Nektar++
|
Base class for the development of solvers. More...
#include <DriverPFASST.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 | DriverPFASST (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) |
Constructor. More... | |
SOLVER_UTILS_EXPORT | ~DriverPFASST () override=default |
Destructor. More... | |
SOLVER_UTILS_EXPORT void | v_InitObject (std::ostream &out=std::cout) override |
Virtual function for initialisation implementation. More... | |
SOLVER_UTILS_EXPORT void | v_Execute (std::ostream &out=std::cout) override |
Virtual function for solve implementation. More... | |
Protected Member Functions inherited from Nektar::SolverUtils::DriverParallelInTime | |
SOLVER_UTILS_EXPORT | DriverParallelInTime (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) |
Constructor. More... | |
SOLVER_UTILS_EXPORT | ~DriverParallelInTime () override=default |
Destructor. More... | |
SOLVER_UTILS_EXPORT void | v_InitObject (std::ostream &out=std::cout) override |
Virtual function for initialisation implementation. More... | |
SOLVER_UTILS_EXPORT void | v_Execute (std::ostream &out=std::cout) override |
Virtual function for solve implementation. More... | |
void | SetParallelInTimeEquationSystem (std::string AdvectiveType) |
void | GetParametersFromSession (void) |
void | InitialiseEqSystem (bool turnoff_output) |
void | InitialiseInterpolationField (void) |
void | PrintSolverInfo (std::ostream &out=std::cout) |
void | PrintHeader (const std::string &title, const char c) |
void | RecvFromPreviousProc (Array< OneD, Array< OneD, NekDouble > > &array, int &convergence) |
void | RecvFromPreviousProc (Array< OneD, NekDouble > &array) |
void | SendToNextProc (Array< OneD, Array< OneD, NekDouble > > &array, int &convergence) |
void | SendToNextProc (Array< OneD, NekDouble > &array) |
void | CopySolutionVector (const Array< OneD, const Array< OneD, NekDouble > > &in, Array< OneD, Array< OneD, NekDouble > > &out) |
void | CopyFromPhysField (const size_t timeLevel, Array< OneD, Array< OneD, NekDouble > > &out) |
void | CopyToPhysField (const size_t timeLevel, const Array< OneD, const Array< OneD, NekDouble > > &in) |
void | UpdateFieldCoeffs (const size_t timeLevel, const Array< OneD, const Array< OneD, NekDouble > > &in=NullNekDoubleArrayOfArray) |
void | EvaluateExactSolution (const size_t timeLevel, const NekDouble &time) |
void | SolutionConvergenceMonitoring (const size_t timeLevel, const size_t iter) |
void | SolutionConvergenceSummary (const size_t timeLevel) |
void | UpdateErrorNorm (const size_t timeLevel, const bool normalized) |
void | PrintErrorNorm (const size_t timeLevel, const bool normalized) |
NekDouble | vL2ErrorMax (void) |
NekDouble | EstimateCommunicationTime (Array< OneD, Array< OneD, NekDouble > > &buffer1, Array< OneD, Array< OneD, NekDouble > > &buffer2) |
void | Interpolate (const Array< OneD, MultiRegions::ExpListSharedPtr > &infield, const Array< OneD, MultiRegions::ExpListSharedPtr > &outfield, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Protected Member Functions inherited from Nektar::SolverUtils::Driver | |
Driver (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) | |
Initialises EquationSystem class members. More... | |
virtual SOLVER_UTILS_EXPORT void | v_InitObject (std::ostream &out=std::cout) |
Virtual function for initialisation implementation. More... | |
virtual SOLVER_UTILS_EXPORT void | v_Execute (std::ostream &out=std::cout)=0 |
Virtual function for solve implementation. More... | |
Static Protected Attributes | |
static std::string | driverLookupId |
Static Protected Attributes inherited from Nektar::SolverUtils::Driver | |
static std::string | evolutionOperatorLookupIds [] |
static std::string | evolutionOperatorDef |
static std::string | driverDefault |
Private Member Functions | |
void | AssertParameters (void) |
void | InitialiseSDCScheme (void) |
void | SetTimeInterpolator (void) |
bool | IsNotInitialCondition (const size_t n) |
void | PropagateQuadratureSolutionAndResidual (const size_t timeLevel, const size_t index) |
void | UpdateFirstQuadrature (const size_t timeLevel) |
void | RunSweep (const NekDouble time, const size_t timeLevel, const bool update=false) |
void | ResidualEval (const NekDouble time, const size_t timeLevel, const size_t n) |
void | ResidualEval (const NekDouble time, const size_t timeLevel) |
void | IntegratedResidualEval (const size_t timeLevel) |
void | Interpolate (const size_t coarseLevel, const SDCarray &in, const size_t fineLevel, SDCarray &out, bool forced) |
void | InterpolateSolution (const size_t timeLevel) |
void | InterpolateResidual (const size_t timeLevel) |
void | Restrict (const size_t fineLevel, const SDCarray &in, const size_t coarseLevel, SDCarray &out) |
void | RestrictSolution (const size_t timeLevel) |
void | RestrictResidual (const size_t timeLevel) |
void | ComputeFASCorrection (const size_t timeLevel) |
void | Correct (const size_t coarseLevel, const Array< OneD, Array< OneD, NekDouble > > &in, const size_t fineLevel, Array< OneD, Array< OneD, NekDouble > > &out, bool forced) |
void | CorrectInitialSolution (const size_t timeLevel) |
void | CorrectInitialResidual (const size_t timeLevel) |
void | Correct (const size_t coarseLevel, const SDCarray &rest, const SDCarray &in, const size_t fineLevel, SDCarray &out, bool forced) |
void | CorrectSolution (const size_t timeLevel) |
void | CorrectResidual (const size_t timeLevel) |
void | ApplyWindowing (void) |
void | EvaluateSDCResidualNorm (const size_t timeLevel) |
void | WriteOutput (const size_t step, const NekDouble time) |
void | Interpolate (const Array< OneD, MultiRegions::ExpListSharedPtr > &infield, const Array< OneD, MultiRegions::ExpListSharedPtr > &outfield, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Private Attributes | |
Array< OneD, size_t > | m_QuadPts |
Array< OneD, Array< OneD, NekDouble > > | m_ImatFtoC |
Array< OneD, Array< OneD, NekDouble > > | m_ImatCtoF |
Array< OneD, SDCarray > | m_solutionRest |
Array< OneD, SDCarray > | m_residualRest |
Array< OneD, SDCarray > | m_integralRest |
Array< OneD, SDCarray > | m_correction |
Array< OneD, SDCarray > | m_storage |
Array< OneD, std::shared_ptr< LibUtilities::TimeIntegrationSchemeSDC > > | m_SDCSolver |
bool | m_updateResidual = false |
Friends | |
class | MemoryManager< DriverPFASST > |
Additional Inherited Members | |
Public Member Functions inherited from Nektar::SolverUtils::Driver | |
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 () |
Protected Attributes inherited from Nektar::SolverUtils::DriverParallelInTime | |
NekDouble | m_totalTime |
Total time integration interval. More... | |
NekDouble | m_chunkTime |
Time integration interval per chunk. More... | |
NekDouble | m_time |
Local time. More... | |
size_t | m_numChunks |
Number of time chunks. More... | |
size_t | m_chunkRank |
Rank in time. More... | |
size_t | m_iterMaxPIT |
Maximum number of parallel-in-time iteration. More... | |
size_t | m_numWindowsPIT |
bool | m_exactSolution |
Using exact solution to compute error norms. More... | |
NekDouble | m_tolerPIT |
ParallelInTime tolerance. More... | |
size_t | m_nVar |
Number of variables. More... | |
size_t | m_nTimeLevel |
Number of time levels. More... | |
Array< OneD, size_t > | m_nsteps |
Number of time steps for each time level. More... | |
Array< OneD, NekDouble > | m_timestep |
Time step for each time level. More... | |
Array< OneD, size_t > | m_npts |
Number of dof for each time level. More... | |
Array< OneD, std::shared_ptr< UnsteadySystem > > | m_EqSys |
Equation system to solve. More... | |
Array< OneD, NekDouble > | m_vL2Errors |
Storage for parallel-in-time iteration. More... | |
Array< OneD, NekDouble > | m_vLinfErrors |
Array< OneD, Array< OneD, NekDouble > > | m_exactsoln |
Protected Attributes inherited from Nektar::SolverUtils::Driver | |
LibUtilities::CommSharedPtr | m_comm |
Communication object. More... | |
LibUtilities::SessionReaderSharedPtr | m_session |
Session reader object. More... | |
LibUtilities::SessionReaderSharedPtr | session_LinNS |
Coupling between SFD and arnoldi. More... | |
SpatialDomains::MeshGraphSharedPtr | m_graph |
MeshGraph object. More... | |
Array< OneD, EquationSystemSharedPtr > | m_equ |
Equation system to solve. More... | |
int | m_nequ |
number of equations More... | |
enum EvolutionOperatorType | m_EvolutionOperator |
Evolution Operator. More... | |
Base class for the development of solvers.
Definition at line 48 of file DriverPFASST.h.
|
protected |
Constructor.
Definition at line 52 of file DriverPFASST.cpp.
|
overrideprotecteddefault |
Destructor.
Definition at line 891 of file DriverPFASST.cpp.
References Interpolate(), Nektar::SolverUtils::DriverParallelInTime::m_chunkRank, Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::DriverParallelInTime::m_EqSys, Nektar::SolverUtils::DriverParallelInTime::m_nTimeLevel, Nektar::SolverUtils::DriverParallelInTime::m_numChunks, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_SDCSolver, and UpdateFirstQuadrature().
Referenced by v_Execute().
Definition at line 280 of file DriverPFASST.cpp.
References ASSERTL0, Nektar::SolverUtils::DriverParallelInTime::m_EqSys, Nektar::SolverUtils::DriverParallelInTime::m_nsteps, Nektar::SolverUtils::DriverParallelInTime::m_nTimeLevel, Nektar::SolverUtils::DriverParallelInTime::m_numChunks, and Nektar::SolverUtils::DriverParallelInTime::m_timestep.
|
private |
Definition at line 682 of file DriverPFASST.cpp.
References m_integralRest, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_SDCSolver, Restrict(), Vmath::Vadd(), and Vmath::Vsub().
Referenced by v_Execute().
|
private |
Definition at line 735 of file DriverPFASST.cpp.
References Interpolate(), IsNotInitialCondition(), m_correction, Nektar::SolverUtils::DriverParallelInTime::m_EqSys, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_storage, Vmath::Vadd(), and Vmath::Vsub().
Referenced by CorrectInitialResidual(), CorrectInitialSolution(), CorrectResidual(), and CorrectSolution().
|
private |
Definition at line 796 of file DriverPFASST.cpp.
References Interpolate(), IsNotInitialCondition(), m_correction, Nektar::SolverUtils::DriverParallelInTime::m_EqSys, m_ImatCtoF, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_storage, Vmath::Svtvp(), Vmath::Vsub(), and Vmath::Zero().
|
private |
Definition at line 783 of file DriverPFASST.cpp.
References Correct(), and m_SDCSolver.
|
private |
Definition at line 770 of file DriverPFASST.cpp.
References Correct(), and m_SDCSolver.
|
private |
Definition at line 866 of file DriverPFASST.cpp.
References Correct(), m_QuadPts, m_residualRest, m_SDCSolver, m_updateResidual, and ResidualEval().
Referenced by v_Execute().
|
private |
Definition at line 853 of file DriverPFASST.cpp.
References Correct(), m_SDCSolver, and m_solutionRest.
Referenced by v_Execute().
|
inlinestatic |
Creates an instance of this class.
Definition at line 54 of file DriverPFASST.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
private |
Definition at line 921 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_EqSys, Nektar::SolverUtils::DriverParallelInTime::m_exactsoln, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_SDCSolver, Nektar::SolverUtils::DriverParallelInTime::m_vL2Errors, Nektar::SolverUtils::DriverParallelInTime::m_vLinfErrors, and Vmath::Vadd().
Referenced by v_Execute().
Definition at line 315 of file DriverPFASST.cpp.
References ASSERTL0, m_correction, Nektar::SolverUtils::DriverParallelInTime::m_EqSys, m_integralRest, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nTimeLevel, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_residualRest, m_SDCSolver, m_solutionRest, m_storage, and Nektar::SolverUtils::DriverParallelInTime::m_timestep.
Referenced by v_InitObject().
|
private |
Definition at line 541 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_chunkTime, and m_SDCSolver.
Referenced by v_Execute().
|
private |
Definition at line 116 of file DriverParallelInTime.cpp.
|
private |
Definition at line 549 of file DriverPFASST.cpp.
References Interpolate(), IsNotInitialCondition(), Nektar::SolverUtils::DriverParallelInTime::m_EqSys, m_ImatCtoF, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_storage, Vmath::Smul(), and Vmath::Svtvp().
Referenced by ApplyWindowing(), Correct(), Interpolate(), InterpolateResidual(), InterpolateSolution(), and Restrict().
|
private |
Definition at line 599 of file DriverPFASST.cpp.
References Interpolate(), and m_SDCSolver.
Referenced by v_Execute().
|
private |
Definition at line 586 of file DriverPFASST.cpp.
References Interpolate(), and m_SDCSolver.
Referenced by v_Execute().
|
private |
Definition at line 457 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_chunkRank.
Referenced by Correct(), and Interpolate().
|
private |
Definition at line 465 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_SDCSolver, and Vmath::Vcopy().
Referenced by v_Execute().
|
private |
Definition at line 532 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_chunkTime, and m_SDCSolver.
|
private |
Definition at line 522 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_chunkTime, and m_SDCSolver.
Referenced by CorrectResidual(), RestrictResidual(), RunSweep(), and v_Execute().
|
private |
Definition at line 612 of file DriverPFASST.cpp.
References Interpolate(), Nektar::SolverUtils::DriverParallelInTime::m_EqSys, m_ImatFtoC, Nektar::SolverUtils::DriverParallelInTime::m_npts, Nektar::SolverUtils::DriverParallelInTime::m_nVar, m_QuadPts, m_storage, Vmath::Smul(), and Vmath::Svtvp().
Referenced by ComputeFASCorrection(), and RestrictSolution().
|
private |
Definition at line 662 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::CopySolutionVector(), m_QuadPts, m_residualRest, m_SDCSolver, Nektar::SolverUtils::DriverParallelInTime::m_time, m_updateResidual, and ResidualEval().
Referenced by v_Execute().
|
private |
Definition at line 644 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::CopySolutionVector(), m_QuadPts, m_SDCSolver, m_solutionRest, and Restrict().
Referenced by v_Execute().
|
private |
Definition at line 498 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_chunkTime, m_SDCSolver, Nektar::SolverUtils::DriverParallelInTime::m_time, and ResidualEval().
Referenced by v_Execute().
Definition at line 396 of file DriverPFASST.cpp.
References m_ImatCtoF, m_ImatFtoC, Nektar::SolverUtils::DriverParallelInTime::m_nTimeLevel, m_QuadPts, m_SDCSolver, and Nektar::LibUtilities::PointsManager().
Referenced by v_InitObject().
|
private |
Definition at line 490 of file DriverPFASST.cpp.
References m_SDCSolver.
Referenced by ApplyWindowing(), and v_Execute().
|
overrideprotectedvirtual |
Virtual function for solve implementation.
Reimplemented from Nektar::SolverUtils::DriverParallelInTime.
Definition at line 74 of file DriverPFASST.cpp.
References ApplyWindowing(), ComputeFASCorrection(), CorrectResidual(), CorrectSolution(), Nektar::LibUtilities::Timer::Elapsed(), Nektar::SolverUtils::DriverParallelInTime::EvaluateExactSolution(), EvaluateSDCResidualNorm(), CellMLToNektar.pycml::format, IntegratedResidualEval(), InterpolateResidual(), InterpolateSolution(), Nektar::SolverUtils::DriverParallelInTime::m_chunkRank, Nektar::SolverUtils::DriverParallelInTime::m_chunkTime, Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::DriverParallelInTime::m_iterMaxPIT, Nektar::SolverUtils::DriverParallelInTime::m_nsteps, Nektar::SolverUtils::DriverParallelInTime::m_nTimeLevel, Nektar::SolverUtils::DriverParallelInTime::m_numChunks, Nektar::SolverUtils::DriverParallelInTime::m_numWindowsPIT, m_SDCSolver, Nektar::SolverUtils::DriverParallelInTime::m_time, Nektar::SolverUtils::DriverParallelInTime::m_timestep, Nektar::SolverUtils::DriverParallelInTime::m_tolerPIT, Nektar::SolverUtils::DriverParallelInTime::m_totalTime, Nektar::SolverUtils::DriverParallelInTime::PrintErrorNorm(), Nektar::SolverUtils::DriverParallelInTime::PrintHeader(), PropagateQuadratureSolutionAndResidual(), Nektar::SolverUtils::DriverParallelInTime::RecvFromPreviousProc(), ResidualEval(), RestrictResidual(), RestrictSolution(), RunSweep(), Nektar::SolverUtils::DriverParallelInTime::SendToNextProc(), Nektar::SolverUtils::DriverParallelInTime::SolutionConvergenceSummary(), Nektar::LibUtilities::Timer::Start(), Nektar::LibUtilities::Timer::Stop(), UpdateFirstQuadrature(), Nektar::SolverUtils::DriverParallelInTime::vL2ErrorMax(), Nektar::UnitTests::w(), and WriteOutput().
|
overrideprotectedvirtual |
Virtual function for initialisation implementation.
Reimplemented from Nektar::SolverUtils::DriverParallelInTime.
Definition at line 61 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::GetParametersFromSession(), Nektar::SolverUtils::DriverParallelInTime::InitialiseEqSystem(), InitialiseSDCScheme(), Nektar::SolverUtils::DriverParallelInTime::PrintSolverInfo(), SetTimeInterpolator(), and Nektar::SolverUtils::DriverParallelInTime::v_InitObject().
|
private |
Definition at line 943 of file DriverPFASST.cpp.
References Nektar::SolverUtils::DriverParallelInTime::m_EqSys, Nektar::SolverUtils::DriverParallelInTime::m_nsteps, m_SDCSolver, Nektar::SolverUtils::Driver::m_session, and Nektar::SolverUtils::DriverParallelInTime::UpdateFieldCoeffs().
Referenced by v_Execute().
|
friend |
Definition at line 45 of file DriverPFASST.h.
|
static |
Name of the class.
Definition at line 65 of file DriverPFASST.h.
|
staticprotected |
Definition at line 83 of file DriverPFASST.h.
Definition at line 157 of file DriverPFASST.h.
Referenced by Correct(), and InitialiseSDCScheme().
Definition at line 153 of file DriverPFASST.h.
Referenced by Correct(), Interpolate(), and SetTimeInterpolator().
Definition at line 152 of file DriverPFASST.h.
Referenced by Restrict(), and SetTimeInterpolator().
Definition at line 156 of file DriverPFASST.h.
Referenced by ComputeFASCorrection(), and InitialiseSDCScheme().
Definition at line 151 of file DriverPFASST.h.
Referenced by ComputeFASCorrection(), Correct(), CorrectResidual(), EvaluateSDCResidualNorm(), InitialiseSDCScheme(), Interpolate(), PropagateQuadratureSolutionAndResidual(), Restrict(), RestrictResidual(), RestrictSolution(), and SetTimeInterpolator().
Definition at line 155 of file DriverPFASST.h.
Referenced by CorrectResidual(), InitialiseSDCScheme(), and RestrictResidual().
|
private |
Definition at line 160 of file DriverPFASST.h.
Referenced by ApplyWindowing(), ComputeFASCorrection(), CorrectInitialResidual(), CorrectInitialSolution(), CorrectResidual(), CorrectSolution(), EvaluateSDCResidualNorm(), InitialiseSDCScheme(), IntegratedResidualEval(), InterpolateResidual(), InterpolateSolution(), PropagateQuadratureSolutionAndResidual(), ResidualEval(), RestrictResidual(), RestrictSolution(), RunSweep(), SetTimeInterpolator(), UpdateFirstQuadrature(), v_Execute(), and WriteOutput().
Definition at line 154 of file DriverPFASST.h.
Referenced by CorrectSolution(), InitialiseSDCScheme(), and RestrictSolution().
Definition at line 158 of file DriverPFASST.h.
Referenced by Correct(), InitialiseSDCScheme(), Interpolate(), and Restrict().
|
private |
Definition at line 162 of file DriverPFASST.h.
Referenced by CorrectResidual(), and RestrictResidual().