Loading src/functions/tnlBoundaryOperatorFunction.h +4 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #ifndef TNLBOUNDARYOPERATORFUNCTION_H #define TNLBOUNDARYOPERATORFUNCTION_H #include <functions/tnlFunction.h> /*** * This class evaluates given operator on given function. * The main role of this type is that the mesh function evaluator Loading @@ -26,6 +28,7 @@ template< typename BoundaryOperator, typename Function > class tnlBoundaryOperatorFunction : public tnlFunction< BoundaryOperator::MeshType::meshDimensions, MeshFunction > { public: Loading @@ -43,7 +46,7 @@ class tnlBoundaryOperatorFunction __cuda_callable__ RealType operator()( const MeshEntity& meshEntity, const RealType& time ) const RealType& time ) const { return boundaryOperator->getValue( meshEntity, function->getData(), time ); } Loading src/functions/tnlExactOperatorFunction.h +3 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ class tnlExactOperatorFunction : public tnlFunction< Operator::Dimensions, Analy typedef Operator OperatorType; typedef Function FunctionType; typedef typename FunctionType::RealType RealType; typedef typename FunctionType::VertexType VertexType; tnlExactOperatorFunction( const OperatorType& operator_, Loading @@ -37,7 +39,7 @@ class tnlExactOperatorFunction : public tnlFunction< Operator::Dimensions, Analy template< typename VertexType, typename RealType = typename VertexType::RealType > __cuda_callable__ RealType operator()( RealType getValue( const VertexType& vertex, const RealType& time ) const { Loading src/functions/tnlFunctionAdapter.h +1 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ */ template< typename Mesh, typename Function, //tnlFunctionType functionType = Function::functionType > int functionType = Function::getFunctionType() > class tnlFunctionAdapter { Loading Loading @@ -80,7 +79,7 @@ class tnlFunctionAdapter< Mesh, Function, MeshFunction > const EntityType& meshEntity, const RealType& time ) { return function( meshEntity ); return function( meshEntity, time ); } }; Loading src/functions/tnlMeshFunctionEvaluator.h +5 −9 Original line number Diff line number Diff line Loading @@ -93,7 +93,6 @@ class tnlMeshFunctionEvaluator : public tnlFunction< OutMeshFunction::getMeshEnt outFunctionMultiplicator( outFunctionMultiplicator ), inFunctionMultiplicator( inFunctionMultiplicator ){} protected: OutMeshFunction* meshFunction; const InFunction* function; const RealType *time, *outFunctionMultiplicator, *inFunctionMultiplicator; Loading Loading @@ -146,13 +145,12 @@ class tnlMeshFunctionEvaluator< OutMeshFunction, tnlOperatorFunction< Operator, OutMeshFunction* meshFunction, const RealType* outFunctionMultiplicator, const RealType* inFunctionMultiplicator ) : meshFunction( meshFunction ), operatorFunction( operatorFunction ),time( time ), : meshFunction( meshFunction ), function( operatorFunction ),time( time ), outFunctionMultiplicator( outFunctionMultiplicator ), inFunctionMultiplicator( inFunctionMultiplicator ){} protected: OutMeshFunction* meshFunction; const OperatorFunctionType* operatorFunction; const OperatorFunctionType* function; const RealType *time, *outFunctionMultiplicator, *inFunctionMultiplicator; }; Loading Loading @@ -181,8 +179,7 @@ class tnlMeshFunctionEvaluator< OutMeshFunction, tnlBoundaryOperatorFunction< Bo typedef tnlBoundaryOperatorFunction< BoundaryOperator, Function > BoundaryOperatorFunctionType; static_assert( std::is_same < MeshType, typename BoundaryOperatorFunctionType::MeshType >::value, "Input function and the mesh of the mesh function have both different number of dimensions." ); "Input boundary operator mesh type and the output mesh function mesh are different types." ); /*** * Evaluate on boundary mesh entities Loading @@ -209,13 +206,12 @@ class tnlMeshFunctionEvaluator< OutMeshFunction, tnlBoundaryOperatorFunction< Bo OutMeshFunction* meshFunction, const RealType* outFunctionMultiplicator, const RealType* inFunctionMultiplicator ) : meshFunction( meshFunction ), operatorFunction( operatorFunction ), time( time ), : meshFunction( meshFunction ), function( operatorFunction ), time( time ), outFunctionMultiplicator( outFunctionMultiplicator ), inFunctionMultiplicator( inFunctionMultiplicator ){} protected: OutMeshFunction* meshFunction; const BoundaryOperatorFunctionType* operatorFunction; const BoundaryOperatorFunctionType* function; const RealType *time, *outFunctionMultiplicator, *inFunctionMultiplicator; }; Loading src/functions/tnlOperatorFunction.h +2 −2 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ class tnlOperatorFunction : public tnlFunction< Operator::getMeshEntityDimension __cuda_callable__ RealType operator()( const MeshEntity& meshEntity, const RealType& time ) const RealType& time = 0 ) const { return operator_->getValue( meshEntity, function->getData(), time ); return operator_->getValue( meshEntity, *function, time ); } protected: Loading Loading
src/functions/tnlBoundaryOperatorFunction.h +4 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #ifndef TNLBOUNDARYOPERATORFUNCTION_H #define TNLBOUNDARYOPERATORFUNCTION_H #include <functions/tnlFunction.h> /*** * This class evaluates given operator on given function. * The main role of this type is that the mesh function evaluator Loading @@ -26,6 +28,7 @@ template< typename BoundaryOperator, typename Function > class tnlBoundaryOperatorFunction : public tnlFunction< BoundaryOperator::MeshType::meshDimensions, MeshFunction > { public: Loading @@ -43,7 +46,7 @@ class tnlBoundaryOperatorFunction __cuda_callable__ RealType operator()( const MeshEntity& meshEntity, const RealType& time ) const RealType& time ) const { return boundaryOperator->getValue( meshEntity, function->getData(), time ); } Loading
src/functions/tnlExactOperatorFunction.h +3 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ class tnlExactOperatorFunction : public tnlFunction< Operator::Dimensions, Analy typedef Operator OperatorType; typedef Function FunctionType; typedef typename FunctionType::RealType RealType; typedef typename FunctionType::VertexType VertexType; tnlExactOperatorFunction( const OperatorType& operator_, Loading @@ -37,7 +39,7 @@ class tnlExactOperatorFunction : public tnlFunction< Operator::Dimensions, Analy template< typename VertexType, typename RealType = typename VertexType::RealType > __cuda_callable__ RealType operator()( RealType getValue( const VertexType& vertex, const RealType& time ) const { Loading
src/functions/tnlFunctionAdapter.h +1 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ */ template< typename Mesh, typename Function, //tnlFunctionType functionType = Function::functionType > int functionType = Function::getFunctionType() > class tnlFunctionAdapter { Loading Loading @@ -80,7 +79,7 @@ class tnlFunctionAdapter< Mesh, Function, MeshFunction > const EntityType& meshEntity, const RealType& time ) { return function( meshEntity ); return function( meshEntity, time ); } }; Loading
src/functions/tnlMeshFunctionEvaluator.h +5 −9 Original line number Diff line number Diff line Loading @@ -93,7 +93,6 @@ class tnlMeshFunctionEvaluator : public tnlFunction< OutMeshFunction::getMeshEnt outFunctionMultiplicator( outFunctionMultiplicator ), inFunctionMultiplicator( inFunctionMultiplicator ){} protected: OutMeshFunction* meshFunction; const InFunction* function; const RealType *time, *outFunctionMultiplicator, *inFunctionMultiplicator; Loading Loading @@ -146,13 +145,12 @@ class tnlMeshFunctionEvaluator< OutMeshFunction, tnlOperatorFunction< Operator, OutMeshFunction* meshFunction, const RealType* outFunctionMultiplicator, const RealType* inFunctionMultiplicator ) : meshFunction( meshFunction ), operatorFunction( operatorFunction ),time( time ), : meshFunction( meshFunction ), function( operatorFunction ),time( time ), outFunctionMultiplicator( outFunctionMultiplicator ), inFunctionMultiplicator( inFunctionMultiplicator ){} protected: OutMeshFunction* meshFunction; const OperatorFunctionType* operatorFunction; const OperatorFunctionType* function; const RealType *time, *outFunctionMultiplicator, *inFunctionMultiplicator; }; Loading Loading @@ -181,8 +179,7 @@ class tnlMeshFunctionEvaluator< OutMeshFunction, tnlBoundaryOperatorFunction< Bo typedef tnlBoundaryOperatorFunction< BoundaryOperator, Function > BoundaryOperatorFunctionType; static_assert( std::is_same < MeshType, typename BoundaryOperatorFunctionType::MeshType >::value, "Input function and the mesh of the mesh function have both different number of dimensions." ); "Input boundary operator mesh type and the output mesh function mesh are different types." ); /*** * Evaluate on boundary mesh entities Loading @@ -209,13 +206,12 @@ class tnlMeshFunctionEvaluator< OutMeshFunction, tnlBoundaryOperatorFunction< Bo OutMeshFunction* meshFunction, const RealType* outFunctionMultiplicator, const RealType* inFunctionMultiplicator ) : meshFunction( meshFunction ), operatorFunction( operatorFunction ), time( time ), : meshFunction( meshFunction ), function( operatorFunction ), time( time ), outFunctionMultiplicator( outFunctionMultiplicator ), inFunctionMultiplicator( inFunctionMultiplicator ){} protected: OutMeshFunction* meshFunction; const BoundaryOperatorFunctionType* operatorFunction; const BoundaryOperatorFunctionType* function; const RealType *time, *outFunctionMultiplicator, *inFunctionMultiplicator; }; Loading
src/functions/tnlOperatorFunction.h +2 −2 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ class tnlOperatorFunction : public tnlFunction< Operator::getMeshEntityDimension __cuda_callable__ RealType operator()( const MeshEntity& meshEntity, const RealType& time ) const RealType& time = 0 ) const { return operator_->getValue( meshEntity, function->getData(), time ); return operator_->getValue( meshEntity, *function, time ); } protected: Loading