From ef15d04e374a98f31d510f0fc939c2f6c22398ef Mon Sep 17 00:00:00 2001 From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz> Date: Wed, 27 May 2015 18:16:32 +0200 Subject: [PATCH] Small refactoring of the code. --- .../heat-equation/tnl-heat-equation-eoc.h | 6 ++-- examples/heat-equation/tnl-heat-equation.h | 9 +++--- src/core/cuda/cuda-reduction_impl.h | 4 +-- src/problems/tnlHeatEquationProblem.h | 8 ++++-- src/problems/tnlHeatEquationProblem_impl.h | 27 ++++++++++++++++-- src/problems/tnlPDEProblem.h | 5 ++-- src/solvers/CMakeLists.txt | 4 +-- src/solvers/pde/tnlExplicitTimeStepper.h | 5 ++-- src/solvers/pde/tnlExplicitTimeStepper_impl.h | 10 +++---- src/solvers/pde/tnlPDESolver.h | 2 -- src/solvers/pde/tnlPDESolver_impl.h | 28 ++++++++++--------- src/solvers/pde/tnlSemiImplicitTimeStepper.h | 3 +- .../pde/tnlSemiImplicitTimeStepper_impl.h | 8 +++--- .../{tnlConfigTags.h => tnlBuildConfigTags.h} | 2 +- ...tBuildConfig.h => tnlFastBuildConfigTag.h} | 2 +- src/solvers/tnlSolver.h | 6 ++-- src/solvers/tnlSolverConfig_impl.h | 2 +- src/solvers/tnlSolverInitiator.h | 2 +- src/solvers/tnlSolverInitiator_impl.h | 2 +- src/solvers/tnlSolverStarter_impl.h | 2 +- 20 files changed, 80 insertions(+), 57 deletions(-) rename src/solvers/{tnlConfigTags.h => tnlBuildConfigTags.h} (99%) rename src/solvers/{tnlFastBuildConfig.h => tnlFastBuildConfigTag.h} (98%) diff --git a/examples/heat-equation/tnl-heat-equation-eoc.h b/examples/heat-equation/tnl-heat-equation-eoc.h index cc432b9e37..7001a2d71c 100644 --- a/examples/heat-equation/tnl-heat-equation-eoc.h +++ b/examples/heat-equation/tnl-heat-equation-eoc.h @@ -19,8 +19,8 @@ #define TNL_HEAT_EQUATION_EOC_H_ #include <solvers/tnlSolver.h> -#include <solvers/tnlFastBuildConfig.h> -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlFastBuildConfigTag.h> +#include <solvers/tnlBuildConfigTags.h> #include <functors/tnlTestFunction.h> #include <operators/diffusion/tnlLinearDiffusion.h> #include <operators/diffusion/tnlExactLinearDiffusion.h> @@ -28,7 +28,7 @@ #include <problems/tnlHeatEquationEocRhs.h> #include <problems/tnlHeatEquationEocProblem.h> -//typedef tnlDefaultConfigTag BuildConfig; +//typedef tnlDefaultBuildConfigTag BuildConfig; typedef tnlFastBuildConfig BuildConfig; template< typename ConfigTag > diff --git a/examples/heat-equation/tnl-heat-equation.h b/examples/heat-equation/tnl-heat-equation.h index 8f4c1f835a..77c3121bc4 100644 --- a/examples/heat-equation/tnl-heat-equation.h +++ b/examples/heat-equation/tnl-heat-equation.h @@ -19,8 +19,8 @@ #define TNL_HEAT_EQUATION_H_ #include <solvers/tnlSolver.h> -#include <solvers/tnlFastBuildConfig.h> -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlFastBuildConfigTag.h> +#include <solvers/tnlBuildConfigTags.h> #include <operators/diffusion/tnlLinearDiffusion.h> #include <operators/tnlAnalyticDirichletBoundaryConditions.h> #include <operators/tnlDirichletBoundaryConditions.h> @@ -29,7 +29,7 @@ #include <functors/tnlConstantFunction.h> #include <problems/tnlHeatEquationProblem.h> -//typedef tnlDefaultConfigTag BuildConfig; +//typedef tnlDefaultBuildConfigTag BuildConfig; typedef tnlFastBuildConfig BuildConfig; template< typename ConfigTag > @@ -106,8 +106,7 @@ class heatEquationSetter int main( int argc, char* argv[] ) { - tnlSolver< heatEquationSetter, heatEquationConfig, BuildConfig > solver; - if( ! solver. run( argc, argv ) ) + if( ! tnlSolver< heatEquationSetter, heatEquationConfig, BuildConfig >::run( argc, argv ) ) return EXIT_FAILURE; return EXIT_SUCCESS; } diff --git a/src/core/cuda/cuda-reduction_impl.h b/src/core/cuda/cuda-reduction_impl.h index 5b818c158a..e374454aca 100644 --- a/src/core/cuda/cuda-reduction_impl.h +++ b/src/core/cuda/cuda-reduction_impl.h @@ -282,8 +282,8 @@ typename Operation :: IndexType reduceOnCudaDevice( const Operation& operation, typedef typename Operation :: RealType RealType; typedef typename Operation :: ResultType ResultType; - const IndexType desBlockSize( 512 ); - const IndexType desGridSize( 2048 ); + const IndexType desBlockSize( 256 ); + const IndexType desGridSize( 65536 ); dim3 blockSize( 0 ), gridSize( 0 ); /*** diff --git a/src/problems/tnlHeatEquationProblem.h b/src/problems/tnlHeatEquationProblem.h index 8a41a40965..f1356515c0 100644 --- a/src/problems/tnlHeatEquationProblem.h +++ b/src/problems/tnlHeatEquationProblem.h @@ -42,6 +42,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, using typename BaseType::MeshType; using typename BaseType::DofVectorType; + using typename BaseType::MeshDependentDataType; static tnlString getTypeStatic(); @@ -55,7 +56,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, bool setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxDofs ); + MeshDependentDataType& meshDependentData ); template< typename Matrix > bool setupLinearSystem( const MeshType& mesh, @@ -65,7 +66,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const IndexType& step, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxDofs ); + MeshDependentDataType& meshDependentData ); IndexType getDofs( const MeshType& mesh ) const; @@ -76,6 +77,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const RealType& tau, const MeshType& mesh, DofVectorType& _u, + MeshDependentDataType& meshDependentData, DofVectorType& _fu ); template< typename Matrix > @@ -83,7 +85,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const RealType& tau, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxDofs, + MeshDependentDataType& meshDependentData, Matrix& matrix, DofVectorType& rightHandSide ); diff --git a/src/problems/tnlHeatEquationProblem_impl.h b/src/problems/tnlHeatEquationProblem_impl.h index 0f30069de8..021c4cff6e 100644 --- a/src/problems/tnlHeatEquationProblem_impl.h +++ b/src/problems/tnlHeatEquationProblem_impl.h @@ -109,7 +109,7 @@ tnlHeatEquationProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOper setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxiliaryDofs ) + MeshDependentDataType& meshDependentData ) { this->bindDofs( mesh, dofs ); const tnlString& initialConditionFile = parameters.getParameter< tnlString >( "initial-condition" ); @@ -158,7 +158,7 @@ makeSnapshot( const RealType& time, const IndexType& step, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxiliaryDofs ) + MeshDependentDataType& meshDependentData ) { cout << endl << "Writing output at time " << time << " step " << step << "." << endl; @@ -181,6 +181,7 @@ getExplicitRHS( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u, + MeshDependentDataType& meshDependentData, DofVectorType& fu ) { /**** @@ -220,7 +221,7 @@ assemblyLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u, - DofVectorType& auxDofs, + MeshDependentDataType& meshDependentData, Matrix& matrix, DofVectorType& b ) { @@ -244,6 +245,26 @@ assemblyLinearSystem( const RealType& time, cout << endl << b << endl; cout << endl << u << endl; abort();*/ + /*cout << "Matrix multiplication test ..." << endl; + tnlVector< RealType, DeviceType, IndexType > y; + y.setLike( u ); + tnlTimerRT timer; + timer.reset(); + timer.start(); + for( int i = 0; i < 100; i++ ) + matrix.vectorProduct( u, y ); + timer.stop(); + cout << "The time is " << timer.getTime(); + cout << "Scalar product test ..." << endl; + timer.reset(); + RealType a; + timer.start(); + for( int i = 0; i < 100; i++ ) + a = y.scalarProduct( u ); + timer.stop(); + cout << "The time is " << timer.getTime(); + cout << endl; + abort();*/ } #endif /* TNLHEATEQUATIONPROBLEM_IMPL_H_ */ diff --git a/src/problems/tnlPDEProblem.h b/src/problems/tnlPDEProblem.h index 12d8b5d21e..7be3d7f0a1 100644 --- a/src/problems/tnlPDEProblem.h +++ b/src/problems/tnlPDEProblem.h @@ -61,14 +61,13 @@ class tnlPDEProblem : public tnlProblem< Real, Device, Index > const RealType& tau, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxDofs ); + MeshDependentDataType& meshDependentData ); bool postIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& dofs, - DofVectorType& auxDofs ); - + MeshDependentDataType& meshDependentData ); tnlSolverMonitor< RealType, IndexType >* getSolverMonitor(); diff --git a/src/solvers/CMakeLists.txt b/src/solvers/CMakeLists.txt index cd08601fdb..befbe5500a 100755 --- a/src/solvers/CMakeLists.txt +++ b/src/solvers/CMakeLists.txt @@ -6,8 +6,8 @@ ADD_SUBDIRECTORY( preconditioners ) SET( headers tnlIterativeSolver.h tnlIterativeSolver_impl.h - tnlConfigTags.h - tnlFastBuildConfig.h + tnlBuildConfigTags.h + tnlFastBuildConfigTag.h tnlMeshTypeResolver.h tnlMeshTypeResolver_impl.h tnlSolver.h diff --git a/src/solvers/pde/tnlExplicitTimeStepper.h b/src/solvers/pde/tnlExplicitTimeStepper.h index 136cfac9ed..9d3dc11a27 100644 --- a/src/solvers/pde/tnlExplicitTimeStepper.h +++ b/src/solvers/pde/tnlExplicitTimeStepper.h @@ -38,6 +38,7 @@ class tnlExplicitTimeStepper typedef typename Problem::IndexType IndexType; typedef typename Problem::MeshType MeshType; typedef typename ProblemType::DofVectorType DofVectorType; + typedef typename ProblemType::MeshDependentDataType MeshDependentDataType; tnlExplicitTimeStepper(); @@ -63,7 +64,7 @@ class tnlExplicitTimeStepper const RealType& stopTime, const MeshType& mesh, DofVectorType& dofVector, - DofVectorType& auxiliaryDofVector ); + MeshDependentDataType& meshDependentData ); void getExplicitRHS( const RealType& time, const RealType& tau, @@ -82,7 +83,7 @@ class tnlExplicitTimeStepper RealType timeStep; - DofVectorType* auxiliaryDofs; + MeshDependentDataType* meshDependentData; tnlTimerRT explicitUpdaterTimer; }; diff --git a/src/solvers/pde/tnlExplicitTimeStepper_impl.h b/src/solvers/pde/tnlExplicitTimeStepper_impl.h index f5bf117ef6..e47e0c562e 100644 --- a/src/solvers/pde/tnlExplicitTimeStepper_impl.h +++ b/src/solvers/pde/tnlExplicitTimeStepper_impl.h @@ -110,7 +110,7 @@ solve( const RealType& time, const RealType& stopTime, const MeshType& mesh, DofVectorType& dofVector, - DofVectorType& auxiliaryDofVector ) + MeshDependentDataType& meshDependentData ) { tnlAssert( this->odeSolver, ); this->odeSolver->setTau( this -> timeStep ); @@ -120,7 +120,7 @@ solve( const RealType& time, if( this->odeSolver->getMinIterations() ) this->odeSolver->setMaxTau( ( stopTime - time ) / ( typename OdeSolver< Problem >::RealType ) this->odeSolver->getMinIterations() ); this->mesh = &mesh; - this->auxiliaryDofs = &auxiliaryDofVector; + this->meshDependentData = &meshDependentData; return this->odeSolver->solve( dofVector ); } @@ -137,20 +137,20 @@ getExplicitRHS( const RealType& time, tau, *( this->mesh), u, - *( this->auxiliaryDofs ) ) ) + *( this->meshDependentData ) ) ) { cerr << endl << "Preiteration failed." << endl; return; //return false; // TODO: throw exception } this->explicitUpdaterTimer.start(); - this->problem->getExplicitRHS( time, tau, *( this->mesh ), u, fu ); + this->problem->getExplicitRHS( time, tau, *( this->mesh ), u, fu, *( this->meshDependentData ) ); this->explicitUpdaterTimer.stop(); if( ! this->problem->postIterate( time, tau, *( this->mesh ), u, - *( this->auxiliaryDofs ) ) ) + *( this->meshDependentData ) ) ) { cerr << endl << "Postiteration failed." << endl; return; diff --git a/src/solvers/pde/tnlPDESolver.h b/src/solvers/pde/tnlPDESolver.h index ff495a772f..87c1f18e5b 100644 --- a/src/solvers/pde/tnlPDESolver.h +++ b/src/solvers/pde/tnlPDESolver.h @@ -91,8 +91,6 @@ class tnlPDESolver : public tnlObject DofVectorType dofs; - DofVectorType auxiliaryDofs; - MeshDependentDataType meshDependentData; TimeStepper* timeStepper; diff --git a/src/solvers/pde/tnlPDESolver_impl.h b/src/solvers/pde/tnlPDESolver_impl.h index 8e369ca77d..3b5282e741 100644 --- a/src/solvers/pde/tnlPDESolver_impl.h +++ b/src/solvers/pde/tnlPDESolver_impl.h @@ -35,7 +35,7 @@ tnlPDESolver() computeCpuTimer( 0 ) { this->dofs.setName( "dofs" ); - this->auxiliaryDofs.setName( "auxiliaryDofs" ); + this->meshDependentData.setName( "meshDependentData" ); } template< typename Problem, @@ -87,20 +87,20 @@ setup( const tnlParameterContainer& parameters, } cout << " [ OK ]" << endl; this->dofs.setValue( 0.0 ); - this->problem->bindDofs( mesh, this->dofs ); + this->problem->bindDofs( this->mesh, this->dofs ); /**** * Set mesh dependent data */ - this->problem->setMeshDependentData( mesh, this->meshDependentData ); - this->problem->bindMeshDependentData( mesh, this->meshDependentData ); + this->problem->setMeshDependentData( this->mesh, this->meshDependentData ); + this->problem->bindMeshDependentData( this->mesh, this->meshDependentData ); /*** * Set-up the initial condition */ cout << "Setting up the initial condition ... "; typedef typename Problem :: DofVectorType DofVectorType; - if( ! this->problem->setInitialCondition( parameters, mesh, this->dofs, this->auxiliaryDofs ) ) + if( ! this->problem->setInitialCondition( parameters, this->mesh, this->dofs, this->meshDependentData ) ) return false; cout << " [ OK ]" << endl; @@ -329,22 +329,24 @@ solve() RealType t( this->initialTime ); IndexType step( 0 ); IndexType allSteps = ceil( ( this->finalTime - this->initialTime ) / this->snapshotPeriod ); - this->timeStepper->setProblem( * ( this->problem ) ); - this->timeStepper->init( mesh ); - this->problem->bindDofs( mesh, this->dofs ); - this->problem->bindMeshDependentData( mesh, this->meshDependentData ); - if( ! this->problem->makeSnapshot( t, step, mesh, this->dofs, this->auxiliaryDofs ) ) + if( ! this->problem->makeSnapshot( t, step, mesh, this->dofs, this->meshDependentData ) ) { cerr << "Making the snapshot failed." << endl; return false; } - timeStepper->setTimeStep( this->timeStep * pow( mesh.getSmallestSpaceStep(), this->timeStepOrder ) ); + + /**** + * Initialize the time stepper + */ + this->timeStepper->setProblem( * ( this->problem ) ); + this->timeStepper->init( this->mesh ); + this->timeStepper->setTimeStep( this->timeStep * pow( mesh.getSmallestSpaceStep(), this->timeStepOrder ) ); while( step < allSteps ) { RealType tau = Min( this -> snapshotPeriod, this -> finalTime - t ); - if( ! this->timeStepper->solve( t, t + tau, mesh, this->dofs, this->auxiliaryDofs ) ) + if( ! this->timeStepper->solve( t, t + tau, mesh, this->dofs, this->meshDependentData ) ) return false; step ++; t += tau; @@ -354,7 +356,7 @@ solve() this->computeRtTimer->stop(); this->computeCpuTimer->stop(); - if( ! this->problem->makeSnapshot( t, step, mesh, this->dofs, this->auxiliaryDofs ) ) + if( ! this->problem->makeSnapshot( t, step, mesh, this->dofs, this->meshDependentData ) ) { cerr << "Making the snapshot failed." << endl; return false; diff --git a/src/solvers/pde/tnlSemiImplicitTimeStepper.h b/src/solvers/pde/tnlSemiImplicitTimeStepper.h index b8dbe74f8d..ab23a123dd 100644 --- a/src/solvers/pde/tnlSemiImplicitTimeStepper.h +++ b/src/solvers/pde/tnlSemiImplicitTimeStepper.h @@ -33,6 +33,7 @@ class tnlSemiImplicitTimeStepper typedef typename Problem::IndexType IndexType; typedef typename Problem::MeshType MeshType; typedef typename ProblemType::DofVectorType DofVectorType; + typedef typename ProblemType::MeshDependentDataType MeshDependentDataType; typedef LinearSystemSolver LinearSystemSolverType; typedef typename ProblemType::MatrixType MatrixType; @@ -62,7 +63,7 @@ class tnlSemiImplicitTimeStepper const RealType& stopTime, const MeshType& mesh, DofVectorType& dofVector, - DofVectorType& auxiliaryDofVector ); + MeshDependentDataType& meshDependentData ); bool writeEpilog( tnlLogger& logger ); diff --git a/src/solvers/pde/tnlSemiImplicitTimeStepper_impl.h b/src/solvers/pde/tnlSemiImplicitTimeStepper_impl.h index cb3efcad64..26559d13d6 100644 --- a/src/solvers/pde/tnlSemiImplicitTimeStepper_impl.h +++ b/src/solvers/pde/tnlSemiImplicitTimeStepper_impl.h @@ -136,7 +136,7 @@ solve( const RealType& time, const RealType& stopTime, const MeshType& mesh, DofVectorType& dofVector, - DofVectorType& auxiliaryDofVector ) + MeshDependentDataType& meshDependentData ) { tnlAssert( this->problem != 0, ); RealType t = time; @@ -149,7 +149,7 @@ solve( const RealType& time, currentTau, mesh, dofVector, - auxiliaryDofVector ) ) + meshDependentData ) ) { cerr << endl << "Preiteration failed." << endl; return false; @@ -161,7 +161,7 @@ solve( const RealType& time, currentTau, mesh, dofVector, - auxiliaryDofVector, + meshDependentData, this->matrix, this->rightHandSide ); this->linearSystemAssemblerTimer.stop(); @@ -180,7 +180,7 @@ solve( const RealType& time, currentTau, mesh, dofVector, - auxiliaryDofVector ) ) + meshDependentData ) ) { cerr << endl << "Postiteration failed." << endl; return false; diff --git a/src/solvers/tnlConfigTags.h b/src/solvers/tnlBuildConfigTags.h similarity index 99% rename from src/solvers/tnlConfigTags.h rename to src/solvers/tnlBuildConfigTags.h index 9f1794dcc0..5b094846fb 100644 --- a/src/solvers/tnlConfigTags.h +++ b/src/solvers/tnlBuildConfigTags.h @@ -20,7 +20,7 @@ #include <mesh/tnlGrid.h> -class tnlDefaultConfigTag{}; +class tnlDefaultBuildConfigTag{}; /**** * All devices are enabled by default. Those which are not available diff --git a/src/solvers/tnlFastBuildConfig.h b/src/solvers/tnlFastBuildConfigTag.h similarity index 98% rename from src/solvers/tnlFastBuildConfig.h rename to src/solvers/tnlFastBuildConfigTag.h index b8bd739351..23b603cf7a 100644 --- a/src/solvers/tnlFastBuildConfig.h +++ b/src/solvers/tnlFastBuildConfigTag.h @@ -18,7 +18,7 @@ #ifndef TNLFASTBUILDCONFIG_H_ #define TNLFASTBUILDCONFIG_H_ -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlBuildConfigTags.h> class tnlFastBuildConfig { diff --git a/src/solvers/tnlSolver.h b/src/solvers/tnlSolver.h index c99bd3af92..9e4040d87a 100644 --- a/src/solvers/tnlSolver.h +++ b/src/solvers/tnlSolver.h @@ -18,15 +18,15 @@ #ifndef TNLSOLVER_H_ #define TNLSOLVER_H_ -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlBuildConfigTags.h> template< template< typename Real, typename Device, typename Index, typename MeshType, typename ConfigTag, typename SolverStarter > class ProblemSetter, template< typename ConfTag > class ProblemConfig, - typename ConfigTag = tnlDefaultConfigTag > + typename ConfigTag = tnlDefaultBuildConfigTag > class tnlSolver { public: - bool run( int argc, char* argv[] ); + static bool run( int argc, char* argv[] ); protected: }; diff --git a/src/solvers/tnlSolverConfig_impl.h b/src/solvers/tnlSolverConfig_impl.h index 76012963e5..329b033591 100644 --- a/src/solvers/tnlSolverConfig_impl.h +++ b/src/solvers/tnlSolverConfig_impl.h @@ -19,7 +19,7 @@ #define TNLSOLVERCONFIG_IMPL_H_ #include <tnlConfig.h> -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlBuildConfigTags.h> #include <solvers/tnlDummyProblem.h> #include <solvers/pde/tnlExplicitTimeStepper.h> #include <solvers/pde/tnlPDESolver.h> diff --git a/src/solvers/tnlSolverInitiator.h b/src/solvers/tnlSolverInitiator.h index 3a27cf5357..525d304c9d 100644 --- a/src/solvers/tnlSolverInitiator.h +++ b/src/solvers/tnlSolverInitiator.h @@ -20,7 +20,7 @@ #include <core/tnlObject.h> #include <config/tnlParameterContainer.h> -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlBuildConfigTags.h> template< template< typename Real, typename Device, typename Index, typename MeshType, typename ConfigTag, typename SolverStarter > class ProblemSetter, typename ConfigTag > diff --git a/src/solvers/tnlSolverInitiator_impl.h b/src/solvers/tnlSolverInitiator_impl.h index 05e281e1bc..0876bd2752 100644 --- a/src/solvers/tnlSolverInitiator_impl.h +++ b/src/solvers/tnlSolverInitiator_impl.h @@ -17,7 +17,7 @@ #include <config/tnlParameterContainer.h> #include <solvers/tnlMeshTypeResolver.h> -#include <solvers/tnlConfigTags.h> +#include <solvers/tnlBuildConfigTags.h> #include <solvers/linear/stationary/tnlSORSolver.h> #include <solvers/linear/krylov/tnlCGSolver.h> #include <solvers/linear/krylov/tnlBICGStabSolver.h> diff --git a/src/solvers/tnlSolverStarter_impl.h b/src/solvers/tnlSolverStarter_impl.h index c9245b5756..09e61c33e2 100644 --- a/src/solvers/tnlSolverStarter_impl.h +++ b/src/solvers/tnlSolverStarter_impl.h @@ -524,9 +524,9 @@ bool tnlSolverStarter< ConfigTag > :: runPDESolver( Problem& problem, */ tnlPDESolver< Problem, TimeStepper > solver; solver.setProblem( problem ); + solver.setTimeStepper( timeStepper ); if( ! solver.setup( parameters ) ) return false; - solver.setTimeStepper( timeStepper ); /**** * Write a prolog -- GitLab