72 |
|
|
73 |
virtual const real_t value(const real_t x, |
virtual const real_t value(const real_t x, |
74 |
const real_t y, |
const real_t y, |
75 |
const real_t z) = 0; |
const real_t z) const = 0; |
76 |
|
|
77 |
FunctionExpression(const FunctionExpression& e) |
FunctionExpression(const FunctionExpression& e) |
78 |
: Expression(e), |
: Expression(e), |
101 |
: public FunctionExpression |
: public FunctionExpression |
102 |
{ |
{ |
103 |
private: |
private: |
104 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
105 |
{ |
{ |
106 |
switch(__functionExpressionValue) { |
switch(__functionExpressionValue) { |
107 |
case FunctionExpressionValue::x: { |
case FunctionExpressionValue::x: { |
141 |
|
|
142 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
143 |
const real_t y, |
const real_t y, |
144 |
const real_t z) |
const real_t z) const |
145 |
{ |
{ |
146 |
switch(__functionExpressionValue) { |
switch(__functionExpressionValue) { |
147 |
case FunctionExpressionValue::x: { |
case FunctionExpressionValue::x: { |
195 |
|
|
196 |
mutable real_t __realValue; |
mutable real_t __realValue; |
197 |
|
|
198 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
199 |
{ |
{ |
200 |
os << __realValue; |
os << __realValue; |
201 |
return os; |
return os; |
214 |
|
|
215 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
216 |
const real_t y, |
const real_t y, |
217 |
const real_t z) |
const real_t z) const |
218 |
{ |
{ |
219 |
return __realValue; |
return __realValue; |
220 |
} |
} |
257 |
ReferenceCounting<FunctionExpression> __functionExpressionY; |
ReferenceCounting<FunctionExpression> __functionExpressionY; |
258 |
ReferenceCounting<FunctionExpression> __functionExpressionZ; |
ReferenceCounting<FunctionExpression> __functionExpressionZ; |
259 |
|
|
260 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
261 |
{ |
{ |
262 |
os << (*__function) |
os << (*__function) |
263 |
<< '(' << *__functionExpressionX |
<< '(' << *__functionExpressionX |
274 |
|
|
275 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
276 |
const real_t y, |
const real_t y, |
277 |
const real_t z) |
const real_t z) const |
278 |
{ |
{ |
279 |
const real_t X = (*__functionExpressionX).value(x,y,z); |
const real_t X = (*__functionExpressionX).value(x,y,z); |
280 |
const real_t Y = (*__functionExpressionY).value(x,y,z); |
const real_t Y = (*__functionExpressionY).value(x,y,z); |
336 |
//! The function to derive |
//! The function to derive |
337 |
ReferenceCounting<FunctionExpression> __function; |
ReferenceCounting<FunctionExpression> __function; |
338 |
|
|
339 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
340 |
{ |
{ |
341 |
switch (__direction) { |
switch (__direction) { |
342 |
case (x): { |
case (x): { |
361 |
|
|
362 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
363 |
const real_t y, |
const real_t y, |
364 |
const real_t z); |
const real_t z) const; |
365 |
|
|
366 |
void execute(); |
void execute(); |
367 |
|
|
385 |
|
|
386 |
ReferenceCounting<FunctionExpression> __function; |
ReferenceCounting<FunctionExpression> __function; |
387 |
|
|
388 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
389 |
{ |
{ |
390 |
os << "FEM Function"; |
os << "FEM Function"; |
391 |
return os; |
return os; |
394 |
template <typename MeshType> |
template <typename MeshType> |
395 |
const real_t __evaluate(const real_t x, |
const real_t __evaluate(const real_t x, |
396 |
const real_t y, |
const real_t y, |
397 |
const real_t z); |
const real_t z) const; |
398 |
|
|
399 |
template <typename MeshType> |
template <typename MeshType> |
400 |
const real_t __dx(const double& x, |
const real_t __dx(const double& x, |
424 |
|
|
425 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
426 |
const real_t y, |
const real_t y, |
427 |
const real_t z); |
const real_t z) const; |
428 |
|
|
429 |
const real_t dx(const double& x, |
const real_t dx(const double& x, |
430 |
const double& y, |
const double& y, |
453 |
: public FunctionExpression |
: public FunctionExpression |
454 |
{ |
{ |
455 |
private: |
private: |
456 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
457 |
{ |
{ |
458 |
os << (*__functionExpression); |
os << (*__functionExpression); |
459 |
return os; |
return os; |
475 |
|
|
476 |
ReferenceCounting<FunctionExpression> value(); |
ReferenceCounting<FunctionExpression> value(); |
477 |
|
|
478 |
const ReferenceCounting<FunctionVariable> variable(); |
const ReferenceCounting<FunctionVariable> variable() const; |
479 |
|
|
480 |
|
ReferenceCounting<FunctionVariable> variable(); |
481 |
|
|
482 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
483 |
const real_t y, |
const real_t y, |
484 |
const real_t z); |
const real_t z) const; |
485 |
|
|
486 |
void execute(); |
void execute(); |
487 |
|
|
498 |
: public FunctionExpression |
: public FunctionExpression |
499 |
{ |
{ |
500 |
public: |
public: |
501 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
502 |
{ |
{ |
503 |
os << '(' << (*__f1Value) << __b << (*__f2Value) << ')'; |
os << '(' << (*__f1Value) << __b << (*__f2Value) << ')'; |
504 |
return os; |
return os; |
526 |
|
|
527 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
528 |
const real_t y, |
const real_t y, |
529 |
const real_t z) |
const real_t z) const |
530 |
{ |
{ |
531 |
real_t d1 = (*__f1Value).value(x,y,z); |
real_t d1 = (*__f1Value).value(x,y,z); |
532 |
real_t d2 = (*__f2Value).value(x,y,z); |
real_t d2 = (*__f2Value).value(x,y,z); |
575 |
UnaryOperator __u; |
UnaryOperator __u; |
576 |
ReferenceCounting<FunctionExpression> __r; |
ReferenceCounting<FunctionExpression> __r; |
577 |
|
|
578 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
579 |
{ |
{ |
580 |
os << __u << '(' << (*__r) << ')'; |
os << __u << '(' << (*__r) << ')'; |
581 |
return os; |
return os; |
591 |
|
|
592 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
593 |
const real_t y, |
const real_t y, |
594 |
const real_t z) |
const real_t z) const |
595 |
{ |
{ |
596 |
real_t d = (*__r).value(x,y,z); |
real_t d = (*__r).value(x,y,z); |
597 |
return __u(d); |
return __u(d); |
652 |
//! The obtained function |
//! The obtained function |
653 |
ReferenceCounting<MeshExpression> __mesh; |
ReferenceCounting<MeshExpression> __mesh; |
654 |
|
|
655 |
std::ostream& put(std::ostream& os) |
std::ostream& put(std::ostream& os) const |
656 |
{ |
{ |
657 |
os << "convect(" <<*__convectedFunction << ')'; |
os << "convect(" <<*__convectedFunction << ')'; |
658 |
return os; |
return os; |
663 |
|
|
664 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
665 |
const real_t y, |
const real_t y, |
666 |
const real_t z); |
const real_t z) const; |
667 |
|
|
668 |
void execute(); |
void execute(); |
669 |
|
|
693 |
|
|
694 |
ReferenceCounting<Scene> __scene; |
ReferenceCounting<Scene> __scene; |
695 |
|
|
696 |
std::ostream& put(std::ostream& os); |
std::ostream& put(std::ostream& os) const; |
697 |
|
|
698 |
public: |
public: |
699 |
ReferenceCounting<FunctionExpression> value() |
ReferenceCounting<FunctionExpression> value() |
703 |
|
|
704 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
705 |
const real_t y, |
const real_t y, |
706 |
const real_t z); |
const real_t z) const; |
707 |
|
|
708 |
void execute(); |
void execute(); |
709 |
|
|
722 |
ReferenceCounting<Structured3DMesh> __structMesh; |
ReferenceCounting<Structured3DMesh> __structMesh; |
723 |
ReferenceCounting<MeshExpression> __mesh; |
ReferenceCounting<MeshExpression> __mesh; |
724 |
|
|
725 |
std::ostream& put(std::ostream& os); |
std::ostream& put(std::ostream& os) const; |
726 |
|
|
727 |
public: |
public: |
728 |
ReferenceCounting<FunctionExpression> value() |
ReferenceCounting<FunctionExpression> value() |
732 |
|
|
733 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
734 |
const real_t y, |
const real_t y, |
735 |
const real_t z); |
const real_t z) const; |
736 |
|
|
737 |
void execute(); |
void execute(); |
738 |
|
|
751 |
private: |
private: |
752 |
ReferenceCounting<DomainExpression> __domain; |
ReferenceCounting<DomainExpression> __domain; |
753 |
|
|
754 |
std::ostream& put(std::ostream& os); |
std::ostream& put(std::ostream& os) const; |
755 |
|
|
756 |
public: |
public: |
757 |
ReferenceCounting<FunctionExpression> value() |
ReferenceCounting<FunctionExpression> value() |
761 |
|
|
762 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
763 |
const real_t y, |
const real_t y, |
764 |
const real_t z); |
const real_t z) const; |
765 |
|
|
766 |
void execute(); |
void execute(); |
767 |
|
|
778 |
: public FunctionExpression |
: public FunctionExpression |
779 |
{ |
{ |
780 |
private: |
private: |
781 |
std::ostream& put(std::ostream& os); |
std::ostream& put(std::ostream& os) const; |
782 |
|
|
783 |
ReferenceCounting<FileDescriptor> __fileDescriptor; |
ReferenceCounting<FileDescriptor> __fileDescriptor; |
784 |
|
|
793 |
|
|
794 |
const real_t value(const real_t x, |
const real_t value(const real_t x, |
795 |
const real_t y, |
const real_t y, |
796 |
const real_t z); |
const real_t z) const; |
797 |
|
|
798 |
void execute(); |
void execute(); |
799 |
|
|
837 |
private: |
private: |
838 |
ReferenceCounting<BooleanExpression> __booleanExpression; |
ReferenceCounting<BooleanExpression> __booleanExpression; |
839 |
|
|
840 |
std::ostream& put(std::ostream & os) |
std::ostream& put(std::ostream & os) const |
841 |
{ |
{ |
842 |
os << "Boolean"; |
os << "Boolean"; |
843 |
return os; |
return os; |
847 |
|
|
848 |
ReferenceCounting<FunctionExpression> value(); |
ReferenceCounting<FunctionExpression> value(); |
849 |
|
|
850 |
const real_t value(real_t x, real_t y, real_t z); |
const real_t value(real_t x, real_t y, real_t z) const; |
851 |
|
|
852 |
const bool boolean(real_t x, real_t y, real_t z) const; |
const bool boolean(real_t x, real_t y, real_t z) const; |
853 |
|
|
863 |
: public FunctionExpressionBoolean |
: public FunctionExpressionBoolean |
864 |
{ |
{ |
865 |
private: |
private: |
866 |
std::ostream& put(std::ostream & os) |
std::ostream& put(std::ostream & os) const |
867 |
{ |
{ |
868 |
os << "boolop"; |
os << "boolop"; |
869 |
return os; |
return os; |
888 |
return this; |
return this; |
889 |
} |
} |
890 |
|
|
891 |
const real_t value(real_t x, real_t y, real_t z) |
const real_t value(real_t x, real_t y, real_t z) const |
892 |
{ |
{ |
893 |
return (B((*__f).value(x,y,z), (*__g).value(x,y,z))?1:0); |
return (B((*__f).value(x,y,z), (*__g).value(x,y,z))?1:0); |
894 |
} |
} |
919 |
: public FunctionExpressionBoolean |
: public FunctionExpressionBoolean |
920 |
{ |
{ |
921 |
private: |
private: |
922 |
std::ostream& put(std::ostream & os) |
std::ostream& put(std::ostream & os) const |
923 |
{ |
{ |
924 |
os << __FILE__ << ':' << __LINE__ << "NOT IMPLEMENTED\n"; |
os << __FILE__ << ':' << __LINE__ << "NOT IMPLEMENTED\n"; |
925 |
return os; |
return os; |
934 |
return this; |
return this; |
935 |
} |
} |
936 |
|
|
937 |
const real_t value(real_t x, real_t y, real_t z) |
const real_t value(real_t x, real_t y, real_t z) const |
938 |
{ |
{ |
939 |
return (boolean(x,y,z))?1.:0.; |
return (boolean(x,y,z))?1.:0.; |
940 |
} |
} |
977 |
{ |
{ |
978 |
private: |
private: |
979 |
|
|
980 |
std::ostream& put(std::ostream & os) |
std::ostream& put(std::ostream & os) const |
981 |
{ |
{ |
982 |
os << __FILE__ << ':' << __LINE__ << "NOT IMPLEMENTED\n"; |
os << __FILE__ << ':' << __LINE__ << "NOT IMPLEMENTED\n"; |
983 |
return os; |
return os; |
992 |
return this; |
return this; |
993 |
} |
} |
994 |
|
|
995 |
const real_t value(real_t x, real_t y, real_t z) |
const real_t value(real_t x, real_t y, real_t z) const |
996 |
{ |
{ |
997 |
return (1-(*__r).value(x,y,z)); |
return (1-(*__r).value(x,y,z)); |
998 |
} |
} |