Nektar++
|
Base class for unsteady solvers. More...
#include <PulseWaveSystem.h>
Protected Member Functions | |
PulseWaveSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) | |
Initialises PulseWaveSystem class members. More... | |
void | v_InitObject (bool DeclareField=false) override |
void | v_DoInitialise (bool dumpInitialConditions=false) override |
Sets up initial conditions. More... | |
void | v_DoSolve () override |
Solves an unsteady problem. More... | |
void | LinkSubdomains (Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &fields) |
Links the subdomains. More... | |
void | BifurcationRiemann (Array< OneD, NekDouble > &Au, Array< OneD, NekDouble > &uu, Array< OneD, NekDouble > &beta, Array< OneD, NekDouble > &A_0, Array< OneD, NekDouble > &alpha) |
Riemann Problem for Bifurcation. More... | |
void | MergingRiemann (Array< OneD, NekDouble > &Au, Array< OneD, NekDouble > &uu, Array< OneD, NekDouble > &beta, Array< OneD, NekDouble > &A_0, Array< OneD, NekDouble > &alpha) |
Riemann Problem for Merging Flow. More... | |
void | InterfaceRiemann (Array< OneD, NekDouble > &Au, Array< OneD, NekDouble > &uu, Array< OneD, NekDouble > &beta, Array< OneD, NekDouble > &A_0, Array< OneD, NekDouble > &alpha) |
Riemann Problem for Interface/Junction. More... | |
void | v_Output (void) override |
void | CheckPoint_Output (const int n) |
NekDouble | v_L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false) override |
Compute the L2 error between fields and a given exact solution. More... | |
NekDouble | v_LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray) override |
Compute the L_inf error between fields and a given exact solution. More... | |
void | WriteVessels (const std::string &outname) |
Write input fields to the given filename. More... | |
void | EnforceInterfaceConditions (const Array< OneD, const Array< OneD, NekDouble > > &fields) |
Protected Member Functions inherited from Nektar::SolverUtils::UnsteadySystem | |
SOLVER_UTILS_EXPORT | UnsteadySystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
Initialises UnsteadySystem class members. More... | |
SOLVER_UTILS_EXPORT void | v_InitObject (bool DeclareField=true) override |
Init object for UnsteadySystem class. More... | |
SOLVER_UTILS_EXPORT void | v_DoSolve () override |
Solves an unsteady problem. More... | |
virtual SOLVER_UTILS_EXPORT void | v_PrintStatusInformation (const int step, const NekDouble cpuTime) |
Print Status Information. More... | |
virtual SOLVER_UTILS_EXPORT void | v_PrintSummaryStatistics (const NekDouble intTime) |
Print Summary Statistics. More... | |
SOLVER_UTILS_EXPORT void | v_DoInitialise (bool dumpInitialConditions=true) override |
Sets up initial conditions. More... | |
SOLVER_UTILS_EXPORT void | v_GenerateSummary (SummaryList &s) override |
Print a summary of time stepping parameters. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_GetTimeStep (const Array< OneD, const Array< OneD, NekDouble > > &inarray) |
Return the timestep to be used for the next step in the time-marching loop. More... | |
virtual SOLVER_UTILS_EXPORT bool | v_PreIntegrate (int step) |
virtual SOLVER_UTILS_EXPORT bool | v_PostIntegrate (int step) |
virtual SOLVER_UTILS_EXPORT bool | v_RequireFwdTrans () |
virtual SOLVER_UTILS_EXPORT void | v_SteadyStateResidual (int step, Array< OneD, NekDouble > &L2) |
virtual SOLVER_UTILS_EXPORT bool | v_UpdateTimeStepCheck () |
SOLVER_UTILS_EXPORT NekDouble | MaxTimeStepEstimator () |
Get the maximum timestep estimator for cfl control. More... | |
SOLVER_UTILS_EXPORT void | CheckForRestartTime (NekDouble &time, int &nchk) |
SOLVER_UTILS_EXPORT void | SVVVarDiffCoeff (const Array< OneD, Array< OneD, NekDouble > > vel, StdRegions::VarCoeffMap &varCoeffMap) |
Evaluate the SVV diffusion coefficient according to Moura's paper where it should proportional to h time velocity. More... | |
SOLVER_UTILS_EXPORT void | DoDummyProjection (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time) |
Perform dummy projection. More... | |
Protected Member Functions inherited from Nektar::SolverUtils::EquationSystem | |
SOLVER_UTILS_EXPORT | EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
Initialises EquationSystem class members. More... | |
virtual SOLVER_UTILS_EXPORT void | v_InitObject (bool DeclareFeld=true) |
Initialisation object for EquationSystem. More... | |
virtual SOLVER_UTILS_EXPORT void | v_DoInitialise (bool dumpInitialConditions=true) |
Virtual function for initialisation implementation. More... | |
virtual SOLVER_UTILS_EXPORT void | v_DoSolve () |
Virtual function for solve implementation. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray) |
Virtual function for the L_inf error computation between fields and a given exact solution. More... | |
virtual SOLVER_UTILS_EXPORT NekDouble | v_L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false) |
Virtual function for the L_2 error computation between fields and a given exact solution. More... | |
virtual SOLVER_UTILS_EXPORT void | v_TransCoeffToPhys () |
Virtual function for transformation to physical space. More... | |
virtual SOLVER_UTILS_EXPORT void | v_TransPhysToCoeff () |
Virtual function for transformation to coefficient space. More... | |
virtual SOLVER_UTILS_EXPORT void | v_GenerateSummary (SummaryList &l) |
Virtual function for generating summary information. More... | |
virtual SOLVER_UTILS_EXPORT void | v_SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0) |
virtual SOLVER_UTILS_EXPORT void | v_EvaluateExactSolution (unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time) |
virtual SOLVER_UTILS_EXPORT void | v_Output (void) |
virtual SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr | v_GetPressure (void) |
virtual SOLVER_UTILS_EXPORT bool | v_NegatedOp (void) |
Virtual function to identify if operator is negated in DoSolve. More... | |
virtual SOLVER_UTILS_EXPORT void | v_ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables) |
Protected Attributes | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_vessels |
size_t | m_nDomains |
size_t | m_currentDomain |
size_t | m_nVariables |
UpwindTypePulse | m_upwindTypePulse |
Array< OneD, int > | m_fieldPhysOffset |
NekDouble | m_rho |
NekDouble | m_pext |
NekDouble | m_C |
NekDouble | m_RT |
NekDouble | m_pout |
Array< OneD, Array< OneD, NekDouble > > | m_A_0 |
Array< OneD, Array< OneD, NekDouble > > | m_A_0_trace |
Array< OneD, Array< OneD, NekDouble > > | m_beta |
Array< OneD, Array< OneD, NekDouble > > | m_beta_trace |
Array< OneD, Array< OneD, NekDouble > > | m_gamma |
Array< OneD, Array< OneD, NekDouble > > | m_alpha |
Array< OneD, Array< OneD, NekDouble > > | m_alpha_trace |
Array< OneD, Array< OneD, NekDouble > > | m_trace_fwd_normal |
std::map< int, SpatialDomains::CompositeMap > | m_domain |
std::vector< int > | m_domOrder |
Array< OneD, Array< OneD, NekDouble > > | m_pressure |
PulseWavePressureAreaSharedPtr | m_pressureArea |
bool | extraFields = false |
Array< OneD, Array< OneD, NekDouble > > | m_PWV |
Array< OneD, Array< OneD, NekDouble > > | m_W1 |
Array< OneD, Array< OneD, NekDouble > > | m_W2 |
std::vector< std::vector< InterfacePointShPtr > > | m_vesselIntfcs |
std::vector< std::vector< InterfacePointShPtr > > | m_bifurcations |
std::vector< std::vector< InterfacePointShPtr > > | m_mergingJcts |
Protected Attributes inherited from Nektar::SolverUtils::UnsteadySystem | |
LibUtilities::TimeIntegrationSchemeSharedPtr | m_intScheme |
Wrapper to the time integration scheme. More... | |
LibUtilities::TimeIntegrationSchemeOperators | m_ode |
The time integration scheme operators to use. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_previousSolution |
Storage for previous solution for steady-state check. More... | |
std::vector< int > | m_intVariables |
NekDouble | m_cflSafetyFactor |
CFL safety factor (comprise between 0 to 1). More... | |
NekDouble | m_CFLGrowth |
CFL growth rate. More... | |
NekDouble | m_CFLEnd |
Maximun cfl in cfl growth. More... | |
int | m_abortSteps |
Number of steps between checks for abort conditions. More... | |
bool | m_explicitDiffusion |
Indicates if explicit or implicit treatment of diffusion is used. More... | |
bool | m_explicitAdvection |
Indicates if explicit or implicit treatment of advection is used. More... | |
bool | m_explicitReaction |
Indicates if explicit or implicit treatment of reaction is used. More... | |
int | m_steadyStateSteps |
Check for steady state at step interval. More... | |
NekDouble | m_steadyStateTol |
Tolerance to which steady state should be evaluated at. More... | |
int | m_filtersInfosteps |
Number of time steps between outputting filters information. More... | |
std::vector< std::pair< std::string, FilterSharedPtr > > | m_filters |
bool | m_homoInitialFwd |
Flag to determine if simulation should start in homogeneous forward transformed state. More... | |
std::ofstream | m_errFile |
NekDouble | m_epsilon |
Diffusion coefficient. More... | |
Protected Attributes inherited from Nektar::SolverUtils::EquationSystem | |
LibUtilities::CommSharedPtr | m_comm |
Communicator. More... | |
bool | m_verbose |
LibUtilities::SessionReaderSharedPtr | m_session |
The session reader. More... | |
std::map< std::string, SolverUtils::SessionFunctionSharedPtr > | m_sessionFunctions |
Map of known SessionFunctions. More... | |
LibUtilities::FieldIOSharedPtr | m_fld |
Field input/output. More... | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_fields |
Array holding all dependent variables. More... | |
SpatialDomains::BoundaryConditionsSharedPtr | m_boundaryConditions |
Pointer to boundary conditions object. More... | |
SpatialDomains::MeshGraphSharedPtr | m_graph |
Pointer to graph defining mesh. More... | |
std::string | m_sessionName |
Name of the session. More... | |
NekDouble | m_time |
Current time of simulation. More... | |
int | m_initialStep |
Number of the step where the simulation should begin. More... | |
NekDouble | m_fintime |
Finish time of the simulation. More... | |
NekDouble | m_timestep |
Time step size. More... | |
NekDouble | m_lambda |
Lambda constant in real system if one required. More... | |
NekDouble | m_checktime |
Time between checkpoints. More... | |
NekDouble | m_lastCheckTime |
NekDouble | m_TimeIncrementFactor |
int | m_nchk |
Number of checkpoints written so far. More... | |
int | m_steps |
Number of steps to take. More... | |
int | m_checksteps |
Number of steps between checkpoints. More... | |
int | m_infosteps |
Number of time steps between outputting status information. More... | |
int | m_iterPIT = 0 |
Number of parallel-in-time time iteration. More... | |
int | m_windowPIT = 0 |
Index of windows for parallel-in-time time iteration. More... | |
int | m_spacedim |
Spatial dimension (>= expansion dim). More... | |
int | m_expdim |
Expansion dimension. More... | |
bool | m_singleMode |
Flag to determine if single homogeneous mode is used. More... | |
bool | m_halfMode |
Flag to determine if half homogeneous mode is used. More... | |
bool | m_multipleModes |
Flag to determine if use multiple homogenenous modes are used. More... | |
bool | m_useFFT |
Flag to determine if FFT is used for homogeneous transform. More... | |
bool | m_homogen_dealiasing |
Flag to determine if dealiasing is used for homogeneous simulations. More... | |
bool | m_specHP_dealiasing |
Flag to determine if dealisising is usde for the Spectral/hp element discretisation. More... | |
enum MultiRegions::ProjectionType | m_projectionType |
Type of projection; e.g continuous or discontinuous. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_traceNormals |
Array holding trace normals for DG simulations in the forwards direction. More... | |
Array< OneD, bool > | m_checkIfSystemSingular |
Flag to indicate if the fields should be checked for singularity. More... | |
LibUtilities::FieldMetaDataMap | m_fieldMetaDataMap |
Map to identify relevant solver info to dump in output fields. More... | |
Array< OneD, NekDouble > | m_movingFrameData |
Moving reference frame status in the inertial frame X, Y, Z, Theta_x, Theta_y, Theta_z, U, V, W, Omega_x, Omega_y, Omega_z, A_x, A_y, A_z, DOmega_x, DOmega_y, DOmega_z, pivot_x, pivot_y, pivot_z. More... | |
std::vector< std::string > | m_strFrameData |
variable name in m_movingFrameData More... | |
int | m_NumQuadPointsError |
Number of Quadrature points used to work out the error. More... | |
enum HomogeneousType | m_HomogeneousType |
NekDouble | m_LhomX |
physical length in X direction (if homogeneous) More... | |
NekDouble | m_LhomY |
physical length in Y direction (if homogeneous) More... | |
NekDouble | m_LhomZ |
physical length in Z direction (if homogeneous) More... | |
int | m_npointsX |
number of points in X direction (if homogeneous) More... | |
int | m_npointsY |
number of points in Y direction (if homogeneous) More... | |
int | m_npointsZ |
number of points in Z direction (if homogeneous) More... | |
int | m_HomoDirec |
number of homogenous directions More... | |
Protected Attributes inherited from Nektar::SolverUtils::ALEHelper | |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_fieldsALE |
Array< OneD, Array< OneD, NekDouble > > | m_gridVelocity |
Array< OneD, Array< OneD, NekDouble > > | m_gridVelocityTrace |
std::vector< ALEBaseShPtr > | m_ALEs |
bool | m_ALESolver = false |
bool | m_ImplicitALESolver = false |
NekDouble | m_prevStageTime = 0.0 |
int | m_spaceDim |
Private Member Functions | |
void | SetUpDomainInterfaces (void) |
void | FillDataFromInterfacePoint (InterfacePointShPtr &I, const Array< OneD, const Array< OneD, NekDouble > > &field, NekDouble &A, NekDouble &u, NekDouble &beta, NekDouble &A_0, NekDouble &alpha) |
void | GetCommArray (std::map< int, LibUtilities::CommSharedPtr > &retval) |
Set and retrn a series of communicators for each partition. More... | |
void | SetUpDomainInterfaceBCs (SpatialDomains::BoundaryConditions &AllBcs, std::map< int, LibUtilities::CommSharedPtr > &domComm) |
Private Attributes | |
Gs::gs_data * | m_intComm |
Communicator for interfaces. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Nektar::SolverUtils::UnsteadySystem | |
static std::string | cmdSetStartTime |
static std::string | cmdSetStartChkNum |
Protected Types inherited from Nektar::SolverUtils::EquationSystem | |
enum | HomogeneousType { eHomogeneous1D , eHomogeneous2D , eHomogeneous3D , eNotHomogeneous } |
Parameter for homogeneous expansions. More... | |
Static Protected Attributes inherited from Nektar::SolverUtils::EquationSystem | |
static std::string | equationSystemTypeLookupIds [] |
static std::string | projectionTypeLookupIds [] |
Base class for unsteady solvers.
Initialises the arterial subdomains in m_vessels and sets up all domain-linking conditions (bifurcations, intefaces/junctions, merging flows). Detects the network structure and assigns boundary conditons. Also provides the underlying timestepping framework for pulse wave solvers including the general timestepping routines.
Definition at line 77 of file PulseWaveSystem.h.
|
override |
|
protected |
Initialises PulseWaveSystem class members.
Processes SolverInfo parameters from the session file and sets up timestepping-specific code.
m_Session | Session object to read parameters from. |
Definition at line 65 of file PulseWaveSystem.cpp.
|
protected |
Riemann Problem for Bifurcation.
Solves the Riemann problem at a bifurcation by assuming subsonic flow at both sides of the boundary and by applying conservation of mass and continuity of the total pressure \( \frac{p}{rho} + \frac{u^{2}}{2}. \) The other 3 missing equations come from the characteristic variables. For further information see "Pulse WavePropagation in the human vascular system" Section 3.4.4
Definition at line 1514 of file PulseWaveSystem.cpp.
References Nektar::LibUtilities::Timer::AccumulateRegion(), ASSERTL0, Nektar::LibUtilities::beta, Nektar::Dot(), m_pressureArea, m_rho, Nektar::Multiply(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().
Referenced by EnforceInterfaceConditions().
|
protected |
Writes the .fld file at the end of the simulation. Similar to the normal v_Output however the Multidomain output has to be prepared.
Definition at line 1840 of file PulseWaveSystem.cpp.
References Nektar::SolverUtils::EquationSystem::m_sessionName, and WriteVessels().
Referenced by v_DoSolve().
|
protected |
Definition at line 1370 of file PulseWaveSystem.cpp.
References Nektar::LibUtilities::Timer::AccumulateRegion(), Nektar::LibUtilities::beta, BifurcationRiemann(), FillDataFromInterfacePoint(), Gs::Gather(), Gs::gs_add, InterfaceRiemann(), m_bifurcations, m_intComm, m_mergingJcts, m_nVariables, m_vesselIntfcs, m_vessels, MergingRiemann(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().
Referenced by Nektar::PulseWavePropagation::DoOdeRhs().
|
private |
Definition at line 1338 of file PulseWaveSystem.cpp.
References Nektar::LibUtilities::Timer::AccumulateRegion(), Nektar::LibUtilities::beta, m_A_0_trace, m_alpha_trace, m_beta_trace, m_fieldPhysOffset, m_nVariables, m_vessels, Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().
Referenced by EnforceInterfaceConditions().
|
private |
Set and retrn a series of communicators for each partition.
Definition at line 324 of file PulseWaveSystem.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::UnitTests::d(), Vmath::Imin(), Nektar::SolverUtils::EquationSystem::m_comm, m_domain, m_domOrder, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceSum, Vmath::Vmax(), and Vmath::Vsum().
Referenced by v_InitObject().
|
inline |
|
protected |
Riemann Problem for Interface/Junction.
Solves the Riemann problem at an interdomain junction/Interface by assuming subsonic flow at both sides of the boundary and by applying conservation of mass and continuity of the total pressure \( \frac{p}{rho} + \frac{u^{2}}{2}. \) The other 2 missing equations come from the characteristic variables. For further information see "Pulse WavePropagation in the human vascular system" Section 3.4.
Definition at line 1737 of file PulseWaveSystem.cpp.
References Nektar::LibUtilities::Timer::AccumulateRegion(), ASSERTL0, Nektar::LibUtilities::beta, Nektar::Dot(), m_pressureArea, m_rho, Nektar::Multiply(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().
Referenced by EnforceInterfaceConditions().
|
protected |
Links the subdomains.
|
protected |
Riemann Problem for Merging Flow.
Solves the Riemann problem at an merging flow condition by assuming subsonic flow at both sides of the boundary and by applying conservation of mass and continuity of the total pressure \( \frac{p}{rho} + \frac{u^{2}}{2}. \) The other 3 missing equations come from the characteristic variables. For further information see "Pulse WavePropagation in the human vascular system" Section 3.4.4
Definition at line 1624 of file PulseWaveSystem.cpp.
References Nektar::LibUtilities::Timer::AccumulateRegion(), ASSERTL0, Nektar::LibUtilities::beta, Nektar::Dot(), m_pressureArea, m_rho, Nektar::Multiply(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().
Referenced by EnforceInterfaceConditions().
|
private |
Definition at line 1048 of file PulseWaveSystem.cpp.
References Nektar::SpatialDomains::BoundaryConditions::AddBoundaryConditions(), Nektar::SpatialDomains::BoundaryConditions::AddBoundaryRegions(), Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL1, Nektar::UnitTests::d(), Nektar::SpatialDomains::BoundaryConditions::GetBoundaryRegions(), m_domain, m_domOrder, Nektar::SolverUtils::EquationSystem::m_session, CellMLToNektar.cellml_metadata::p, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceSum, and Vmath::Vsum().
Referenced by v_InitObject().
Definition at line 773 of file PulseWaveSystem.cpp.
References ASSERTL0, ASSERTL1, Nektar::UnitTests::d(), Gs::Gather(), Gs::gs_add, Gs::gs_max, Gs::Init(), m_bifurcations, Nektar::SolverUtils::EquationSystem::m_comm, m_domain, m_intComm, m_mergingJcts, m_nDomains, m_nVariables, Nektar::SolverUtils::EquationSystem::m_session, m_vesselIntfcs, m_vessels, CellMLToNektar.cellml_metadata::p, and Vmath::Zero().
Referenced by v_InitObject().
|
inline |
Definition at line 88 of file PulseWaveSystem.h.
References m_vessels.
|
overrideprotectedvirtual |
Sets up initial conditions.
Initialisation routine for multiple subdomain case. Sets the initial conditions for all arterial subdomains read from the inputfile. Sets the material properties and the A_0 area for all subdomains and fills the domain-linking boundary conditions with the initial values of their domain.
Reimplemented from Nektar::SolverUtils::UnsteadySystem.
Definition at line 1216 of file PulseWaveSystem.cpp.
References Nektar::UnitTests::d(), m_domOrder, Nektar::SolverUtils::EquationSystem::m_fields, m_nVariables, Nektar::SolverUtils::EquationSystem::m_session, m_vessels, and Nektar::SolverUtils::EquationSystem::SetInitialConditions().
Solves an unsteady problem.
NEEDS Updating:
DoSolve routine for PulseWavePropagation with multiple subdomains taken from UnsteadySystem and modified for multidomain case. Initialises the time integration scheme (as specified in the session file), and perform the time integration. Within the timestepping loop the following is done: 1. Link all arterial segments according to the network structure, solve the Riemann problem between different arterial segments and assign the values to the boundary conditions (LinkSubdomains) 2. Every arterial segment is solved independently for this timestep. This is done by handing the solution vector \( \mathbf{u} \) and the right hand side m_ode, which is the PulseWavePropagation class in this example over to the time integration scheme
if(m_session->GetComm()->GetRank() == 0) { cout << "Time-integration timing: " << IntegrationTime << " s" << endl << endl; }
Reimplemented from Nektar::SolverUtils::UnsteadySystem.
Definition at line 1267 of file PulseWaveSystem.cpp.
References Nektar::LibUtilities::Timer::AccumulateRegion(), CheckPoint_Output(), Nektar::SolverUtils::EquationSystem::m_checksteps, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_infosteps, Nektar::SolverUtils::UnsteadySystem::m_intScheme, m_nDomains, m_nVariables, Nektar::SolverUtils::UnsteadySystem::m_ode, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_steps, Nektar::SolverUtils::EquationSystem::m_time, Nektar::SolverUtils::EquationSystem::m_timestep, m_vessels, Nektar::LibUtilities::Timer::Start(), Nektar::LibUtilities::Timer::Stop(), and Vmath::Vcopy().
|
overrideprotectedvirtual |
Initialisation routine for multidomain solver. Sets up the expansions for every arterial segment (m_vessels) and for one complete field m_outfield which is needed to write the postprocessing output. Also determines which upwind strategy is used (currently only upwinding scheme available) and reads blodd flow specific parameters from the inputfile
Reimplemented from Nektar::SolverUtils::UnsteadySystem.
Definition at line 88 of file PulseWaveSystem.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::UnitTests::d(), Nektar::MultiRegions::eDiscontinuous, GetCommArray(), Nektar::SolverUtils::EquationSystem::GetFunction(), Nektar::GetPressureAreaFactory(), Nektar::SolverUtils::EquationSystem::GetTraceTotPoints(), m_A_0, m_A_0_trace, m_alpha, m_alpha_trace, m_beta, m_beta_trace, m_domain, m_domOrder, m_fieldPhysOffset, Nektar::SolverUtils::EquationSystem::m_fields, m_gamma, Nektar::SolverUtils::EquationSystem::m_graph, m_nDomains, m_nVariables, m_pext, m_pressure, m_pressureArea, Nektar::SolverUtils::EquationSystem::m_projectionType, m_PWV, m_rho, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_time, m_trace_fwd_normal, m_upwindTypePulse, m_vessels, m_W1, m_W2, SetUpDomainInterfaceBCs(), SetUpDomainInterfaces(), Nektar::SIZE_UpwindTypePulse, Nektar::UpwindTypeMapPulse, and Nektar::SolverUtils::UnsteadySystem::v_InitObject().
Referenced by Nektar::PulseWavePropagation::v_InitObject().
|
overrideprotectedvirtual |
Compute the L2 error between fields and a given exact solution.
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 1946 of file PulseWaveSystem.cpp.
References ASSERTL0, Nektar::SolverUtils::EquationSystem::EvaluateExactSolution(), FilterPython_Function::field, Nektar::SolverUtils::EquationSystem::GetFunction(), Nektar::SolverUtils::EquationSystem::GetNpoints(), Nektar::SolverUtils::EquationSystem::m_comm, Nektar::SolverUtils::EquationSystem::m_fields, m_nDomains, Nektar::SolverUtils::EquationSystem::m_NumQuadPointsError, m_nVariables, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_time, m_vessels, Nektar::LibUtilities::ReduceSum, and tinysimd::sqrt().
|
overrideprotectedvirtual |
Compute the L_inf error between fields and a given exact solution.
Compute the error in the L_inf-norm
field | The field to compare. |
exactsoln | The exact solution to compare with. |
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 2043 of file PulseWaveSystem.cpp.
References ASSERTL0, Nektar::SolverUtils::EquationSystem::EvaluateExactSolution(), FilterPython_Function::field, Nektar::SolverUtils::EquationSystem::GetFunction(), Nektar::SolverUtils::EquationSystem::GetNpoints(), Nektar::SolverUtils::EquationSystem::m_comm, Nektar::SolverUtils::EquationSystem::m_fields, m_nDomains, Nektar::SolverUtils::EquationSystem::m_NumQuadPointsError, m_nVariables, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_time, m_vessels, and Nektar::LibUtilities::ReduceMax.
Writes the .fld file at the end of the simulation. Similar to the normal v_Output however the Multidomain output has to be prepared.
Write the field data to file. The file is named according to the session name with the extension .fld appended.
Reimplemented from Nektar::SolverUtils::EquationSystem.
Definition at line 1825 of file PulseWaveSystem.cpp.
References Nektar::SolverUtils::EquationSystem::m_sessionName, and WriteVessels().
|
protected |
Write input fields to the given filename.
Writes the field data to a file with the given filename.
outname | Filename to write to. |
Definition at line 1852 of file PulseWaveSystem.cpp.
References extraFields, Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::SolverUtils::EquationSystem::m_fieldMetaDataMap, Nektar::SolverUtils::EquationSystem::m_fld, m_nDomains, m_nVariables, m_pressure, m_PWV, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_time, m_vessels, m_W1, and m_W2.
Referenced by CheckPoint_Output(), and v_Output().
|
protected |
Definition at line 125 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), and WriteVessels().
Definition at line 108 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), and v_InitObject().
Definition at line 109 of file PulseWaveSystem.h.
Referenced by FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetA0(), and v_InitObject().
Definition at line 113 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), and v_InitObject().
Definition at line 114 of file PulseWaveSystem.h.
Referenced by FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetAlpha(), and v_InitObject().
Definition at line 110 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), and v_InitObject().
Definition at line 111 of file PulseWaveSystem.h.
Referenced by FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetBeta(), and v_InitObject().
|
protected |
Definition at line 131 of file PulseWaveSystem.h.
Referenced by EnforceInterfaceConditions(), and SetUpDomainInterfaces().
|
protected |
Definition at line 104 of file PulseWaveSystem.h.
|
protected |
Definition at line 96 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::PulseWavePropagation::GetA0(), Nektar::PulseWavePropagation::GetAlpha(), Nektar::PulseWavePropagation::GetBeta(), Nektar::PulseWavePropagation::GetFluxVector(), and Nektar::PulseWavePropagation::GetN().
|
protected |
Definition at line 118 of file PulseWaveSystem.h.
Referenced by GetCommArray(), SetUpDomainInterfaceBCs(), SetUpDomainInterfaces(), and v_InitObject().
|
protected |
Definition at line 119 of file PulseWaveSystem.h.
Referenced by GetCommArray(), SetUpDomainInterfaceBCs(), v_DoInitialise(), and v_InitObject().
Definition at line 100 of file PulseWaveSystem.h.
Referenced by FillDataFromInterfacePoint(), and v_InitObject().
Definition at line 112 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), and v_InitObject().
|
private |
Communicator for interfaces.
Definition at line 195 of file PulseWaveSystem.h.
Referenced by EnforceInterfaceConditions(), and SetUpDomainInterfaces().
|
protected |
Definition at line 132 of file PulseWaveSystem.h.
Referenced by EnforceInterfaceConditions(), and SetUpDomainInterfaces().
|
protected |
Definition at line 95 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::PulseWavePropagation::GetDomains(), GetNdomains(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), SetUpDomainInterfaces(), v_DoSolve(), v_InitObject(), v_L2Error(), v_LinfError(), and WriteVessels().
|
protected |
Definition at line 97 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::DoOdeProjection(), Nektar::PulseWavePropagation::DoOdeRhs(), EnforceInterfaceConditions(), FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetFluxVector(), SetUpDomainInterfaces(), v_DoInitialise(), v_DoSolve(), v_InitObject(), v_L2Error(), v_LinfError(), and WriteVessels().
|
protected |
Definition at line 102 of file PulseWaveSystem.h.
Referenced by v_InitObject().
|
protected |
Definition at line 106 of file PulseWaveSystem.h.
Definition at line 121 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), v_InitObject(), and WriteVessels().
|
protected |
Definition at line 122 of file PulseWaveSystem.h.
Referenced by BifurcationRiemann(), Nektar::PulseWavePropagation::GetFluxVector(), InterfaceRiemann(), MergingRiemann(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), Nektar::PulseWavePropagation::v_InitObject(), and v_InitObject().
Definition at line 126 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), v_InitObject(), and WriteVessels().
|
protected |
Definition at line 101 of file PulseWaveSystem.h.
Referenced by BifurcationRiemann(), Nektar::PulseWavePropagation::GetFluxVector(), Nektar::PulseWavePropagation::GetRho(), InterfaceRiemann(), MergingRiemann(), and v_InitObject().
|
protected |
Definition at line 105 of file PulseWaveSystem.h.
Definition at line 115 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetN(), and v_InitObject().
|
protected |
Definition at line 98 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::v_InitObject(), and v_InitObject().
|
protected |
Definition at line 130 of file PulseWaveSystem.h.
Referenced by EnforceInterfaceConditions(), and SetUpDomainInterfaces().
|
protected |
Definition at line 94 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::DoOdeRhs(), EnforceInterfaceConditions(), FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetFluxVector(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), SetUpDomainInterfaces(), UpdateVessels(), v_DoInitialise(), v_DoSolve(), Nektar::PulseWavePropagation::v_InitObject(), v_InitObject(), v_L2Error(), v_LinfError(), and WriteVessels().
Definition at line 127 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), v_InitObject(), and WriteVessels().
Definition at line 128 of file PulseWaveSystem.h.
Referenced by Nektar::PulseWavePropagation::GetFluxVector(), v_InitObject(), and WriteVessels().