Loading src/functions/CMakeLists.txt +3 −1 Original line number Diff line number Diff line ADD_SUBDIRECTORY( initial_conditions ) SET( headers tnlFunctionDiscretizer.h tnlFunctionDiscretizer_impl.h tnlFunctionAdapter.h Loading src/functions/initial_conditions/CMakeLists.txt 0 → 100755 +5 −0 Original line number Diff line number Diff line SET( headers tnlCylinderFunction.h tnlCylinderFunction_impl.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/functions/initial_conditions ) src/functions/initial_conditions/CMakeLists.txt~ 0 → 100755 +5 −0 Original line number Diff line number Diff line SET( headers tnlCylinderFunction.h tnlCylinderFunction_impl.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/problems ) src/functions/initial_conditions/tnlCylinderFunction.h 0 → 100644 +164 −0 Original line number Diff line number Diff line /*************************************************************************** tnlExpBumpFunction.h - description ------------------- begin : Dec 5, 2013 copyright : (C) 2013 by Tomas Oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLCYLINDERFUNCTION_H_ #define TNLCYLINDERFUNCTION_H_ #include <config/tnlParameterContainer.h> #include <core/vectors/tnlStaticVector.h> #include <functions/tnlFunctionType.h> template< typename Real > class tnlCylinderFunctionBase { public: typedef Real RealType; bool setup( const tnlParameterContainer& parameters, const tnlString& prefix = "" ); void setDiameter( const RealType& sigma ); const RealType& getDiameter() const; protected: RealType diameter; }; template< int Dimensions, typename Real > class tnlCylinderFunction { }; template< typename Real > class tnlCylinderFunction< 1, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 1 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 2, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 2 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 3, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 3 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlExpBumpFunction< Dimensions, Real >& f ) { str << "Cylinder.; return str; } template< int FunctionDimensions, typename Real > class tnlFunctionType< tnlCylinderFunction< FunctionDimensions, Real > > { public: enum { Type = tnlAnalyticFunction }; }; #include <functions/tnlCylinderFunction_impl.h> #endif /* TNLEXPBUMPFUNCTION_H_ */ src/functions/initial_conditions/tnlCylinderFunction.h~ 0 → 100644 +164 −0 Original line number Diff line number Diff line /*************************************************************************** tnlExpBumpFunction.h - description ------------------- begin : Dec 5, 2013 copyright : (C) 2013 by Tomas Oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLCYLINDERFUNCTION_H_ #define TNLCYLINDERFUNCTION_H_ #include <config/tnlParameterContainer.h> #include <core/vectors/tnlStaticVector.h> #include <functions/tnlFunctionType.h> template< typename Real > class tnlCylinderFunctionBase { public: typedef Real RealType; bool setup( const tnlParameterContainer& parameters, const tnlString& prefix = "" ); void setDiameter( const RealType& sigma ); const RealType& getDiameter() const; protected: RealType amplitude, sigma; }; template< int Dimensions, typename Real > class tnlCylinderFunction { }; template< typename Real > class tnlCylinderFunction< 1, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 1 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 2, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 2 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 3, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 3 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlExpBumpFunction< Dimensions, Real >& f ) { str << "Cylinder.; return str; } template< int FunctionDimensions, typename Real > class tnlFunctionType< tnlCylinderFunction< FunctionDimensions, Real > > { public: enum { Type = tnlAnalyticFunction }; }; #include <functions/tnlCylinderFunction_impl.h> #endif /* TNLEXPBUMPFUNCTION_H_ */ Loading
src/functions/CMakeLists.txt +3 −1 Original line number Diff line number Diff line ADD_SUBDIRECTORY( initial_conditions ) SET( headers tnlFunctionDiscretizer.h tnlFunctionDiscretizer_impl.h tnlFunctionAdapter.h Loading
src/functions/initial_conditions/CMakeLists.txt 0 → 100755 +5 −0 Original line number Diff line number Diff line SET( headers tnlCylinderFunction.h tnlCylinderFunction_impl.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/functions/initial_conditions )
src/functions/initial_conditions/CMakeLists.txt~ 0 → 100755 +5 −0 Original line number Diff line number Diff line SET( headers tnlCylinderFunction.h tnlCylinderFunction_impl.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/problems )
src/functions/initial_conditions/tnlCylinderFunction.h 0 → 100644 +164 −0 Original line number Diff line number Diff line /*************************************************************************** tnlExpBumpFunction.h - description ------------------- begin : Dec 5, 2013 copyright : (C) 2013 by Tomas Oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLCYLINDERFUNCTION_H_ #define TNLCYLINDERFUNCTION_H_ #include <config/tnlParameterContainer.h> #include <core/vectors/tnlStaticVector.h> #include <functions/tnlFunctionType.h> template< typename Real > class tnlCylinderFunctionBase { public: typedef Real RealType; bool setup( const tnlParameterContainer& parameters, const tnlString& prefix = "" ); void setDiameter( const RealType& sigma ); const RealType& getDiameter() const; protected: RealType diameter; }; template< int Dimensions, typename Real > class tnlCylinderFunction { }; template< typename Real > class tnlCylinderFunction< 1, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 1 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 2, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 2 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 3, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 3 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlExpBumpFunction< Dimensions, Real >& f ) { str << "Cylinder.; return str; } template< int FunctionDimensions, typename Real > class tnlFunctionType< tnlCylinderFunction< FunctionDimensions, Real > > { public: enum { Type = tnlAnalyticFunction }; }; #include <functions/tnlCylinderFunction_impl.h> #endif /* TNLEXPBUMPFUNCTION_H_ */
src/functions/initial_conditions/tnlCylinderFunction.h~ 0 → 100644 +164 −0 Original line number Diff line number Diff line /*************************************************************************** tnlExpBumpFunction.h - description ------------------- begin : Dec 5, 2013 copyright : (C) 2013 by Tomas Oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLCYLINDERFUNCTION_H_ #define TNLCYLINDERFUNCTION_H_ #include <config/tnlParameterContainer.h> #include <core/vectors/tnlStaticVector.h> #include <functions/tnlFunctionType.h> template< typename Real > class tnlCylinderFunctionBase { public: typedef Real RealType; bool setup( const tnlParameterContainer& parameters, const tnlString& prefix = "" ); void setDiameter( const RealType& sigma ); const RealType& getDiameter() const; protected: RealType amplitude, sigma; }; template< int Dimensions, typename Real > class tnlCylinderFunction { }; template< typename Real > class tnlCylinderFunction< 1, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 1 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 2, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 2 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< typename Real > class tnlCylinderFunction< 3, Real > : public tnlCylinderFunctionBase< Real > { public: enum { Dimensions = 3 }; typedef Real RealType; typedef tnlStaticVector< Dimensions, Real > VertexType; static tnlString getType(); tnlCylinderFunction(); #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, int ZDiffOrder, typename Vertex > #else template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > #endif #ifdef HAVE_CUDA __device__ __host__ #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlExpBumpFunction< Dimensions, Real >& f ) { str << "Cylinder.; return str; } template< int FunctionDimensions, typename Real > class tnlFunctionType< tnlCylinderFunction< FunctionDimensions, Real > > { public: enum { Type = tnlAnalyticFunction }; }; #include <functions/tnlCylinderFunction_impl.h> #endif /* TNLEXPBUMPFUNCTION_H_ */