Loading src/functions/CMakeLists.txt +2 −4 Original line number Diff line number Diff line ADD_SUBDIRECTORY( initial_conditions ) SET( headers tnlFunctionDiscretizer.h tnlFunctionDiscretizer_impl.h tnlFunctionEvaluator.h SET( headers tnlFunctionEvaluator.h tnlFunctionEvaluator_impl.h tnlFunctionAdapter.h tnlConstantFunction.h Loading @@ -14,7 +12,7 @@ SET( headers tnlFunctionDiscretizer.h tnlSinWaveFunction.h tnlSinWaveFunction_impl.h tnlTestFunction.h tnlFunction.h tnlDomain.h tnlTestFunction_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/functions ) Loading src/functions/initial_conditions/level_set_functions/tnlBlobFunction.h +25 −18 Original line number Diff line number Diff line Loading @@ -61,16 +61,18 @@ class tnlBlobFunction< 1, Real > : public tnlBlobFunctionBase< Real, 1 > #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading @@ -90,17 +92,20 @@ class tnlBlobFunction< 2, Real > : public tnlBlobFunctionBase< Real, 2 > #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; template< typename Real > Loading @@ -119,16 +124,18 @@ class tnlBlobFunction< 3, Real > : public tnlBlobFunctionBase< Real, 3 > #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading src/functions/initial_conditions/level_set_functions/tnlBlobFunction_impl.h +41 −14 Original line number Diff line number Diff line Loading @@ -51,11 +51,11 @@ tnlBlobFunction< 1, Real >::tnlBlobFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlBlobFunction< 1, Real >::getValue( const Vertex& v, tnlBlobFunction< 1, Real >:: getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -66,10 +66,19 @@ tnlBlobFunction< 1, Real >::getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlBlobFunction< 1, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 2D */ template< typename Real > tnlString tnlBlobFunction< 2, Real >::getType() Loading @@ -85,12 +94,11 @@ tnlBlobFunction< 2, Real >::tnlBlobFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlBlobFunction< 2, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -102,10 +110,19 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlBlobFunction< 2, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 3D */ template< typename Real > tnlString tnlBlobFunction< 3, Real >::getType() Loading @@ -121,12 +138,11 @@ tnlBlobFunction< 3, Real >::tnlBlobFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlBlobFunction< 3, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -137,4 +153,15 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlBlobFunction< 3, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } #endif /* TNLBLOBFUNCTION_IMPL_H_ */ src/functions/initial_conditions/level_set_functions/tnlPseudoSquareFunction.h +25 −18 Original line number Diff line number Diff line Loading @@ -61,16 +61,18 @@ class tnlPseudoSquareFunction< 1, Real > : public tnlPseudoSquareFunctionBase< R #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading @@ -90,16 +92,18 @@ class tnlPseudoSquareFunction< 2, Real > : public tnlPseudoSquareFunctionBase< R #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading @@ -119,17 +123,20 @@ class tnlPseudoSquareFunction< 3, Real > : public tnlPseudoSquareFunctionBase< R #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; template< int Dimensions, Loading src/functions/initial_conditions/level_set_functions/tnlPseudoSquareFunction_impl.h +39 −14 Original line number Diff line number Diff line Loading @@ -52,11 +52,11 @@ tnlPseudoSquareFunction< 1, Real >::tnlPseudoSquareFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlPseudoSquareFunction< 1, Real >::getValue( const Vertex& v, tnlPseudoSquareFunction< 1, Real >:: getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -67,10 +67,19 @@ tnlPseudoSquareFunction< 1, Real >::getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlPseudoSquareFunction< 1, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 2D */ template< typename Real > tnlString tnlPseudoSquareFunction< 2, Real >::getType() Loading @@ -86,12 +95,11 @@ tnlPseudoSquareFunction< 2, Real >::tnlPseudoSquareFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlPseudoSquareFunction< 2, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -103,10 +111,19 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlPseudoSquareFunction< 2, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 3D */ template< typename Real > tnlString tnlPseudoSquareFunction< 3, Real >::getType() Loading @@ -122,12 +139,11 @@ tnlPseudoSquareFunction< 3, Real >::tnlPseudoSquareFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlPseudoSquareFunction< 3, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -138,5 +154,14 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlPseudoSquareFunction< 3, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } #endif /* TNLPSEUDOSQUAREFUNCTION_IMPL_H_ */ Loading
src/functions/CMakeLists.txt +2 −4 Original line number Diff line number Diff line ADD_SUBDIRECTORY( initial_conditions ) SET( headers tnlFunctionDiscretizer.h tnlFunctionDiscretizer_impl.h tnlFunctionEvaluator.h SET( headers tnlFunctionEvaluator.h tnlFunctionEvaluator_impl.h tnlFunctionAdapter.h tnlConstantFunction.h Loading @@ -14,7 +12,7 @@ SET( headers tnlFunctionDiscretizer.h tnlSinWaveFunction.h tnlSinWaveFunction_impl.h tnlTestFunction.h tnlFunction.h tnlDomain.h tnlTestFunction_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/functions ) Loading
src/functions/initial_conditions/level_set_functions/tnlBlobFunction.h +25 −18 Original line number Diff line number Diff line Loading @@ -61,16 +61,18 @@ class tnlBlobFunction< 1, Real > : public tnlBlobFunctionBase< Real, 1 > #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading @@ -90,17 +92,20 @@ class tnlBlobFunction< 2, Real > : public tnlBlobFunctionBase< Real, 2 > #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; template< typename Real > Loading @@ -119,16 +124,18 @@ class tnlBlobFunction< 3, Real > : public tnlBlobFunctionBase< Real, 3 > #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading
src/functions/initial_conditions/level_set_functions/tnlBlobFunction_impl.h +41 −14 Original line number Diff line number Diff line Loading @@ -51,11 +51,11 @@ tnlBlobFunction< 1, Real >::tnlBlobFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlBlobFunction< 1, Real >::getValue( const Vertex& v, tnlBlobFunction< 1, Real >:: getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -66,10 +66,19 @@ tnlBlobFunction< 1, Real >::getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlBlobFunction< 1, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 2D */ template< typename Real > tnlString tnlBlobFunction< 2, Real >::getType() Loading @@ -85,12 +94,11 @@ tnlBlobFunction< 2, Real >::tnlBlobFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlBlobFunction< 2, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -102,10 +110,19 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlBlobFunction< 2, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 3D */ template< typename Real > tnlString tnlBlobFunction< 3, Real >::getType() Loading @@ -121,12 +138,11 @@ tnlBlobFunction< 3, Real >::tnlBlobFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlBlobFunction< 3, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -137,4 +153,15 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlBlobFunction< 3, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } #endif /* TNLBLOBFUNCTION_IMPL_H_ */
src/functions/initial_conditions/level_set_functions/tnlPseudoSquareFunction.h +25 −18 Original line number Diff line number Diff line Loading @@ -61,16 +61,18 @@ class tnlPseudoSquareFunction< 1, Real > : public tnlPseudoSquareFunctionBase< R #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading @@ -90,16 +92,18 @@ class tnlPseudoSquareFunction< 2, Real > : public tnlPseudoSquareFunctionBase< R #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; Loading @@ -119,17 +123,20 @@ class tnlPseudoSquareFunction< 3, Real > : public tnlPseudoSquareFunctionBase< R #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > int ZDiffOrder = 0 > #endif __cuda_callable__ RealType getValue( const Vertex& v, RealType getPartialDerivative( const VertexType& v, const Real& time = 0.0 ) const; __cuda_callable__ RealType operator()( const VertexType& v, const Real& time = 0.0 ) const; }; template< int Dimensions, Loading
src/functions/initial_conditions/level_set_functions/tnlPseudoSquareFunction_impl.h +39 −14 Original line number Diff line number Diff line Loading @@ -52,11 +52,11 @@ tnlPseudoSquareFunction< 1, Real >::tnlPseudoSquareFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlPseudoSquareFunction< 1, Real >::getValue( const Vertex& v, tnlPseudoSquareFunction< 1, Real >:: getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -67,10 +67,19 @@ tnlPseudoSquareFunction< 1, Real >::getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlPseudoSquareFunction< 1, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 2D */ template< typename Real > tnlString tnlPseudoSquareFunction< 2, Real >::getType() Loading @@ -86,12 +95,11 @@ tnlPseudoSquareFunction< 2, Real >::tnlPseudoSquareFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlPseudoSquareFunction< 2, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -103,10 +111,19 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlPseudoSquareFunction< 2, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } /**** * 3D */ template< typename Real > tnlString tnlPseudoSquareFunction< 3, Real >::getType() Loading @@ -122,12 +139,11 @@ tnlPseudoSquareFunction< 3, Real >::tnlPseudoSquareFunction() template< typename Real > template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > int ZDiffOrder > __cuda_callable__ Real tnlPseudoSquareFunction< 3, Real >:: getValue( const Vertex& v, getPartialDerivative( const VertexType& v, const Real& time ) const { const RealType& x = v.x(); Loading @@ -138,5 +154,14 @@ getValue( const Vertex& v, return 0.0; } template< typename Real > __cuda_callable__ Real tnlPseudoSquareFunction< 3, Real >:: operator()( const VertexType& v, const Real& time ) const { return this->template getPartialDerivative< 0, 0, 0 >( v, time ); } #endif /* TNLPSEUDOSQUAREFUNCTION_IMPL_H_ */