Loading src/solvers/linear/krylov/CMakeLists.txt +7 −5 Original line number Diff line number Diff line Loading @@ -3,7 +3,9 @@ SET( headers tnlCGSolver.h tnlBICGStabSolver.h tnlBICGStabSolver_impl.h tnlGMRESSolver.h tnlGMRESSolver_impl.h ) tnlGMRESSolver_impl.h tnlTFQMRSolver.h tnlTFQMRSolver_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/solvers/linear/krylov ) set( common_SOURCES ${CURRENT_DIR}/tnlGMRESSolver_impl.cpp ) Loading src/solvers/tnlBuildConfigTags.h +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ class tnlSemiImplicitSORSolverTag{}; class tnlSemiImplicitCGSolverTag{}; class tnlSemiImplicitBICGStabSolverTag{}; class tnlSemiImplicitGMRESSolverTag{}; class tnlSemiImplicitTFQMRSolverTag{}; template< typename MeshConfig, typename SemiImplicitSolver > struct tnlMeshConfigSemiImplicitSolver{ enum { enabled = true }; }; Loading src/solvers/tnlSolverConfig_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,8 @@ bool tnlSolverConfig< MeshConfig, ProblemConfig >::configSetup( tnlConfigDescrip config.addEntryEnum( "bicgstab" ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitGMRESSolverTag >::enabled ) config.addEntryEnum( "gmres" ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitTFQMRSolverTag >::enabled ) config.addEntryEnum( "tfqmr" ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitSORSolverTag >::enabled ) config.addEntryEnum( "sor" ); } Loading Loading @@ -143,6 +145,8 @@ bool tnlSolverConfig< MeshConfig, ProblemConfig >::configSetup( tnlConfigDescrip tnlBICGStabSolver< MatrixType >::configSetup( config ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitGMRESSolverTag >::enabled ) tnlGMRESSolver< MatrixType >::configSetup( config ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitTFQMRSolverTag >::enabled ) tnlTFQMRSolver< MatrixType >::configSetup( config ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitSORSolverTag >::enabled ) tnlSORSolver< MatrixType >::configSetup( config ); } Loading src/solvers/tnlSolverStarter_impl.h +23 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <solvers/linear/krylov/tnlCGSolver.h> #include <solvers/linear/krylov/tnlBICGStabSolver.h> #include <solvers/linear/krylov/tnlGMRESSolver.h> #include <solvers/linear/krylov/tnlTFQMRSolver.h> #include <solvers/pde/tnlExplicitTimeStepper.h> #include <solvers/pde/tnlSemiImplicitTimeStepper.h> #include <solvers/pde/tnlPDESolver.h> Loading Loading @@ -187,9 +188,10 @@ class tnlSolverStarterTimeDiscretisationSetter< Problem, tnlSemiImplicitTimeDisc if( discreteSolver != "sor" && discreteSolver != "cg" && discreteSolver != "bicgstab" && discreteSolver != "gmres" ) discreteSolver != "gmres" && discreteSolver != "tfqmr" ) { cerr << "Unknown explicit discrete solver " << discreteSolver << ". It can be only: sor, cg, bicgstab or gmres." << endl; cerr << "Unknown explicit discrete solver " << discreteSolver << ". It can be only: sor, cg, bicgstab, gmres or tfqmr." << endl; return false; } Loading @@ -201,6 +203,8 @@ class tnlSolverStarterTimeDiscretisationSetter< Problem, tnlSemiImplicitTimeDisc return tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitBICGStabSolverTag, MeshConfig >::run( problem, parameters ); if( discreteSolver == "gmres" ) return tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitGMRESSolverTag, MeshConfig >::run( problem, parameters ); if( discreteSolver == "tfqmr" ) return tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitTFQMRSolverTag, MeshConfig >::run( problem, parameters ); return false; } }; Loading Loading @@ -356,6 +360,23 @@ class tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitGMRESSol } }; template< typename Problem, typename MeshConfig > class tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitTFQMRSolverTag, MeshConfig, true > { public: static bool run( Problem& problem, const tnlParameterContainer& parameters ) { typedef typename Problem::MatrixType MatrixType; typedef tnlTFQMRSolver< MatrixType > LinearSystemSolver; typedef tnlSemiImplicitTimeStepper< Problem, LinearSystemSolver > TimeStepper; return tnlSolverStarterSemiImplicitTimeStepperSetter< Problem, TimeStepper, MeshConfig >::run( problem, parameters ); } }; /**** * Setting the explicit time stepper */ Loading Loading
src/solvers/linear/krylov/CMakeLists.txt +7 −5 Original line number Diff line number Diff line Loading @@ -3,7 +3,9 @@ SET( headers tnlCGSolver.h tnlBICGStabSolver.h tnlBICGStabSolver_impl.h tnlGMRESSolver.h tnlGMRESSolver_impl.h ) tnlGMRESSolver_impl.h tnlTFQMRSolver.h tnlTFQMRSolver_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/solvers/linear/krylov ) set( common_SOURCES ${CURRENT_DIR}/tnlGMRESSolver_impl.cpp ) Loading
src/solvers/tnlBuildConfigTags.h +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ class tnlSemiImplicitSORSolverTag{}; class tnlSemiImplicitCGSolverTag{}; class tnlSemiImplicitBICGStabSolverTag{}; class tnlSemiImplicitGMRESSolverTag{}; class tnlSemiImplicitTFQMRSolverTag{}; template< typename MeshConfig, typename SemiImplicitSolver > struct tnlMeshConfigSemiImplicitSolver{ enum { enabled = true }; }; Loading
src/solvers/tnlSolverConfig_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,8 @@ bool tnlSolverConfig< MeshConfig, ProblemConfig >::configSetup( tnlConfigDescrip config.addEntryEnum( "bicgstab" ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitGMRESSolverTag >::enabled ) config.addEntryEnum( "gmres" ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitTFQMRSolverTag >::enabled ) config.addEntryEnum( "tfqmr" ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitSORSolverTag >::enabled ) config.addEntryEnum( "sor" ); } Loading Loading @@ -143,6 +145,8 @@ bool tnlSolverConfig< MeshConfig, ProblemConfig >::configSetup( tnlConfigDescrip tnlBICGStabSolver< MatrixType >::configSetup( config ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitGMRESSolverTag >::enabled ) tnlGMRESSolver< MatrixType >::configSetup( config ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitTFQMRSolverTag >::enabled ) tnlTFQMRSolver< MatrixType >::configSetup( config ); if( tnlMeshConfigSemiImplicitSolver< MeshConfig, tnlSemiImplicitSORSolverTag >::enabled ) tnlSORSolver< MatrixType >::configSetup( config ); } Loading
src/solvers/tnlSolverStarter_impl.h +23 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <solvers/linear/krylov/tnlCGSolver.h> #include <solvers/linear/krylov/tnlBICGStabSolver.h> #include <solvers/linear/krylov/tnlGMRESSolver.h> #include <solvers/linear/krylov/tnlTFQMRSolver.h> #include <solvers/pde/tnlExplicitTimeStepper.h> #include <solvers/pde/tnlSemiImplicitTimeStepper.h> #include <solvers/pde/tnlPDESolver.h> Loading Loading @@ -187,9 +188,10 @@ class tnlSolverStarterTimeDiscretisationSetter< Problem, tnlSemiImplicitTimeDisc if( discreteSolver != "sor" && discreteSolver != "cg" && discreteSolver != "bicgstab" && discreteSolver != "gmres" ) discreteSolver != "gmres" && discreteSolver != "tfqmr" ) { cerr << "Unknown explicit discrete solver " << discreteSolver << ". It can be only: sor, cg, bicgstab or gmres." << endl; cerr << "Unknown explicit discrete solver " << discreteSolver << ". It can be only: sor, cg, bicgstab, gmres or tfqmr." << endl; return false; } Loading @@ -201,6 +203,8 @@ class tnlSolverStarterTimeDiscretisationSetter< Problem, tnlSemiImplicitTimeDisc return tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitBICGStabSolverTag, MeshConfig >::run( problem, parameters ); if( discreteSolver == "gmres" ) return tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitGMRESSolverTag, MeshConfig >::run( problem, parameters ); if( discreteSolver == "tfqmr" ) return tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitTFQMRSolverTag, MeshConfig >::run( problem, parameters ); return false; } }; Loading Loading @@ -356,6 +360,23 @@ class tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitGMRESSol } }; template< typename Problem, typename MeshConfig > class tnlSolverStarterSemiImplicitSolverSetter< Problem, tnlSemiImplicitTFQMRSolverTag, MeshConfig, true > { public: static bool run( Problem& problem, const tnlParameterContainer& parameters ) { typedef typename Problem::MatrixType MatrixType; typedef tnlTFQMRSolver< MatrixType > LinearSystemSolver; typedef tnlSemiImplicitTimeStepper< Problem, LinearSystemSolver > TimeStepper; return tnlSolverStarterSemiImplicitTimeStepperSetter< Problem, TimeStepper, MeshConfig >::run( problem, parameters ); } }; /**** * Setting the explicit time stepper */ Loading