#include <FunctionExpressionDG.hpp>


Definition at line 37 of file FunctionExpressionDG.hpp.
enum FunctionExpression::FunctionType [inherited] |
functions types ids
Definition at line 42 of file FunctionExpression.hpp.
00042 { 00043 constant, 00044 linearBase, 00045 normalComponent, 00046 fem, 00047 dg, 00048 spectral, 00049 derivative, 00050 meshReferences, 00051 composed, 00052 variable, 00053 cfunction, 00054 binaryOperation, 00055 unaryMinus, 00056 convection, 00057 00058 objectCharacteristic, 00059 meshCharacteristic, 00060 domainCharacteristic, 00061 00062 read, 00063 functionValue, 00064 not_, 00065 integrate 00066 };
enum Expression::Type [inherited] |
Reimplemented in IFStreamExpression, OFStreamExpression, and UnknownExpression.
Definition at line 42 of file Expression.hpp.
00042 { 00043 boolean, 00044 boundary, 00045 boundaryCondition, 00046 boundaryConditionList, 00047 00048 domain, 00049 00050 field, 00051 fieldlist, 00052 function, 00053 00054 ifstreamexpression, 00055 integrated, 00056 integratedOperator, 00057 insideExpression, 00058 insideListExpression, 00059 istreamexpression, 00060 istreamExpressionList, 00061 00062 linearExp, 00063 00064 mesh, 00065 multiLinearExp, 00066 multiLinearExpSum, 00067 multiLinearForm, 00068 multiLinearFormSum, 00069 00070 ofstreamexpression, 00071 option, 00072 ostreamexpression, 00073 ostreamExpressionList, 00074 00075 pdeEquation, 00076 pdeOperator, 00077 pdeOperatorSum, 00078 pdeProblem, 00079 problem, 00080 00081 real, 00082 00083 scene, 00084 solver, 00085 solverOptions, 00086 string, 00087 subOption, 00088 subOptionList, 00089 00090 testFunctionList, 00091 00092 unknown, 00093 unknownList, 00094 00095 variationalFormula, 00096 variationalBilinearOperator, 00097 variationalLinearOperator, 00098 variationalDirichlet, 00099 vector3 00100 };
| FunctionExpressionDG::FunctionExpressionDG | ( | ReferenceCounting< MeshExpression > | mesh, | |
| ReferenceCounting< FunctionExpression > | e, | |||
| const ScalarDiscretizationTypeBase::Type & | femType | |||
| ) |
Constructor
| mesh | mesh of discretization | |
| e | expression of the function | |
| femType | discretization type |
Definition at line 86 of file FunctionExpressionDG.cpp.
00089 : FunctionExpression(FunctionExpression::dg), 00090 __discretizationType(__DGTypeFromFEMType(discretizationType)), 00091 __mesh(mesh), 00092 __functionExpression(function) 00093 { 00094 ; 00095 }
| FunctionExpressionDG::FunctionExpressionDG | ( | const FunctionExpressionDG & | f | ) |
Copy constructor
| f | given finite element function expression |
Definition at line 98 of file FunctionExpressionDG.cpp.
00099 : FunctionExpression(dgFunction), 00100 __discretizationType(dgFunction.__discretizationType), 00101 __mesh(dgFunction.__mesh), 00102 __functionExpression(dgFunction.__functionExpression) 00103 { 00104 ; 00105 }
| FunctionExpressionDG::~FunctionExpressionDG | ( | ) |
| ScalarDiscretizationTypeBase::Type FunctionExpressionDG::__DGTypeFromFEMType | ( | const ScalarDiscretizationTypeBase::Type & | d | ) | [static, private] |
Converts FEM type to DG type
| d | given fem type |
Definition at line 64 of file FunctionExpressionDG.cpp.
References ScalarDiscretizationTypeBase::DGFEM0, ScalarDiscretizationTypeBase::DGFEM1, ScalarDiscretizationTypeBase::DGFEM2, ScalarDiscretizationTypeBase::lagrangianFEM0, ScalarDiscretizationTypeBase::lagrangianFEM1, ScalarDiscretizationTypeBase::lagrangianFEM2, ScalarDiscretizationTypeBase::name(), and ErrorHandler::unexpected.
00065 { 00066 switch(d) { 00067 case ScalarDiscretizationTypeBase::lagrangianFEM0: { 00068 return ScalarDiscretizationTypeBase::DGFEM0; 00069 } 00070 case ScalarDiscretizationTypeBase::lagrangianFEM1: { 00071 return ScalarDiscretizationTypeBase::DGFEM1; 00072 } 00073 case ScalarDiscretizationTypeBase::lagrangianFEM2: { 00074 return ScalarDiscretizationTypeBase::DGFEM2; 00075 } 00076 default: { 00077 throw ErrorHandler(__FILE__,__LINE__, 00078 "cannot convert '"+ScalarDiscretizationTypeBase::name(d) 00079 +"' to a Discontinuous Galerkin type", 00080 ErrorHandler::unexpected); 00081 } 00082 } 00083 }

| ReferenceCounting<MeshExpression> FunctionExpressionDG::mesh | ( | ) | const [inline] |
Access to the mesh
Definition at line 70 of file FunctionExpressionDG.hpp.
References __mesh.
00071 { 00072 #warning SHOULD NOT USE THIS FUNCTION 00073 return __mesh; 00074 }
| void FunctionExpressionDG::execute | ( | ) | [virtual] |
Executes the expression
Implements Expression.
Definition at line 36 of file FunctionExpressionDG.cpp.
References __discretizationType, __functionExpression, __mesh, FunctionExpression::__scalarFunction, DGFunctionBuilder::build(), DGFunctionBuilder::getBuiltScalarFunction(), StaticBase< Information >::instance(), Information::setMesh(), and Information::unsetMesh().
00037 { 00038 __mesh->execute(); 00039 00040 Information::instance().setMesh(__mesh->mesh()); 00041 00042 DGFunctionBuilder builder; 00043 00044 if (__functionExpression != 0) { 00045 __functionExpression->execute(); 00046 00047 builder.build(ScalarDiscretizationTypeDG(__discretizationType), 00048 __mesh->mesh(), 00049 *(__functionExpression->function())); 00050 } else { 00051 builder.build(ScalarDiscretizationTypeDG(__discretizationType), 00052 __mesh->mesh()); 00053 } 00054 00055 __scalarFunction = builder.getBuiltScalarFunction(); 00056 00057 // function has now been evaluated. 00058 __functionExpression = 0; 00059 Information::instance().unsetMesh(); 00060 }

| std::ostream & FunctionExpression::put | ( | std::ostream & | os | ) | const [protected, virtual, inherited] |
Specialization of the put function
| os | the stream |
Implements Expression.
Reimplemented in FunctionExpressionConvection, FunctionExpressionDomainCharacteristic, FunctionExpressionMeshCharacteristic, FunctionExpressionMeshReferences, and FunctionExpressionVariable.
Definition at line 28 of file FunctionExpression.cpp.
References FunctionExpression::__scalarFunction.
00029 { 00030 os << *__scalarFunction; 00031 return os; 00032 }
| bool FunctionExpression::hasBoundaryExpression | ( | ) | const [virtual, inherited] |
Returns true if the functions has a boundary
Reimplemented in FunctionExpressionBinaryOperation, FunctionExpressionComposed, FunctionExpressionConvection, FunctionExpressionDerivative, FunctionExpressionNormalComponent, FunctionExpressionNot, FunctionExpressionUnaryMinus, FunctionExpressionValue, and FunctionExpressionVariable.
Definition at line 36 of file FunctionExpression.cpp.
Referenced by RealExpressionIntegrate::execute(), and FunctionExpression::value().
| const FunctionExpression::FunctionType & FunctionExpression::type | ( | ) | const [inherited] |
Read only access to the type of the function
Reimplemented from Expression.
Definition at line 43 of file FunctionExpression.cpp.
References FunctionExpression::__type.
00044 { 00045 return __type; 00046 }
| ConstReferenceCounting< ScalarFunctionBase > FunctionExpression::function | ( | ) | const [inherited] |
Access to the scalar function
Definition at line 50 of file FunctionExpression.cpp.
References FunctionExpression::__scalarFunction, and ASSERT.
Referenced by RealExpressionIntegrate::__integrate(), FunctionExpressionMeshReferences::ReferencesSet::add(), RealExpressionIntegrate::execute(), and FunctionExpressionVariable::execute().
00051 { 00052 ASSERT(__scalarFunction != 0); 00053 return __scalarFunction; 00054 }
| ReferenceCounting< FunctionExpression > FunctionExpression::value | ( | ) | [inherited] |
Access the value of the function expression
Definition at line 58 of file FunctionExpression.cpp.
References FunctionExpression::__scalarFunction, ASSERT, and FunctionExpression::hasBoundaryExpression().
00059 { 00060 ASSERT(__scalarFunction != 0); 00061 return new FunctionExpressionValue(__scalarFunction, 00062 this->hasBoundaryExpression()); 00063 }

| static Expression::Type Expression::getType | ( | ReferenceCounting< Expression > | e1, | |
| ReferenceCounting< Expression > | e2 | |||
| ) | [inline, static, protected, inherited] |
Traits conversion of types.
Definition at line 112 of file Expression.hpp.
References Expression::real.
00114 { 00115 return Expression::real; 00116 }
| virtual std::istream& Expression::_get | ( | std::istream & | is | ) | [inline, protected, virtual, inherited] |
Read *this to the input is.
Reimplemented in IStreamExpressionList, and RealExpressionVariable.
Definition at line 122 of file Expression.hpp.
References ErrorHandler::normal.
00123 { 00124 throw ErrorHandler(__FILE__,__LINE__, 00125 "operator >> is not supported for this expression", 00126 ErrorHandler::normal); 00127 return is; 00128 }
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Expression & | e | |||
| ) | [friend, inherited] |
this function allows to output expressions.
Definition at line 143 of file Expression.hpp.
00144 { 00145 return e.put(os); 00146 }
| std::istream& operator>> | ( | std::istream & | is, | |
| Expression & | e | |||
| ) | [friend, inherited] |
this function allows to read expressions from streams
Definition at line 149 of file Expression.hpp.
00150 { 00151 return e._get(is); 00152 }
type of discretization
Definition at line 42 of file FunctionExpressionDG.hpp.
Referenced by execute().
mesh of discretization
Definition at line 45 of file FunctionExpressionDG.hpp.
expression defining the function
Definition at line 48 of file FunctionExpressionDG.hpp.
Referenced by execute().
ConstReferenceCounting<ScalarFunctionBase> FunctionExpression::__scalarFunction [protected, inherited] |
The function associated to the expression
Definition at line 73 of file FunctionExpression.hpp.
Referenced by FunctionExpressionVariable::execute(), FunctionExpressionUnaryMinus::execute(), FunctionExpressionSpectral::execute(), FunctionExpressionRead::execute(), FunctionExpressionObjectCharacteristic::execute(), FunctionExpressionNot::execute(), FunctionExpressionNormalComponent::execute(), FunctionExpressionMeshReferences::execute(), FunctionExpressionMeshCharacteristic::execute(), FunctionExpressionLinearBasis::execute(), FunctionExpressionIntegrate::execute(), FunctionExpressionFEM::execute(), FunctionExpressionDomainCharacteristic::execute(), execute(), FunctionExpressionDerivative::execute(), FunctionExpressionConvection::execute(), FunctionExpressionConstant::execute(), FunctionExpressionComposed::execute(), FunctionExpressionCFunction::execute(), FunctionExpressionBinaryOperation::execute(), FunctionExpression::function(), FunctionExpressionValue::FunctionExpressionValue(), FunctionExpressionConvection::put(), FunctionExpression::put(), and FunctionExpression::value().
1.5.6