Loading install +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ TARGET=TNL INSTALL_PREFIX=${HOME}/local WITH_CUDA=yes WITH_CUDA=no TEMPLATE_EXPLICIT_INSTANTIATION=yes #VERBOSE="VERBOSE=1" Loading src/problems/tnlPDEProblem.h +5 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,11 @@ class tnlPDEProblem : public tnlProblem< Real, Device, Index > typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; typedef tnlCSRMatrix< RealType, DeviceType, IndexType > MatrixType; /**** * This means that the time stepper will be set from the command line arguments. */ typedef void TimeStepper; static tnlString getTypeStatic(); tnlString getPrologHeader() const; Loading src/solvers/tnlSolverStarter_impl.h +49 −12 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ #include <solvers/tnlIterativeSolverMonitor.h> #include <solvers/ode/tnlODESolverMonitor.h> template< typename Problem, typename ConfigTag, typename TimeStepper = typename Problem::TimeStepper > class tnlUserDefinedTimeDiscretisationSetter; template< typename Problem, typename TimeDiscretisation, typename ConfigTag, Loading Loading @@ -83,6 +88,37 @@ bool tnlSolverStarter< ConfigTag > :: run( const tnlParameterContainer& paramete return false; } return tnlUserDefinedTimeDiscretisationSetter< Problem, ConfigTag >::run( problem, parameters ); } template< typename Problem, typename ConfigTag, typename TimeStepper > class tnlUserDefinedTimeDiscretisationSetter { public: static bool run( Problem& problem, const tnlParameterContainer& parameters ) { TimeStepper timeStepper; if( ! timeStepper.setup( parameters ) ) { cerr << "The time stepper initiation failed!" << endl; return false; } tnlSolverStarter< ConfigTag > solverStarter; return solverStarter.template runPDESolver< Problem, TimeStepper >( problem, parameters, timeStepper ); } }; template< typename Problem, typename ConfigTag > class tnlUserDefinedTimeDiscretisationSetter< Problem, ConfigTag, void > { public: static bool run( Problem& problem, const tnlParameterContainer& parameters ) { /**** * Set-up the time discretisation */ Loading @@ -96,6 +132,7 @@ bool tnlSolverStarter< ConfigTag > :: run( const tnlParameterContainer& paramete cerr << "Uknown time discretisation: " << timeDiscretisation << "." << endl; return false; } }; /**** * Setting the time discretisation Loading CMakeLists.txt +1 −1 File changed.Contains only whitespace changes. Show changes Loading
install +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ TARGET=TNL INSTALL_PREFIX=${HOME}/local WITH_CUDA=yes WITH_CUDA=no TEMPLATE_EXPLICIT_INSTANTIATION=yes #VERBOSE="VERBOSE=1" Loading
src/problems/tnlPDEProblem.h +5 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,11 @@ class tnlPDEProblem : public tnlProblem< Real, Device, Index > typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; typedef tnlCSRMatrix< RealType, DeviceType, IndexType > MatrixType; /**** * This means that the time stepper will be set from the command line arguments. */ typedef void TimeStepper; static tnlString getTypeStatic(); tnlString getPrologHeader() const; Loading
src/solvers/tnlSolverStarter_impl.h +49 −12 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ #include <solvers/tnlIterativeSolverMonitor.h> #include <solvers/ode/tnlODESolverMonitor.h> template< typename Problem, typename ConfigTag, typename TimeStepper = typename Problem::TimeStepper > class tnlUserDefinedTimeDiscretisationSetter; template< typename Problem, typename TimeDiscretisation, typename ConfigTag, Loading Loading @@ -83,6 +88,37 @@ bool tnlSolverStarter< ConfigTag > :: run( const tnlParameterContainer& paramete return false; } return tnlUserDefinedTimeDiscretisationSetter< Problem, ConfigTag >::run( problem, parameters ); } template< typename Problem, typename ConfigTag, typename TimeStepper > class tnlUserDefinedTimeDiscretisationSetter { public: static bool run( Problem& problem, const tnlParameterContainer& parameters ) { TimeStepper timeStepper; if( ! timeStepper.setup( parameters ) ) { cerr << "The time stepper initiation failed!" << endl; return false; } tnlSolverStarter< ConfigTag > solverStarter; return solverStarter.template runPDESolver< Problem, TimeStepper >( problem, parameters, timeStepper ); } }; template< typename Problem, typename ConfigTag > class tnlUserDefinedTimeDiscretisationSetter< Problem, ConfigTag, void > { public: static bool run( Problem& problem, const tnlParameterContainer& parameters ) { /**** * Set-up the time discretisation */ Loading @@ -96,6 +132,7 @@ bool tnlSolverStarter< ConfigTag > :: run( const tnlParameterContainer& paramete cerr << "Uknown time discretisation: " << timeDiscretisation << "." << endl; return false; } }; /**** * Setting the time discretisation Loading