Loading examples/heat-equation/tnlHeatEquationEocRhs.h +3 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,9 @@ class tnlHeatEquationEocRhs template< typename Vertex, typename Real > #ifdef HAVE_CUDA __device__ __host__ #endif Real getValue( const Vertex& vertex, const Real& time ) const { Loading src/core/tnlCuda.h +5 −2 Original line number Diff line number Diff line Loading @@ -77,15 +77,18 @@ class tnlCuda static ObjectType* passToDevice( const ObjectType& object ); template< typename ObjectType > static ObjectType passFromDevice( const ObjectType& object ); static ObjectType passFromDevice( const ObjectType* object ); template< typename ObjectType > static void passFromDevice( const ObjectType& deviceObject, static void passFromDevice( const ObjectType* deviceObject, ObjectType& hostObject ); template< typename ObjectType > static void freeFromDevice( ObjectType* object ); template< typename ObjectType > static void print( const ObjectType* object, ostream& str = std::cout ); #ifdef HAVE_CUDA template< typename Index > static __device__ Index getInterleaving( const Index index ); Loading src/functions/tnlConstantFunction.h +9 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #ifndef TNLCONSTANTFUNCTION_H_ #define TNLCONSTANTFUNCTION_H_ #include <iostream> #include <core/vectors/tnlStaticVector.h> template< int FunctionDimensions, Loading Loading @@ -74,6 +75,14 @@ class tnlConstantFunction RealType constant; }; template< int FunctionDimensions, typename Real > std::ostream& operator << ( std::ostream& str, const tnlConstantFunction< FunctionDimensions, Real >& f ) { str << "Constant function: constant = " << f.getConstant(); return str; } #include <implementation/functions/tnlConstantFunction_impl.h> #endif /* TNLCONSTANTFUNCTION_H_ */ src/functions/tnlExpBumpFunction.h +8 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,14 @@ class tnlExpBumpFunction< 3, Real > : public tnlExpBumpFunctionBase< Real > const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlExpBumpFunction< Dimensions, Real >& f ) { str << "ExpBump. function: amplitude = " << f.getAmplitude() << " sigma = " << f.getSigma(); return str; } #include <implementation/functions/tnlExpBumpFunction_impl.h> Loading src/functions/tnlSinBumpsFunction.h +11 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,17 @@ class tnlSinBumpsFunction< 3, Real > : public tnlSinBumpsFunctionBase< tnlStatic const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlSinBumpsFunction< Dimensions, Real >& f ) { str << "Sin Bumps. function: amplitude = " << f.getAmplitude() << " wavelength = " << f.getWaveLength() << " phase = " << f.getPhase(); return str; } #include <implementation/functions/tnlSinBumpsFunction_impl.h> Loading Loading
examples/heat-equation/tnlHeatEquationEocRhs.h +3 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,9 @@ class tnlHeatEquationEocRhs template< typename Vertex, typename Real > #ifdef HAVE_CUDA __device__ __host__ #endif Real getValue( const Vertex& vertex, const Real& time ) const { Loading
src/core/tnlCuda.h +5 −2 Original line number Diff line number Diff line Loading @@ -77,15 +77,18 @@ class tnlCuda static ObjectType* passToDevice( const ObjectType& object ); template< typename ObjectType > static ObjectType passFromDevice( const ObjectType& object ); static ObjectType passFromDevice( const ObjectType* object ); template< typename ObjectType > static void passFromDevice( const ObjectType& deviceObject, static void passFromDevice( const ObjectType* deviceObject, ObjectType& hostObject ); template< typename ObjectType > static void freeFromDevice( ObjectType* object ); template< typename ObjectType > static void print( const ObjectType* object, ostream& str = std::cout ); #ifdef HAVE_CUDA template< typename Index > static __device__ Index getInterleaving( const Index index ); Loading
src/functions/tnlConstantFunction.h +9 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #ifndef TNLCONSTANTFUNCTION_H_ #define TNLCONSTANTFUNCTION_H_ #include <iostream> #include <core/vectors/tnlStaticVector.h> template< int FunctionDimensions, Loading Loading @@ -74,6 +75,14 @@ class tnlConstantFunction RealType constant; }; template< int FunctionDimensions, typename Real > std::ostream& operator << ( std::ostream& str, const tnlConstantFunction< FunctionDimensions, Real >& f ) { str << "Constant function: constant = " << f.getConstant(); return str; } #include <implementation/functions/tnlConstantFunction_impl.h> #endif /* TNLCONSTANTFUNCTION_H_ */
src/functions/tnlExpBumpFunction.h +8 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,14 @@ class tnlExpBumpFunction< 3, Real > : public tnlExpBumpFunctionBase< Real > const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlExpBumpFunction< Dimensions, Real >& f ) { str << "ExpBump. function: amplitude = " << f.getAmplitude() << " sigma = " << f.getSigma(); return str; } #include <implementation/functions/tnlExpBumpFunction_impl.h> Loading
src/functions/tnlSinBumpsFunction.h +11 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,17 @@ class tnlSinBumpsFunction< 3, Real > : public tnlSinBumpsFunctionBase< tnlStatic const Real& time = 0.0 ) const; }; template< int Dimensions, typename Real > ostream& operator << ( ostream& str, const tnlSinBumpsFunction< Dimensions, Real >& f ) { str << "Sin Bumps. function: amplitude = " << f.getAmplitude() << " wavelength = " << f.getWaveLength() << " phase = " << f.getPhase(); return str; } #include <implementation/functions/tnlSinBumpsFunction_impl.h> Loading