Nektar++
|
Base class for the development of solvers. More...
#include <DriverParareal.h>
Static Public Member Functions | |
static DriverSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of the class. More... | |
Protected Member Functions | |
SOLVER_UTILS_EXPORT | DriverParareal (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) |
Constructor. More... | |
virtual SOLVER_UTILS_EXPORT | ~DriverParareal () |
Destructor. More... | |
virtual SOLVER_UTILS_EXPORT void | v_InitObject (std::ostream &out=std::cout) override |
Second-stage initialisation. More... | |
virtual SOLVER_UTILS_EXPORT void | v_Execute (std::ostream &out=std::cout) override |
Virtual function for solve implementation. More... | |
void | SetPararealSessionFile (void) |
Set the Parareal (coarse solver) session file. More... | |
void | RunCoarseSolve (const NekDouble time, const int nstep, const int iter, const Array< OneD, const Array< OneD, NekDouble >> &input, Array< OneD, Array< OneD, NekDouble >> &output) |
void | RunFineSolve (const NekDouble time, const int nstep, const int iter, const Array< OneD, const Array< OneD, NekDouble >> &input, Array< OneD, Array< OneD, NekDouble >> &output) |
![]() | |
Driver (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) | |
Initialises EquationSystem class members. More... | |
virtual SOLVER_UTILS_EXPORT Array< OneD, NekDouble > | v_GetRealEvl (void) |
virtual SOLVER_UTILS_EXPORT Array< OneD, NekDouble > | v_GetImagEvl (void) |
Static Protected Attributes | |
static std::string | driverLookupId |
![]() | |
static std::string | evolutionOperatorLookupIds [] |
static std::string | evolutionOperatorDef |
static std::string | driverDefault |
Friends | |
class | MemoryManager< DriverParareal > |
Additional Inherited Members | |
![]() | |
virtual | ~Driver () |
Destructor. More... | |
SOLVER_UTILS_EXPORT void | InitObject (std::ostream &out=std::cout) |
Initialise Object. More... | |
SOLVER_UTILS_EXPORT void | Execute (std::ostream &out=std::cout) |
Execute driver. More... | |
SOLVER_UTILS_EXPORT Array< OneD, EquationSystemSharedPtr > | GetEqu () |
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > | GetRealEvl (void) |
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > | GetImagEvl (void) |
Base class for the development of solvers.
Definition at line 47 of file DriverParareal.h.
|
protected |
Constructor.
Definition at line 54 of file DriverParareal.cpp.
|
protectedvirtual |
|
inlinestatic |
Creates an instance of this class.
Definition at line 53 of file DriverParareal.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
protected |
Definition at line 279 of file DriverParareal.cpp.
References m_chunkRank, m_coarseSteps, m_coarseTimeStep, Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_equ, m_interp, and m_numChunks.
Referenced by v_Execute().
|
protected |
Definition at line 340 of file DriverParareal.cpp.
References m_chunkRank, Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_equ, m_fineSteps, m_fineTimeStep, m_numChunks, and Nektar::SolverUtils::Driver::m_session.
Referenced by v_Execute().
Set the Parareal (coarse solver) session file.
Definition at line 180 of file DriverParareal.cpp.
References Nektar::LibUtilities::SessionReader::CreateInstance(), m_coarseSolveFactor, Nektar::SolverUtils::Driver::m_graph, m_graphCoarse, Nektar::SolverUtils::Driver::m_session, m_sessionCoarse, and Nektar::SpatialDomains::MeshGraph::Read().
Referenced by v_InitObject().
|
overrideprotectedvirtual |
Virtual function for solve implementation.
Implements Nektar::SolverUtils::Driver.
Definition at line 389 of file DriverParareal.cpp.
References ASSERTL0, CellMLToNektar.pycml::copy(), Nektar::LibUtilities::Timer::Elapsed(), m_chunkRank, m_chunkTime, m_coarseSteps, m_coarseTimeStep, Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_equ, m_exactSolution, m_fineSteps, m_fineTimeStep, m_interp, m_numChunks, m_pararealIterMax, m_pararealToler, Nektar::SolverUtils::Driver::m_session, m_sessionCoarse, m_totalTime, Nektar::LibUtilities::ReduceMax, RunCoarseSolve(), RunFineSolve(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().
|
overrideprotectedvirtual |
Second-stage initialisation.
Reimplemented from Nektar::SolverUtils::Driver.
Definition at line 71 of file DriverParareal.cpp.
References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::SolverUtils::eAdjoint, Nektar::SolverUtils::eDirect, Nektar::SolverUtils::eNonlinear, Nektar::SolverUtils::eSkewSymmetric, Nektar::SolverUtils::GetEquationSystemFactory(), Nektar::SolverUtils::Driver::m_equ, Nektar::SolverUtils::Driver::m_EvolutionOperator, Nektar::SolverUtils::Driver::m_graph, m_graphCoarse, Nektar::SolverUtils::Driver::m_nequ, Nektar::SolverUtils::Driver::m_session, m_sessionCoarse, and SetPararealSessionFile().
|
friend |
Definition at line 1 of file DriverParareal.h.
|
static |
Name of the class.
Definition at line 64 of file DriverParareal.h.
|
staticprotected |
Definition at line 140 of file DriverParareal.h.
|
protected |
Rank in time.
Definition at line 102 of file DriverParareal.h.
Referenced by RunCoarseSolve(), RunFineSolve(), and v_Execute().
|
protected |
|
protected |
Coarse solver time factor.
Definition at line 90 of file DriverParareal.h.
Referenced by SetPararealSessionFile().
|
protected |
Number of steps for the coarse solver.
Definition at line 96 of file DriverParareal.h.
Referenced by RunCoarseSolve(), and v_Execute().
|
protected |
Timestep for coarse solver.
Definition at line 81 of file DriverParareal.h.
Referenced by RunCoarseSolve(), and v_Execute().
|
protected |
Using exact solution to compute error norms.
Definition at line 108 of file DriverParareal.h.
Referenced by v_Execute().
|
protected |
Number of steps for the fine solver.
Definition at line 93 of file DriverParareal.h.
Referenced by RunFineSolve(), and v_Execute().
|
protected |
Timestep for fine solver.
Definition at line 78 of file DriverParareal.h.
Referenced by RunFineSolve(), and v_Execute().
|
protected |
Parareal (coarse solver) MeshGraph object.
Definition at line 75 of file DriverParareal.h.
Referenced by SetPararealSessionFile(), and v_InitObject().
|
protected |
Definition at line 69 of file DriverParareal.h.
Referenced by RunCoarseSolve(), and v_Execute().
|
protected |
Number of time chunks.
Definition at line 99 of file DriverParareal.h.
Referenced by RunCoarseSolve(), RunFineSolve(), and v_Execute().
|
protected |
Maximum number of parareal iteration.
Definition at line 105 of file DriverParareal.h.
Referenced by v_Execute().
|
protected |
|
protected |
Parareal (coarse solver) session reader object.
Definition at line 72 of file DriverParareal.h.
Referenced by SetPararealSessionFile(), v_Execute(), and v_InitObject().
|
protected |
Total time integration interval.
Definition at line 84 of file DriverParareal.h.
Referenced by v_Execute().