Loading CMakeLists.txt +27 −27 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ if( WITH_CUDA STREQUAL "yes" ) set( CUDA_ARCH -gencode arch=compute_${WITH_CUDA_ARCH},code=sm_${WITH_CUDA_ARCH} ) endif() endif() set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; ${CUDA_ARCH} ) set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; ${CUDA_ARCH} -D_FORCE_INLINES ) # TODO: this is necessary only due to a bug in cmake set( CUDA_ADD_LIBRARY_OPTIONS -shared ) # TODO: workaround for a bug in cmake 3.5.0 (fixed in 3.5.1) Loading Loading @@ -325,29 +325,29 @@ endif( WITH_TESTS STREQUAL "yes" ) #### # Explicit template instantiation # if( WITH_TEMPLATE_INSTANTIATION STREQUAL "yes" ) AddCompilerFlag( "-DTEMPLATE_EXPLICIT_INSTANTIATION " ) if( INSTANTIATE_INT STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_INT " ) endif() if( INSTANTIATE_LONG_INT STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_LONG_INT " ) endif() if( INSTANTIATE_FLOAT STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_FLOAT " ) endif() if( INSTANTIATE_DOUBLE STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_DOUBLE " ) endif() if( INSTANTIATE_LONG_DOUBLE STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_LONG_DOUBLE " ) endif() endif() #if( WITH_TEMPLATE_INSTANTIATION STREQUAL "yes" ) # AddCompilerFlag( "-DTEMPLATE_EXPLICIT_INSTANTIATION " ) # # if( INSTANTIATE_INT STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_INT " ) # endif() # # if( INSTANTIATE_LONG_INT STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_LONG_INT " ) # endif() # # if( INSTANTIATE_FLOAT STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_FLOAT " ) # endif() # # if( INSTANTIATE_DOUBLE STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_DOUBLE " ) # endif() # # if( INSTANTIATE_LONG_DOUBLE STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_LONG_DOUBLE " ) # endif() #endif() set( CXX_TEST_FLAGS "-fprofile-arcs -ftest-coverage" ) set( LD_TEST_FLAGS "-lgcov -coverage" ) Loading @@ -355,8 +355,8 @@ set( LD_TEST_FLAGS "-lgcov -coverage" ) set( configDirectory \"${CMAKE_INSTALL_PREFIX}/share/tnl-${tnlVersion}/\") set( sourceDirectory \"${PROJECT_SOURCE_DIR}/\" ) set( testsDirectory \"${PROJECT_TESTS_PATH}/\" ) CONFIGURE_FILE( "tnlConfig.h.in" "${PROJECT_BUILD_PATH}/tnlConfig.h" ) INSTALL( FILES ${PROJECT_BUILD_PATH}/tnlConfig.h DESTINATION include/tnl-${tnlVersion} ) CONFIGURE_FILE( "tnlConfig.h.in" "${PROJECT_BUILD_PATH}/TNL/tnlConfig.h" ) INSTALL( FILES ${PROJECT_BUILD_PATH}/TNL/tnlConfig.h DESTINATION include/tnl-${tnlVersion} ) #Nastavime cesty k hlavickovym souborum a knihovnam INCLUDE_DIRECTORIES( src ) Loading examples/advection/LaxFridrichs.h +18 −14 Original line number Diff line number Diff line #ifndef LaxFridrichs_H #define LaxFridrichs_H #include <core/vectors/tnlVector.h> #include <mesh/tnlGrid.h> #include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { template< typename Mesh, typename Real = typename Mesh::RealType, Loading @@ -16,15 +18,15 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > class LaxFridrichs< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index > class LaxFridrichs< Meshes::Grid< 1,MeshReal, Device, MeshIndex >, Real, Index > { public: typedef tnlGrid< 1, MeshReal, Device, MeshIndex > MeshType; typedef Meshes::Grid< 1, MeshReal, Device, MeshIndex > MeshType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlMeshFunction< MeshType > MeshFunctionType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; Real tau; Real artificalViscosity; Loading Loading @@ -52,7 +54,7 @@ class LaxFridrichs< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index > this->tau = tau; }; static tnlString getType(); static String getType(); template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Loading Loading @@ -83,15 +85,15 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > class LaxFridrichs< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index > class LaxFridrichs< Meshes::Grid< 2,MeshReal, Device, MeshIndex >, Real, Index > { public: typedef tnlGrid< 2, MeshReal, Device, MeshIndex > MeshType; typedef Meshes::Grid< 2, MeshReal, Device, MeshIndex > MeshType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlMeshFunction< MeshType > MeshFunctionType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; Real tau; Real artificalViscosity; Loading Loading @@ -119,7 +121,7 @@ class LaxFridrichs< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index > this->tau = tau; }; static tnlString getType(); static String getType(); template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Loading Loading @@ -150,15 +152,15 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index > class LaxFridrichs< Meshes::Grid< 3,MeshReal, Device, MeshIndex >, Real, Index > { public: typedef tnlGrid< 3, MeshReal, Device, MeshIndex > MeshType; typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlMeshFunction< MeshType > MeshFunctionType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; Real tau; Real artificalViscosity; Loading Loading @@ -186,7 +188,7 @@ class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index > this->tau = tau; }; static tnlString getType(); static String getType(); template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Loading @@ -212,6 +214,8 @@ class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index > MatrixRow& matrixRow ) const; }; } // namespace TNL #include "LaxFridrichs_impl.h" Loading examples/advection/LaxFridrichs_impl.h +28 −24 Original line number Diff line number Diff line #ifndef LaxFridrichs_IMPL_H #define LaxFridrichs_IMPL_H namespace TNL { /**** * 1D problem */ Loading @@ -9,14 +11,14 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > tnlString LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: String LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: getType() { return tnlString( "LaxFridrichs< " ) + return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + ::getType< Real >() + ", " + ::getType< Index >() + " >"; TNL::getType< Real >() + ", " + TNL::getType< Index >() + " >"; } template< typename MeshReal, Loading @@ -27,7 +29,7 @@ template< typename MeshReal, template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Real LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: operator()( const MeshFunction& u, const MeshEntity& entity, const Real& time ) const Loading Loading @@ -61,7 +63,7 @@ template< typename MeshReal, template< typename MeshEntity > __cuda_callable__ Index LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const MeshEntity& entity ) const Loading @@ -84,7 +86,7 @@ template< typename MeshReal, template< typename MeshEntity, typename Vector, typename MatrixRow > __cuda_callable__ void LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: updateLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading Loading @@ -118,14 +120,14 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > tnlString LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: String LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: getType() { return tnlString( "LaxFridrichs< " ) + return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + ::getType< Real >() + ", " + ::getType< Index >() + " >"; TNL::getType< Real >() + ", " + TNL::getType< Index >() + " >"; } template< typename MeshReal, Loading @@ -136,7 +138,7 @@ template< typename MeshReal, template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Real LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: operator()( const MeshFunction& u, const MeshEntity& entity, const Real& time ) const Loading Loading @@ -177,7 +179,7 @@ template< typename MeshReal, template< typename MeshEntity > __cuda_callable__ Index LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const MeshEntity& entity ) const Loading @@ -200,7 +202,7 @@ template< typename MeshReal, template< typename MeshEntity, typename Vector, typename MatrixRow > __cuda_callable__ void LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: updateLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading Loading @@ -239,14 +241,14 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > tnlString LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: String LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: getType() { return tnlString( "LaxFridrichs< " ) + return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + ::getType< Real >() + ", " + ::getType< Index >() + " >"; TNL::getType< Real >() + ", " + TNL::getType< Index >() + " >"; } template< typename MeshReal, Loading @@ -257,7 +259,7 @@ template< typename MeshReal, template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Real LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: operator()( const MeshFunction& u, const MeshEntity& entity, const Real& time ) const Loading Loading @@ -294,7 +296,7 @@ template< typename MeshReal, template< typename MeshEntity > __cuda_callable__ Index LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const MeshEntity& entity ) const Loading @@ -317,7 +319,7 @@ template< typename MeshReal, template< typename MeshEntity, typename Vector, typename MatrixRow > __cuda_callable__ void LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: updateLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading Loading @@ -353,5 +355,7 @@ updateLinearSystem( const RealType& time, matrixRow.setElement( 6, up, -lambdaZ );*/ } } // namespace TNL #endif /* LaxFridrichsIMPL_H */ examples/advection/advection.h +29 −27 Original line number Diff line number Diff line #include <tnlConfig.h> #include <solvers/tnlSolver.h> #include <solvers/tnlBuildConfigTags.h> #include <operators/tnlDirichletBoundaryConditions.h> #include <operators/tnlNeumannBoundaryConditions.h> #include <functions/tnlConstantFunction.h> #include <TNL/tnlConfig.h> #include <TNL/Solvers/Solver.h> #include <TNL/Solvers/BuildConfigTags.h> #include <TNL/Operators/DirichletBoundaryConditions.h> #include <TNL/Operators/NeumannBoundaryConditions.h> #include <TNL/Functions/Analytic/Constant.h> #include "advectionProblem.h" #include "LaxFridrichs.h" #include "advectionRhs.h" #include "advectionBuildConfigTag.h" using namespace TNL; typedef advectionBuildConfigTag BuildConfig; /**** Loading @@ -24,22 +26,22 @@ typedef advectionBuildConfigTag BuildConfig; template< typename ConfigTag >class advectionConfig { public: static void configSetup( tnlConfigDescription & config ) static void configSetup( Config::ConfigDescription & config ) { config.addDelimiter( "advection settings:" ); config.addEntry< tnlString >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); config.addEntryEnum< tnlString >( "dirichlet" ); config.addEntryEnum< tnlString >( "neumann" ); config.addEntry< String >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); config.addEntryEnum< String >( "dirichlet" ); config.addEntryEnum< String >( "neumann" ); config.addEntry< double >( "boundary-conditions-constant", "This sets a value in case of the constant boundary conditions." ); config.addEntry< double >( "artifical-viscosity", "This sets value of artifical viscosity (default 1)", 1.0); config.addEntry< tnlString >( "begin", "choose begin type", "sin"); config.addEntryEnum< tnlString >( "sin"); config.addEntryEnum< tnlString >( "sin_square"); config.addEntry< String >( "begin", "choose begin type", "sin"); config.addEntryEnum< String >( "sin"); config.addEntryEnum< String >( "sin_square"); config.addEntry< double >( "advection-speedX", "This sets value of advection speed in X direction (default 1)" , 1.0); config.addEntry< double >( "advection-speedY", "This sets value of advection speed in Y direction (default 1)" , 1.0); config.addEntry< tnlString >( "move", "choose movement type", "advection"); config.addEntryEnum< tnlString >( "advection"); config.addEntryEnum< tnlString >( "rotation"); config.addEntry< String >( "move", "choose movement type", "advection"); config.addEntryEnum< String >( "advection"); config.addEntryEnum< String >( "rotation"); config.addEntry< int >( "dimension", "choose movement typeproblem dimension", 1); config.addEntryEnum< int >( 1 ); config.addEntryEnum< int >( 2 ); Loading @@ -66,43 +68,43 @@ class advectionSetter typedef Device DeviceType; typedef Index IndexType; static bool run( const tnlParameterContainer & parameters ) static bool run( const Config::ParameterContainer & parameters ) { enum { Dimensions = MeshType::getMeshDimensions() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef advectionRhs< MeshType, Real > RightHandSide; typedef tnlStaticVector < MeshType::getMeshDimensions(), Real > Vertex; typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; /**** * Resolve the template arguments of your solver here. * The following code is for the Dirichlet and the Neumann boundary conditions. * Both can be constant or defined as descrete values of tnlVector. * Both can be constant or defined as descrete values of Vector. */ tnlString boundaryConditionsType = parameters.getParameter< tnlString >( "boundary-conditions-type" ); String boundaryConditionsType = parameters.getParameter< String >( "boundary-conditions-type" ); if( parameters.checkParameter( "boundary-conditions-constant" ) ) { typedef tnlConstantFunction< Dimensions, Real > ConstantFunction; typedef Functions::Analytic::Constant< Dimensions, Real > Constant; if( boundaryConditionsType == "dirichlet" ) { typedef tnlDirichletBoundaryConditions< MeshType, ConstantFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } typedef tnlNeumannBoundaryConditions< MeshType, ConstantFunction, Real, Index > BoundaryConditions; typedef Operators::NeumannBoundaryConditions< MeshType, Constant, Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } typedef tnlMeshFunction< MeshType > MeshFunction; typedef Functions::MeshFunction< MeshType > MeshFunction; if( boundaryConditionsType == "dirichlet" ) { typedef tnlDirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } typedef tnlNeumannBoundaryConditions< MeshType, MeshFunction, Real, Index > BoundaryConditions; typedef Operators::NeumannBoundaryConditions< MeshType, MeshFunction, Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); Loading @@ -112,7 +114,7 @@ class advectionSetter int main( int argc, char* argv[] ) { tnlSolver< advectionSetter, advectionConfig, BuildConfig > solver; Solvers::Solver< advectionSetter, advectionConfig, BuildConfig > solver; if( ! solver. run( argc, argv ) ) return EXIT_FAILURE; return EXIT_SUCCESS; Loading examples/advection/advectionBuildConfigTag.h +22 −15 Original line number Diff line number Diff line #ifndef advectionBUILDCONFIGTAG_H_ #define advectionBUILDCONFIGTAG_H_ #include <solvers/tnlBuildConfigTags.h> #include <TNL/Solvers/BuildConfigTags.h> namespace TNL { class advectionBuildConfigTag{}; namespace Solvers { /**** * Turn off support for float and long double. */ template<> struct tnlConfigTagReal< advectionBuildConfigTag, float > { enum { enabled = false }; }; template<> struct tnlConfigTagReal< advectionBuildConfigTag, long double > { enum { enabled = false }; }; template<> struct ConfigTagReal< advectionBuildConfigTag, float > { enum { enabled = false }; }; template<> struct ConfigTagReal< advectionBuildConfigTag, long double > { enum { enabled = false }; }; /**** * Turn off support for short int and long int indexing. */ template<> struct tnlConfigTagIndex< advectionBuildConfigTag, short int >{ enum { enabled = false }; }; template<> struct tnlConfigTagIndex< advectionBuildConfigTag, long int >{ enum { enabled = false }; }; template<> struct ConfigTagIndex< advectionBuildConfigTag, short int >{ enum { enabled = false }; }; template<> struct ConfigTagIndex< advectionBuildConfigTag, long int >{ enum { enabled = false }; }; /**** * Use of tnlGrid is enabled for allowed dimensions and Real, Device and Index types. * Use of Grid is enabled for allowed dimensions and Real, Device and Index types. */ template< int Dimensions, typename Real, typename Device, typename Index > struct tnlConfigTagMesh< advectionBuildConfigTag, tnlGrid< Dimensions, Real, Device, Index > > { enum { enabled = tnlConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled && tnlConfigTagReal< advectionBuildConfigTag, Real >::enabled && tnlConfigTagDevice< advectionBuildConfigTag, Device >::enabled && tnlConfigTagIndex< advectionBuildConfigTag, Index >::enabled }; }; struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimensions, Real, Device, Index > > { enum { enabled = ConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled && ConfigTagReal< advectionBuildConfigTag, Real >::enabled && ConfigTagDevice< advectionBuildConfigTag, Device >::enabled && ConfigTagIndex< advectionBuildConfigTag, Index >::enabled }; }; /**** * Please, chose your preferred time discretisation here. */ template<> struct tnlConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct tnlConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct tnlConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; /**** * Only the Runge-Kutta-Merson solver is enabled by default. */ template<> struct tnlConfigTagExplicitSolver< advectionBuildConfigTag, tnlExplicitEulerSolverTag >{ enum { enabled = true }; }; template<> struct ConfigTagExplicitSolver< advectionBuildConfigTag, Solvers::tnlExplicitEulerSolverTag >{ enum { enabled = true }; }; } // namespace Solvers } // namespace TNL #endif /* advectionBUILDCONFIGTAG_H_ */ Loading
CMakeLists.txt +27 −27 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ if( WITH_CUDA STREQUAL "yes" ) set( CUDA_ARCH -gencode arch=compute_${WITH_CUDA_ARCH},code=sm_${WITH_CUDA_ARCH} ) endif() endif() set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; ${CUDA_ARCH} ) set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; ${CUDA_ARCH} -D_FORCE_INLINES ) # TODO: this is necessary only due to a bug in cmake set( CUDA_ADD_LIBRARY_OPTIONS -shared ) # TODO: workaround for a bug in cmake 3.5.0 (fixed in 3.5.1) Loading Loading @@ -325,29 +325,29 @@ endif( WITH_TESTS STREQUAL "yes" ) #### # Explicit template instantiation # if( WITH_TEMPLATE_INSTANTIATION STREQUAL "yes" ) AddCompilerFlag( "-DTEMPLATE_EXPLICIT_INSTANTIATION " ) if( INSTANTIATE_INT STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_INT " ) endif() if( INSTANTIATE_LONG_INT STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_LONG_INT " ) endif() if( INSTANTIATE_FLOAT STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_FLOAT " ) endif() if( INSTANTIATE_DOUBLE STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_DOUBLE " ) endif() if( INSTANTIATE_LONG_DOUBLE STREQUAL "yes" ) AddCompilerFlag( "-DINSTANTIATE_LONG_DOUBLE " ) endif() endif() #if( WITH_TEMPLATE_INSTANTIATION STREQUAL "yes" ) # AddCompilerFlag( "-DTEMPLATE_EXPLICIT_INSTANTIATION " ) # # if( INSTANTIATE_INT STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_INT " ) # endif() # # if( INSTANTIATE_LONG_INT STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_LONG_INT " ) # endif() # # if( INSTANTIATE_FLOAT STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_FLOAT " ) # endif() # # if( INSTANTIATE_DOUBLE STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_DOUBLE " ) # endif() # # if( INSTANTIATE_LONG_DOUBLE STREQUAL "yes" ) # AddCompilerFlag( "-DINSTANTIATE_LONG_DOUBLE " ) # endif() #endif() set( CXX_TEST_FLAGS "-fprofile-arcs -ftest-coverage" ) set( LD_TEST_FLAGS "-lgcov -coverage" ) Loading @@ -355,8 +355,8 @@ set( LD_TEST_FLAGS "-lgcov -coverage" ) set( configDirectory \"${CMAKE_INSTALL_PREFIX}/share/tnl-${tnlVersion}/\") set( sourceDirectory \"${PROJECT_SOURCE_DIR}/\" ) set( testsDirectory \"${PROJECT_TESTS_PATH}/\" ) CONFIGURE_FILE( "tnlConfig.h.in" "${PROJECT_BUILD_PATH}/tnlConfig.h" ) INSTALL( FILES ${PROJECT_BUILD_PATH}/tnlConfig.h DESTINATION include/tnl-${tnlVersion} ) CONFIGURE_FILE( "tnlConfig.h.in" "${PROJECT_BUILD_PATH}/TNL/tnlConfig.h" ) INSTALL( FILES ${PROJECT_BUILD_PATH}/TNL/tnlConfig.h DESTINATION include/tnl-${tnlVersion} ) #Nastavime cesty k hlavickovym souborum a knihovnam INCLUDE_DIRECTORIES( src ) Loading
examples/advection/LaxFridrichs.h +18 −14 Original line number Diff line number Diff line #ifndef LaxFridrichs_H #define LaxFridrichs_H #include <core/vectors/tnlVector.h> #include <mesh/tnlGrid.h> #include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { template< typename Mesh, typename Real = typename Mesh::RealType, Loading @@ -16,15 +18,15 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > class LaxFridrichs< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index > class LaxFridrichs< Meshes::Grid< 1,MeshReal, Device, MeshIndex >, Real, Index > { public: typedef tnlGrid< 1, MeshReal, Device, MeshIndex > MeshType; typedef Meshes::Grid< 1, MeshReal, Device, MeshIndex > MeshType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlMeshFunction< MeshType > MeshFunctionType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; Real tau; Real artificalViscosity; Loading Loading @@ -52,7 +54,7 @@ class LaxFridrichs< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index > this->tau = tau; }; static tnlString getType(); static String getType(); template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Loading Loading @@ -83,15 +85,15 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > class LaxFridrichs< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index > class LaxFridrichs< Meshes::Grid< 2,MeshReal, Device, MeshIndex >, Real, Index > { public: typedef tnlGrid< 2, MeshReal, Device, MeshIndex > MeshType; typedef Meshes::Grid< 2, MeshReal, Device, MeshIndex > MeshType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlMeshFunction< MeshType > MeshFunctionType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; Real tau; Real artificalViscosity; Loading Loading @@ -119,7 +121,7 @@ class LaxFridrichs< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index > this->tau = tau; }; static tnlString getType(); static String getType(); template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Loading Loading @@ -150,15 +152,15 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index > class LaxFridrichs< Meshes::Grid< 3,MeshReal, Device, MeshIndex >, Real, Index > { public: typedef tnlGrid< 3, MeshReal, Device, MeshIndex > MeshType; typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlMeshFunction< MeshType > MeshFunctionType; typedef Functions::MeshFunction< MeshType > MeshFunctionType; enum { Dimensions = MeshType::getMeshDimensions() }; Real tau; Real artificalViscosity; Loading Loading @@ -186,7 +188,7 @@ class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index > this->tau = tau; }; static tnlString getType(); static String getType(); template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Loading @@ -212,6 +214,8 @@ class LaxFridrichs< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index > MatrixRow& matrixRow ) const; }; } // namespace TNL #include "LaxFridrichs_impl.h" Loading
examples/advection/LaxFridrichs_impl.h +28 −24 Original line number Diff line number Diff line #ifndef LaxFridrichs_IMPL_H #define LaxFridrichs_IMPL_H namespace TNL { /**** * 1D problem */ Loading @@ -9,14 +11,14 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > tnlString LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: String LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: getType() { return tnlString( "LaxFridrichs< " ) + return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + ::getType< Real >() + ", " + ::getType< Index >() + " >"; TNL::getType< Real >() + ", " + TNL::getType< Index >() + " >"; } template< typename MeshReal, Loading @@ -27,7 +29,7 @@ template< typename MeshReal, template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Real LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: operator()( const MeshFunction& u, const MeshEntity& entity, const Real& time ) const Loading Loading @@ -61,7 +63,7 @@ template< typename MeshReal, template< typename MeshEntity > __cuda_callable__ Index LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const MeshEntity& entity ) const Loading @@ -84,7 +86,7 @@ template< typename MeshReal, template< typename MeshEntity, typename Vector, typename MatrixRow > __cuda_callable__ void LaxFridrichs< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: updateLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading Loading @@ -118,14 +120,14 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > tnlString LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: String LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: getType() { return tnlString( "LaxFridrichs< " ) + return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + ::getType< Real >() + ", " + ::getType< Index >() + " >"; TNL::getType< Real >() + ", " + TNL::getType< Index >() + " >"; } template< typename MeshReal, Loading @@ -136,7 +138,7 @@ template< typename MeshReal, template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Real LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: operator()( const MeshFunction& u, const MeshEntity& entity, const Real& time ) const Loading Loading @@ -177,7 +179,7 @@ template< typename MeshReal, template< typename MeshEntity > __cuda_callable__ Index LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const MeshEntity& entity ) const Loading @@ -200,7 +202,7 @@ template< typename MeshReal, template< typename MeshEntity, typename Vector, typename MatrixRow > __cuda_callable__ void LaxFridrichs< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: updateLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading Loading @@ -239,14 +241,14 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > tnlString LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: String LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: getType() { return tnlString( "LaxFridrichs< " ) + return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + ::getType< Real >() + ", " + ::getType< Index >() + " >"; TNL::getType< Real >() + ", " + TNL::getType< Index >() + " >"; } template< typename MeshReal, Loading @@ -257,7 +259,7 @@ template< typename MeshReal, template< typename MeshFunction, typename MeshEntity > __cuda_callable__ Real LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: operator()( const MeshFunction& u, const MeshEntity& entity, const Real& time ) const Loading Loading @@ -294,7 +296,7 @@ template< typename MeshReal, template< typename MeshEntity > __cuda_callable__ Index LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const MeshEntity& entity ) const Loading @@ -317,7 +319,7 @@ template< typename MeshReal, template< typename MeshEntity, typename Vector, typename MatrixRow > __cuda_callable__ void LaxFridrichs< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: LaxFridrichs< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: updateLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading Loading @@ -353,5 +355,7 @@ updateLinearSystem( const RealType& time, matrixRow.setElement( 6, up, -lambdaZ );*/ } } // namespace TNL #endif /* LaxFridrichsIMPL_H */
examples/advection/advection.h +29 −27 Original line number Diff line number Diff line #include <tnlConfig.h> #include <solvers/tnlSolver.h> #include <solvers/tnlBuildConfigTags.h> #include <operators/tnlDirichletBoundaryConditions.h> #include <operators/tnlNeumannBoundaryConditions.h> #include <functions/tnlConstantFunction.h> #include <TNL/tnlConfig.h> #include <TNL/Solvers/Solver.h> #include <TNL/Solvers/BuildConfigTags.h> #include <TNL/Operators/DirichletBoundaryConditions.h> #include <TNL/Operators/NeumannBoundaryConditions.h> #include <TNL/Functions/Analytic/Constant.h> #include "advectionProblem.h" #include "LaxFridrichs.h" #include "advectionRhs.h" #include "advectionBuildConfigTag.h" using namespace TNL; typedef advectionBuildConfigTag BuildConfig; /**** Loading @@ -24,22 +26,22 @@ typedef advectionBuildConfigTag BuildConfig; template< typename ConfigTag >class advectionConfig { public: static void configSetup( tnlConfigDescription & config ) static void configSetup( Config::ConfigDescription & config ) { config.addDelimiter( "advection settings:" ); config.addEntry< tnlString >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); config.addEntryEnum< tnlString >( "dirichlet" ); config.addEntryEnum< tnlString >( "neumann" ); config.addEntry< String >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); config.addEntryEnum< String >( "dirichlet" ); config.addEntryEnum< String >( "neumann" ); config.addEntry< double >( "boundary-conditions-constant", "This sets a value in case of the constant boundary conditions." ); config.addEntry< double >( "artifical-viscosity", "This sets value of artifical viscosity (default 1)", 1.0); config.addEntry< tnlString >( "begin", "choose begin type", "sin"); config.addEntryEnum< tnlString >( "sin"); config.addEntryEnum< tnlString >( "sin_square"); config.addEntry< String >( "begin", "choose begin type", "sin"); config.addEntryEnum< String >( "sin"); config.addEntryEnum< String >( "sin_square"); config.addEntry< double >( "advection-speedX", "This sets value of advection speed in X direction (default 1)" , 1.0); config.addEntry< double >( "advection-speedY", "This sets value of advection speed in Y direction (default 1)" , 1.0); config.addEntry< tnlString >( "move", "choose movement type", "advection"); config.addEntryEnum< tnlString >( "advection"); config.addEntryEnum< tnlString >( "rotation"); config.addEntry< String >( "move", "choose movement type", "advection"); config.addEntryEnum< String >( "advection"); config.addEntryEnum< String >( "rotation"); config.addEntry< int >( "dimension", "choose movement typeproblem dimension", 1); config.addEntryEnum< int >( 1 ); config.addEntryEnum< int >( 2 ); Loading @@ -66,43 +68,43 @@ class advectionSetter typedef Device DeviceType; typedef Index IndexType; static bool run( const tnlParameterContainer & parameters ) static bool run( const Config::ParameterContainer & parameters ) { enum { Dimensions = MeshType::getMeshDimensions() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef advectionRhs< MeshType, Real > RightHandSide; typedef tnlStaticVector < MeshType::getMeshDimensions(), Real > Vertex; typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; /**** * Resolve the template arguments of your solver here. * The following code is for the Dirichlet and the Neumann boundary conditions. * Both can be constant or defined as descrete values of tnlVector. * Both can be constant or defined as descrete values of Vector. */ tnlString boundaryConditionsType = parameters.getParameter< tnlString >( "boundary-conditions-type" ); String boundaryConditionsType = parameters.getParameter< String >( "boundary-conditions-type" ); if( parameters.checkParameter( "boundary-conditions-constant" ) ) { typedef tnlConstantFunction< Dimensions, Real > ConstantFunction; typedef Functions::Analytic::Constant< Dimensions, Real > Constant; if( boundaryConditionsType == "dirichlet" ) { typedef tnlDirichletBoundaryConditions< MeshType, ConstantFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } typedef tnlNeumannBoundaryConditions< MeshType, ConstantFunction, Real, Index > BoundaryConditions; typedef Operators::NeumannBoundaryConditions< MeshType, Constant, Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } typedef tnlMeshFunction< MeshType > MeshFunction; typedef Functions::MeshFunction< MeshType > MeshFunction; if( boundaryConditionsType == "dirichlet" ) { typedef tnlDirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef Operators::DirichletBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } typedef tnlNeumannBoundaryConditions< MeshType, MeshFunction, Real, Index > BoundaryConditions; typedef Operators::NeumannBoundaryConditions< MeshType, MeshFunction, Real, Index > BoundaryConditions; typedef advectionProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); Loading @@ -112,7 +114,7 @@ class advectionSetter int main( int argc, char* argv[] ) { tnlSolver< advectionSetter, advectionConfig, BuildConfig > solver; Solvers::Solver< advectionSetter, advectionConfig, BuildConfig > solver; if( ! solver. run( argc, argv ) ) return EXIT_FAILURE; return EXIT_SUCCESS; Loading
examples/advection/advectionBuildConfigTag.h +22 −15 Original line number Diff line number Diff line #ifndef advectionBUILDCONFIGTAG_H_ #define advectionBUILDCONFIGTAG_H_ #include <solvers/tnlBuildConfigTags.h> #include <TNL/Solvers/BuildConfigTags.h> namespace TNL { class advectionBuildConfigTag{}; namespace Solvers { /**** * Turn off support for float and long double. */ template<> struct tnlConfigTagReal< advectionBuildConfigTag, float > { enum { enabled = false }; }; template<> struct tnlConfigTagReal< advectionBuildConfigTag, long double > { enum { enabled = false }; }; template<> struct ConfigTagReal< advectionBuildConfigTag, float > { enum { enabled = false }; }; template<> struct ConfigTagReal< advectionBuildConfigTag, long double > { enum { enabled = false }; }; /**** * Turn off support for short int and long int indexing. */ template<> struct tnlConfigTagIndex< advectionBuildConfigTag, short int >{ enum { enabled = false }; }; template<> struct tnlConfigTagIndex< advectionBuildConfigTag, long int >{ enum { enabled = false }; }; template<> struct ConfigTagIndex< advectionBuildConfigTag, short int >{ enum { enabled = false }; }; template<> struct ConfigTagIndex< advectionBuildConfigTag, long int >{ enum { enabled = false }; }; /**** * Use of tnlGrid is enabled for allowed dimensions and Real, Device and Index types. * Use of Grid is enabled for allowed dimensions and Real, Device and Index types. */ template< int Dimensions, typename Real, typename Device, typename Index > struct tnlConfigTagMesh< advectionBuildConfigTag, tnlGrid< Dimensions, Real, Device, Index > > { enum { enabled = tnlConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled && tnlConfigTagReal< advectionBuildConfigTag, Real >::enabled && tnlConfigTagDevice< advectionBuildConfigTag, Device >::enabled && tnlConfigTagIndex< advectionBuildConfigTag, Index >::enabled }; }; struct ConfigTagMesh< advectionBuildConfigTag, Meshes::Grid< Dimensions, Real, Device, Index > > { enum { enabled = ConfigTagDimensions< advectionBuildConfigTag, Dimensions >::enabled && ConfigTagReal< advectionBuildConfigTag, Real >::enabled && ConfigTagDevice< advectionBuildConfigTag, Device >::enabled && ConfigTagIndex< advectionBuildConfigTag, Index >::enabled }; }; /**** * Please, chose your preferred time discretisation here. */ template<> struct tnlConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct tnlConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct tnlConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct ConfigTagTimeDiscretisation< advectionBuildConfigTag, tnlImplicitTimeDiscretisationTag >{ enum { enabled = true }; }; /**** * Only the Runge-Kutta-Merson solver is enabled by default. */ template<> struct tnlConfigTagExplicitSolver< advectionBuildConfigTag, tnlExplicitEulerSolverTag >{ enum { enabled = true }; }; template<> struct ConfigTagExplicitSolver< advectionBuildConfigTag, Solvers::tnlExplicitEulerSolverTag >{ enum { enabled = true }; }; } // namespace Solvers } // namespace TNL #endif /* advectionBUILDCONFIGTAG_H_ */