Nektar++
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
Nektar::SolverUtils::EquationSystem Class Reference

A base class for describing how to solve specific equations. More...

#include <EquationSystem.h>

Inheritance diagram for Nektar::SolverUtils::EquationSystem:
[legend]

Public Member Functions

virtual SOLVER_UTILS_EXPORT ~EquationSystem ()
 Destructor. More...
 
SOLVER_UTILS_EXPORT void SetUpTraceNormals (void)
 
SOLVER_UTILS_EXPORT void InitObject ()
 Initialises the members of this object. More...
 
SOLVER_UTILS_EXPORT void DoInitialise ()
 Perform any initialisation necessary before solving the problem. More...
 
SOLVER_UTILS_EXPORT void DoSolve ()
 Solve the problem. More...
 
SOLVER_UTILS_EXPORT void TransCoeffToPhys ()
 Transform from coefficient to physical space. More...
 
SOLVER_UTILS_EXPORT void TransPhysToCoeff ()
 Transform from physical to coefficient space. More...
 
SOLVER_UTILS_EXPORT void Output ()
 Perform output operations after solve. More...
 
SOLVER_UTILS_EXPORT NekDouble LinfError (unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray)
 Linf error computation. More...
 
SOLVER_UTILS_EXPORT std::string GetSessionName ()
 Get Session name. More...
 
template<class T >
std::shared_ptr< T > as ()
 
SOLVER_UTILS_EXPORT void ResetSessionName (std::string newname)
 Reset Session name. More...
 
SOLVER_UTILS_EXPORT LibUtilities::SessionReaderSharedPtr GetSession ()
 Get Session name. More...
 
SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr GetPressure ()
 Get pressure field if available. More...
 
SOLVER_UTILS_EXPORT void ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 
SOLVER_UTILS_EXPORT void PrintSummary (std::ostream &out)
 Print a summary of parameters and solver characteristics. More...
 
SOLVER_UTILS_EXPORT void SetLambda (NekDouble lambda)
 Set parameter m_lambda. More...
 
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction (std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
 Get a SessionFunction by name. More...
 
SOLVER_UTILS_EXPORT void SetInitialConditions (NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
 Initialise the data in the dependent fields. More...
 
SOLVER_UTILS_EXPORT void EvaluateExactSolution (int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
 Evaluates an exact solution. More...
 
SOLVER_UTILS_EXPORT NekDouble L2Error (unsigned int field, const Array< OneD, NekDouble > &exactsoln, bool Normalised=false)
 Compute the L2 error between fields and a given exact solution. More...
 
SOLVER_UTILS_EXPORT NekDouble L2Error (unsigned int field, bool Normalised=false)
 Compute the L2 error of the fields. More...
 
SOLVER_UTILS_EXPORT Array< OneD, NekDoubleErrorExtraPoints (unsigned int field)
 Compute error (L2 and L_inf) over an larger set of quadrature points return [L2 Linf]. More...
 
SOLVER_UTILS_EXPORT void Checkpoint_Output (const int n)
 Write checkpoint file of m_fields. More...
 
SOLVER_UTILS_EXPORT void Checkpoint_Output (const int n, MultiRegions::ExpListSharedPtr &field, std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 Write checkpoint file of custom data fields. More...
 
SOLVER_UTILS_EXPORT void Checkpoint_BaseFlow (const int n)
 Write base flow file of m_fields. More...
 
SOLVER_UTILS_EXPORT void WriteFld (const std::string &outname)
 Write field data to the given filename. More...
 
SOLVER_UTILS_EXPORT void WriteFld (const std::string &outname, MultiRegions::ExpListSharedPtr &field, std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 Write input fields to the given filename. More...
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
 Input field data from the given file. More...
 
SOLVER_UTILS_EXPORT void ImportFldToMultiDomains (const std::string &infile, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const int ndomains)
 Input field data from the given file to multiple domains. More...
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, std::vector< std::string > &fieldStr, Array< OneD, Array< OneD, NekDouble > > &coeffs)
 Output a field. Input field data into array from the given file. More...
 
SOLVER_UTILS_EXPORT void ImportFld (const std::string &infile, MultiRegions::ExpListSharedPtr &pField, std::string &pFieldName)
 Output a field. Input field data into ExpList from the given file. More...
 
SOLVER_UTILS_EXPORT void SessionSummary (SummaryList &vSummary)
 Write out a session summary. More...
 
SOLVER_UTILS_EXPORT Array< OneD, MultiRegions::ExpListSharedPtr > & UpdateFields ()
 
SOLVER_UTILS_EXPORT LibUtilities::FieldMetaDataMapUpdateFieldMetaDataMap ()
 Get hold of FieldInfoMap so it can be updated. More...
 
SOLVER_UTILS_EXPORT NekDouble GetFinalTime ()
 Return final time. More...
 
SOLVER_UTILS_EXPORT int GetNcoeffs ()
 
SOLVER_UTILS_EXPORT int GetNcoeffs (const int eid)
 
SOLVER_UTILS_EXPORT int GetNumExpModes ()
 
SOLVER_UTILS_EXPORT const Array< OneD, int > GetNumExpModesPerExp ()
 
SOLVER_UTILS_EXPORT int GetNvariables ()
 
SOLVER_UTILS_EXPORT const std::string GetVariable (unsigned int i)
 
SOLVER_UTILS_EXPORT int GetTraceTotPoints ()
 
SOLVER_UTILS_EXPORT int GetTraceNpoints ()
 
SOLVER_UTILS_EXPORT int GetExpSize ()
 
SOLVER_UTILS_EXPORT int GetPhys_Offset (int n)
 
SOLVER_UTILS_EXPORT int GetCoeff_Offset (int n)
 
SOLVER_UTILS_EXPORT int GetTotPoints ()
 
SOLVER_UTILS_EXPORT int GetTotPoints (int n)
 
SOLVER_UTILS_EXPORT int GetNpoints ()
 
SOLVER_UTILS_EXPORT int GetSteps ()
 
SOLVER_UTILS_EXPORT NekDouble GetTimeStep ()
 
SOLVER_UTILS_EXPORT void CopyFromPhysField (const int i, Array< OneD, NekDouble > &output)
 
SOLVER_UTILS_EXPORT void CopyToPhysField (const int i, Array< OneD, NekDouble > &output)
 
SOLVER_UTILS_EXPORT void SetSteps (const int steps)
 
SOLVER_UTILS_EXPORT void ZeroPhysFields ()
 
SOLVER_UTILS_EXPORT void FwdTransFields ()
 
SOLVER_UTILS_EXPORT void SetModifiedBasis (const bool modbasis)
 
SOLVER_UTILS_EXPORT int GetCheckpointNumber ()
 
SOLVER_UTILS_EXPORT void SetCheckpointNumber (int num)
 
SOLVER_UTILS_EXPORT int GetCheckpointSteps ()
 
SOLVER_UTILS_EXPORT void SetCheckpointSteps (int num)
 
SOLVER_UTILS_EXPORT void SetTime (const NekDouble time)
 
SOLVER_UTILS_EXPORT void SetInitialStep (const int step)
 
SOLVER_UTILS_EXPORT void SetBoundaryConditions (NekDouble time)
 Evaluates the boundary conditions at the given time. More...
 
virtual SOLVER_UTILS_EXPORT bool v_NegatedOp ()
 Virtual function to identify if operator is negated in DoSolve. More...
 

Protected Types

enum  HomogeneousType { eHomogeneous1D, eHomogeneous2D, eHomogeneous3D, eNotHomogeneous }
 Parameter for homogeneous expansions. More...
 

Protected Member Functions

SOLVER_UTILS_EXPORT EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises EquationSystem class members. More...
 
virtual SOLVER_UTILS_EXPORT void v_InitObject ()
 Initialisation object for EquationSystem. More...
 
virtual SOLVER_UTILS_EXPORT void v_DoInitialise ()
 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 void v_ExtraFldOutput (std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
 

Protected Attributes

LibUtilities::CommSharedPtr m_comm
 Communicator. More...
 
LibUtilities::SessionReaderSharedPtr m_session
 The session reader. More...
 
std::map< std::string, SolverUtils::SessionFunctionSharedPtrm_sessionFunctions
 Map of known SessionFunctions. More...
 
LibUtilities::FieldIOSharedPtr m_fld
 Field input/output. More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_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...
 
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_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...
 
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...
 

Static Protected Attributes

static std::string equationSystemTypeLookupIds []
 

Private Member Functions

virtual SOLVER_UTILS_EXPORT Array< OneD, bool > v_GetSystemSingularChecks ()
 
SOLVER_UTILS_EXPORT void PrintProgressbar (const int position, const int goal) const
 

Detailed Description

A base class for describing how to solve specific equations.

This class is a base class for all solver implementations. It provides the underlying generic functionality and interface for solving equations.

To solve a steady-state equation, create a derived class from this class and reimplement the virtual functions to provide custom implementation for the problem.

To solve unsteady problems, derive from the UnsteadySystem class instead which provides general time integration.

Definition at line 74 of file EquationSystem.h.

Member Enumeration Documentation

◆ HomogeneousType

Parameter for homogeneous expansions.

Enumerator
eHomogeneous1D 
eHomogeneous2D 
eHomogeneous3D 
eNotHomogeneous 

Definition at line 399 of file EquationSystem.h.

Constructor & Destructor Documentation

◆ ~EquationSystem()

Nektar::SolverUtils::EquationSystem::~EquationSystem ( )
virtual

Destructor.

Destructor for class EquationSystem.

Definition at line 680 of file EquationSystem.cpp.

681  {
682  LibUtilities::NekManager<LocalRegions::MatrixKey,
683  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
684  LibUtilities::NekManager<LocalRegions::MatrixKey,
685  DNekScalBlkMat, LocalRegions::MatrixKey::opLess>::ClearManager();
686  }
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:65
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat

◆ EquationSystem()

Nektar::SolverUtils::EquationSystem::EquationSystem ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::MeshGraphSharedPtr pGraph 
)
protected

Initialises EquationSystem class members.

This constructor is protected as the objects of this class are never instantiated directly.

Parameters
pSessionThe session reader holding problem parameters.

Definition at line 101 of file EquationSystem.cpp.

References m_fieldMetaDataMap, and m_session.

104  : m_comm (pSession->GetComm()),
105  m_session (pSession),
106  m_graph (pGraph),
107  m_lambda (0),
109  {
110  // set up session names in fieldMetaDataMap
111  const vector<std::string> filenames = m_session->GetFilenames();
112 
113  for(int i = 0; i < filenames.size(); ++i)
114  {
115  string sessionname = "SessionName";
116  sessionname += boost::lexical_cast<std::string>(i);
117  m_fieldMetaDataMap[sessionname] = filenames[i];
118  m_fieldMetaDataMap["ChkFileNum"] =
119  boost::lexical_cast<std::string>(0);
120  }
121 
122  }
NekDouble m_lambda
Lambda constant in real system if one required.
LibUtilities::CommSharedPtr m_comm
Communicator.
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
Map to identify relevant solver info to dump in output fields.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.
static FieldMetaDataMap NullFieldMetaDataMap
Definition: FieldIO.h:53

Member Function Documentation

◆ as()

template<class T >
std::shared_ptr<T> Nektar::SolverUtils::EquationSystem::as ( )
inline

Definition at line 112 of file EquationSystem.h.

113  {
114  return std::dynamic_pointer_cast<T>( shared_from_this() );
115  }

◆ Checkpoint_BaseFlow()

void Nektar::SolverUtils::EquationSystem::Checkpoint_BaseFlow ( const int  n)

Write base flow file of m_fields.

Write the n-th base flow into a .chk file

Parameters
nThe index of the base flow file.

Definition at line 1112 of file EquationSystem.cpp.

References m_sessionName, and WriteFld().

1113  {
1114  std::string outname = m_sessionName + "_BaseFlow_" +
1115  boost::lexical_cast<std::string>(n);
1116 
1117  WriteFld(outname + ".chk");
1118  }
std::string m_sessionName
Name of the session.
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.

◆ Checkpoint_Output() [1/2]

void Nektar::SolverUtils::EquationSystem::Checkpoint_Output ( const int  n)

Write checkpoint file of m_fields.

Write the n-th checkpoint file.

Parameters
nThe index of the checkpoint file.

Definition at line 1086 of file EquationSystem.cpp.

References m_sessionName, and WriteFld().

Referenced by Nektar::MMFMaxwell::v_DoSolve(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::MMFAdvection::v_DoSolve(), Nektar::CoupledLinearNS::v_DoSolve(), Nektar::MMFSWE::v_DoSolve(), Nektar::IsentropicVortex::v_SetInitialConditions(), Nektar::NonlinearPeregrine::v_SetInitialConditions(), Nektar::CompressibleFlowSystem::v_SetInitialConditions(), and v_SetInitialConditions().

1087  {
1088  std::string outname = m_sessionName + "_" +
1089  boost::lexical_cast<std::string>(n);
1090  WriteFld(outname + ".chk");
1091  }
std::string m_sessionName
Name of the session.
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.

◆ Checkpoint_Output() [2/2]

void Nektar::SolverUtils::EquationSystem::Checkpoint_Output ( const int  n,
MultiRegions::ExpListSharedPtr field,
std::vector< Array< OneD, NekDouble > > &  fieldcoeffs,
std::vector< std::string > &  variables 
)

Write checkpoint file of custom data fields.

Write the n-th checkpoint file.

Parameters
nThe index of the checkpoint file.

Definition at line 1097 of file EquationSystem.cpp.

References m_sessionName, and WriteFld().

1102  {
1103  std::string outname = m_sessionName + "_" +
1104  boost::lexical_cast<std::string>(n);
1105  WriteFld(outname, field, fieldcoeffs, variables);
1106  }
std::string m_sessionName
Name of the session.
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.

◆ CopyFromPhysField()

void Nektar::SolverUtils::EquationSystem::CopyFromPhysField ( const int  i,
Array< OneD, NekDouble > &  output 
)
inline

Definition at line 732 of file EquationSystem.h.

References Vmath::Vcopy().

734  {
735  Vmath::Vcopy(output.num_elements(), m_fields[i]->GetPhys(), 1, output, 1 );
736  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ CopyToPhysField()

void Nektar::SolverUtils::EquationSystem::CopyToPhysField ( const int  i,
Array< OneD, NekDouble > &  output 
)
inline

Definition at line 738 of file EquationSystem.h.

References Vmath::Vcopy().

740  {
741  Vmath::Vcopy(output.num_elements(), output, 1, m_fields[i]->UpdatePhys(), 1 );
742  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ DoInitialise()

void Nektar::SolverUtils::EquationSystem::DoInitialise ( )
inline

Perform any initialisation necessary before solving the problem.

This allows initialisation of the solver which cannot be completed during object construction (such as setting of initial conditions).

Public interface routine to virtual function implementation.

Definition at line 504 of file EquationSystem.h.

505  {
506  v_DoInitialise();
507  }
virtual SOLVER_UTILS_EXPORT void v_DoInitialise()
Virtual function for initialisation implementation.

◆ DoSolve()

void Nektar::SolverUtils::EquationSystem::DoSolve ( void  )
inline

Solve the problem.

Performs the actual solve.

Public interface routine to virtual function implementation.

Definition at line 536 of file EquationSystem.h.

537  {
538  v_DoSolve();
539  }
virtual SOLVER_UTILS_EXPORT void v_DoSolve()
Virtual function for solve implementation.

◆ ErrorExtraPoints()

Array< OneD, NekDouble > Nektar::SolverUtils::EquationSystem::ErrorExtraPoints ( unsigned int  field)

Compute error (L2 and L_inf) over an larger set of quadrature points return [L2 Linf].

Compute the error in the L2-norm, L-inf for a larger number of quadrature points.

Parameters
fieldThe field to compare.
Returns
Error in the L2-norm and L-inf norm.

Definition at line 857 of file EquationSystem.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, GetNumExpModes(), m_fields, m_graph, m_NumQuadPointsError, m_session, and m_time.

Referenced by Nektar::MMFSWE::v_L2Error(), v_L2Error(), and v_LinfError().

859  {
860  int NumModes = GetNumExpModes();
861  Array<OneD,NekDouble> L2INF(2);
862 
863  const LibUtilities::PointsKey PkeyT1(
865  const LibUtilities::PointsKey PkeyT2(
867  const LibUtilities::PointsKey PkeyQ1(
869  const LibUtilities::PointsKey PkeyQ2(
871  const LibUtilities::BasisKey BkeyT1(
872  LibUtilities::eModified_A,NumModes, PkeyT1);
873  const LibUtilities::BasisKey BkeyT2(
874  LibUtilities::eModified_B, NumModes, PkeyT2);
875  const LibUtilities::BasisKey BkeyQ1(
876  LibUtilities::eModified_A, NumModes, PkeyQ1);
877  const LibUtilities::BasisKey BkeyQ2(
878  LibUtilities::eModified_A, NumModes, PkeyQ2);
879 
882  m_session, BkeyT1, BkeyT2, BkeyQ1, BkeyQ2, m_graph);
883 
884  int ErrorCoordim = ErrorExp->GetCoordim(0);
885  int ErrorNq = ErrorExp->GetTotPoints();
886 
887  Array<OneD,NekDouble> ErrorXc0(ErrorNq, 0.0);
888  Array<OneD,NekDouble> ErrorXc1(ErrorNq, 0.0);
889  Array<OneD,NekDouble> ErrorXc2(ErrorNq, 0.0);
890 
891  switch(ErrorCoordim)
892  {
893  case 1:
894  ErrorExp->GetCoords(ErrorXc0);
895  break;
896  case 2:
897  ErrorExp->GetCoords(ErrorXc0, ErrorXc1);
898  break;
899  case 3:
900  ErrorExp->GetCoords(ErrorXc0, ErrorXc1, ErrorXc2);
901  break;
902  }
904  m_session->GetFunction("ExactSolution", field);
905 
906  // Evaluate the exact solution
907  Array<OneD,NekDouble> ErrorSol(ErrorNq);
908 
909  exSol->Evaluate(ErrorXc0,ErrorXc1,ErrorXc2,m_time,ErrorSol);
910 
911  // Calcualte spectral/hp approximation on the quadrature points
912  // of this new expansion basis
913  ErrorExp->BwdTrans_IterPerExp(m_fields[field]->GetCoeffs(),
914  ErrorExp->UpdatePhys());
915 
916  L2INF[0] = ErrorExp->L2 (ErrorExp->GetPhys(), ErrorSol);
917  L2INF[1] = ErrorExp->Linf(ErrorExp->GetPhys(), ErrorSol);
918 
919  return L2INF;
920  }
NekDouble m_time
Current time of simulation.
Principle Modified Functions .
Definition: BasisType.h:48
SOLVER_UTILS_EXPORT int GetNumExpModes()
std::shared_ptr< ExpList2D > ExpList2DSharedPtr
Shared pointer to an ExpList2D object.
Definition: ExpList2D.h:48
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:58
Principle Modified Functions .
Definition: BasisType.h:49
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< Equation > EquationSharedPtr
Definition: Equation.h:131
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.
int m_NumQuadPointsError
Number of Quadrature points used to work out the error.
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:51

◆ EvaluateExactSolution()

void Nektar::SolverUtils::EquationSystem::EvaluateExactSolution ( int  field,
Array< OneD, NekDouble > &  outfield,
const NekDouble  time 
)
inline

Evaluates an exact solution.

Definition at line 628 of file EquationSystem.h.

Referenced by Nektar::MMFSWE::v_LinfError().

631  {
632  v_EvaluateExactSolution(field, outfield, time);
633  }
virtual SOLVER_UTILS_EXPORT void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time)

◆ ExtraFldOutput()

void Nektar::SolverUtils::EquationSystem::ExtraFldOutput ( std::vector< Array< OneD, NekDouble > > &  fieldcoeffs,
std::vector< std::string > &  variables 
)
inline

Append the coefficients and name of variables with solver specific extra variables

Parameters
fieldcoeffsVector with coefficients
variablesVector with name of variables

Definition at line 583 of file EquationSystem.h.

Referenced by WriteFld().

586  {
587  v_ExtraFldOutput(fieldcoeffs, variables);
588  }
virtual SOLVER_UTILS_EXPORT void v_ExtraFldOutput(std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)

◆ FwdTransFields()

void Nektar::SolverUtils::EquationSystem::FwdTransFields ( void  )

FwdTrans the m_fields members

Definition at line 1072 of file EquationSystem.cpp.

References m_fields.

1073  {
1074  for (int i = 0; i < m_fields.num_elements(); i++)
1075  {
1076  m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),
1077  m_fields[i]->UpdateCoeffs());
1078  m_fields[i]->SetPhysState(false);
1079  }
1080  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetCheckpointNumber()

SOLVER_UTILS_EXPORT int Nektar::SolverUtils::EquationSystem::GetCheckpointNumber ( )
inline

Definition at line 291 of file EquationSystem.h.

292  {
293  return m_nchk;
294  }
int m_nchk
Number of checkpoints written so far.

◆ GetCheckpointSteps()

SOLVER_UTILS_EXPORT int Nektar::SolverUtils::EquationSystem::GetCheckpointSteps ( )
inline

Definition at line 301 of file EquationSystem.h.

302  {
303  return m_checksteps;
304  }
int m_checksteps
Number of steps between checkpoints.

◆ GetCoeff_Offset()

int Nektar::SolverUtils::EquationSystem::GetCoeff_Offset ( int  n)
inline

Definition at line 697 of file EquationSystem.h.

Referenced by Nektar::IncNavierStokes::SetRadiationBoundaryForcing().

698  {
699  return m_fields[0]->GetCoeff_Offset(n);
700  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetExpSize()

int Nektar::SolverUtils::EquationSystem::GetExpSize ( void  )
inline

Definition at line 687 of file EquationSystem.h.

Referenced by Nektar::CompressibleFlowSystem::GetStabilityLimitVector(), and Nektar::UnsteadyAdvectionDiffusion::SubStepAdvance().

688  {
689  return m_fields[0]->GetExpSize();
690  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetFinalTime()

NekDouble Nektar::SolverUtils::EquationSystem::GetFinalTime ( )
inline

Return final time.

Definition at line 641 of file EquationSystem.h.

642  {
643  return m_time;
644  }
NekDouble m_time
Current time of simulation.

◆ GetFunction()

SessionFunctionSharedPtr Nektar::SolverUtils::EquationSystem::GetFunction ( std::string  name,
const MultiRegions::ExpListSharedPtr field = MultiRegions::NullExpListSharedPtr,
bool  cache = false 
)

Get a SessionFunction by name.

Definition at line 688 of file EquationSystem.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), GetSession(), m_fields, m_session, m_sessionFunctions, and CellMLToNektar.pycml::name.

Referenced by Nektar::CoupledLinearNS::DefineForcingTerm(), Nektar::ShallowWaterSystem::EvaluateCoriolis(), Nektar::MMFSWE::EvaluateCoriolis(), Nektar::ShallowWaterSystem::EvaluateWaterDepth(), Nektar::VelocityCorrectionScheme::SetUpSVV(), Nektar::SteadyAdvectionDiffusion::v_DoInitialise(), Nektar::CoupledLinearNS::v_DoInitialise(), Nektar::LinearElasticSystem::v_DoSolve(), v_EvaluateExactSolution(), Nektar::Poisson::v_GenerateSummary(), Nektar::Poisson::v_InitObject(), Nektar::Projection::v_InitObject(), Nektar::APE::v_InitObject(), Nektar::SteadyAdvectionDiffusion::v_InitObject(), Nektar::BidomainRoth::v_InitObject(), Nektar::LEE::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::EigenValuesAdvection::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::CFLtester::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::PulseWaveSystem::v_InitObject(), Nektar::MMFAdvection::v_InitObject(), Nektar::PulseWaveSystem::v_L2Error(), v_L2Error(), Nektar::PulseWaveSystem::v_LinfError(), v_LinfError(), Nektar::Dummy::v_PostIntegrate(), Nektar::AcousticSystem::v_PreIntegrate(), and v_SetInitialConditions().

692  {
693  MultiRegions::ExpListSharedPtr vField = field;
694  if (!field)
695  {
696  vField = m_fields[0];
697  }
698 
699  if (cache)
700  {
701  if ((m_sessionFunctions.find(name) == m_sessionFunctions.end())
703  || (m_sessionFunctions[name]->GetExpansion() != vField)
704  )
705  {
708  m_session, vField, name, cache);
709  }
710 
711  return m_sessionFunctions[name];
712  }
713  else
714  {
716  new SessionFunction(m_session,vField, name, cache));
717  }
718  }
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< std::string, SolverUtils::SessionFunctionSharedPtr > m_sessionFunctions
Map of known SessionFunctions.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SOLVER_UTILS_EXPORT LibUtilities::SessionReaderSharedPtr GetSession()
Get Session name.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
std::shared_ptr< SessionFunction > SessionFunctionSharedPtr

◆ GetNcoeffs() [1/2]

int Nektar::SolverUtils::EquationSystem::GetNcoeffs ( void  )
inline

Definition at line 646 of file EquationSystem.h.

Referenced by Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::UnsteadyReactionDiffusion::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::MMFAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::MMFSWE::DoOdeRhs(), Nektar::MMFMaxwell::DoOdeRhs(), ImportFld(), ImportFldToMultiDomains(), Nektar::VelocityCorrectionScheme::SetupFlowrate(), Nektar::CoupledLinearNS::SolveLinearNS(), Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem(), Nektar::LEE::v_AddLinTerm(), Nektar::Projection::v_DoSolve(), Nektar::Laplace::v_DoSolve(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::AcousticSystem::v_ExtraFldOutput(), Nektar::CoupledLinearNS::v_Output(), v_SetInitialConditions(), Nektar::MMFAdvection::WeakDGDirectionalAdvection(), Nektar::MMFMaxwell::WeakDGMaxwellDirDeriv(), Nektar::MMFSWE::WeakDGSWEDirDeriv(), and WriteFld().

647  {
648  return m_fields[0]->GetNcoeffs();
649  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetNcoeffs() [2/2]

int Nektar::SolverUtils::EquationSystem::GetNcoeffs ( const int  eid)
inline

Definition at line 651 of file EquationSystem.h.

652  {
653  return m_fields[0]->GetNcoeffs(eid);
654  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetNpoints()

int Nektar::SolverUtils::EquationSystem::GetNpoints ( void  )
inline

Definition at line 712 of file EquationSystem.h.

Referenced by Nektar::MMFMaxwell::ComputeMaterialMicroWaveCloak(), Nektar::MMFMaxwell::ComputeMaterialOpticalCloak(), Nektar::MMFMaxwell::ComputeRadCloak(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::UnsteadyViscousBurgers::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::MMFAdvection::DoOdeProjection(), Nektar::CompressibleFlowSystem::DoOdeProjection(), Nektar::MMFMaxwell::DoOdeProjection(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::UnsteadyInviscidBurger::DoOdeRhs(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::CFLtester::DoOdeRhs(), Nektar::MMFAdvection::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::UnsteadyInviscidBurger::GetFluxVector(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::SolverUtils::UnsteadySystem::v_AppendOutput1D(), Nektar::NavierStokesCFEAxisym::v_DoDiffusion(), Nektar::NavierStokesCFE::v_DoDiffusion(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::NavierStokesCFEAxisym::v_InitObject(), Nektar::PulseWaveSystem::v_L2Error(), Nektar::MMFSWE::v_L2Error(), v_L2Error(), Nektar::PulseWaveSystem::v_LinfError(), v_LinfError(), Nektar::MMFMaxwell::WeakDGMaxwellDirDeriv(), Nektar::MMFSWE::WeakDGSWEDirDeriv(), and ZeroPhysFields().

713  {
714  return m_fields[0]->GetNpoints();
715  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetNumExpModes()

int Nektar::SolverUtils::EquationSystem::GetNumExpModes ( void  )
inline

Definition at line 656 of file EquationSystem.h.

Referenced by ErrorExtraPoints().

657  {
658  return m_graph->GetExpansions().begin()->second->m_basisKeyVector[0]
659  .GetNumModes();
660  }
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.

◆ GetNumExpModesPerExp()

const Array< OneD, int > Nektar::SolverUtils::EquationSystem::GetNumExpModesPerExp ( void  )
inline

Definition at line 662 of file EquationSystem.h.

Referenced by Nektar::SolverUtils::AdvectionSystem::GetElmtCFLVals().

663  {
664  return m_fields[0]->EvalBasisNumModesMaxPerExp();
665  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetNvariables()

int Nektar::SolverUtils::EquationSystem::GetNvariables ( void  )
inline

Definition at line 667 of file EquationSystem.h.

Referenced by ImportFldToMultiDomains().

668  {
669  return m_session->GetVariables().size();
670  }
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

◆ GetPhys_Offset()

int Nektar::SolverUtils::EquationSystem::GetPhys_Offset ( int  n)
inline

Definition at line 692 of file EquationSystem.h.

Referenced by Nektar::IncNavierStokes::SetRadiationBoundaryForcing(), Nektar::NonlinearSWE::WallBoundary(), and Nektar::LinearSWE::WallBoundary().

693  {
694  return m_fields[0]->GetPhys_Offset(n);
695  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetPressure()

MultiRegions::ExpListSharedPtr Nektar::SolverUtils::EquationSystem::GetPressure ( void  )
inline

Get pressure field if available.

Get Pressure field if available

Definition at line 571 of file EquationSystem.h.

572  {
573  return v_GetPressure();
574  }
virtual SOLVER_UTILS_EXPORT MultiRegions::ExpListSharedPtr v_GetPressure(void)

◆ GetSession()

SOLVER_UTILS_EXPORT LibUtilities::SessionReaderSharedPtr Nektar::SolverUtils::EquationSystem::GetSession ( )
inline

Get Session name.

Definition at line 124 of file EquationSystem.h.

References CellMLToNektar.pycml::name, Nektar::MultiRegions::NullExpListSharedPtr, and SOLVER_UTILS_EXPORT.

Referenced by GetFunction().

125  {
126  return m_session;
127  }
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

◆ GetSessionName()

SOLVER_UTILS_EXPORT std::string Nektar::SolverUtils::EquationSystem::GetSessionName ( )
inline

Get Session name.

Definition at line 106 of file EquationSystem.h.

107  {
108  return m_sessionName;
109  }
std::string m_sessionName
Name of the session.

◆ GetSteps()

int Nektar::SolverUtils::EquationSystem::GetSteps ( void  )
inline

Definition at line 717 of file EquationSystem.h.

718  {
719  return m_steps;
720  }
int m_steps
Number of steps to take.

◆ GetTimeStep()

NekDouble Nektar::SolverUtils::EquationSystem::GetTimeStep ( void  )
inline

Definition at line 722 of file EquationSystem.h.

Referenced by Nektar::SolverUtils::UnsteadySystem::v_DoSolve().

723  {
724  return m_timestep;
725  }
NekDouble m_timestep
Time step size.

◆ GetTotPoints() [1/2]

int Nektar::SolverUtils::EquationSystem::GetTotPoints ( void  )
inline

Definition at line 702 of file EquationSystem.h.

Referenced by Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::SolverUtils::MMFSystem::AdddedtMaxwell(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SolverUtils::UnsteadySystem::CheckSteadyState(), Nektar::SolverUtils::MMFSystem::Computedemdxicdote(), Nektar::MMFMaxwell::ComputeEnergyDensity(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::MMFSWE::ConservativeToPrimitive(), Nektar::SolverUtils::MMFSystem::DeriveCrossProductMF(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::Dummy::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::AcousticSystem::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::MMFSWE::DoOdeRhs(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::MMFMaxwell::EvaluateCoriolis(), Nektar::MMFSWE::EvaluateCoriolisForZonalFlow(), Nektar::MMFSWE::EvaluateStandardCoriolis(), Nektar::MMFSWE::EvaluateWaterDepth(), Nektar::RinglebFlow::GetExactRinglebFlow(), Nektar::CFLtester::GetStdVelocity(), Nektar::MMFSWE::IsolatedMountainFlow(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::MMFDiffusion::Morphogenesis(), Nektar::MMFDiffusion::PlanePhiWave(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::MMFSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::MMFSWE::RossbyWave(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::MMFSWE::SteadyZonalFlow(), Nektar::MMFDiffusion::TestCubeProblem(), Nektar::MMFDiffusion::TestPlaneProblem(), Nektar::MMFSWE::UnstableJetFlow(), Nektar::MMFSWE::UnsteadyZonalFlow(), Nektar::LEE::v_AddLinTerm(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::IsentropicVortex::v_EvaluateExactSolution(), Nektar::MMFDiffusion::v_EvaluateExactSolution(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::APE::v_InitObject(), Nektar::LEE::v_InitObject(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::Dummy::v_Output(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::IsentropicVortex::v_SetInitialConditions(), Nektar::MMFDiffusion::v_SetInitialConditions(), Nektar::MMFMaxwell::v_SetInitialConditions(), Nektar::MMFSWE::v_SetInitialConditions(), and Nektar::NonlinearPeregrine::WCESolve().

703  {
704  return m_fields[0]->GetNpoints();
705  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetTotPoints() [2/2]

int Nektar::SolverUtils::EquationSystem::GetTotPoints ( int  n)
inline

Definition at line 707 of file EquationSystem.h.

708  {
709  return m_fields[0]->GetTotPoints(n);
710  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ GetTraceNpoints()

int Nektar::SolverUtils::EquationSystem::GetTraceNpoints ( void  )
inline

◆ GetTraceTotPoints()

int Nektar::SolverUtils::EquationSystem::GetTraceTotPoints ( void  )
inline

Definition at line 677 of file EquationSystem.h.

Referenced by Nektar::SolverUtils::MMFSystem::AverageMaxwellFlux1D(), Nektar::SolverUtils::MMFSystem::ComputeMFtrace(), Nektar::SolverUtils::MMFSystem::ComputeNtimesF12(), Nektar::SolverUtils::MMFSystem::ComputeNtimesFz(), Nektar::SolverUtils::MMFSystem::ComputeNtimestimesdF12(), Nektar::SolverUtils::MMFSystem::ComputeNtimestimesdFz(), Nektar::MMFMaxwell::ComputeSurfaceCurrent(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::SolverUtils::MMFSystem::LaxFriedrichMaxwellFlux1D(), Nektar::NonlinearPeregrine::NumericalFluxConsVariables(), Nektar::NonlinearPeregrine::NumericalFluxForcing(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTE(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTM(), Nektar::MMFSWE::NumericalSWEFlux(), Nektar::MMFMaxwell::Printout_SurfaceCurrent(), Nektar::NonlinearSWE::SetBoundaryConditions(), Nektar::LinearSWE::SetBoundaryConditions(), Nektar::AcousticSystem::SetBoundaryConditions(), Nektar::NonlinearPeregrine::SetBoundaryConditions(), Nektar::CompressibleFlowSystem::SetBoundaryConditions(), Nektar::SolverUtils::MMFSystem::UpwindMaxwellFlux1D(), Nektar::NavierStokesCFE::v_DoDiffusion(), Nektar::PulseWaveSystem::v_InitObject(), Nektar::MMFSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryContVariables(), and Nektar::NonlinearPeregrine::WallBoundaryForcing().

678  {
679  return GetTraceNpoints();
680  }
SOLVER_UTILS_EXPORT int GetTraceNpoints()

◆ GetVariable()

const std::string Nektar::SolverUtils::EquationSystem::GetVariable ( unsigned int  i)
inline

Definition at line 672 of file EquationSystem.h.

673  {
674  return m_session->GetVariable(i);
675  }
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

◆ ImportFld() [1/3]

void Nektar::SolverUtils::EquationSystem::ImportFld ( const std::string &  infile,
Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields 
)

Input field data from the given file.

Import field from infile and load into m_fields. This routine will also perform a BwdTrans to ensure data is in both the physical and coefficient storage.

Parameters
infileFilename to read.

Definition at line 1222 of file EquationSystem.cpp.

References ASSERTL1, Nektar::LibUtilities::FieldIO::CreateForFile(), GetNcoeffs(), m_fields, m_session, and Vmath::Zero().

1225  {
1226  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1227  std::vector<std::vector<NekDouble> > FieldData;
1228  LibUtilities::FieldIOSharedPtr field_fld =
1230  field_fld->Import(infile,FieldDef,FieldData);
1231 
1232  // Copy FieldData into m_fields
1233  for(int j = 0; j < pFields.num_elements(); ++j)
1234  {
1235  Vmath::Zero(pFields[j]->GetNcoeffs(),
1236  pFields[j]->UpdateCoeffs(),1);
1237 
1238  for(int i = 0; i < FieldDef.size(); ++i)
1239  {
1240  ASSERTL1(FieldDef[i]->m_fields[j] ==
1241  m_session->GetVariable(j),
1242  std::string("Order of ") + infile
1243  + std::string(" data and that defined in "
1244  "m_boundaryconditions differs"));
1245 
1246  pFields[j]->ExtractDataToCoeffs(FieldDef[i], FieldData[i],
1247  FieldDef[i]->m_fields[j],
1248  pFields[j]->UpdateCoeffs());
1249  }
1250  pFields[j]->BwdTrans(pFields[j]->GetCoeffs(),
1251  pFields[j]->UpdatePhys());
1252  }
1253  }
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
Definition: FieldIO.cpp:226
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT int GetNcoeffs()
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250

◆ ImportFld() [2/3]

void Nektar::SolverUtils::EquationSystem::ImportFld ( const std::string &  infile,
std::vector< std::string > &  fieldStr,
Array< OneD, Array< OneD, NekDouble > > &  coeffs 
)

Output a field. Input field data into array from the given file.

Import field from infile and load into the array coeffs.

Parameters
infileFilename to read.
fieldStran array of string identifying fields to be imported
coeffsarray of array of coefficients to store imported data

Definition at line 1353 of file EquationSystem.cpp.

References ASSERTL0, Nektar::LibUtilities::FieldIO::CreateForFile(), m_fields, m_session, and Vmath::Zero().

1357  {
1358 
1359  ASSERTL0(fieldStr.size() <= coeffs.num_elements(),
1360  "length of fieldstr should be the same as pFields");
1361 
1362  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1363  std::vector<std::vector<NekDouble> > FieldData;
1364 
1365  LibUtilities::FieldIOSharedPtr field_fld =
1367  field_fld->Import(infile,FieldDef,FieldData);
1368 
1369  // Copy FieldData into m_fields
1370  for(int j = 0; j < fieldStr.size(); ++j)
1371  {
1372  Vmath::Zero(coeffs[j].num_elements(),coeffs[j],1);
1373  for(int i = 0; i < FieldDef.size(); ++i)
1374  {
1375  m_fields[0]->ExtractDataToCoeffs(FieldDef[i], FieldData[i],
1376  fieldStr[j], coeffs[j]);
1377  }
1378  }
1379  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
Definition: FieldIO.cpp:226
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306

◆ ImportFld() [3/3]

void Nektar::SolverUtils::EquationSystem::ImportFld ( const std::string &  infile,
MultiRegions::ExpListSharedPtr pField,
std::string &  pFieldName 
)

Output a field. Input field data into ExpList from the given file.

Import field from infile and load into pField. This routine will also perform a BwdTrans to ensure data is in both the physical and coefficient storage.

Definition at line 1312 of file EquationSystem.cpp.

References ASSERTL1, Nektar::LibUtilities::FieldIO::CreateForFile(), m_fields, m_session, and Vmath::Zero().

1316  {
1317  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1318  std::vector<std::vector<NekDouble> > FieldData;
1319 
1320  LibUtilities::FieldIOSharedPtr field_fld =
1322  field_fld->Import(infile,FieldDef,FieldData);
1323  int idx = -1;
1324 
1325  Vmath::Zero(pField->GetNcoeffs(),pField->UpdateCoeffs(),1);
1326 
1327  for(int i = 0; i < FieldDef.size(); ++i)
1328  {
1329  // find the index of the required field in the file.
1330  for(int j = 0; j < FieldData.size(); ++j)
1331  {
1332  if (FieldDef[i]->m_fields[j] == pFieldName)
1333  {
1334  idx = j;
1335  }
1336  }
1337  ASSERTL1(idx >= 0, "Field " + pFieldName + " not found.");
1338 
1339  pField->ExtractDataToCoeffs(FieldDef[i], FieldData[i],
1340  FieldDef[i]->m_fields[idx],
1341  pField->UpdateCoeffs());
1342  }
1343  pField->BwdTrans(pField->GetCoeffs(), pField->UpdatePhys());
1344  }
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
Definition: FieldIO.cpp:226
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250

◆ ImportFldToMultiDomains()

void Nektar::SolverUtils::EquationSystem::ImportFldToMultiDomains ( const std::string &  infile,
Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const int  ndomains 
)

Input field data from the given file to multiple domains.

Import field from infile and load into m_fields. This routine will also perform a BwdTrans to ensure data is in both the physical and coefficient storage.

Parameters
infileFilename to read. If optionan ndomains is specified it assumes we loop over nodmains for each nvariables.

Definition at line 1265 of file EquationSystem.cpp.

References ASSERTL0, ASSERTL1, GetNcoeffs(), GetNvariables(), Nektar::LibUtilities::Import(), m_fields, m_session, and Vmath::Zero().

1269  {
1270  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1271  std::vector<std::vector<NekDouble> > FieldData;
1272 
1273  LibUtilities::Import(infile,FieldDef,FieldData);
1274 
1275  int nvariables = GetNvariables();
1276 
1277  ASSERTL0(ndomains*nvariables == pFields.num_elements(),
1278  "Number of fields does not match the number of variables and domains");
1279 
1280  // Copy FieldData into m_fields
1281  for(int j = 0; j < ndomains; ++j)
1282  {
1283  for(int i = 0; i < nvariables; ++i)
1284  {
1285  Vmath::Zero(pFields[j*nvariables+i]->GetNcoeffs(),
1286  pFields[j*nvariables+i]->UpdateCoeffs(),1);
1287 
1288  for(int n = 0; n < FieldDef.size(); ++n)
1289  {
1290  ASSERTL1(FieldDef[n]->m_fields[i] == m_session->GetVariable(i),
1291  std::string("Order of ") + infile
1292  + std::string(" data and that defined in "
1293  "m_boundaryconditions differs"));
1294 
1295  pFields[j*nvariables+i]->ExtractDataToCoeffs(
1296  FieldDef[n], FieldData[n],
1297  FieldDef[n]->m_fields[i],
1298  pFields[j*nvariables+i]->UpdateCoeffs());
1299  }
1300  pFields[j*nvariables+i]->BwdTrans(
1301  pFields[j*nvariables+i]->GetCoeffs(),
1302  pFields[j*nvariables+i]->UpdatePhys());
1303  }
1304  }
1305  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > &ElementIDs)
This function allows for data to be imported from an FLD file when a session and/or communicator is n...
Definition: FieldIO.cpp:293
SOLVER_UTILS_EXPORT int GetNvariables()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT int GetNcoeffs()
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250

◆ InitObject()

void Nektar::SolverUtils::EquationSystem::InitObject ( )
inline

Initialises the members of this object.

This is the second part of the two-phase initialisation process. Calls to virtual functions will correctly resolve to the derived class during this phase of the construction.

Definition at line 492 of file EquationSystem.h.

493  {
494  v_InitObject();
495  }
virtual SOLVER_UTILS_EXPORT void v_InitObject()
Initialisation object for EquationSystem.

◆ L2Error() [1/2]

NekDouble Nektar::SolverUtils::EquationSystem::L2Error ( unsigned int  field,
const Array< OneD, NekDouble > &  exactsoln,
bool  Normalised = false 
)
inline

Compute the L2 error between fields and a given exact solution.

L_2 Error computation Public interface routine to virtual function implementation.

Definition at line 563 of file EquationSystem.h.

564  {
565  return v_L2Error(field, exactsoln, Normalised);
566  }
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.

◆ L2Error() [2/2]

SOLVER_UTILS_EXPORT NekDouble Nektar::SolverUtils::EquationSystem::L2Error ( unsigned int  field,
bool  Normalised = false 
)
inline

Compute the L2 error of the fields.

Definition at line 168 of file EquationSystem.h.

References Nektar::NullNekDouble1DArray, and SOLVER_UTILS_EXPORT.

171  {
172  return L2Error(field,NullNekDouble1DArray,Normalised);
173  }
static Array< OneD, NekDouble > NullNekDouble1DArray
SOLVER_UTILS_EXPORT NekDouble L2Error(unsigned int field, const Array< OneD, NekDouble > &exactsoln, bool Normalised=false)
Compute the L2 error between fields and a given exact solution.

◆ LinfError()

NekDouble Nektar::SolverUtils::EquationSystem::LinfError ( unsigned int  field,
const Array< OneD, NekDouble > &  exactsoln = NullNekDouble1DArray 
)
inline

Linf error computation.

L_inf Error computation Public interface routine to virtual function implementation.

Definition at line 554 of file EquationSystem.h.

Referenced by Nektar::MMFSWE::v_LinfError().

555  {
556  return v_LinfError(field, exactsoln);
557  }
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...

◆ Output()

void Nektar::SolverUtils::EquationSystem::Output ( void  )
inline

Perform output operations after solve.

Perform output operations after solve.

Definition at line 545 of file EquationSystem.h.

546  {
547  v_Output();
548  }
virtual SOLVER_UTILS_EXPORT void v_Output(void)

◆ PrintProgressbar()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::PrintProgressbar ( const int  position,
const int  goal 
) const
inlineprivate

Definition at line 479 of file EquationSystem.h.

References Nektar::LibUtilities::PrintProgressbar().

481  {
482  LibUtilities::PrintProgressbar(position, goal, "Interpolating");
483  }
int PrintProgressbar(const int position, const int goal, const std::string message, int lastprogress=-1)
Prints a progressbar.
Definition: Progressbar.hpp:67

◆ PrintSummary()

void Nektar::SolverUtils::EquationSystem::PrintSummary ( std::ostream &  out)
inline

Print a summary of parameters and solver characteristics.

Prints a summary of variables and problem parameters.

Public interface routine to virtual function implementation.

Parameters
outThe ostream object to write to.

Definition at line 597 of file EquationSystem.h.

598  {
599  if (m_session->GetComm()->GetRank() == 0)
600  {
601  std::vector<std::pair<std::string, std::string> > vSummary;
602  v_GenerateSummary(vSummary);
603 
604  out << "=======================================================================" << std::endl;
605  for (auto &x : vSummary)
606  {
607  out << "\t";
608  out.width(20);
609  out << x.first << ": " << x.second << std::endl;
610  }
611  out << "=======================================================================" << std::endl;
612  }
613  }
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &l)
Virtual function for generating summary information.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

◆ ResetSessionName()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::ResetSessionName ( std::string  newname)
inline

Reset Session name.

Definition at line 118 of file EquationSystem.h.

119  {
120  m_sessionName = newname;
121  }
std::string m_sessionName
Name of the session.

◆ SessionSummary()

void Nektar::SolverUtils::EquationSystem::SessionSummary ( SummaryList s)

Write out a session summary.

Write out a summary of the session data.

Parameters
outOutput stream to write data to.

Definition at line 1385 of file EquationSystem.cpp.

References Nektar::SolverUtils::AddSummaryItem(), Nektar::MultiRegions::eDiscontinuous, Nektar::MultiRegions::eGalerkin, eHomogeneous1D, eHomogeneous2D, Nektar::MultiRegions::eMixed_CG_Discontinuous, Nektar::SolverUtils::GetAdvectionFactory(), Nektar::SolverUtils::GetDiffusionFactory(), m_expdim, m_fields, m_halfMode, m_HomogeneousType, m_LhomY, m_LhomZ, m_multipleModes, m_npointsY, m_npointsZ, m_projectionType, m_session, m_sessionName, m_singleMode, m_spacedim, and m_useFFT.

Referenced by Nektar::Projection::v_GenerateSummary(), Nektar::Laplace::v_GenerateSummary(), Nektar::LinearElasticSystem::v_GenerateSummary(), and v_GenerateSummary().

1386  {
1387  AddSummaryItem(s, "EquationType",
1388  m_session->GetSolverInfo("EQTYPE"));
1389  AddSummaryItem(s, "Session Name", m_sessionName);
1390  AddSummaryItem(s, "Spatial Dim.", m_spacedim);
1391  AddSummaryItem(s, "Max SEM Exp. Order",
1392  m_fields[0]->EvalBasisNumModesMax());
1393 
1394  if (m_session->GetComm()->GetSize() > 1)
1395  {
1396  AddSummaryItem(s, "Num. Processes",
1397  m_session->GetComm()->GetSize());
1398  }
1399 
1401  {
1402  AddSummaryItem(s, "Quasi-3D", "Homogeneous in z-direction");
1403  AddSummaryItem(s, "Expansion Dim.", m_expdim + 1);
1404  AddSummaryItem(s, "Num. Hom. Modes (z)", m_npointsZ);
1405  AddSummaryItem(s, "Hom. length (LZ)", m_LhomZ);
1406  AddSummaryItem(s, "FFT Type", m_useFFT ? "FFTW" : "MVM");
1407  if (m_halfMode)
1408  {
1409  AddSummaryItem(s, "ModeType", "Half Mode");
1410  }
1411  else if (m_singleMode)
1412  {
1413  AddSummaryItem(s, "ModeType", "Single Mode");
1414  }
1415  else if (m_multipleModes)
1416  {
1417  AddSummaryItem(s, "ModeType", "Multiple Modes");
1418  }
1419  }
1420  else if(m_HomogeneousType == eHomogeneous2D)
1421  {
1422  AddSummaryItem(s, "Quasi-3D", "Homogeneous in yz-plane");
1423  AddSummaryItem(s, "Expansion Dim.", m_expdim + 2);
1424  AddSummaryItem(s, "Num. Hom. Modes (y)", m_npointsY);
1425  AddSummaryItem(s, "Num. Hom. Modes (z)", m_npointsZ);
1426  AddSummaryItem(s, "Hom. length (LY)", m_LhomY);
1427  AddSummaryItem(s, "Hom. length (LZ)", m_LhomZ);
1428  AddSummaryItem(s, "FFT Type", m_useFFT ? "FFTW" : "MVM");
1429  }
1430  else
1431  {
1432  AddSummaryItem(s, "Expansion Dim.", m_expdim);
1433  }
1434 
1435  if (m_session->DefinesSolverInfo("UpwindType"))
1436  {
1437  AddSummaryItem(s, "Riemann Solver",
1438  m_session->GetSolverInfo("UpwindType"));
1439  }
1440 
1441  if (m_session->DefinesSolverInfo("AdvectionType"))
1442  {
1443  std::string AdvectionType;
1444  AdvectionType = m_session->GetSolverInfo("AdvectionType");
1445  AddSummaryItem(s, "Advection Type", GetAdvectionFactory().
1446  GetClassDescription(AdvectionType));
1447  }
1448 
1450  {
1451  AddSummaryItem(s, "Projection Type", "Continuous Galerkin");
1452  }
1454  {
1455  AddSummaryItem(s, "Projection Type", "Discontinuous Galerkin");
1456  }
1458  {
1459  AddSummaryItem(s, "Projection Type",
1460  "Mixed Continuous Galerkin and Discontinuous");
1461  }
1462 
1463  if (m_session->DefinesSolverInfo("DiffusionType"))
1464  {
1465  std::string DiffusionType;
1466  DiffusionType = m_session->GetSolverInfo("DiffusionType");
1467  AddSummaryItem(s, "Diffusion Type", GetDiffusionFactory().
1468  GetClassDescription(DiffusionType));
1469  }
1470  }
bool m_singleMode
Flag to determine if single homogeneous mode is used.
bool m_halfMode
Flag to determine if half homogeneous mode is used.
NekDouble m_LhomZ
physical length in Z direction (if homogeneous)
int m_expdim
Expansion dimension.
DiffusionFactory & GetDiffusionFactory()
Definition: Diffusion.cpp:41
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
bool m_useFFT
Flag to determine if FFT is used for homogeneous transform.
NekDouble m_LhomY
physical length in Y direction (if homogeneous)
int m_npointsZ
number of points in Z direction (if homogeneous)
std::string m_sessionName
Name of the session.
bool m_multipleModes
Flag to determine if use multiple homogenenous modes are used.
int m_npointsY
number of points in Y direction (if homogeneous)
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition: Misc.cpp:49
int m_spacedim
Spatial dimension (>= expansion dim).
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
Definition: Advection.cpp:47
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
enum HomogeneousType m_HomogeneousType

◆ SetBoundaryConditions()

void Nektar::SolverUtils::EquationSystem::SetBoundaryConditions ( NekDouble  time)

Evaluates the boundary conditions at the given time.

If boundary conditions are time-dependent, they will be evaluated at the time specified.

Parameters
timeThe time at which to evaluate the BCs

Definition at line 725 of file EquationSystem.cpp.

References m_fields, and m_session.

Referenced by Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::UnsteadyViscousBurgers::DoImplicitSolve(), Nektar::MMFDiffusion::DoImplicitSolve(), Nektar::UnsteadyReactionDiffusion::DoOdeProjection(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::UnsteadyViscousBurgers::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::MMFAdvection::DoOdeProjection(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), and Nektar::SolverUtils::UnsteadySystem::v_DoInitialise().

726  {
727  std::string varName;
728  int nvariables = m_fields.num_elements();
729  for (int i = 0; i < nvariables; ++i)
730  {
731  varName = m_session->GetVariable(i);
732  m_fields[i]->EvaluateBoundaryConditions(time, varName);
733  }
734  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

◆ SetCheckpointNumber()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::SetCheckpointNumber ( int  num)
inline

Definition at line 296 of file EquationSystem.h.

297  {
298  m_nchk = num;
299  }
int m_nchk
Number of checkpoints written so far.

◆ SetCheckpointSteps()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::SetCheckpointSteps ( int  num)
inline

Definition at line 306 of file EquationSystem.h.

307  {
308  m_checksteps = num;
309  }
int m_checksteps
Number of steps between checkpoints.

◆ SetInitialConditions()

void Nektar::SolverUtils::EquationSystem::SetInitialConditions ( NekDouble  initialtime = 0.0,
bool  dumpInitialConditions = true,
const int  domain = 0 
)
inline

Initialise the data in the dependent fields.

Definition at line 620 of file EquationSystem.h.

Referenced by main(), Nektar::SolverUtils::UnsteadySystem::v_DoInitialise(), Nektar::PulseWaveSystem::v_DoInitialise(), Nektar::CoupledLinearNS::v_DoInitialise(), and Nektar::MMFSWE::v_DoInitialise().

623  {
624  v_SetInitialConditions(initialtime,dumpInitialConditions,domain);
625  }
virtual SOLVER_UTILS_EXPORT void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)

◆ SetInitialStep()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::SetInitialStep ( const int  step)
inline

Definition at line 317 of file EquationSystem.h.

References SOLVER_UTILS_EXPORT.

319  {
320  m_initialStep = step;
321  }
int m_initialStep
Number of the step where the simulation should begin.

◆ SetLambda()

void Nektar::SolverUtils::EquationSystem::SetLambda ( NekDouble  lambda)
inline

Set parameter m_lambda.

Definition at line 615 of file EquationSystem.h.

616  {
617  m_lambda = lambda;
618  }
NekDouble m_lambda
Lambda constant in real system if one required.

◆ SetModifiedBasis()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::SetModifiedBasis ( const bool  modbasis)
inline

◆ SetSteps()

void Nektar::SolverUtils::EquationSystem::SetSteps ( const int  steps)
inline

Definition at line 727 of file EquationSystem.h.

728  {
729  m_steps = steps;
730  }
int m_steps
Number of steps to take.

◆ SetTime()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::SetTime ( const NekDouble  time)
inline

Definition at line 311 of file EquationSystem.h.

313  {
314  m_time = time;
315  }
NekDouble m_time
Current time of simulation.

◆ SetUpTraceNormals()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::EquationSystem::SetUpTraceNormals ( void  )

◆ TransCoeffToPhys()

void Nektar::SolverUtils::EquationSystem::TransCoeffToPhys ( void  )
inline

Transform from coefficient to physical space.

Performs the transformation from coefficient to physical space.

Public interface routine to virtual function implementation.

Definition at line 515 of file EquationSystem.h.

516  {
518  }
virtual SOLVER_UTILS_EXPORT void v_TransCoeffToPhys()
Virtual function for transformation to physical space.

◆ TransPhysToCoeff()

void Nektar::SolverUtils::EquationSystem::TransPhysToCoeff ( void  )
inline

Transform from physical to coefficient space.

Performs the transformation from physical to coefficient space.

Public interface routine to virtual function implementation.

Definition at line 525 of file EquationSystem.h.

526  {
528  }
virtual SOLVER_UTILS_EXPORT void v_TransPhysToCoeff()
Virtual function for transformation to coefficient space.

◆ UpdateFieldMetaDataMap()

SOLVER_UTILS_EXPORT LibUtilities::FieldMetaDataMap& Nektar::SolverUtils::EquationSystem::UpdateFieldMetaDataMap ( )
inline

Get hold of FieldInfoMap so it can be updated.

◆ UpdateFields()

Array< OneD, MultiRegions::ExpListSharedPtr > & Nektar::SolverUtils::EquationSystem::UpdateFields ( void  )
inline

Definition at line 635 of file EquationSystem.h.

636  {
637  return m_fields;
638  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ v_DoInitialise()

void Nektar::SolverUtils::EquationSystem::v_DoInitialise ( void  )
protectedvirtual

Virtual function for initialisation implementation.

By default, nothing needs initialising at the EquationSystem level.

Reimplemented in Nektar::MMFSWE, Nektar::CoupledLinearNS, Nektar::VelocityCorrectionScheme, Nektar::PulseWaveSystem, Nektar::SolverUtils::UnsteadySystem, Nektar::VCSMapping, Nektar::EigenValuesAdvection, and Nektar::SteadyAdvectionDiffusion.

Definition at line 1001 of file EquationSystem.cpp.

1002  {
1003 
1004  }

◆ v_DoSolve()

void Nektar::SolverUtils::EquationSystem::v_DoSolve ( void  )
protectedvirtual

◆ v_EvaluateExactSolution()

void Nektar::SolverUtils::EquationSystem::v_EvaluateExactSolution ( unsigned int  field,
Array< OneD, NekDouble > &  outfield,
const NekDouble  time 
)
protectedvirtual

Reimplemented in Nektar::MMFSWE, Nektar::MMFMaxwell, Nektar::MMFAdvection, Nektar::MMFDiffusion, Nektar::IsentropicVortex, and Nektar::RinglebFlow.

Definition at line 982 of file EquationSystem.cpp.

References ASSERTL0, GetFunction(), m_fields, m_session, and Vmath::Zero().

Referenced by Nektar::MMFDiffusion::v_EvaluateExactSolution().

986  {
987  ASSERTL0 (outfield.num_elements() == m_fields[field]->GetNpoints(),
988  "ExactSolution array size mismatch.");
989  Vmath::Zero(outfield.num_elements(), outfield, 1);
990  if (m_session->DefinesFunction("ExactSolution"))
991  {
992  GetFunction("ExactSolution")->Evaluate(
993  m_session->GetVariable(field), outfield, time);
994  }
995  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376

◆ v_ExtraFldOutput()

void Nektar::SolverUtils::EquationSystem::v_ExtraFldOutput ( std::vector< Array< OneD, NekDouble > > &  fieldcoeffs,
std::vector< std::string > &  variables 
)
protectedvirtual

Reimplemented in Nektar::CompressibleFlowSystem, and Nektar::LinearElasticSystem.

Definition at line 1484 of file EquationSystem.cpp.

1487  {
1488  boost::ignore_unused(fieldcoeffs, variables);
1489  }

◆ v_GenerateSummary()

void Nektar::SolverUtils::EquationSystem::v_GenerateSummary ( SummaryList l)
protectedvirtual

◆ v_GetPressure()

MultiRegions::ExpListSharedPtr Nektar::SolverUtils::EquationSystem::v_GetPressure ( void  )
protectedvirtual

Reimplemented in Nektar::IncNavierStokes.

Definition at line 1477 of file EquationSystem.cpp.

References ASSERTL0.

1478  {
1479  ASSERTL0(false, "This function is not valid for the Base class");
1481  return null;
1482  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.

◆ v_GetSystemSingularChecks()

Array< OneD, bool > Nektar::SolverUtils::EquationSystem::v_GetSystemSingularChecks ( )
privatevirtual

Reimplemented in Nektar::VelocityCorrectionScheme, Nektar::Laplace, Nektar::Helmholtz, and Nektar::Poisson.

Definition at line 1472 of file EquationSystem.cpp.

References m_session.

Referenced by v_InitObject().

1473  {
1474  return Array<OneD, bool>(m_session->GetVariables().size(), false);
1475  }
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

◆ v_InitObject()

void Nektar::SolverUtils::EquationSystem::v_InitObject ( )
protectedvirtual

Initialisation object for EquationSystem.

Continuous field

Setting up the normals

Setting up the normals

Reimplemented in Nektar::MMFSWE, Nektar::CoupledLinearNS, Nektar::MMFAdvection, Nektar::IncNavierStokes, Nektar::PulseWaveSystem, Nektar::UnsteadyViscousBurgers, Nektar::CompressibleFlowSystem, Nektar::UnsteadyAdvectionDiffusion, Nektar::MMFDiffusion, Nektar::CFLtester, Nektar::LinearElasticSystem, Nektar::SolverUtils::UnsteadySystem, Nektar::UnsteadyAdvection, Nektar::UnsteadyInviscidBurger, Nektar::MMFMaxwell, Nektar::PulseWavePropagation, Nektar::ShallowWaterSystem, Nektar::NonlinearPeregrine, Nektar::AcousticSystem, Nektar::ImageWarpingSystem, Nektar::IterativeElasticSystem, Nektar::NavierStokesCFE, Nektar::EigenValuesAdvection, Nektar::UnsteadyDiffusion, Nektar::Monodomain, Nektar::Dummy, Nektar::LEE, Nektar::Bidomain, Nektar::NavierStokesCFEAxisym, Nektar::BidomainRoth, Nektar::LinearSWE, Nektar::NonlinearSWE, Nektar::VCSMapping, Nektar::APE, Nektar::Laplace, Nektar::SteadyAdvectionDiffusion, Nektar::UnsteadyReactionDiffusion, Nektar::Projection, Nektar::PulseWaveSystemOutput, Nektar::Helmholtz, Nektar::VelocityCorrectionScheme, Nektar::Poisson, Nektar::SteadyAdvectionDiffusionReaction, and Nektar::SolverUtils::AdvectionSystem.

Definition at line 127 of file EquationSystem.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::LibUtilities::FieldIO::CreateDefault(), Nektar::MultiRegions::eDiscontinuous, Nektar::LibUtilities::eFourier, Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eFourierHalfModeIm, Nektar::LibUtilities::eFourierHalfModeRe, Nektar::LibUtilities::eFourierSingleMode, Nektar::LibUtilities::eFourierSingleModeSpaced, Nektar::MultiRegions::eGalerkin, eHomogeneous1D, eHomogeneous2D, eHomogeneous3D, Nektar::MultiRegions::eMixed_CG_Discontinuous, eNotHomogeneous, GetTraceNpoints(), m_boundaryConditions, m_checkIfSystemSingular, m_checksteps, m_checktime, m_expdim, m_fields, m_fintime, m_fld, m_graph, m_halfMode, m_HomoDirec, m_homogen_dealiasing, m_HomogeneousType, m_LhomY, m_LhomZ, m_multipleModes, m_nchk, m_npointsY, m_npointsZ, m_NumQuadPointsError, m_projectionType, m_session, m_sessionName, m_singleMode, m_spacedim, m_specHP_dealiasing, m_steps, m_time, m_timestep, m_traceNormals, m_useFFT, v_GetSystemSingularChecks(), and ZeroPhysFields().

Referenced by Nektar::Projection::v_InitObject(), Nektar::Laplace::v_InitObject(), Nektar::SteadyAdvectionDiffusion::v_InitObject(), Nektar::EigenValuesAdvection::v_InitObject(), Nektar::SolverUtils::UnsteadySystem::v_InitObject(), and Nektar::LinearElasticSystem::v_InitObject().

128  {
129  // Save the basename of input file name for output details
130  m_sessionName = m_session->GetSessionName();
131 
132  // Instantiate a field reader/writer
134 
135  // Also read and store the boundary conditions
139 
140  // Set space dimension for use in class
141  m_spacedim = m_graph->GetSpaceDimension();
142 
143  // Setting parameteres for homogenous problems
144  m_HomoDirec = 0;
145  m_useFFT = false;
146  m_homogen_dealiasing = false;
147  m_singleMode = false;
148  m_halfMode = false;
149  m_multipleModes = false;
151 
152  if (m_session->DefinesSolverInfo("HOMOGENEOUS"))
153  {
154  std::string HomoStr = m_session->GetSolverInfo("HOMOGENEOUS");
155  m_spacedim = 3;
156 
157  if ((HomoStr == "HOMOGENEOUS1D") || (HomoStr == "Homogeneous1D")
158  || (HomoStr == "1D") || (HomoStr == "Homo1D"))
159  {
161  m_session->LoadParameter("LZ", m_LhomZ);
162  m_HomoDirec = 1;
163 
164  if(m_session->DefinesSolverInfo("ModeType"))
165  {
166  m_session->MatchSolverInfo("ModeType", "SingleMode",
167  m_singleMode, false);
168  m_session->MatchSolverInfo("ModeType", "HalfMode",
169  m_halfMode, false);
170  m_session->MatchSolverInfo("ModeType", "MultipleModes",
171  m_multipleModes, false);
172  }
173 
174  // Stability Analysis flags
175  if (m_session->DefinesSolverInfo("ModeType"))
176  {
177  if(m_singleMode)
178  {
179  m_npointsZ = 2;
180  }
181  else if(m_halfMode)
182  {
183  m_npointsZ = 1;
184  }
185  else if(m_multipleModes)
186  {
187  m_npointsZ = m_session->GetParameter("HomModesZ");
188  }
189  else
190  {
191  ASSERTL0(false, "SolverInfo ModeType not valid");
192  }
193  }
194  else
195  {
196  m_npointsZ = m_session->GetParameter("HomModesZ");
197  }
198  }
199 
200  if ((HomoStr == "HOMOGENEOUS2D") || (HomoStr == "Homogeneous2D")
201  || (HomoStr == "2D") || (HomoStr == "Homo2D"))
202  {
204  m_session->LoadParameter("HomModesY", m_npointsY);
205  m_session->LoadParameter("LY", m_LhomY);
206  m_session->LoadParameter("HomModesZ", m_npointsZ);
207  m_session->LoadParameter("LZ", m_LhomZ);
208  m_HomoDirec = 2;
209  }
210 
211  if ((HomoStr == "HOMOGENEOUS3D") || (HomoStr == "Homogeneous3D")
212  || (HomoStr == "3D") || (HomoStr == "Homo3D"))
213  {
215  m_session->LoadParameter("HomModesY", m_npointsY);
216  m_session->LoadParameter("LY", m_LhomY);
217  m_session->LoadParameter("HomModesZ", m_npointsZ);
218  m_session->LoadParameter("LZ", m_LhomZ);
219  m_HomoDirec = 2;
220  }
221 
222  m_session->MatchSolverInfo("USEFFT", "FFTW", m_useFFT, false);
223 
224  m_session->MatchSolverInfo("DEALIASING", "True",
225  m_homogen_dealiasing, false);
226  }
227  else
228  {
229  // set to default value so can use to identify 2d or 3D
230  // (homogeneous) expansions
231  m_npointsZ = 1;
232  }
233 
234  m_session->MatchSolverInfo("SPECTRALHPDEALIASING", "True",
235  m_specHP_dealiasing, false);
236  if (m_specHP_dealiasing == false)
237  {
238  m_session->MatchSolverInfo("SPECTRALHPDEALIASING", "On",
239  m_specHP_dealiasing, false);
240  }
241 
242  // Options to determine type of projection from file or directly
243  // from constructor
244  if (m_session->DefinesSolverInfo("PROJECTION"))
245  {
246  std::string ProjectStr = m_session->GetSolverInfo("PROJECTION");
247 
248  if ((ProjectStr == "Continuous") || (ProjectStr == "Galerkin") ||
249  (ProjectStr == "CONTINUOUS") || (ProjectStr == "GALERKIN"))
250  {
252  }
253  else if ((ProjectStr == "MixedCGDG") ||
254  (ProjectStr == "Mixed_CG_Discontinuous"))
255  {
257  }
258  else if(ProjectStr == "DisContinuous")
259  {
261  }
262  else
263  {
264  ASSERTL0(false,"PROJECTION value not recognised");
265  }
266  }
267  else
268  {
269  cerr << "Projection type not specified in SOLVERINFO,"
270  "defaulting to continuous Galerkin" << endl;
272  }
273 
274  // Enforce singularity check for some problems
276 
277  int i;
278  int nvariables = m_session->GetVariables().size();
279  bool DeclareCoeffPhysArrays = true;
280 
281 
282  m_fields = Array<OneD, MultiRegions::ExpListSharedPtr>(nvariables);
283  m_spacedim = m_graph->GetSpaceDimension()+m_HomoDirec;
284  m_expdim = m_graph->GetMeshDimension();
285 
286  /// Continuous field
289  {
290  switch(m_expdim)
291  {
292  case 1:
293  {
296  {
297  const LibUtilities::PointsKey PkeyY
299  const LibUtilities::BasisKey BkeyY
301  const LibUtilities::PointsKey PkeyZ
303  const LibUtilities::BasisKey
304  BkeyZ(LibUtilities::eFourier, m_npointsZ, PkeyZ);
305 
306  for (i = 0; i < m_fields.num_elements(); i++)
307  {
308  m_fields[i] = MemoryManager<MultiRegions
309  ::ContField3DHomogeneous2D>
310  ::AllocateSharedPtr(
311  m_session, BkeyY, BkeyZ, m_LhomY,
312  m_LhomZ, m_useFFT,
314  m_session->GetVariable(i));
315  }
316  }
317  else
318  {
319  for (i = 0; i < m_fields.num_elements(); i++)
320  {
321  m_fields[i] = MemoryManager
322  <MultiRegions::ContField1D>::
323  AllocateSharedPtr(
325  m_session->GetVariable(i));
326  }
327  }
328  break;
329  }
330  case 2:
331  {
333  {
334  // Fourier single mode stability analysis
335  if (m_singleMode)
336  {
337  const LibUtilities::PointsKey PkeyZ(
338  m_npointsZ,
340 
341  const LibUtilities::BasisKey BkeyZ(
343  m_npointsZ,
344  PkeyZ);
345 
346  for(i = 0; i < m_fields.num_elements(); i++)
347  {
348  m_fields[i] = MemoryManager<MultiRegions
349  ::ContField3DHomogeneous1D>
350  ::AllocateSharedPtr(
351  m_session, BkeyZ, m_LhomZ,
353  m_graph,
354  m_session->GetVariable(i),
356  }
357  }
358  // Half mode stability analysis
359  else if(m_halfMode)
360  {
361  const LibUtilities::PointsKey PkeyZ(
362  m_npointsZ,
364 
365  const LibUtilities::BasisKey BkeyZR(
367  m_npointsZ, PkeyZ);
368 
369  const LibUtilities::BasisKey BkeyZI(
371  m_npointsZ, PkeyZ);
372 
373 
374  for (i = 0; i < m_fields.num_elements(); i++)
375  {
376  if(m_session->GetVariable(i).compare("w")
377  == 0)
378  {
379  m_fields[i] = MemoryManager<MultiRegions
380  ::ContField3DHomogeneous1D>
381  ::AllocateSharedPtr(
382  m_session, BkeyZI, m_LhomZ,
383  m_useFFT,
385  m_graph,
386  m_session->GetVariable(i),
388  }
389  else
390  {
391  m_fields[i] = MemoryManager<MultiRegions
392  ::ContField3DHomogeneous1D>
393  ::AllocateSharedPtr(
394  m_session, BkeyZR, m_LhomZ,
396  m_graph,
397  m_session->GetVariable(i),
399  }
400 
401 
402  }
403  }
404  // Normal homogeneous 1D
405  else
406  {
407  const LibUtilities::PointsKey PkeyZ(
408  m_npointsZ,
410  const LibUtilities::BasisKey BkeyZ(
412 
413  for (i = 0; i < m_fields.num_elements(); i++)
414  {
415  m_fields[i] = MemoryManager<MultiRegions
416  ::ContField3DHomogeneous1D>
417  ::AllocateSharedPtr(
418  m_session, BkeyZ, m_LhomZ,
420  m_graph,
421  m_session->GetVariable(i),
423  }
424  }
425  }
426  else
427  {
428  i = 0;
430  firstfield = MemoryManager<MultiRegions::
431  ContField2D>::AllocateSharedPtr(
433  m_session->GetVariable(i),
434  DeclareCoeffPhysArrays,
436  m_fields[0] = firstfield;
437  for (i = 1; i < m_fields.num_elements(); i++)
438  {
439  if (m_graph->
440  SameExpansions(m_session->GetVariable(0),
441  m_session->GetVariable(i)))
442  {
443  m_fields[i] = MemoryManager<MultiRegions::
444  ContField2D>::AllocateSharedPtr(
445  *firstfield, m_graph,
446  m_session->GetVariable(i),
447  DeclareCoeffPhysArrays,
449  }
450  else
451  {
452  m_fields[i] = MemoryManager<MultiRegions
453  ::ContField2D>::AllocateSharedPtr(
454  m_session, m_graph,
455  m_session->GetVariable(i),
456  DeclareCoeffPhysArrays,
458  }
459  }
460 
461  if (m_projectionType ==
463  {
464  /// Setting up the normals
466  Array<OneD, Array<OneD, NekDouble> >
467  (m_spacedim);
468 
469  for (i = 0; i < m_spacedim; ++i)
470  {
471  m_traceNormals[i] = Array<OneD, NekDouble>
472  (GetTraceNpoints());
473  }
474 
475  m_fields[0]->GetTrace()->
476  GetNormals(m_traceNormals);
477  }
478 
479  }
480 
481  break;
482  }
483  case 3:
484  {
485  i = 0;
489  m_session->GetVariable(i),
491 
492  m_fields[0] = firstfield;
493  for (i = 1; i < m_fields.num_elements(); i++)
494  {
495  if(m_graph->SameExpansions(
496  m_session->GetVariable(0),
497  m_session->GetVariable(i)))
498  {
499  m_fields[i] = MemoryManager<MultiRegions
500  ::ContField3D>::AllocateSharedPtr(
501  *firstfield, m_graph,
502  m_session->GetVariable(i),
504  }
505  else
506  {
507  m_fields[i] = MemoryManager<MultiRegions
508  ::ContField3D>::AllocateSharedPtr(
509  m_session, m_graph,
510  m_session->GetVariable(i),
512  }
513  }
514 
515  if (m_projectionType ==
517  {
518  /// Setting up the normals
520  Array<OneD, Array<OneD, NekDouble> >
521  (m_spacedim);
522  for(i = 0; i < m_spacedim; ++i)
523  {
524  m_traceNormals[i] =
525  Array<OneD, NekDouble> (GetTraceNpoints());
526  }
527 
528  m_fields[0]->GetTrace()->GetNormals(m_traceNormals);
529  // Call the trace on all fields to ensure DG setup.
530  for(i = 1; i < m_fields.num_elements(); ++i)
531  {
532  m_fields[i]->GetTrace();
533  }
534  }
535  break;
536  }
537  default:
538  ASSERTL0(false,"Expansion dimension not recognised");
539  break;
540  }
541  }
542  // Discontinuous field
543  else
544  {
545  switch(m_expdim)
546  {
547  case 1:
548  {
551  {
552  const LibUtilities::PointsKey PkeyY(
554  const LibUtilities::BasisKey BkeyY(
556  const LibUtilities::PointsKey PkeyZ(
558  const LibUtilities::BasisKey BkeyZ(
560 
561  for (i = 0; i < m_fields.num_elements(); i++)
562  {
563  m_fields[i] = MemoryManager<MultiRegions
564  ::DisContField3DHomogeneous2D>
565  ::AllocateSharedPtr(
566  m_session, BkeyY, BkeyZ, m_LhomY,
567  m_LhomZ, m_useFFT,
569  m_session->GetVariable(i));
570  }
571  }
572  else
573  {
574  for (i = 0; i < m_fields.num_elements(); i++)
575  {
576  m_fields[i] = MemoryManager<MultiRegions::
577  DisContField1D>::AllocateSharedPtr(
579  m_session->GetVariable(i));
580  }
581  }
582 
583  break;
584  }
585  case 2:
586  {
588  {
589  const LibUtilities::PointsKey PkeyZ(
591  const LibUtilities::BasisKey BkeyZ(
593 
594  for (i = 0; i < m_fields.num_elements(); i++)
595  {
596  m_fields[i] = MemoryManager<MultiRegions
597  ::DisContField3DHomogeneous1D>
598  ::AllocateSharedPtr(
599  m_session, BkeyZ, m_LhomZ, m_useFFT,
601  m_session->GetVariable(i));
602  }
603  }
604  else
605  {
606  for (i = 0; i < m_fields.num_elements(); i++)
607  {
608  m_fields[i] = MemoryManager<MultiRegions::
609  DisContField2D>::AllocateSharedPtr(
611  m_session->GetVariable(i));
612  }
613  }
614 
615  break;
616  }
617  case 3:
618  {
620  {
621  ASSERTL0(false,
622  "3D fully periodic problems not implemented yet");
623  }
624  else
625  {
626  for (i = 0; i < m_fields.num_elements(); i++)
627  {
628  m_fields[i] = MemoryManager<MultiRegions::
629  DisContField3D>::AllocateSharedPtr(
631  m_session->GetVariable(i));
632  }
633  }
634  break;
635  }
636  default:
637  ASSERTL0(false, "Expansion dimension not recognised");
638  break;
639  }
640 
641  // Setting up the normals
643  Array<OneD, Array<OneD, NekDouble> >(m_spacedim);
644 
645  for (i = 0; i < m_spacedim; ++i)
646  {
647  m_traceNormals[i] =
648  Array<OneD, NekDouble> (GetTraceNpoints(), 0.0);
649  }
650 
651  m_fields[0]->GetTrace()->GetNormals(m_traceNormals);
652  }
653 
654  // Set Default Parameter
655  m_session->LoadParameter("Time", m_time, 0.0);
656  m_session->LoadParameter("TimeStep", m_timestep, 0.0);
657  m_session->LoadParameter("NumSteps", m_steps, 0);
658  m_session->LoadParameter("IO_CheckSteps", m_checksteps, 0);
659  m_session->LoadParameter("IO_CheckTime", m_checktime, 0.0);
660  m_session->LoadParameter("FinTime", m_fintime, 0);
661  m_session->LoadParameter("NumQuadPointsError",
663 
664  // Check uniqueness of checkpoint output
665  ASSERTL0((m_checktime == 0.0 && m_checksteps == 0) ||
666  (m_checktime > 0.0 && m_checksteps == 0) ||
667  (m_checktime == 0.0 && m_checksteps > 0),
668  "Only one of IO_CheckTime and IO_CheckSteps "
669  "should be set!");
670 
671  m_nchk = 0;
672 
673  // Zero all physical fields initially
674  ZeroPhysFields();
675  }
bool m_singleMode
Flag to determine if single homogeneous mode is used.
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
NekDouble m_time
Current time of simulation.
NekDouble m_timestep
Time step size.
bool m_halfMode
Flag to determine if half homogeneous mode is used.
NekDouble m_LhomZ
physical length in Z direction (if homogeneous)
Array< OneD, bool > m_checkIfSystemSingular
Flag to indicate if the fields should be checked for singularity.
int m_expdim
Expansion dimension.
std::shared_ptr< ContField2D > ContField2DSharedPtr
Definition: ContField2D.h:289
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
NekDouble m_checktime
Time between checkpoints.
bool m_useFFT
Flag to determine if FFT is used for homogeneous transform.
NekDouble m_LhomY
physical length in Y direction (if homogeneous)
bool m_specHP_dealiasing
Flag to determine if dealisising is usde for the Spectral/hp element discretisation.
Fourier Expansion .
Definition: BasisType.h:53
int m_npointsZ
number of points in Z direction (if homogeneous)
std::string m_sessionName
Name of the session.
int m_nchk
Number of checkpoints written so far.
int m_checksteps
Number of steps between checkpoints.
NekDouble m_fintime
Finish time of the simulation.
int m_steps
Number of steps to take.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
int m_HomoDirec
number of homogenous directions
std::shared_ptr< ContField3D > ContField3DSharedPtr
Definition: ContField3D.h:208
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:65
bool m_multipleModes
Flag to determine if use multiple homogenenous modes are used.
Fourier Modified expansions with just the real part of the first mode .
Definition: BasisType.h:60
virtual SOLVER_UTILS_EXPORT Array< OneD, bool > v_GetSystemSingularChecks()
int m_npointsY
number of points in Y direction (if homogeneous)
SpatialDomains::BoundaryConditionsSharedPtr m_boundaryConditions
Pointer to boundary conditions object.
int m_spacedim
Spatial dimension (>= expansion dim).
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
bool m_homogen_dealiasing
Flag to determine if dealiasing is used for homogeneous simulations.
Fourier Modified expansions with just the imaginary part of the first mode .
Definition: BasisType.h:61
static std::shared_ptr< FieldIO > CreateDefault(const LibUtilities::SessionReaderSharedPtr session)
Returns an object for the default FieldIO method.
Definition: FieldIO.cpp:195
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
Fourier ModifiedExpansion with just the first mode .
Definition: BasisType.h:59
SOLVER_UTILS_EXPORT int GetTraceNpoints()
1D Non Evenly-spaced points for Single Mode analysis
Definition: PointsType.h:66
LibUtilities::FieldIOSharedPtr m_fld
Field input/output.
SOLVER_UTILS_EXPORT void ZeroPhysFields()
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.
int m_NumQuadPointsError
Number of Quadrature points used to work out the error.
enum HomogeneousType m_HomogeneousType

◆ v_L2Error()

NekDouble Nektar::SolverUtils::EquationSystem::v_L2Error ( unsigned int  field,
const Array< OneD, NekDouble > &  exactsoln = NullNekDouble1DArray,
bool  Normalised = false 
)
protectedvirtual

Virtual function for the L_2 error computation between fields and a given exact solution.

Compute the error in the L2-norm.

Parameters
fieldThe field to compare.
exactsolnThe exact solution to compare with.
NormalisedNormalise L2-error.
Returns
Error in the L2-norm.

Reimplemented in Nektar::MMFSWE, and Nektar::PulseWaveSystem.

Definition at line 743 of file EquationSystem.cpp.

References ErrorExtraPoints(), GetFunction(), GetNpoints(), m_comm, m_fields, m_NumQuadPointsError, m_session, m_time, and Nektar::LibUtilities::ReduceSum.

747  {
748  NekDouble L2error = -1.0;
749 
750  if (m_NumQuadPointsError == 0)
751  {
752  if (m_fields[field]->GetPhysState() == false)
753  {
754  m_fields[field]->BwdTrans(m_fields[field]->GetCoeffs(),
755  m_fields[field]->UpdatePhys());
756  }
757 
758  if (exactsoln.num_elements())
759  {
760  L2error = m_fields[field]->L2(
761  m_fields[field]->GetPhys(), exactsoln);
762  }
763  else if (m_session->DefinesFunction("ExactSolution"))
764  {
765  Array<OneD, NekDouble>
766  exactsoln(m_fields[field]->GetNpoints());
767 
768  GetFunction("ExactSolution")->Evaluate(
769  m_session->GetVariable(field), exactsoln, m_time);
770 
771  L2error = m_fields[field]->L2(
772  m_fields[field]->GetPhys(), exactsoln);
773  }
774  else
775  {
776  L2error = m_fields[field]->L2(m_fields[field]->GetPhys());
777  }
778 
779  if (Normalised == true)
780  {
781  Array<OneD, NekDouble> one(m_fields[field]->GetNpoints(),
782  1.0);
783 
784  NekDouble Vol = m_fields[field]->PhysIntegral(one);
785  m_comm->AllReduce(Vol, LibUtilities::ReduceSum);
786 
787  L2error = sqrt(L2error*L2error/Vol);
788  }
789  }
790  else
791  {
792  Array<OneD,NekDouble> L2INF(2);
793  L2INF = ErrorExtraPoints(field);
794  L2error = L2INF[0];
795  }
796  return L2error;
797  }
NekDouble m_time
Current time of simulation.
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > ErrorExtraPoints(unsigned int field)
Compute error (L2 and L_inf) over an larger set of quadrature points return [L2 Linf].
LibUtilities::CommSharedPtr m_comm
Communicator.
double NekDouble
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
int m_NumQuadPointsError
Number of Quadrature points used to work out the error.

◆ v_LinfError()

NekDouble Nektar::SolverUtils::EquationSystem::v_LinfError ( unsigned int  field,
const Array< OneD, NekDouble > &  exactsoln = NullNekDouble1DArray 
)
protectedvirtual

Virtual function for the L_inf error computation between fields and a given exact solution.

Compute the error in the L_inf-norm

Parameters
fieldThe field to compare.
exactsolnThe exact solution to compare with.
Returns
Error in the L_inft-norm.

Reimplemented in Nektar::MMFSWE, and Nektar::PulseWaveSystem.

Definition at line 805 of file EquationSystem.cpp.

References ErrorExtraPoints(), GetFunction(), GetNpoints(), m_fields, m_NumQuadPointsError, m_session, and m_time.

808  {
809  NekDouble Linferror = -1.0;
810 
811  if (m_NumQuadPointsError == 0)
812  {
813  if (m_fields[field]->GetPhysState() == false)
814  {
815  m_fields[field]->BwdTrans(m_fields[field]->GetCoeffs(),
816  m_fields[field]->UpdatePhys());
817  }
818 
819  if (exactsoln.num_elements())
820  {
821  Linferror = m_fields[field]->Linf(
822  m_fields[field]->GetPhys(), exactsoln);
823  }
824  else if (m_session->DefinesFunction("ExactSolution"))
825  {
826  Array<OneD, NekDouble>
827  exactsoln(m_fields[field]->GetNpoints());
828 
829  GetFunction("ExactSolution")->Evaluate(
830  m_session->GetVariable(field), exactsoln, m_time);
831 
832  Linferror = m_fields[field]->Linf(
833  m_fields[field]->GetPhys(), exactsoln);
834  }
835  else
836  {
837  Linferror = m_fields[field]->Linf(
838  m_fields[field]->GetPhys());
839  }
840  }
841  else
842  {
843  Array<OneD,NekDouble> L2INF(2);
844  L2INF = ErrorExtraPoints(field);
845  Linferror = L2INF[1];
846  }
847 
848  return Linferror;
849  }
NekDouble m_time
Current time of simulation.
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > ErrorExtraPoints(unsigned int field)
Compute error (L2 and L_inf) over an larger set of quadrature points return [L2 Linf].
double NekDouble
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
int m_NumQuadPointsError
Number of Quadrature points used to work out the error.

◆ v_NegatedOp()

bool Nektar::SolverUtils::EquationSystem::v_NegatedOp ( void  )
virtual

Virtual function to identify if operator is negated in DoSolve.

Virtual function to define if operator in DoSolve is negated with regard to the strong form. This is currently only used in Arnoldi solves. Default is false.

Reimplemented in Nektar::CoupledLinearNS.

Definition at line 1019 of file EquationSystem.cpp.

1020  {
1021  return false;
1022  }

◆ v_Output()

void Nektar::SolverUtils::EquationSystem::v_Output ( void  )
protectedvirtual

Write the field data to file. The file is named according to the session name with the extension .fld appended.

Reimplemented in Nektar::CoupledLinearNS, Nektar::PulseWaveSystem, Nektar::AcousticSystem, and Nektar::Dummy.

Definition at line 1052 of file EquationSystem.cpp.

References m_sessionName, and WriteFld().

Referenced by Nektar::Dummy::v_Output(), and Nektar::AcousticSystem::v_Output().

1053  {
1054  WriteFld(m_sessionName + ".fld");
1055  }
std::string m_sessionName
Name of the session.
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.

◆ v_SetInitialConditions()

void Nektar::SolverUtils::EquationSystem::v_SetInitialConditions ( NekDouble  initialtime = 0.0,
bool  dumpInitialConditions = true,
const int  domain = 0 
)
protectedvirtual

Set the physical fields based on a restart file, or a function describing the initial condition given in the session.

Parameters
initialtimeTime at which to evaluate the function.
dumpInitialConditionsWrite the initial condition to file?

Reimplemented in Nektar::MMFSWE, Nektar::MMFMaxwell, Nektar::CompressibleFlowSystem, Nektar::MMFAdvection, Nektar::MMFDiffusion, Nektar::NonlinearPeregrine, Nektar::Monodomain, Nektar::Bidomain, Nektar::BidomainRoth, and Nektar::IsentropicVortex.

Definition at line 929 of file EquationSystem.cpp.

References Checkpoint_Output(), GetFunction(), GetNcoeffs(), m_checksteps, m_fields, m_nchk, m_session, m_time, and Vmath::Zero().

Referenced by Nektar::BidomainRoth::v_SetInitialConditions(), Nektar::Bidomain::v_SetInitialConditions(), Nektar::Monodomain::v_SetInitialConditions(), Nektar::NonlinearPeregrine::v_SetInitialConditions(), Nektar::MMFDiffusion::v_SetInitialConditions(), and Nektar::CompressibleFlowSystem::v_SetInitialConditions().

932  {
933  boost::ignore_unused(initialtime);
934 
935  if (m_session->GetComm()->GetRank() == 0)
936  {
937  cout << "Initial Conditions:" << endl;
938  }
939 
940  if (m_session->DefinesFunction("InitialConditions"))
941  {
942  GetFunction("InitialConditions")->Evaluate(
943  m_session->GetVariables(), m_fields, m_time, domain);
944 
945  if (m_session->GetComm()->GetRank() == 0)
946  {
947 
948  for (int i = 0; i < m_fields.num_elements(); ++i)
949  {
950  std::string varName = m_session->GetVariable(i);
951  cout << " - Field " << varName << ": "
952  << GetFunction("InitialConditions")->Describe(varName, domain)
953  << endl;
954  }
955  }
956  }
957  else
958  {
959  int nq = m_fields[0]->GetNpoints();
960  for (int i = 0; i < m_fields.num_elements(); i++)
961  {
962  Vmath::Zero(nq, m_fields[i]->UpdatePhys(), 1);
963  m_fields[i]->SetPhysState(true);
965  m_fields[i]->UpdateCoeffs(), 1);
966  if (m_session->GetComm()->GetRank() == 0)
967  {
968  cout << " - Field " << m_session->GetVariable(i)
969  << ": 0 (default)" << endl;
970  }
971  }
972 
973  }
974 
975  if (dumpInitialConditions && m_checksteps)
976  {
978  m_nchk++;
979  }
980  }
NekDouble m_time
Current time of simulation.
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
int m_nchk
Number of checkpoints written so far.
int m_checksteps
Number of steps between checkpoints.
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT int GetNcoeffs()
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376

◆ v_TransCoeffToPhys()

void Nektar::SolverUtils::EquationSystem::v_TransCoeffToPhys ( void  )
protectedvirtual

Virtual function for transformation to physical space.

Reimplemented in Nektar::IncNavierStokes, Nektar::CoupledLinearNS, and Nektar::VelocityCorrectionScheme.

Definition at line 1027 of file EquationSystem.cpp.

1028  {
1029 
1030  }

◆ v_TransPhysToCoeff()

void Nektar::SolverUtils::EquationSystem::v_TransPhysToCoeff ( void  )
protectedvirtual

Virtual function for transformation to coefficient space.

Reimplemented in Nektar::IncNavierStokes, Nektar::CoupledLinearNS, and Nektar::VelocityCorrectionScheme.

Definition at line 1035 of file EquationSystem.cpp.

1036  {
1037 
1038  }

◆ WriteFld() [1/2]

void Nektar::SolverUtils::EquationSystem::WriteFld ( const std::string &  outname)

Write field data to the given filename.

Writes the field data to a file with the given filename.

Parameters
outnameFilename to write to.

Definition at line 1124 of file EquationSystem.cpp.

References ExtraFldOutput(), GetNcoeffs(), m_boundaryConditions, and m_fields.

Referenced by Checkpoint_BaseFlow(), Nektar::MMFMaxwell::Checkpoint_EDFluxOutput(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Checkpoint_Output(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFMaxwell::Checkpoint_PlotOutput(), Nektar::MMFMaxwell::Checkpoint_TotalFieldOutput(), Nektar::MMFMaxwell::Checkpoint_TotPlotOutput(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::CoupledLinearNS::v_Output(), v_Output(), Nektar::SolverUtils::AdvectionSystem::v_PostIntegrate(), Nektar::MMFDiffusion::v_SetInitialConditions(), Nektar::MMFAdvection::v_SetInitialConditions(), Nektar::MMFMaxwell::v_SetInitialConditions(), and Nektar::MMFSWE::v_SetInitialConditions().

1125  {
1126  std::vector<Array<OneD, NekDouble> > fieldcoeffs(
1127  m_fields.num_elements());
1128  std::vector<std::string> variables(m_fields.num_elements());
1129 
1130  for (int i = 0; i < m_fields.num_elements(); ++i)
1131  {
1132  if (m_fields[i]->GetNcoeffs() == m_fields[0]->GetNcoeffs())
1133  {
1134  fieldcoeffs[i] = m_fields[i]->UpdateCoeffs();
1135  }
1136  else
1137  {
1138  fieldcoeffs[i] = Array<OneD,NekDouble>(m_fields[0]->
1139  GetNcoeffs());
1140  m_fields[0]->ExtractCoeffsToCoeffs(m_fields[i],
1141  m_fields[i]->GetCoeffs(),
1142  fieldcoeffs[i]);
1143  }
1144  variables[i] = m_boundaryConditions->GetVariable(i);
1145  }
1146 
1147  ExtraFldOutput(fieldcoeffs, variables);
1148 
1149  WriteFld(outname, m_fields[0], fieldcoeffs, variables);
1150  }
SpatialDomains::BoundaryConditionsSharedPtr m_boundaryConditions
Pointer to boundary conditions object.
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNcoeffs()
SOLVER_UTILS_EXPORT void ExtraFldOutput(std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)

◆ WriteFld() [2/2]

void Nektar::SolverUtils::EquationSystem::WriteFld ( const std::string &  outname,
MultiRegions::ExpListSharedPtr field,
std::vector< Array< OneD, NekDouble > > &  fieldcoeffs,
std::vector< std::string > &  variables 
)

Write input fields to the given filename.

Writes the field data to a file with the given filename.

Parameters
outnameFilename to write to.
fieldExpList on which data is based.
fieldcoeffsAn array of array of expansion coefficients.
variablesAn array of variable names.

Definition at line 1161 of file EquationSystem.cpp.

References Nektar::GlobalMapping::Mapping::Load(), m_fieldMetaDataMap, m_fld, m_nchk, m_session, m_time, and Nektar::GlobalMapping::MappingSharedPtr.

1166  {
1167  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
1168  = field->GetFieldDefinitions();
1169  std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
1170 
1171  // Copy Data into FieldData and set variable
1172  for(int j = 0; j < fieldcoeffs.size(); ++j)
1173  {
1174  for(int i = 0; i < FieldDef.size(); ++i)
1175  {
1176  // Could do a search here to find correct variable
1177  FieldDef[i]->m_fields.push_back(variables[j]);
1178  field->AppendFieldData(FieldDef[i], FieldData[i],
1179  fieldcoeffs[j]);
1180  }
1181  }
1182 
1183  // Update time in field info if required
1184  if(m_fieldMetaDataMap.find("Time") != m_fieldMetaDataMap.end())
1185  {
1186  m_fieldMetaDataMap["Time"] =
1187  boost::lexical_cast<std::string>(m_time);
1188  }
1189 
1190  // Update step in field info if required
1191  if(m_fieldMetaDataMap.find("ChkFileNum") != m_fieldMetaDataMap.end())
1192  {
1193  m_fieldMetaDataMap["ChkFileNum"] =
1194  boost::lexical_cast<std::string>(m_nchk);
1195  }
1196 
1197  // If necessary, add mapping information to metadata
1198  // and output mapping coordinates
1199  Array<OneD, MultiRegions::ExpListSharedPtr> fields(1);
1200  fields[0] = field;
1204  mapping->Output( fieldMetaDataMap, outname);
1205 
1206 #ifdef NEKTAR_DISABLE_BACKUPS
1207  bool backup = false;
1208 #else
1209  bool backup = true;
1210 #endif
1211 
1212  m_fld->Write(outname, FieldDef, FieldData, fieldMetaDataMap, backup);
1213  }
NekDouble m_time
Current time of simulation.
int m_nchk
Number of checkpoints written so far.
std::map< std::string, std::string > FieldMetaDataMap
Definition: FieldIO.h:52
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
Map to identify relevant solver info to dump in output fields.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
LibUtilities::FieldIOSharedPtr m_fld
Field input/output.
GLOBAL_MAPPING_EXPORT typedef std::shared_ptr< Mapping > MappingSharedPtr
A shared pointer to a Mapping object.
Definition: Mapping.h:50
static GLOBAL_MAPPING_EXPORT MappingSharedPtr Load(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
Return a pointer to the mapping, creating it on first call.
Definition: Mapping.cpp:268

◆ ZeroPhysFields()

void Nektar::SolverUtils::EquationSystem::ZeroPhysFields ( void  )

Zero the physical fields.

Definition at line 1060 of file EquationSystem.cpp.

References GetNpoints(), m_fields, and Vmath::Zero().

Referenced by Nektar::PulseWaveSystem::v_InitObject(), and v_InitObject().

1061  {
1062  for (int i = 0; i < m_fields.num_elements(); i++)
1063  {
1065  m_fields[i]->UpdatePhys(),1);
1066  }
1067  }
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376

Member Data Documentation

◆ equationSystemTypeLookupIds

std::string Nektar::SolverUtils::EquationSystem::equationSystemTypeLookupIds
staticprotected
Initial value:

Definition at line 473 of file EquationSystem.h.

◆ m_boundaryConditions

SpatialDomains::BoundaryConditionsSharedPtr Nektar::SolverUtils::EquationSystem::m_boundaryConditions
protected

◆ m_checkIfSystemSingular

Array<OneD, bool> Nektar::SolverUtils::EquationSystem::m_checkIfSystemSingular
protected

Flag to indicate if the fields should be checked for singularity.

Definition at line 391 of file EquationSystem.h.

Referenced by v_InitObject().

◆ m_checksteps

int Nektar::SolverUtils::EquationSystem::m_checksteps
protected

◆ m_checktime

NekDouble Nektar::SolverUtils::EquationSystem::m_checktime
protected

◆ m_comm

LibUtilities::CommSharedPtr Nektar::SolverUtils::EquationSystem::m_comm
protected

◆ m_expdim

int Nektar::SolverUtils::EquationSystem::m_expdim
protected

◆ m_fieldMetaDataMap

LibUtilities::FieldMetaDataMap Nektar::SolverUtils::EquationSystem::m_fieldMetaDataMap
protected

◆ m_fields

Array<OneD, MultiRegions::ExpListSharedPtr> Nektar::SolverUtils::EquationSystem::m_fields
protected

Array holding all dependent variables.

Definition at line 339 of file EquationSystem.h.

Referenced by Nektar::SolverUtils::MMFSystem::AbsIntegral(), Nektar::UnsteadyAdvectionDiffusion::AddAdvectionPenaltyFlux(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::MMFSWE::AddCoriolis(), Nektar::MMFSWE::AddDivForGradient(), Nektar::MMFSWE::AddElevationEffect(), Nektar::MMFMaxwell::AddGreenDerivCompensate(), Nektar::MMFMaxwell::AddPML(), Nektar::MMFSWE::AddRotation(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::MMFAdvection::AdvectionBellPlane(), Nektar::MMFAdvection::AdvectionBellSphere(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::SolverUtils::MMFSystem::AverageMaxwellFlux1D(), Nektar::SolverUtils::MMFSystem::AvgAbsInt(), Nektar::SolverUtils::MMFSystem::AvgInt(), Nektar::LinearElasticSystem::BuildMatrixSystem(), Nektar::SolverUtils::MMFSystem::CartesianToMovingframes(), Nektar::SolverUtils::UnsteadySystem::CheckForRestartTime(), Nektar::SolverUtils::MMFSystem::CheckMovingFrames(), Nektar::MMFMaxwell::Checkpoint_EDFluxOutput(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFMaxwell::Checkpoint_PlotOutput(), Nektar::MMFMaxwell::Checkpoint_TotalFieldOutput(), Nektar::MMFMaxwell::Checkpoint_TotPlotOutput(), Nektar::SolverUtils::UnsteadySystem::CheckSteadyState(), Nektar::MMFSWE::Compute_demdt_cdot_ek(), Nektar::SolverUtils::MMFSystem::ComputeCurl(), Nektar::SolverUtils::MMFSystem::Computedemdxicdote(), Nektar::SolverUtils::MMFSystem::ComputeDivCurlMF(), Nektar::MMFSWE::ComputeEnergy(), Nektar::MMFMaxwell::ComputeEnergyDensity(), Nektar::MMFSWE::ComputeEnstrophy(), Nektar::MMFSWE::ComputeMass(), Nektar::MMFMaxwell::ComputeMaterialMicroWaveCloak(), Nektar::MMFMaxwell::ComputeMaterialOpticalCloak(), Nektar::MMFMaxwell::ComputeMaterialVector(), Nektar::SolverUtils::MMFSystem::ComputeMFtrace(), Nektar::MMFAdvection::ComputeNablaCdotVelocity(), Nektar::MMFSWE::ComputeNablaCdotVelocity(), Nektar::SolverUtils::MMFSystem::ComputencdotMF(), Nektar::MMFMaxwell::ComputeRadCloak(), Nektar::MMFMaxwell::ComputeSurfaceCurrent(), Nektar::MMFAdvection::ComputeveldotMF(), Nektar::MMFSWE::ComputeVorticity(), Nektar::SolverUtils::MMFSystem::ComputeZimYim(), Nektar::MMFSWE::ConservativeToPrimitive(), Nektar::CoupledLinearNS::Continuation(), Nektar::ShallowWaterSystem::CopyBoundaryTrace(), Nektar::AcousticSystem::CopyBoundaryTrace(), Nektar::SolverUtils::MMFSystem::CopyBoundaryTrace(), Nektar::CoupledLinearNS::DefineForcingTerm(), Nektar::CompressibleFlowSystem::DoAdvection(), Nektar::BidomainRoth::DoImplicitSolve(), Nektar::Bidomain::DoImplicitSolve(), Nektar::Monodomain::DoImplicitSolve(), Nektar::UnsteadyReactionDiffusion::DoImplicitSolve(), Nektar::UnsteadyDiffusion::DoImplicitSolve(), Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::UnsteadyViscousBurgers::DoImplicitSolve(), Nektar::MMFDiffusion::DoImplicitSolve(), Nektar::UnsteadyReactionDiffusion::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::Dummy::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::AcousticSystem::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::MMFAdvection::DoOdeProjection(), Nektar::CompressibleFlowSystem::DoOdeProjection(), Nektar::UnsteadyReactionDiffusion::DoOdeRhs(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::UnsteadyInviscidBurger::DoOdeRhs(), Nektar::UnsteadyDiffusion::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::AcousticSystem::DoOdeRhs(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::CFLtester::DoOdeRhs(), Nektar::MMFAdvection::DoOdeRhs(), Nektar::MMFSWE::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::MMFMaxwell::DoOdeRhs(), ErrorExtraPoints(), Nektar::CoupledLinearNS::EvaluateAdvection(), Nektar::IncNavierStokes::EvaluateAdvectionTerms(), Nektar::MMFAdvection::EvaluateAdvectionVelocity(), Nektar::MMFMaxwell::EvaluateCoriolis(), Nektar::MMFSWE::EvaluateCoriolisForZonalFlow(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::MMFSWE::EvaluateStandardCoriolis(), Nektar::MMFSWE::EvaluateWaterDepth(), FwdTransFields(), Nektar::MMFMaxwell::GaussianPulse(), Nektar::MMFMaxwell::GenerateSigmaPML(), Nektar::SolverUtils::AdvectionSystem::GetCFLEstimate(), Nektar::SolverUtils::AdvectionSystem::GetElmtCFLVals(), Nektar::CompressibleFlowSystem::GetElmtMinHP(), Nektar::CompressibleFlowSystem::GetElmtTimeStep(), Nektar::RinglebFlow::GetExactRinglebFlow(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorAdv(), Nektar::UnsteadyViscousBurgers::GetFluxVectorAdv(), Nektar::UnsteadyAdvection::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), GetFunction(), Nektar::SolverUtils::MMFSystem::GetIncidentField(), Nektar::UnsteadyAdvectionDiffusion::GetMaxStdVelocity(), Nektar::SolverUtils::MMFSystem::GetMaxwellFlux1D(), Nektar::SolverUtils::MMFSystem::GetMaxwellFlux2D(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::EigenValuesAdvection::GetNormalVelocity(), Nektar::ImageWarpingSystem::GetNormalVelocity(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::CFLtester::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::MMFAdvection::GetNormalVelocity(), Nektar::CompressibleFlowSystem::GetStabilityLimitVector(), Nektar::CFLtester::GetStdVelocity(), Nektar::UnsteadyAdvectionDiffusion::GetSubstepTimeStep(), Nektar::MMFSWE::GetSWEFluxVector(), ImportFld(), ImportFldToMultiDomains(), Nektar::CompressibleFlowSystem::InitAdvection(), Nektar::SolverUtils::UnsteadySystem::InitializeSteadyState(), Nektar::MMFSWE::IsolatedMountainFlow(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::SolverUtils::MMFSystem::LaxFriedrichMaxwellFlux1D(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Nektar::VCSMapping::MappingPressureCorrection(), Nektar::VelocityCorrectionScheme::MeasureFlowrate(), Nektar::SolverUtils::MMFSystem::MMFInitObject(), Nektar::MMFDiffusion::Morphogenesis(), Nektar::NonlinearPeregrine::NumericalFluxConsVariables(), Nektar::NonlinearPeregrine::NumericalFluxForcing(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTE(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTM(), Nektar::MMFSWE::NumericalSWEFlux(), Nektar::MMFDiffusion::PlanePhiWave(), Nektar::MMFSWE::PrimitiveToConservative(), Nektar::MMFMaxwell::Printout_SurfaceCurrent(), Nektar::MMFSWE::RossbyWave(), SessionSummary(), Nektar::NonlinearSWE::SetBoundaryConditions(), Nektar::LinearSWE::SetBoundaryConditions(), Nektar::AcousticSystem::SetBoundaryConditions(), Nektar::NonlinearPeregrine::SetBoundaryConditions(), Nektar::CompressibleFlowSystem::SetBoundaryConditions(), Nektar::IncNavierStokes::SetBoundaryConditions(), Nektar::MMFSWE::SetBoundaryConditions(), SetBoundaryConditions(), Nektar::NonlinearPeregrine::SetBoundaryConditionsContVariables(), Nektar::NonlinearPeregrine::SetBoundaryConditionsForcing(), Nektar::IncNavierStokes::SetRadiationBoundaryForcing(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::VelocityCorrectionScheme::SetUpExtrapolation(), Nektar::VelocityCorrectionScheme::SetupFlowrate(), Nektar::SolverUtils::MMFSystem::SetUpMovingFrames(), Nektar::VelocityCorrectionScheme::SetUpSVV(), Nektar::IncNavierStokes::SetUpWomersley(), Nektar::IncNavierStokes::SetWomersleyBoundary(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::CoupledLinearNS::Solve(), Nektar::CoupledLinearNS::SolveLinearNS(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::VelocityCorrectionScheme::SolveUnsteadyStokesSystem(), Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem(), Nektar::MMFSWE::SteadyZonalFlow(), Nektar::UnsteadyAdvectionDiffusion::SubStepAdvance(), Nektar::UnsteadyAdvectionDiffusion::SubStepAdvection(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::VelocityCorrectionScheme::SVVVarDiffCoeff(), Nektar::MMFAdvection::Test2Dproblem(), Nektar::MMFAdvection::Test3Dproblem(), Nektar::MMFDiffusion::TestCubeProblem(), Nektar::MMFMaxwell::TestMaxwell1D(), Nektar::MMFMaxwell::TestMaxwell2DPEC(), Nektar::MMFMaxwell::TestMaxwell2DPMC(), Nektar::MMFMaxwell::TestMaxwellSphere(), Nektar::MMFDiffusion::TestPlaneProblem(), Nektar::MMFSWE::TestSWE2Dproblem(), Nektar::MMFSWE::TestVorticityComputation(), Nektar::MMFSWE::UnstableJetFlow(), Nektar::MMFSWE::UnsteadyZonalFlow(), Nektar::AcousticSystem::UpdateBasefieldFwdBwd(), Nektar::SolverUtils::MMFSystem::UpwindMaxwellFlux1D(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::UnsteadySystem::v_AppendOutput1D(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::NavierStokesCFE::v_DoDiffusion(), Nektar::SteadyAdvectionDiffusion::v_DoInitialise(), Nektar::VCSMapping::v_DoInitialise(), Nektar::PulseWaveSystem::v_DoInitialise(), Nektar::VelocityCorrectionScheme::v_DoInitialise(), Nektar::CoupledLinearNS::v_DoInitialise(), Nektar::MMFSWE::v_DoInitialise(), Nektar::Projection::v_DoSolve(), Nektar::Laplace::v_DoSolve(), Nektar::SteadyAdvectionDiffusion::v_DoSolve(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::IterativeElasticSystem::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::MMFAdvection::v_DoSolve(), Nektar::MMFSWE::v_DoSolve(), Nektar::VCSMapping::v_EvaluateAdvection_SetPressureBCs(), Nektar::VelocityCorrectionScheme::v_EvaluateAdvection_SetPressureBCs(), Nektar::IsentropicVortex::v_EvaluateExactSolution(), Nektar::MMFMaxwell::v_EvaluateExactSolution(), v_EvaluateExactSolution(), Nektar::AcousticSystem::v_ExtraFldOutput(), Nektar::LinearElasticSystem::v_ExtraFldOutput(), Nektar::CompressibleFlowSystem::v_ExtraFldOutput(), Nektar::Poisson::v_GenerateSummary(), Nektar::Projection::v_GenerateSummary(), Nektar::SolverUtils::MMFSystem::v_GenerateSummary(), Nektar::AcousticSystem::v_GetMaxStdVelocity(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::IncNavierStokes::v_GetMaxStdVelocity(), Nektar::CFLtester::v_GetTimeStep(), Nektar::CompressibleFlowSystem::v_GetTimeStep(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::Poisson::v_InitObject(), Nektar::VelocityCorrectionScheme::v_InitObject(), Nektar::Projection::v_InitObject(), Nektar::UnsteadyReactionDiffusion::v_InitObject(), Nektar::APE::v_InitObject(), Nektar::VCSMapping::v_InitObject(), Nektar::NonlinearSWE::v_InitObject(), Nektar::LinearSWE::v_InitObject(), Nektar::BidomainRoth::v_InitObject(), Nektar::Bidomain::v_InitObject(), Nektar::LEE::v_InitObject(), Nektar::NavierStokesCFEAxisym::v_InitObject(), Nektar::Dummy::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::UnsteadyDiffusion::v_InitObject(), Nektar::EigenValuesAdvection::v_InitObject(), Nektar::NavierStokesCFE::v_InitObject(), Nektar::IterativeElasticSystem::v_InitObject(), Nektar::ImageWarpingSystem::v_InitObject(), Nektar::AcousticSystem::v_InitObject(), Nektar::NonlinearPeregrine::v_InitObject(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::PulseWavePropagation::v_InitObject(), Nektar::MMFMaxwell::v_InitObject(), Nektar::UnsteadyInviscidBurger::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::LinearElasticSystem::v_InitObject(), Nektar::CFLtester::v_InitObject(), Nektar::MMFDiffusion::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::CompressibleFlowSystem::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), Nektar::PulseWaveSystem::v_InitObject(), Nektar::IncNavierStokes::v_InitObject(), Nektar::MMFAdvection::v_InitObject(), Nektar::CoupledLinearNS::v_InitObject(), Nektar::MMFSWE::v_InitObject(), v_InitObject(), Nektar::MMFSWE::v_L2Error(), v_L2Error(), Nektar::MMFSWE::v_LinfError(), v_LinfError(), Nektar::CoupledLinearNS::v_Output(), Nektar::Dummy::v_PostIntegrate(), Nektar::Dummy::v_PreIntegrate(), Nektar::AcousticSystem::v_PreIntegrate(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::APE::v_RiemannInvariantBC(), Nektar::LEE::v_RiemannInvariantBC(), Nektar::IsentropicVortex::v_SetInitialConditions(), Nektar::MMFDiffusion::v_SetInitialConditions(), Nektar::MMFAdvection::v_SetInitialConditions(), Nektar::CompressibleFlowSystem::v_SetInitialConditions(), Nektar::MMFMaxwell::v_SetInitialConditions(), Nektar::MMFSWE::v_SetInitialConditions(), v_SetInitialConditions(), Nektar::VCSWeakPressure::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpViscousForcing(), Nektar::VelocityCorrectionScheme::v_SetUpViscousForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::VCSMapping::v_SolveViscous(), Nektar::VelocityCorrectionScheme::v_SolveViscous(), Nektar::VelocityCorrectionScheme::v_TransCoeffToPhys(), Nektar::CoupledLinearNS::v_TransCoeffToPhys(), Nektar::VelocityCorrectionScheme::v_TransPhysToCoeff(), Nektar::CoupledLinearNS::v_TransPhysToCoeff(), Nektar::AcousticSystem::v_WallBC(), Nektar::AcousticSystem::v_WhiteNoiseBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::MMFSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryContVariables(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::NonlinearPeregrine::WCESolve(), Nektar::MMFAdvection::WeakDGDirectionalAdvection(), Nektar::MMFMaxwell::WeakDGMaxwellDirDeriv(), Nektar::MMFSWE::WeakDGSWEDirDeriv(), WriteFld(), Nektar::IterativeElasticSystem::WriteGeometry(), and ZeroPhysFields().

◆ m_fintime

NekDouble Nektar::SolverUtils::EquationSystem::m_fintime
protected

◆ m_fld

LibUtilities::FieldIOSharedPtr Nektar::SolverUtils::EquationSystem::m_fld
protected

Field input/output.

Definition at line 337 of file EquationSystem.h.

Referenced by v_InitObject(), and WriteFld().

◆ m_graph

SpatialDomains::MeshGraphSharedPtr Nektar::SolverUtils::EquationSystem::m_graph
protected

◆ m_halfMode

bool Nektar::SolverUtils::EquationSystem::m_halfMode
protected

Flag to determine if half homogeneous mode is used.

Definition at line 371 of file EquationSystem.h.

Referenced by SessionSummary(), and v_InitObject().

◆ m_HomoDirec

int Nektar::SolverUtils::EquationSystem::m_HomoDirec
protected

number of homogenous directions

Definition at line 417 of file EquationSystem.h.

Referenced by v_InitObject().

◆ m_homogen_dealiasing

bool Nektar::SolverUtils::EquationSystem::m_homogen_dealiasing
protected

Flag to determine if dealiasing is used for homogeneous simulations.

Definition at line 380 of file EquationSystem.h.

Referenced by Nektar::VCSWeakPressure::v_GenerateSummary(), Nektar::VelocityCorrectionScheme::v_GenerateSummary(), Nektar::CoupledLinearNS::v_InitObject(), and v_InitObject().

◆ m_HomogeneousType

enum HomogeneousType Nektar::SolverUtils::EquationSystem::m_HomogeneousType
protected

◆ m_initialStep

int Nektar::SolverUtils::EquationSystem::m_initialStep
protected

Number of the step where the simulation should begin.

Definition at line 349 of file EquationSystem.h.

Referenced by Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), and Nektar::SolverUtils::UnsteadySystem::v_InitObject().

◆ m_lambda

NekDouble Nektar::SolverUtils::EquationSystem::m_lambda
protected

Lambda constant in real system if one required.

Definition at line 355 of file EquationSystem.h.

Referenced by Nektar::CoupledLinearNS::v_DoInitialise().

◆ m_LhomX

NekDouble Nektar::SolverUtils::EquationSystem::m_LhomX
protected

physical length in X direction (if homogeneous)

Definition at line 409 of file EquationSystem.h.

◆ m_LhomY

NekDouble Nektar::SolverUtils::EquationSystem::m_LhomY
protected

physical length in Y direction (if homogeneous)

Definition at line 410 of file EquationSystem.h.

Referenced by SessionSummary(), and v_InitObject().

◆ m_LhomZ

NekDouble Nektar::SolverUtils::EquationSystem::m_LhomZ
protected

physical length in Z direction (if homogeneous)

Definition at line 411 of file EquationSystem.h.

Referenced by SessionSummary(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::CoupledLinearNS::v_InitObject(), and v_InitObject().

◆ m_multipleModes

bool Nektar::SolverUtils::EquationSystem::m_multipleModes
protected

Flag to determine if use multiple homogenenous modes are used.

Definition at line 373 of file EquationSystem.h.

Referenced by SessionSummary(), and v_InitObject().

◆ m_nchk

int Nektar::SolverUtils::EquationSystem::m_nchk
protected

◆ m_npointsX

int Nektar::SolverUtils::EquationSystem::m_npointsX
protected

number of points in X direction (if homogeneous)

Definition at line 413 of file EquationSystem.h.

◆ m_npointsY

int Nektar::SolverUtils::EquationSystem::m_npointsY
protected

number of points in Y direction (if homogeneous)

Definition at line 414 of file EquationSystem.h.

Referenced by SessionSummary(), and v_InitObject().

◆ m_npointsZ

int Nektar::SolverUtils::EquationSystem::m_npointsZ
protected

◆ m_NumQuadPointsError

int Nektar::SolverUtils::EquationSystem::m_NumQuadPointsError
protected

Number of Quadrature points used to work out the error.

Definition at line 396 of file EquationSystem.h.

Referenced by ErrorExtraPoints(), v_InitObject(), Nektar::PulseWaveSystem::v_L2Error(), Nektar::MMFSWE::v_L2Error(), v_L2Error(), Nektar::PulseWaveSystem::v_LinfError(), and v_LinfError().

◆ m_projectionType

enum MultiRegions::ProjectionType Nektar::SolverUtils::EquationSystem::m_projectionType
protected

Type of projection; e.g continuous or discontinuous.

Definition at line 387 of file EquationSystem.h.

Referenced by Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::UnsteadyViscousBurgers::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::MMFAdvection::DoOdeProjection(), Nektar::MMFSWE::DoOdeProjection(), Nektar::CompressibleFlowSystem::DoOdeProjection(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::MMFAdvection::DoOdeRhs(), Nektar::CompressibleFlowSystem::GetStabilityLimit(), Nektar::CompressibleFlowSystem::InitAdvection(), SessionSummary(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::UnsteadyReactionDiffusion::v_InitObject(), Nektar::LinearSWE::v_InitObject(), Nektar::NonlinearSWE::v_InitObject(), Nektar::UnsteadyDiffusion::v_InitObject(), Nektar::EigenValuesAdvection::v_InitObject(), Nektar::AcousticSystem::v_InitObject(), Nektar::NonlinearPeregrine::v_InitObject(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::UnsteadyInviscidBurger::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::CFLtester::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), Nektar::PulseWaveSystem::v_InitObject(), and v_InitObject().

◆ m_session

LibUtilities::SessionReaderSharedPtr Nektar::SolverUtils::EquationSystem::m_session
protected

The session reader.

Definition at line 333 of file EquationSystem.h.

Referenced by Nektar::LinearElasticSystem::BuildMatrixSystem(), Nektar::SolverUtils::UnsteadySystem::CheckForRestartTime(), Nektar::SolverUtils::UnsteadySystem::CheckSteadyState(), Nektar::SolverUtils::MMFSystem::CopyBoundaryTrace(), Nektar::CoupledLinearNS::DefineForcingTerm(), Nektar::Bidomain::DoImplicitSolve(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), EquationSystem(), ErrorExtraPoints(), GetFunction(), Nektar::UnsteadyAdvectionDiffusion::GetSubstepTimeStep(), Nektar::Helmholtz::Helmholtz(), ImportFld(), ImportFldToMultiDomains(), Nektar::CompressibleFlowSystem::InitAdvection(), Nektar::CompressibleFlowSystem::InitialiseParameters(), Nektar::SolverUtils::UnsteadySystem::InitializeSteadyState(), Nektar::VelocityCorrectionScheme::MeasureFlowrate(), Nektar::SolverUtils::MMFSystem::MMFInitObject(), SessionSummary(), Nektar::NonlinearSWE::SetBoundaryConditions(), Nektar::LinearSWE::SetBoundaryConditions(), Nektar::AcousticSystem::SetBoundaryConditions(), Nektar::IncNavierStokes::SetBoundaryConditions(), SetBoundaryConditions(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::VelocityCorrectionScheme::SetUpExtrapolation(), Nektar::VelocityCorrectionScheme::SetupFlowrate(), Nektar::SolverUtils::MMFSystem::SetUpMovingFrames(), Nektar::VelocityCorrectionScheme::SetUpSVV(), Nektar::UnsteadyAdvectionDiffusion::SubStepAdvance(), Nektar::SteadyAdvectionDiffusion::v_DoInitialise(), Nektar::PulseWaveSystem::v_DoInitialise(), Nektar::CoupledLinearNS::v_DoInitialise(), Nektar::IterativeElasticSystem::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::MMFAdvection::v_DoSolve(), Nektar::MMFSWE::v_DoSolve(), v_EvaluateExactSolution(), Nektar::AcousticSystem::v_ExtraFldOutput(), Nektar::CompressibleFlowSystem::v_ExtraFldOutput(), Nektar::Poisson::v_GenerateSummary(), Nektar::Projection::v_GenerateSummary(), Nektar::LinearSWE::v_GenerateSummary(), Nektar::Monodomain::v_GenerateSummary(), Nektar::SolverUtils::UnsteadySystem::v_GenerateSummary(), Nektar::VelocityCorrectionScheme::v_GetForceDimension(), Nektar::CoupledLinearNS::v_GetForceDimension(), Nektar::Helmholtz::v_GetSystemSingularChecks(), Nektar::Poisson::v_GetSystemSingularChecks(), Nektar::Laplace::v_GetSystemSingularChecks(), Nektar::VelocityCorrectionScheme::v_GetSystemSingularChecks(), v_GetSystemSingularChecks(), Nektar::SolverUtils::AdvectionSystem::v_InitObject(), Nektar::Poisson::v_InitObject(), Nektar::SteadyAdvectionDiffusionReaction::v_InitObject(), Nektar::VelocityCorrectionScheme::v_InitObject(), Nektar::PulseWaveSystemOutput::v_InitObject(), Nektar::Projection::v_InitObject(), Nektar::UnsteadyReactionDiffusion::v_InitObject(), Nektar::APE::v_InitObject(), Nektar::VCSMapping::v_InitObject(), Nektar::NonlinearSWE::v_InitObject(), Nektar::LinearSWE::v_InitObject(), Nektar::BidomainRoth::v_InitObject(), Nektar::Bidomain::v_InitObject(), Nektar::LEE::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::Dummy::v_InitObject(), Nektar::UnsteadyDiffusion::v_InitObject(), Nektar::EigenValuesAdvection::v_InitObject(), Nektar::NavierStokesCFE::v_InitObject(), Nektar::IterativeElasticSystem::v_InitObject(), Nektar::ImageWarpingSystem::v_InitObject(), Nektar::AcousticSystem::v_InitObject(), Nektar::NonlinearPeregrine::v_InitObject(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::PulseWavePropagation::v_InitObject(), Nektar::MMFMaxwell::v_InitObject(), Nektar::UnsteadyInviscidBurger::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::SolverUtils::UnsteadySystem::v_InitObject(), Nektar::LinearElasticSystem::v_InitObject(), Nektar::CFLtester::v_InitObject(), Nektar::MMFDiffusion::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::CompressibleFlowSystem::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), Nektar::PulseWaveSystem::v_InitObject(), Nektar::IncNavierStokes::v_InitObject(), Nektar::MMFAdvection::v_InitObject(), Nektar::CoupledLinearNS::v_InitObject(), Nektar::MMFSWE::v_InitObject(), v_InitObject(), Nektar::PulseWaveSystem::v_L2Error(), v_L2Error(), Nektar::PulseWaveSystem::v_LinfError(), v_LinfError(), Nektar::Dummy::v_Output(), Nektar::Dummy::v_PostIntegrate(), Nektar::Dummy::v_PreIntegrate(), Nektar::AcousticSystem::v_PreIntegrate(), Nektar::CompressibleFlowSystem::v_SetInitialConditions(), v_SetInitialConditions(), Nektar::VCSMapping::v_SolvePressure(), Nektar::VCSMapping::v_SolveViscous(), WriteFld(), Nektar::IterativeElasticSystem::WriteGeometry(), and Nektar::PulseWaveSystem::WriteVessels().

◆ m_sessionFunctions

std::map<std::string, SolverUtils::SessionFunctionSharedPtr> Nektar::SolverUtils::EquationSystem::m_sessionFunctions
protected

Map of known SessionFunctions.

Definition at line 335 of file EquationSystem.h.

Referenced by GetFunction().

◆ m_sessionName

std::string Nektar::SolverUtils::EquationSystem::m_sessionName
protected

◆ m_singleMode

bool Nektar::SolverUtils::EquationSystem::m_singleMode
protected

◆ m_spacedim

int Nektar::SolverUtils::EquationSystem::m_spacedim
protected

Spatial dimension (>= expansion dim).

Definition at line 365 of file EquationSystem.h.

Referenced by Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SolverUtils::MMFSystem::CheckMovingFrames(), Nektar::MMFMaxwell::Checkpoint_EDFluxOutput(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFMaxwell::Checkpoint_PlotOutput(), Nektar::MMFMaxwell::Checkpoint_TotPlotOutput(), Nektar::MMFSWE::Compute_demdt_cdot_ek(), Nektar::SolverUtils::MMFSystem::ComputeCurl(), Nektar::SolverUtils::MMFSystem::Computedemdxicdote(), Nektar::SolverUtils::MMFSystem::ComputeDivCurlMF(), Nektar::MMFSWE::ComputeEnstrophy(), Nektar::SolverUtils::MMFSystem::ComputeMFtrace(), Nektar::MMFAdvection::ComputeNablaCdotVelocity(), Nektar::MMFSWE::ComputeNablaCdotVelocity(), Nektar::SolverUtils::MMFSystem::ComputencdotMF(), Nektar::SolverUtils::MMFSystem::ComputeNtimesF12(), Nektar::SolverUtils::MMFSystem::ComputeNtimesFz(), Nektar::SolverUtils::MMFSystem::ComputeNtimesMF(), Nektar::SolverUtils::MMFSystem::ComputeNtimestimesdFz(), Nektar::MMFAdvection::ComputeveldotMF(), Nektar::SolverUtils::MMFSystem::DeriveCrossProductMF(), Nektar::CompressibleFlowSystem::DoAdvection(), Nektar::Bidomain::DoImplicitSolve(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::AcousticSystem::DoOdeRhs(), Nektar::MMFAdvection::DoOdeRhs(), Nektar::MMFAdvection::EvaluateAdvectionVelocity(), Nektar::IsentropicVortex::EvaluateIsentropicVortex(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvection::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::IncNavierStokes::GetVelocity(), Nektar::NonlinearSWE::GetVelocityVector(), Nektar::LinearSWE::GetVelocityVector(), Nektar::NonlinearPeregrine::GetVelocityVector(), Nektar::SolverUtils::MMFSystem::GramSchumitz(), Nektar::MMFSWE::IsolatedMountainFlow(), Nektar::VelocityCorrectionScheme::MeasureFlowrate(), Nektar::SolverUtils::MMFSystem::MMFInitObject(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTE(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTM(), Nektar::MMFSWE::RossbyWave(), SessionSummary(), Nektar::VelocityCorrectionScheme::SetupFlowrate(), Nektar::SolverUtils::MMFSystem::SetUpMovingFrames(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::VelocityCorrectionScheme::SolveUnsteadyStokesSystem(), Nektar::MMFSWE::SteadyZonalFlow(), Nektar::MMFMaxwell::TestMaxwellSphere(), Nektar::MMFSWE::TestSWE2Dproblem(), Nektar::MMFSWE::TestVorticityComputation(), Nektar::MMFSWE::UnstableJetFlow(), Nektar::MMFSWE::UnsteadyZonalFlow(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::IsentropicVortex::v_EvaluateExactSolution(), Nektar::CompressibleFlowSystem::v_ExtraFldOutput(), Nektar::APE::v_GetFluxVector(), Nektar::LEE::v_GetFluxVector(), Nektar::AcousticSystem::v_GetMaxStdVelocity(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::SteadyAdvectionDiffusion::v_InitObject(), Nektar::BidomainRoth::v_InitObject(), Nektar::Bidomain::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::EigenValuesAdvection::v_InitObject(), Nektar::ImageWarpingSystem::v_InitObject(), Nektar::AcousticSystem::v_InitObject(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::MMFMaxwell::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::CFLtester::v_InitObject(), Nektar::MMFDiffusion::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::CompressibleFlowSystem::v_InitObject(), Nektar::IncNavierStokes::v_InitObject(), Nektar::MMFAdvection::v_InitObject(), v_InitObject(), Nektar::APE::v_RiemannInvariantBC(), Nektar::LEE::v_RiemannInvariantBC(), Nektar::IsentropicVortex::v_SetInitialConditions(), Nektar::AcousticSystem::v_WallBC(), Nektar::AcousticSystem::v_WhiteNoiseBC(), Nektar::SolverUtils::MMFSystem::VectorAvgMagnitude(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), and Nektar::NonlinearPeregrine::WallBoundary().

◆ m_specHP_dealiasing

bool Nektar::SolverUtils::EquationSystem::m_specHP_dealiasing
protected

◆ m_steps

int Nektar::SolverUtils::EquationSystem::m_steps
protected

◆ m_time

NekDouble Nektar::SolverUtils::EquationSystem::m_time
protected

◆ m_timestep

NekDouble Nektar::SolverUtils::EquationSystem::m_timestep
protected

◆ m_traceNormals

Array<OneD, Array<OneD, NekDouble> > Nektar::SolverUtils::EquationSystem::m_traceNormals
protected

◆ m_useFFT

bool Nektar::SolverUtils::EquationSystem::m_useFFT
protected

Flag to determine if FFT is used for homogeneous transform.

Definition at line 375 of file EquationSystem.h.

Referenced by SessionSummary(), Nektar::CoupledLinearNS::v_InitObject(), and v_InitObject().