Nektar++
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Nektar::MMFAdvection Class Reference

#include <MMFAdvection.h>

Inheritance diagram for Nektar::MMFAdvection:
[legend]

Public Member Functions

virtual ~MMFAdvection ()
 Destructor. More...
 
- Public Member Functions inherited from Nektar::SolverUtils::MMFSystem
SOLVER_UTILS_EXPORT MMFSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
virtual SOLVER_UTILS_EXPORT ~MMFSystem ()
 
SOLVER_UTILS_EXPORT void MMFInitObject (const Array< OneD, const Array< OneD, NekDouble >> &Anisotropy, const int TangentXelem=-1)
 
SOLVER_UTILS_EXPORT void CopyBoundaryTrace (const Array< OneD, const NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, const BoundaryCopyType BDCopyType, const int var=0, const std::string btype="NoUserDefined")
 
- Public Member Functions inherited from Nektar::SolverUtils::UnsteadySystem
virtual SOLVER_UTILS_EXPORT ~UnsteadySystem ()
 Destructor. More...
 
SOLVER_UTILS_EXPORT NekDouble GetTimeStep (const Array< OneD, const Array< OneD, NekDouble >> &inarray)
 Calculate the larger time-step mantaining the problem stable. More...
 
- Public Member Functions inherited from Nektar::SolverUtils::EquationSystem
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...
 
- Public Member Functions inherited from Nektar::SolverUtils::AdvectionSystem
SOLVER_UTILS_EXPORT AdvectionSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 
virtual SOLVER_UTILS_EXPORT ~AdvectionSystem ()
 
SOLVER_UTILS_EXPORT AdvectionSharedPtr GetAdvObject ()
 Returns the advection object held by this instance. More...
 
SOLVER_UTILS_EXPORT Array< OneD, NekDoubleGetElmtCFLVals (void)
 
SOLVER_UTILS_EXPORT NekDouble GetCFLEstimate (int &elmtid)
 

Static Public Member Functions

static SolverUtils::EquationSystemSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Creates an instance of this class. More...
 

Public Attributes

TestType m_TestType
 
- Public Attributes inherited from Nektar::SolverUtils::MMFSystem
NekDouble m_pi
 
int m_shapedim
 
SurfaceType m_surfaceType
 
UpwindType m_upwindType
 
TestMaxwellType m_TestMaxwellType
 
PolType m_PolType
 
IncType m_IncType
 
Array< OneD, NekDoublem_MMFfactors
 
- Public Attributes inherited from Nektar::SolverUtils::UnsteadySystem
NekDouble m_cflSafetyFactor
 CFL safety factor (comprise between 0 to 1). More...
 

Static Public Attributes

static std::string className
 Name of class. More...
 

Protected Member Functions

 MMFAdvection (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Session reader. More...
 
void WeakDGDirectionalAdvection (const Array< OneD, Array< OneD, NekDouble >> &InField, Array< OneD, Array< OneD, NekDouble >> &OutField)
 
void GetFluxVector (const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)
 Evaluate the flux at each solution point. More...
 
void GetFluxVectorDeAlias (const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)
 Evaluate the flux at each solution point using dealiasing. More...
 
void DoOdeRhs (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
 Compute the RHS. More...
 
void DoOdeProjection (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
 Compute the projection. More...
 
void EvaluateAdvectionVelocity (Array< OneD, Array< OneD, NekDouble >> &velocity)
 
NekDouble ComputeCirculatingArclength (const NekDouble zlevel, const NekDouble Rhs)
 
Array< OneD, NekDouble > & GetNormalVelocity ()
 Get the normal velocity. More...
 
void ComputeNablaCdotVelocity (Array< OneD, NekDouble > &vellc)
 
void ComputeveldotMF (Array< OneD, Array< OneD, NekDouble >> &veldotMF)
 
void AdvectionBellPlane (Array< OneD, NekDouble > &outfield)
 
void AdvectionBellSphere (Array< OneD, NekDouble > &outfield)
 
void Test2Dproblem (const NekDouble time, Array< OneD, NekDouble > &outfield)
 
void Test3Dproblem (const NekDouble time, Array< OneD, NekDouble > &outfield)
 
virtual void v_InitObject ()
 Initialise the object. More...
 
virtual void v_DoSolve ()
 Solves an unsteady problem. More...
 
virtual void v_GenerateSummary (SolverUtils::SummaryList &s)
 Print Summary. More...
 
virtual void v_SetInitialConditions (const NekDouble initialtime, bool dumpInitialConditions, const int domain)
 
virtual void v_EvaluateExactSolution (unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
 
- Protected Member Functions inherited from Nektar::SolverUtils::MMFSystem
void SetUpMovingFrames (const Array< OneD, const Array< OneD, NekDouble >> &Anisotropy, const int TangentXelem)
 
void CheckMovingFrames (const Array< OneD, const Array< OneD, NekDouble >> &movingframes)
 
SOLVER_UTILS_EXPORT void ComputencdotMF ()
 
SOLVER_UTILS_EXPORT void ComputeDivCurlMF ()
 
SOLVER_UTILS_EXPORT void ComputeMFtrace ()
 
SOLVER_UTILS_EXPORT void VectorDotProd (const Array< OneD, const Array< OneD, NekDouble >> &v1, const Array< OneD, const Array< OneD, NekDouble >> &v2, Array< OneD, NekDouble > &v3)
 
SOLVER_UTILS_EXPORT void VectorCrossProd (const Array< OneD, const Array< OneD, NekDouble >> &v1, const Array< OneD, const Array< OneD, NekDouble >> &v2, Array< OneD, Array< OneD, NekDouble >> &v3)
 
SOLVER_UTILS_EXPORT void VectorCrossProd (const Array< OneD, NekDouble > &v1, const Array< OneD, NekDouble > &v2, Array< OneD, NekDouble > &v3)
 
SOLVER_UTILS_EXPORT void ComputeCurl (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
SOLVER_UTILS_EXPORT Array< OneD, NekDoubleCartesianToMovingframes (const Array< OneD, const Array< OneD, NekDouble >> &uvec, unsigned int field)
 
SOLVER_UTILS_EXPORT void DeriveCrossProductMF (Array< OneD, Array< OneD, NekDouble >> &CrossProductMF)
 
SOLVER_UTILS_EXPORT void ComputeNtimesMF ()
 
SOLVER_UTILS_EXPORT void ComputeNtimesFz (const int dir, const Array< OneD, Array< OneD, NekDouble >> &Fwd, const Array< OneD, Array< OneD, NekDouble >> &Bwd, const Array< OneD, const NekDouble > &imFwd, const Array< OneD, const NekDouble > &imBwd, Array< OneD, NekDouble > &outarrayFwd, Array< OneD, NekDouble > &outarrayBwd)
 
SOLVER_UTILS_EXPORT void ComputeNtimesF12 (const Array< OneD, Array< OneD, NekDouble >> &Fwd, const Array< OneD, Array< OneD, NekDouble >> &Bwd, const Array< OneD, const NekDouble > &im1Fwd, const Array< OneD, const NekDouble > &im1Bwd, const Array< OneD, const NekDouble > &im2Fwd, const Array< OneD, const NekDouble > &im2Bwd, Array< OneD, NekDouble > &outarrayFwd, Array< OneD, NekDouble > &outarrayBwd)
 
SOLVER_UTILS_EXPORT void ComputeNtimestimesdFz (const int dir, const Array< OneD, Array< OneD, NekDouble >> &Fwd, const Array< OneD, Array< OneD, NekDouble >> &Bwd, const Array< OneD, const NekDouble > &imFwd, const Array< OneD, const NekDouble > &imBwd, Array< OneD, NekDouble > &outarrayFwd, Array< OneD, NekDouble > &outarrayBwd)
 
SOLVER_UTILS_EXPORT void ComputeNtimestimesdF12 (const Array< OneD, Array< OneD, NekDouble >> &Fwd, const Array< OneD, Array< OneD, NekDouble >> &Bwd, const Array< OneD, const NekDouble > &im1Fwd, const Array< OneD, const NekDouble > &im1Bwd, const Array< OneD, const NekDouble > &im2Fwd, const Array< OneD, const NekDouble > &im2Bwd, Array< OneD, NekDouble > &outarrayFwd, Array< OneD, NekDouble > &outarrayBwd)
 
SOLVER_UTILS_EXPORT void CartesianToSpherical (const NekDouble x0j, const NekDouble x1j, const NekDouble x2j, NekDouble &sin_varphi, NekDouble &cos_varphi, NekDouble &sin_theta, NekDouble &cos_theta)
 
SOLVER_UTILS_EXPORT void ComputeZimYim (Array< OneD, Array< OneD, NekDouble >> &epsvec, Array< OneD, Array< OneD, NekDouble >> &muvec)
 
SOLVER_UTILS_EXPORT void AdddedtMaxwell (const Array< OneD, const Array< OneD, NekDouble >> &physarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
SOLVER_UTILS_EXPORT void GetMaxwellFluxVector (const int var, const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &flux)
 
SOLVER_UTILS_EXPORT void GetMaxwellFlux1D (const int var, const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &flux)
 
SOLVER_UTILS_EXPORT void GetMaxwellFlux2D (const int var, const Array< OneD, const Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &flux)
 
SOLVER_UTILS_EXPORT void LaxFriedrichMaxwellFlux1D (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &numfluxFwd, Array< OneD, Array< OneD, NekDouble >> &numfluxBwd)
 
SOLVER_UTILS_EXPORT void UpwindMaxwellFlux1D (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &numfluxFwd, Array< OneD, Array< OneD, NekDouble >> &numfluxBwd)
 
SOLVER_UTILS_EXPORT void AverageMaxwellFlux1D (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &numfluxFwd, Array< OneD, Array< OneD, NekDouble >> &numfluxBwd)
 
SOLVER_UTILS_EXPORT void NumericalMaxwellFlux (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &numfluxFwd, Array< OneD, Array< OneD, NekDouble >> &numfluxBwd, const NekDouble time=0.0)
 
SOLVER_UTILS_EXPORT void NumericalMaxwellFluxTM (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &numfluxFwd, Array< OneD, Array< OneD, NekDouble >> &numfluxBwd, const NekDouble time)
 
SOLVER_UTILS_EXPORT void NumericalMaxwellFluxTE (Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, NekDouble >> &numfluxFwd, Array< OneD, Array< OneD, NekDouble >> &numfluxBwd, const NekDouble time)
 
SOLVER_UTILS_EXPORT Array< OneD, NekDoubleGetIncidentField (const int var, const NekDouble time)
 
SOLVER_UTILS_EXPORT void Computedemdxicdote ()
 
SOLVER_UTILS_EXPORT NekDouble AvgInt (const Array< OneD, const NekDouble > &inarray)
 
SOLVER_UTILS_EXPORT NekDouble AvgAbsInt (const Array< OneD, const NekDouble > &inarray)
 
SOLVER_UTILS_EXPORT NekDouble AbsIntegral (const Array< OneD, const NekDouble > &inarray)
 
SOLVER_UTILS_EXPORT NekDouble RootMeanSquare (const Array< OneD, const NekDouble > &inarray)
 
SOLVER_UTILS_EXPORT NekDouble VectorAvgMagnitude (const Array< OneD, const Array< OneD, NekDouble >> &inarray)
 
SOLVER_UTILS_EXPORT void GramSchumitz (const Array< OneD, const Array< OneD, NekDouble >> &v1, const Array< OneD, const Array< OneD, NekDouble >> &v2, Array< OneD, Array< OneD, NekDouble >> &outarray, bool KeepTheMagnitude=true)
 
SOLVER_UTILS_EXPORT void BubbleSort (Array< OneD, NekDouble > &refarray, Array< OneD, NekDouble > &sortarray)
 
- Protected Member Functions inherited from Nektar::SolverUtils::UnsteadySystem
SOLVER_UTILS_EXPORT UnsteadySystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises UnsteadySystem class members. More...
 
SOLVER_UTILS_EXPORT NekDouble MaxTimeStepEstimator ()
 Get the maximum timestep estimator for cfl control. More...
 
virtual SOLVER_UTILS_EXPORT void v_DoInitialise ()
 Sets up initial conditions. More...
 
virtual SOLVER_UTILS_EXPORT void v_AppendOutput1D (Array< OneD, Array< OneD, NekDouble >> &solution1D)
 Print the solution at each solution point in a txt file. More...
 
virtual SOLVER_UTILS_EXPORT NekDouble v_GetTimeStep (const Array< OneD, const Array< OneD, NekDouble >> &inarray)
 Return the timestep to be used for the next step in the time-marching loop. More...
 
virtual SOLVER_UTILS_EXPORT bool v_PreIntegrate (int step)
 
virtual SOLVER_UTILS_EXPORT bool v_RequireFwdTrans ()
 
SOLVER_UTILS_EXPORT void CheckForRestartTime (NekDouble &time, int &nchk)
 
SOLVER_UTILS_EXPORT void SVVVarDiffCoeff (const Array< OneD, Array< OneD, NekDouble >> vel, StdRegions::VarCoeffMap &varCoeffMap)
 Evaluate the SVV diffusion coefficient according to Moura's paper where it should proportional to h time velocity. More...
 
- Protected Member Functions inherited from Nektar::SolverUtils::EquationSystem
SOLVER_UTILS_EXPORT EquationSystem (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 Initialises EquationSystem class members. More...
 
virtual SOLVER_UTILS_EXPORT 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_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 Member Functions inherited from Nektar::SolverUtils::AdvectionSystem
virtual SOLVER_UTILS_EXPORT bool v_PostIntegrate (int step)
 
virtual SOLVER_UTILS_EXPORT Array< OneD, NekDoublev_GetMaxStdVelocity ()
 

Protected Attributes

SolverUtils::RiemannSolverSharedPtr m_riemannSolver
 
NekDouble m_advx
 
NekDouble m_advy
 
NekDouble m_advz
 
NekDouble m_waveFreq
 
NekDouble m_RotAngle
 
NekDouble m_Mass0
 
int m_VelProjection
 
Array< OneD, Array< OneD, NekDouble > > m_velocity
 Advection velocity. More...
 
Array< OneD, NekDoublem_traceVn
 
Array< OneD, Array< OneD, NekDouble > > m_veldotMF
 
Array< OneD, NekDoublem_vellc
 
int m_planeNumber
 
- Protected Attributes inherited from Nektar::SolverUtils::MMFSystem
NekDouble m_alpha
 
NekDouble m_Incfreq
 
int m_SmoothFactor
 
NekDouble m_SFinit
 
Array< OneD, Array< OneD, NekDouble > > m_movingframes
 
Array< OneD, Array< OneD, NekDouble > > m_surfaceNormal
 
Array< OneD, Array< OneD, NekDouble > > m_ncdotMFFwd
 
Array< OneD, Array< OneD, NekDouble > > m_ncdotMFBwd
 
Array< OneD, Array< OneD, NekDouble > > m_nperpcdotMFFwd
 
Array< OneD, Array< OneD, NekDouble > > m_nperpcdotMFBwd
 
Array< OneD, Array< OneD, NekDouble > > m_DivMF
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_CurlMF
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_MFtraceFwd
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_MFtraceBwd
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_ntimesMFFwd
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_ntimesMFBwd
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_ntimes_ntimesMFFwd
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_ntimes_ntimesMFBwd
 
Array< OneD, Array< OneD, NekDouble > > m_ZimFwd
 
Array< OneD, Array< OneD, NekDouble > > m_ZimBwd
 
Array< OneD, Array< OneD, NekDouble > > m_YimFwd
 
Array< OneD, Array< OneD, NekDouble > > m_YimBwd
 
Array< OneD, Array< OneD, NekDouble > > m_epsvec
 
Array< OneD, Array< OneD, NekDouble > > m_muvec
 
Array< OneD, Array< OneD, NekDouble > > m_negepsvecminus1
 
Array< OneD, Array< OneD, NekDouble > > m_negmuvecminus1
 
Array< OneD, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > > m_dedxi_cdot_e
 
SpatialDomains::GeomMMF m_MMFdir
 
Array< OneD, NekDoublem_MFlength
 
- Protected Attributes inherited from Nektar::SolverUtils::UnsteadySystem
int m_infosteps
 Number of time steps between outputting status information. More...
 
int m_abortSteps
 Number of steps between checks for abort conditions. More...
 
int m_filtersInfosteps
 Number of time steps between outputting filters information. More...
 
int m_nanSteps
 
LibUtilities::TimeIntegrationWrapperSharedPtr m_intScheme
 Wrapper to the time integration scheme. More...
 
LibUtilities::TimeIntegrationSchemeOperators m_ode
 The time integration scheme operators to use. More...
 
LibUtilities::TimeIntegrationSolutionSharedPtr m_intSoln
 
NekDouble m_epsilon
 
bool m_explicitDiffusion
 Indicates if explicit or implicit treatment of diffusion is used. More...
 
bool m_explicitAdvection
 Indicates if explicit or implicit treatment of advection is used. More...
 
bool m_explicitReaction
 Indicates if explicit or implicit treatment of reaction is used. More...
 
bool m_homoInitialFwd
 Flag to determine if simulation should start in homogeneous forward transformed state. More...
 
NekDouble m_steadyStateTol
 Tolerance to which steady state should be evaluated at. More...
 
int m_steadyStateSteps
 Check for steady state at step interval. More...
 
Array< OneD, Array< OneD, NekDouble > > m_previousSolution
 Storage for previous solution for steady-state check. More...
 
std::ofstream m_errFile
 
std::vector< int > m_intVariables
 
std::vector< std::pair< std::string, FilterSharedPtr > > m_filters
 
NekDouble m_filterTimeWarning
 Number of time steps between outputting status information. More...
 
- Protected Attributes inherited from Nektar::SolverUtils::EquationSystem
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...
 
- Protected Attributes inherited from Nektar::SolverUtils::AdvectionSystem
SolverUtils::AdvectionSharedPtr m_advObject
 Advection term. More...
 

Friends

class MemoryManager< MMFAdvection >
 

Additional Inherited Members

- Protected Types inherited from Nektar::SolverUtils::EquationSystem
enum  HomogeneousType { eHomogeneous1D, eHomogeneous2D, eHomogeneous3D, eNotHomogeneous }
 Parameter for homogeneous expansions. More...
 
- Static Protected Attributes inherited from Nektar::SolverUtils::EquationSystem
static std::string equationSystemTypeLookupIds []
 

Detailed Description

Definition at line 58 of file MMFAdvection.h.

Constructor & Destructor Documentation

◆ ~MMFAdvection()

Nektar::MMFAdvection::~MMFAdvection ( )
virtual

Destructor.

Unsteady linear advection equation destructor.

Definition at line 205 of file MMFAdvection.cpp.

206 {
207 }

◆ MMFAdvection()

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

Session reader.

Definition at line 50 of file MMFAdvection.cpp.

References m_planeNumber.

52  : UnsteadySystem(pSession, pGraph), MMFSystem(pSession, pGraph),
53  AdvectionSystem(pSession, pGraph)
54 {
55  m_planeNumber = 0;
56 }
SOLVER_UTILS_EXPORT UnsteadySystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
SOLVER_UTILS_EXPORT AdvectionSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
SOLVER_UTILS_EXPORT MMFSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Definition: MMFSystem.cpp:43

Member Function Documentation

◆ AdvectionBellPlane()

void Nektar::MMFAdvection::AdvectionBellPlane ( Array< OneD, NekDouble > &  outfield)
protected

Definition at line 1093 of file MMFAdvection.cpp.

References Nektar::SolverUtils::EquationSystem::m_fields, and Nektar::SolverUtils::MMFSystem::m_pi.

Referenced by v_EvaluateExactSolution(), and v_SetInitialConditions().

1094 {
1095  int nq = m_fields[0]->GetNpoints();
1096 
1097  NekDouble dist, m_radius_limit;
1098 
1099  Array<OneD, NekDouble> x(nq);
1100  Array<OneD, NekDouble> y(nq);
1101  Array<OneD, NekDouble> z(nq);
1102 
1103  m_fields[0]->GetCoords(x, y, z);
1104 
1105  // Sets of parameters
1106  m_radius_limit = 0.5;
1107 
1108  NekDouble x0j, x1j;
1109  outfield = Array<OneD, NekDouble>(nq, 0.0);
1110  for (int j = 0; j < nq; ++j)
1111  {
1112  x0j = x[j];
1113  x1j = y[j];
1114 
1115  dist = sqrt(x0j * x0j + x1j * x1j);
1116 
1117  if (dist < m_radius_limit)
1118  {
1119  outfield[j] = 0.5 * (1.0 + cos(m_pi * dist / m_radius_limit));
1120  }
1121  else
1122  {
1123  outfield[j] = 0.0;
1124  }
1125  }
1126 }
double NekDouble
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ AdvectionBellSphere()

void Nektar::MMFAdvection::AdvectionBellSphere ( Array< OneD, NekDouble > &  outfield)
protected

Definition at line 1128 of file MMFAdvection.cpp.

References Nektar::SolverUtils::EquationSystem::m_fields, and Nektar::SolverUtils::MMFSystem::m_pi.

Referenced by v_EvaluateExactSolution(), and v_SetInitialConditions().

1129 {
1130  int nq = m_fields[0]->GetNpoints();
1131 
1132  NekDouble dist, radius, cosdiff, sin_theta, cos_theta, sin_varphi,
1133  cos_varphi;
1134  NekDouble m_theta_c, m_varphi_c, m_radius_limit, m_c0;
1135 
1136  Array<OneD, NekDouble> x(nq);
1137  Array<OneD, NekDouble> y(nq);
1138  Array<OneD, NekDouble> z(nq);
1139 
1140  m_fields[0]->GetCoords(x, y, z);
1141 
1142  // Sets of parameters
1143  m_theta_c = 0.0;
1144  m_varphi_c = 3.0 * m_pi / 2.0;
1145  m_radius_limit = 7.0 * m_pi / 64.0;
1146  m_c0 = 0.0;
1147 
1148  NekDouble x0j, x1j, x2j;
1149  outfield = Array<OneD, NekDouble>(nq, 0.0);
1150  for (int j = 0; j < nq; ++j)
1151  {
1152  x0j = x[j];
1153  x1j = y[j];
1154  x2j = z[j];
1155 
1156  radius = sqrt(x0j * x0j + x1j * x1j + x2j * x2j);
1157 
1158  sin_varphi = x1j / sqrt(x0j * x0j + x1j * x1j);
1159  cos_varphi = x0j / sqrt(x0j * x0j + x1j * x1j);
1160 
1161  sin_theta = x2j / radius;
1162  cos_theta = sqrt(x0j * x0j + x1j * x1j) / radius;
1163 
1164  cosdiff = cos_varphi * cos(m_varphi_c) + sin_varphi * sin(m_varphi_c);
1165  dist = radius * acos(sin(m_theta_c) * sin_theta +
1166  cos(m_theta_c) * cos_theta * cosdiff);
1167 
1168  if (dist < m_radius_limit)
1169  {
1170  outfield[j] =
1171  0.5 * (1.0 + cos(m_pi * dist / m_radius_limit)) + m_c0;
1172  }
1173  else
1174  {
1175  outfield[j] = m_c0;
1176  }
1177  }
1178 }
double NekDouble
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ ComputeCirculatingArclength()

NekDouble Nektar::MMFAdvection::ComputeCirculatingArclength ( const NekDouble  zlevel,
const NekDouble  Rhs 
)
protected

Definition at line 868 of file MMFAdvection.cpp.

References ASSERTL0, Nektar::SolverUtils::eIrregular, Nektar::SolverUtils::eNonconvex, Nektar::SolverUtils::eSphere, Nektar::SolverUtils::eTRSphere, and Nektar::SolverUtils::MMFSystem::m_surfaceType.

870 {
871 
872  NekDouble Tol = 0.0001, Maxiter = 1000, N = 100;
873  NekDouble newy, F = 0.0, dF = 1.0, y0, tmp;
874 
875  Array<OneD, NekDouble> xp(N + 1);
876  Array<OneD, NekDouble> yp(N + 1);
877 
878  NekDouble intval = 0.0;
879  switch (m_surfaceType)
880  {
883  {
884  intval = sqrt(Rhs - zlevel * zlevel);
885  }
886  break;
887 
889  {
890  intval = sqrt(0.5 * (Rhs - zlevel * zlevel * zlevel * zlevel -
891  zlevel * zlevel));
892  }
893  break;
894 
896  {
897  tmp = 0.5 *
898  (Rhs - zlevel * zlevel * zlevel * zlevel - zlevel * zlevel);
899  intval = sqrt(0.5 * (1.0 + sqrt(1.0 + 4.0 * tmp)));
900  }
901  break;
902 
903  default:
904  break;
905  }
906 
907  switch (m_surfaceType)
908  {
909  // Find the half of all the xp and yp on zlevel ....
913  {
914  for (int j = 0; j < N + 1; ++j)
915  {
916  xp[j] = j * 2.0 * intval / N - intval;
917 
918  y0 = 1.0;
919  for (int i = 0; i < Maxiter; ++i)
920  {
921  switch (m_surfaceType)
922  {
923  // Find the half of all the xp and yp on zlevel ....
926  {
927  F = xp[j] * xp[j] + y0 * y0 + zlevel * zlevel - Rhs;
928  dF = 2.0 * y0;
929  }
930  break;
931 
933  {
934  F = 2.0 * xp[j] * xp[j] + y0 * y0 * y0 * y0 +
935  y0 * y0 + zlevel * zlevel * zlevel * zlevel +
936  zlevel * zlevel - Rhs;
937  dF = 4.0 * y0 * y0 * y0 + 2.0 * y0;
938  }
939  break;
940 
941  default:
942  break;
943  }
944 
945  newy = y0 - F / dF;
946 
947  if (fabs(F / dF) < Tol)
948  {
949  yp[j] = newy;
950  break;
951  }
952 
953  else
954  {
955  y0 = newy;
956  }
957 
958  ASSERTL0(i < Maxiter,
959  "Advection Velocity convergence fails");
960 
961  } // i-loop
962  }
963  }
964  break;
965 
967  {
968  for (int j = 0; j < N + 1; ++j)
969  {
970  xp[j] = j * 2.0 * intval / N - intval;
971  tmp = 0.5 * Rhs -
972  0.5 * (zlevel * zlevel * zlevel * zlevel +
973  zlevel * zlevel) -
974  (xp[j] * xp[j] * xp[j] * xp[j] - xp[j] * xp[j]);
975  if (tmp < 0)
976  {
977  tmp = -1.0 * tmp;
978  }
979  yp[j] = sqrt(tmp);
980  } // j-loop
981  }
982  break;
983 
984  default:
985  break;
986 
987  } // switch-loop
988 
989  NekDouble pi = 3.14159265358979323846;
990  NekDouble arclength = 0.0;
991  for (int j = 0; j < N; ++j)
992  {
993  arclength = arclength +
994  sqrt((yp[j + 1] - yp[j]) * (yp[j + 1] - yp[j]) +
995  (xp[j + 1] - xp[j]) * (xp[j + 1] - xp[j])) /
996  pi;
997  }
998 
999  return arclength;
1000 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
double NekDouble

◆ ComputeNablaCdotVelocity()

void Nektar::MMFAdvection::ComputeNablaCdotVelocity ( Array< OneD, NekDouble > &  vellc)
protected

Definition at line 1225 of file MMFAdvection.cpp.

References Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::MMFSystem::m_movingframes, Nektar::SolverUtils::MMFSystem::m_shapedim, Nektar::SolverUtils::EquationSystem::m_spacedim, m_velocity, Vmath::Vvtvp(), and Vmath::Zero().

Referenced by v_InitObject().

1226 {
1227  int nq = m_fields[0]->GetNpoints();
1228 
1229  Array<OneD, NekDouble> velcoeff(nq, 0.0);
1230 
1231  Array<OneD, NekDouble> Dtmp0(nq);
1232  Array<OneD, NekDouble> Dtmp1(nq);
1233  Array<OneD, NekDouble> Dtmp2(nq);
1234  Array<OneD, NekDouble> Drv(nq);
1235 
1236  vellc = Array<OneD, NekDouble>(nq, 0.0);
1237 
1238  // m_vellc = \nabla m_vel \cdot tan_i
1239  Array<OneD, NekDouble> tmp(nq);
1240  Array<OneD, NekDouble> vessel(nq);
1241 
1242  for (int j = 0; j < m_shapedim; ++j)
1243  {
1244  Vmath::Zero(nq, velcoeff, 1);
1245  for (int k = 0; k < m_spacedim; ++k)
1246  {
1247  // a_j = tan_j cdot m_vel
1248  Vmath::Vvtvp(nq, &m_movingframes[j][k * nq], 1, &m_velocity[k][0],
1249  1, &velcoeff[0], 1, &velcoeff[0], 1);
1250  }
1251 
1252  // d a_j / d x^k
1253  m_fields[0]->PhysDeriv(velcoeff, Dtmp0, Dtmp1, Dtmp2);
1254 
1255  for (int k = 0; k < m_spacedim; ++k)
1256  {
1257  // tan_j^k ( d a_j / d x^k )
1258  switch (k)
1259  {
1260  case (0):
1261  {
1262  Vmath::Vvtvp(nq, &Dtmp0[0], 1, &m_movingframes[j][k * nq],
1263  1, &vellc[0], 1, &vellc[0], 1);
1264  }
1265  break;
1266 
1267  case (1):
1268  {
1269  Vmath::Vvtvp(nq, &Dtmp1[0], 1, &m_movingframes[j][k * nq],
1270  1, &vellc[0], 1, &vellc[0], 1);
1271  }
1272  break;
1273 
1274  case (2):
1275  {
1276  Vmath::Vvtvp(nq, &Dtmp2[0], 1, &m_movingframes[j][k * nq],
1277  1, &vellc[0], 1, &vellc[0], 1);
1278  }
1279  break;
1280  }
1281  }
1282  }
1283 }
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition: Vmath.cpp:445
Array< OneD, Array< OneD, NekDouble > > m_movingframes
Definition: MMFSystem.h:180
int m_spacedim
Spatial dimension (>= expansion dim).
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

◆ ComputeveldotMF()

void Nektar::MMFAdvection::ComputeveldotMF ( Array< OneD, Array< OneD, NekDouble >> &  veldotMF)
protected

Definition at line 1285 of file MMFAdvection.cpp.

References Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::MMFSystem::m_movingframes, Nektar::SolverUtils::MMFSystem::m_shapedim, Nektar::SolverUtils::EquationSystem::m_spacedim, m_velocity, and Vmath::Vvtvp().

Referenced by v_InitObject().

1287 {
1288  int nq = m_fields[0]->GetNpoints();
1289 
1290  veldotMF = Array<OneD, Array<OneD, NekDouble>>(m_shapedim);
1291 
1292  Array<OneD, NekDouble> magMF(nq);
1293  for (int j = 0; j < m_shapedim; ++j)
1294  {
1295  veldotMF[j] = Array<OneD, NekDouble>(nq, 0.0);
1296 
1297  for (int k = 0; k < m_spacedim; ++k)
1298  {
1299  Vmath::Vvtvp(nq, &m_movingframes[j][k * nq], 1, &m_velocity[k][0],
1300  1, &veldotMF[j][0], 1, &veldotMF[j][0], 1);
1301  }
1302  }
1303 }
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition: Vmath.cpp:445
Array< OneD, Array< OneD, NekDouble > > m_movingframes
Definition: MMFSystem.h:180
int m_spacedim
Spatial dimension (>= expansion dim).
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ create()

static SolverUtils::EquationSystemSharedPtr Nektar::MMFAdvection::create ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::MeshGraphSharedPtr pGraph 
)
inlinestatic

Creates an instance of this class.

Definition at line 64 of file MMFAdvection.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.

67  {
70  p->InitObject();
71  return p;
72  }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.

◆ DoOdeProjection()

void Nektar::MMFAdvection::DoOdeProjection ( const Array< OneD, const Array< OneD, NekDouble >> &  inarray,
Array< OneD, Array< OneD, NekDouble >> &  outarray,
const NekDouble  time 
)
protected

Compute the projection.

Compute the projection for the linear advection equation.

Parameters
inarrayGiven fields.
outarrayCalculated solution.
timeTime.

Definition at line 465 of file MMFAdvection.cpp.

References ASSERTL0, Nektar::MultiRegions::eDiscontinuous, Nektar::MultiRegions::eGalerkin, Nektar::MultiRegions::eMixed_CG_Discontinuous, Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::SolverUtils::EquationSystem::GetNpoints(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_projectionType, Nektar::SolverUtils::EquationSystem::SetBoundaryConditions(), and Vmath::Vcopy().

Referenced by v_InitObject().

468 {
469  // Counter variable
470  int i;
471 
472  // Number of fields (variables of the problem)
473  int nVariables = inarray.num_elements();
474 
475  // Set the boundary conditions
476  SetBoundaryConditions(time);
477 
478  // Switch on the projection type (Discontinuous or Continuous)
479  switch (m_projectionType)
480  {
481  // Discontinuous projection
483  {
484  // Number of quadrature points
485  int nQuadraturePts = GetNpoints();
486 
487  // Just copy over array
488  for (i = 0; i < nVariables; ++i)
489  {
490  Vmath::Vcopy(nQuadraturePts, inarray[i], 1, outarray[i], 1);
491  }
492  break;
493  }
494 
495  // Continuous projection
498  {
499  Array<OneD, NekDouble> coeffs(m_fields[0]->GetNcoeffs(), 0.0);
500  for (i = 0; i < nVariables; ++i)
501  {
502  m_fields[i]->FwdTrans(inarray[i], coeffs);
503  m_fields[i]->BwdTrans_IterPerExp(coeffs, outarray[i]);
504  }
505  break;
506  }
507 
508  default:
509  ASSERTL0(false, "Unknown projection scheme");
510  break;
511  }
512 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
SOLVER_UTILS_EXPORT void SetBoundaryConditions(NekDouble time)
Evaluates the boundary conditions at the given time.
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNcoeffs()
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ DoOdeRhs()

void Nektar::MMFAdvection::DoOdeRhs ( const Array< OneD, const Array< OneD, NekDouble >> &  inarray,
Array< OneD, Array< OneD, NekDouble >> &  outarray,
const NekDouble  time 
)
protected

Compute the RHS.

Compute the right-hand side for the linear advection equation.

Parameters
inarrayGiven fields.
outarrayCalculated solution.
timeTime.

Definition at line 395 of file MMFAdvection.cpp.

References ASSERTL0, Nektar::MultiRegions::eDiscontinuous, Nektar::SolverUtils::EquationSystem::GetNpoints(), Nektar::SolverUtils::AdvectionSystem::m_advObject, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_projectionType, Nektar::SolverUtils::EquationSystem::m_spacedim, m_velocity, Vmath::Neg(), and WeakDGDirectionalAdvection().

Referenced by v_InitObject().

398 {
399  boost::ignore_unused(time);
400 
401  int i;
402  int nvariables = inarray.num_elements();
403  int npoints = GetNpoints();
404 
405  switch (m_projectionType)
406  {
408  {
409  int ncoeffs = inarray[0].num_elements();
410 
411  if (m_spacedim == 3)
412  {
413  Array<OneD, Array<OneD, NekDouble>> WeakAdv(nvariables);
414 
415  WeakAdv[0] = Array<OneD, NekDouble>(ncoeffs * nvariables);
416  for (i = 1; i < nvariables; ++i)
417  {
418  WeakAdv[i] = WeakAdv[i - 1] + ncoeffs;
419  }
420 
421  // Compute \nabla \cdot \vel u according to MMF scheme
422  WeakDGDirectionalAdvection(inarray, WeakAdv);
423 
424  for (i = 0; i < nvariables; ++i)
425  {
426  m_fields[i]->MultiplyByElmtInvMass(WeakAdv[i], WeakAdv[i]);
427  m_fields[i]->BwdTrans(WeakAdv[i], outarray[i]);
428 
429  // Add m_vellc * inarray[i] = \nabla v^m \cdot e^m to
430  // outarray[i]
431  // Vmath::Vvtvp(npoints, &m_vellc[0], 1, &inarray[i][0], 1,
432  // &outarray[i][0], 1, &outarray[i][0], 1);
433  Vmath::Neg(npoints, outarray[i], 1);
434  }
435  }
436  else
437  {
438  m_advObject->Advect(2, m_fields, m_velocity, inarray,
439  outarray, 0.0);
440 
441  for (i = 0; i < nvariables; ++i)
442  {
443  Vmath::Neg(npoints, outarray[i], 1);
444  }
445  }
446 
447 
448  }
449  break;
450 
451  default:
452  {
453  ASSERTL0(false, "Unknown projection scheme");
454  }
455  break;
456  }
457 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
int m_spacedim
Spatial dimension (>= expansion dim).
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:399
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
void WeakDGDirectionalAdvection(const Array< OneD, Array< OneD, NekDouble >> &InField, Array< OneD, Array< OneD, NekDouble >> &OutField)

◆ EvaluateAdvectionVelocity()

void Nektar::MMFAdvection::EvaluateAdvectionVelocity ( Array< OneD, Array< OneD, NekDouble >> &  velocity)
protected

Definition at line 611 of file MMFAdvection.cpp.

References Nektar::SolverUtils::MMFSystem::CartesianToSpherical(), Nektar::SolverUtils::MMFSystem::GramSchumitz(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::MMFSystem::m_movingframes, m_RotAngle, Nektar::SolverUtils::EquationSystem::m_spacedim, m_velocity, m_VelProjection, m_waveFreq, Nektar::SolverUtils::MMFSystem::RootMeanSquare(), Vmath::Vadd(), Vmath::Vcopy(), Nektar::SolverUtils::MMFSystem::VectorCrossProd(), Vmath::Vmul(), and Vmath::Vsub().

Referenced by v_InitObject().

613 {
614  int nq = m_fields[0]->GetNpoints();
615 
616  NekDouble vel_phi, vel_theta, sin_varphi, cos_varphi, sin_theta, cos_theta;
617  NekDouble x0j, x1j, x2j;
618 
619  Array<OneD, NekDouble> x0(nq);
620  Array<OneD, NekDouble> x1(nq);
621  Array<OneD, NekDouble> x2(nq);
622 
623  m_fields[0]->GetCoords(x0, x1, x2);
624 
625  // theta = a*sin(z/r), phi = a*tan(y/x);
626  for (int j = 0; j < nq; j++)
627  {
628  x0j = x0[j];
629  x1j = x1[j];
630  x2j = x2[j];
631 
632  CartesianToSpherical(x0j, x1j, x2j, sin_varphi, cos_varphi, sin_theta,
633  cos_theta);
634 
635  vel_phi = m_waveFreq * (cos_theta * cos(m_RotAngle) +
636  sin_theta * cos_varphi * sin(m_RotAngle));
637  vel_theta = -1.0 * m_waveFreq * sin_theta * sin(m_RotAngle);
638 
639  velocity[0][j] =
640  -1.0 * vel_phi * sin_varphi - vel_theta * sin_theta * cos_varphi;
641  velocity[1][j] =
642  vel_phi * cos_varphi - vel_theta * sin_theta * sin_varphi;
643  velocity[2][j] = vel_theta * cos_theta;
644  }
645 
646  // Project the veloicty on the tangent plane
647 
648  if (m_VelProjection)
649  {
650  // Check MovingFrames \cdot SurfaceNormals = 0
651  Array<OneD, Array<OneD, NekDouble>> newvelocity(m_spacedim);
652 
653  Array<OneD, Array<OneD, NekDouble>> MF1(m_spacedim);
654  Array<OneD, Array<OneD, NekDouble>> MF2(m_spacedim);
655  Array<OneD, Array<OneD, NekDouble>> SN(m_spacedim);
656 
657  for (int k = 0; k < m_spacedim; ++k)
658  {
659  newvelocity[k] = Array<OneD, NekDouble>(nq);
660  MF1[k] = Array<OneD, NekDouble>(nq);
661  MF2[k] = Array<OneD, NekDouble>(nq);
662  SN[k] = Array<OneD, NekDouble>(nq);
663 
664  Vmath::Vcopy(nq, &m_movingframes[0][k * nq], 1, &MF1[k][0], 1);
665  Vmath::Vcopy(nq, &m_movingframes[1][k * nq], 1, &MF2[k][0], 1);
666  }
667 
668  VectorCrossProd(MF1, MF2, SN);
669  GramSchumitz(SN, m_velocity, newvelocity, true);
670 
671  Array<OneD, NekDouble> tmp(nq, 0.0);
672  Array<OneD, NekDouble> Projection(nq, 0.0);
673 
674  for (int k = 0; k < m_spacedim; ++k)
675  {
676  Vmath::Vsub(nq, &m_velocity[0][0], 1, &newvelocity[0][0], 1,
677  &tmp[0], 1);
678  Vmath::Vmul(nq, &tmp[0], 1, &tmp[0], 1, &tmp[0], 1);
679  Vmath::Vadd(nq, tmp, 1, Projection, 1, Projection, 1);
680  }
681 
682  std::cout
683  << "Velocity vector is projected onto the tangent plane: Diff = "
684  << RootMeanSquare(Projection) << std::endl;
685 
686  for (int k = 0; k < m_spacedim; ++k)
687  {
688  Vmath::Vcopy(nq, &newvelocity[k][0], 1, &m_velocity[k][0], 1);
689  }
690  }
691 }
SOLVER_UTILS_EXPORT void GramSchumitz(const Array< OneD, const Array< OneD, NekDouble >> &v1, const Array< OneD, const Array< OneD, NekDouble >> &v2, Array< OneD, Array< OneD, NekDouble >> &outarray, bool KeepTheMagnitude=true)
Definition: MMFSystem.cpp:2428
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
Array< OneD, Array< OneD, NekDouble > > m_movingframes
Definition: MMFSystem.h:180
SOLVER_UTILS_EXPORT void VectorCrossProd(const Array< OneD, const Array< OneD, NekDouble >> &v1, const Array< OneD, const Array< OneD, NekDouble >> &v2, Array< OneD, Array< OneD, NekDouble >> &v3)
Definition: MMFSystem.cpp:697
SOLVER_UTILS_EXPORT NekDouble RootMeanSquare(const Array< OneD, const NekDouble > &inarray)
Definition: MMFSystem.cpp:2367
int m_spacedim
Spatial dimension (>= expansion dim).
double NekDouble
SOLVER_UTILS_EXPORT void CartesianToSpherical(const NekDouble x0j, const NekDouble x1j, const NekDouble x2j, NekDouble &sin_varphi, NekDouble &cos_varphi, NekDouble &sin_theta, NekDouble &cos_theta)
Definition: MMFSystem.cpp:795
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:346
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
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:302
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:186

◆ GetFluxVector()

void Nektar::MMFAdvection::GetFluxVector ( const Array< OneD, Array< OneD, NekDouble >> &  physfield,
Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &  flux 
)
protected

Evaluate the flux at each solution point.

Return the flux vector for the linear advection equation.

Parameters
iComponent of the flux vector to calculate.
physfieldFields.
fluxResulting flux.

Definition at line 521 of file MMFAdvection.cpp.

References ASSERTL1, m_velocity, and Vmath::Vmul().

Referenced by v_InitObject().

524 {
525  ASSERTL1(flux[0].num_elements() == m_velocity.num_elements(),
526  "Dimension of flux array and velocity array do not match");
527 
528  int i, j;
529  int nq = physfield[0].num_elements();
530 
531  for (i = 0; i < flux.num_elements(); ++i)
532  {
533  for (j = 0; j < flux[0].num_elements(); ++j)
534  {
535  Vmath::Vmul(nq, physfield[i], 1, m_velocity[j], 1, flux[i][j], 1);
536  }
537  }
538 }
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:186

◆ GetFluxVectorDeAlias()

void Nektar::MMFAdvection::GetFluxVectorDeAlias ( const Array< OneD, Array< OneD, NekDouble >> &  physfield,
Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &  flux 
)
protected

Evaluate the flux at each solution point using dealiasing.

◆ GetNormalVelocity()

Array< OneD, NekDouble > & Nektar::MMFAdvection::GetNormalVelocity ( )
protected

Get the normal velocity.

Get the normal velocity for the linear advection equation.

Definition at line 365 of file MMFAdvection.cpp.

References Nektar::SolverUtils::EquationSystem::GetTraceNpoints(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_traceNormals, m_traceVn, m_velocity, Vmath::Vvtvp(), and Vmath::Zero().

Referenced by v_InitObject().

366 {
367  // Number of trace (interface) points
368  int i;
369  int nTracePts = GetTraceNpoints();
370 
371  // Auxiliary variable to compute the normal velocity
372  Array<OneD, NekDouble> tmp(nTracePts);
373 
374  // Reset the normal velocity
375  Vmath::Zero(nTracePts, m_traceVn, 1);
376 
377  for (i = 0; i < m_velocity.num_elements(); ++i)
378  {
379  m_fields[0]->ExtractTracePhys(m_velocity[i], tmp);
380 
381  Vmath::Vvtvp(nTracePts, m_traceNormals[i], 1, tmp, 1, m_traceVn, 1,
382  m_traceVn, 1);
383  }
384 
385  return m_traceVn;
386 }
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition: Vmath.cpp:445
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
Array< OneD, NekDouble > m_traceVn
Definition: MMFAdvection.h:92
SOLVER_UTILS_EXPORT int GetTraceNpoints()
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376

◆ Test2Dproblem()

void Nektar::MMFAdvection::Test2Dproblem ( const NekDouble  time,
Array< OneD, NekDouble > &  outfield 
)
protected

Definition at line 1180 of file MMFAdvection.cpp.

References m_advx, m_advy, Nektar::SolverUtils::EquationSystem::m_fields, and Nektar::SolverUtils::MMFSystem::m_pi.

Referenced by v_EvaluateExactSolution(), and v_SetInitialConditions().

1182 {
1183  int nq = m_fields[0]->GetNpoints();
1184 
1185  Array<OneD, NekDouble> x0(nq);
1186  Array<OneD, NekDouble> x1(nq);
1187  Array<OneD, NekDouble> x2(nq);
1188 
1189  m_fields[0]->GetCoords(x0, x1, x2);
1190 
1191  Array<OneD, NekDouble> u(nq);
1192 
1193  for (int i = 0; i < nq; ++i)
1194  {
1195  u[i] = cos(m_pi * (x0[i] - m_advx * time)) *
1196  cos(m_pi * (x1[i] - m_advy * time));
1197  }
1198 
1199  outfield = u;
1200 }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ Test3Dproblem()

void Nektar::MMFAdvection::Test3Dproblem ( const NekDouble  time,
Array< OneD, NekDouble > &  outfield 
)
protected

Definition at line 1202 of file MMFAdvection.cpp.

References m_advx, m_advy, m_advz, Nektar::SolverUtils::EquationSystem::m_fields, and Nektar::SolverUtils::MMFSystem::m_pi.

Referenced by v_EvaluateExactSolution(), and v_SetInitialConditions().

1204 {
1205  int nq = m_fields[0]->GetNpoints();
1206 
1207  Array<OneD, NekDouble> x0(nq);
1208  Array<OneD, NekDouble> x1(nq);
1209  Array<OneD, NekDouble> x2(nq);
1210 
1211  m_fields[0]->GetCoords(x0, x1, x2);
1212 
1213  Array<OneD, NekDouble> u(nq);
1214 
1215  for (int i = 0; i < nq; ++i)
1216  {
1217  u[i] = cos(m_pi * (x0[i] - m_advx * time)) *
1218  cos(m_pi * (x1[i] - m_advy * time)) *
1219  cos(m_pi * (x2[i] - m_advz * time));
1220  }
1221 
1222  outfield = u;
1223 }
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.

◆ v_DoSolve()

void Nektar::MMFAdvection::v_DoSolve ( void  )
protectedvirtual

Solves an unsteady problem.

Initialises the time integration scheme (as specified in the session file), and perform the time integration.

Reimplemented from Nektar::SolverUtils::UnsteadySystem.

Definition at line 209 of file MMFAdvection.cpp.

References ASSERTL0, Nektar::SolverUtils::EquationSystem::Checkpoint_Output(), Nektar::NekConstants::kNekZeroTol, Nektar::SolverUtils::UnsteadySystem::m_cflSafetyFactor, Nektar::SolverUtils::EquationSystem::m_checksteps, Nektar::SolverUtils::EquationSystem::m_checktime, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::EquationSystem::m_fintime, Nektar::SolverUtils::UnsteadySystem::m_infosteps, Nektar::SolverUtils::UnsteadySystem::m_intScheme, Nektar::SolverUtils::UnsteadySystem::m_intSoln, Nektar::SolverUtils::UnsteadySystem::m_intVariables, m_Mass0, Nektar::SolverUtils::UnsteadySystem::m_ode, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::EquationSystem::m_steps, Nektar::SolverUtils::EquationSystem::m_time, Nektar::SolverUtils::EquationSystem::m_timestep, Nektar::LibUtilities::Timer::Start(), Nektar::LibUtilities::Timer::Stop(), and Nektar::LibUtilities::Timer::TimePerTest().

210 {
211  ASSERTL0(m_intScheme != 0, "No time integration scheme.");
212 
213  int i, nchk = 1;
214  int nvariables = 0;
215  int nfields = m_fields.num_elements();
216  int nq = m_fields[0]->GetNpoints();
217 
218  if (m_intVariables.empty())
219  {
220  for (i = 0; i < nfields; ++i)
221  {
222  m_intVariables.push_back(i);
223  }
224  nvariables = nfields;
225  }
226  else
227  {
228  nvariables = m_intVariables.size();
229  }
230 
231  // Set up wrapper to fields data storage.
232  Array<OneD, Array<OneD, NekDouble>> fields(nvariables);
233  Array<OneD, Array<OneD, NekDouble>> tmp(nvariables);
234 
235  // Order storage to list time-integrated fields first.
236  for (i = 0; i < nvariables; ++i)
237  {
238  fields[i] = m_fields[m_intVariables[i]]->GetPhys();
239  m_fields[m_intVariables[i]]->SetPhysState(false);
240  }
241 
242  // Initialise time integration scheme
243  m_intSoln =
244  m_intScheme->InitializeScheme(m_timestep, fields, m_time, m_ode);
245 
246  // Check uniqueness of checkpoint output
247  ASSERTL0((m_checktime == 0.0 && m_checksteps == 0) ||
248  (m_checktime > 0.0 && m_checksteps == 0) ||
249  (m_checktime == 0.0 && m_checksteps > 0),
250  "Only one of IO_CheckTime and IO_CheckSteps "
251  "should be set!");
252 
253  LibUtilities::Timer timer;
254  bool doCheckTime = false;
255  int step = 0;
256  NekDouble intTime = 0.0;
257  NekDouble cpuTime = 0.0;
258  NekDouble elapsed = 0.0;
259 
260  int Ntot, indx;
261  // Perform integration in time.
262  Ntot = m_steps / m_checksteps + 1;
263 
264  Array<OneD, NekDouble> dMass(Ntot);
265 
266  Array<OneD, NekDouble> zeta(nq);
267  Array<OneD, Array<OneD, NekDouble>> fieldsprimitive(nvariables);
268  for (int i = 0; i < nvariables; ++i)
269  {
270  fieldsprimitive[i] = Array<OneD, NekDouble>(nq);
271  }
272 
273  while (step < m_steps || m_time < m_fintime - NekConstants::kNekZeroTol)
274  {
275  timer.Start();
276  fields = m_intScheme->TimeIntegrate(step, m_timestep, m_intSoln, m_ode);
277  timer.Stop();
278 
279  m_time += m_timestep;
280  elapsed = timer.TimePerTest(1);
281  intTime += elapsed;
282  cpuTime += elapsed;
283 
284  // Write out status information
285  if (m_session->GetComm()->GetRank() == 0 && !((step + 1) % m_infosteps))
286  {
287  std::cout << "Steps: " << std::setw(8) << std::left << step + 1 << " "
288  << "Time: " << std::setw(12) << std::left << m_time;
289 
290  std::stringstream ss;
291  ss << cpuTime << "s";
292  std::cout << " CPU Time: " << std::setw(8) << std::left << ss.str()
293  << std::endl;
294 
295  // Masss = h^*
296  indx = (step + 1) / m_checksteps;
297  dMass[indx] =
298  (m_fields[0]->PhysIntegral(fields[0]) - m_Mass0) / m_Mass0;
299 
300  std::cout << "dMass = " << std::setw(8) << std::left << dMass[indx]
301  << std::endl;
302 
303  cpuTime = 0.0;
304  }
305 
306  // Transform data into coefficient space
307  for (i = 0; i < nvariables; ++i)
308  {
309  m_fields[m_intVariables[i]]->SetPhys(fields[i]);
310  m_fields[m_intVariables[i]]->FwdTrans_IterPerExp(
311  fields[i], m_fields[m_intVariables[i]]->UpdateCoeffs());
312  m_fields[m_intVariables[i]]->SetPhysState(false);
313  }
314 
315  // Write out checkpoint files
316  if ((m_checksteps && step && !((step + 1) % m_checksteps)) ||
317  doCheckTime)
318  {
319  Checkpoint_Output(nchk++);
320  doCheckTime = false;
321  }
322 
323  // Step advance
324  ++step;
325  }
326 
327  std::cout << "dMass = ";
328  for (i = 0; i < Ntot; ++i)
329  {
330  std::cout << dMass[i] << " , ";
331  }
332  std::cout << std::endl << std::endl;
333 
334  // Print out summary statistics
335  if (m_session->GetComm()->GetRank() == 0)
336  {
337  if (m_cflSafetyFactor > 0.0)
338  {
339  std::cout << "CFL safety factor : " << m_cflSafetyFactor << std::endl
340  << "CFL time-step : " << m_timestep << std::endl;
341  }
342 
343  if (m_session->GetSolverInfo("Driver") != "SteadyState")
344  {
345  std::cout << "Time-integration : " << intTime << "s" << std::endl;
346  }
347  }
348 
349  for (i = 0; i < nvariables; ++i)
350  {
351  m_fields[m_intVariables[i]]->SetPhys(fields[i]);
352  m_fields[m_intVariables[i]]->SetPhysState(true);
353  }
354 
355  for (i = 0; i < nvariables; ++i)
356  {
357  m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),
358  m_fields[i]->UpdateCoeffs());
359  }
360 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
NekDouble m_time
Current time of simulation.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
NekDouble m_timestep
Time step size.
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
NekDouble m_checktime
Time between checkpoints.
int m_checksteps
Number of steps between checkpoints.
NekDouble m_fintime
Finish time of the simulation.
int m_steps
Number of steps to take.
static const NekDouble kNekZeroTol
double NekDouble
NekDouble m_cflSafetyFactor
CFL safety factor (comprise between 0 to 1).
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
LibUtilities::TimeIntegrationWrapperSharedPtr m_intScheme
Wrapper to the time integration scheme.
int m_infosteps
Number of time steps between outputting status information.
LibUtilities::TimeIntegrationSolutionSharedPtr m_intSoln

◆ v_EvaluateExactSolution()

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

Reimplemented from Nektar::SolverUtils::EquationSystem.

Definition at line 1305 of file MMFAdvection.cpp.

References AdvectionBellPlane(), AdvectionBellSphere(), eAdvectionBell, Nektar::eTestCube, Nektar::eTestPlane, eTestPlaneMassConsv, m_TestType, Test2Dproblem(), and Test3Dproblem().

1308 {
1309  boost::ignore_unused(field);
1310 
1311  switch (m_TestType)
1312  {
1313  case eAdvectionBell:
1314  {
1315  AdvectionBellSphere(outfield);
1316  }
1317  break;
1318 
1319  case eTestPlane:
1320  {
1321  Test2Dproblem(time, outfield);
1322  }
1323  break;
1324 
1325  case eTestPlaneMassConsv:
1326  {
1327  AdvectionBellPlane(outfield);
1328  }
1329  break;
1330 
1331  case eTestCube:
1332  {
1333  Test3Dproblem(time, outfield);
1334  }
1335  break;
1336 
1337  default:
1338  break;
1339  }
1340 }
void AdvectionBellPlane(Array< OneD, NekDouble > &outfield)
void Test3Dproblem(const NekDouble time, Array< OneD, NekDouble > &outfield)
void AdvectionBellSphere(Array< OneD, NekDouble > &outfield)
void Test2Dproblem(const NekDouble time, Array< OneD, NekDouble > &outfield)

◆ v_GenerateSummary()

void Nektar::MMFAdvection::v_GenerateSummary ( SolverUtils::SummaryList s)
protectedvirtual

Print Summary.

Reimplemented from Nektar::SolverUtils::MMFSystem.

Definition at line 1342 of file MMFAdvection.cpp.

References Nektar::SolverUtils::AddSummaryItem(), m_RotAngle, m_TestType, Nektar::TestTypeMap, and Nektar::SolverUtils::MMFSystem::v_GenerateSummary().

1343 {
1346  SolverUtils::AddSummaryItem(s, "Rotation Angle", m_RotAngle);
1347 }
const char *const TestTypeMap[]
Definition: MMFDiffusion.h:58
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
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
Definition: MMFSystem.cpp:2492

◆ v_InitObject()

void Nektar::MMFAdvection::v_InitObject ( )
protectedvirtual

Initialise the object.

Initialisation object for the unsteady linear advection equation.

Reimplemented from Nektar::SolverUtils::AdvectionSystem.

Definition at line 61 of file MMFAdvection.cpp.

References ASSERTL0, Nektar::SolverUtils::MMFSystem::AvgInt(), ComputeNablaCdotVelocity(), Nektar::SolverUtils::MMFSystem::ComputencdotMF(), ComputeveldotMF(), Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::LibUtilities::TimeIntegrationSchemeOperators::DefineOdeRhs(), Nektar::LibUtilities::TimeIntegrationSchemeOperators::DefineProjection(), DoOdeProjection(), DoOdeRhs(), Nektar::SolverUtils::eCube, Nektar::SolverUtils::eIrregular, Nektar::SolverUtils::eNonconvex, Nektar::SolverUtils::ePlane, Nektar::SolverUtils::eSphere, Nektar::SolverUtils::eTRSphere, EvaluateAdvectionVelocity(), Nektar::SolverUtils::GetAdvectionFactory(), GetFluxVector(), Nektar::SolverUtils::EquationSystem::GetFunction(), GetNormalVelocity(), Nektar::SolverUtils::GetRiemannSolverFactory(), Nektar::SolverUtils::EquationSystem::GetTraceNpoints(), Nektar::SolverUtils::AdvectionSystem::m_advObject, m_advx, m_advy, m_advz, Nektar::SolverUtils::UnsteadySystem::m_explicitAdvection, Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::MMFSystem::m_movingframes, Nektar::SolverUtils::UnsteadySystem::m_ode, Nektar::SolverUtils::MMFSystem::m_pi, m_riemannSolver, m_RotAngle, Nektar::SolverUtils::EquationSystem::m_session, Nektar::SolverUtils::MMFSystem::m_shapedim, Nektar::SolverUtils::EquationSystem::m_spacedim, Nektar::SolverUtils::MMFSystem::m_surfaceType, m_TestType, m_traceVn, m_veldotMF, m_vellc, m_velocity, m_VelProjection, m_waveFreq, Nektar::SolverUtils::MMFSystem::MMFInitObject(), Nektar::SolverUtils::MMFSystem::RootMeanSquare(), Nektar::SIZE_TestType, Nektar::TestTypeMap, Nektar::SolverUtils::UnsteadySystem::v_InitObject(), and Vmath::Vmul().

62 {
63  // Call to the initialisation object
65 
66  int nq = m_fields[0]->GetNpoints();
67  int shapedim = m_fields[0]->GetShapeDimension();
68  Array<OneD, Array<OneD, NekDouble>> Anisotropy(shapedim);
69  for (int j = 0; j < shapedim; ++j)
70  {
71  Anisotropy[j] = Array<OneD, NekDouble>(nq, 1.0);
72  }
73 
74  MMFSystem::MMFInitObject(Anisotropy);
75 
76  // Define TestType
77  ASSERTL0(m_session->DefinesSolverInfo("TESTTYPE"),
78  "No TESTTYPE defined in session.");
79  std::string TestTypeStr = m_session->GetSolverInfo("TESTTYPE");
80  for (int i = 0; i < (int)SIZE_TestType; ++i)
81  {
82  if (boost::iequals(TestTypeMap[i], TestTypeStr))
83  {
84  m_TestType = (TestType)i;
85  break;
86  }
87  }
88 
89  m_session->LoadParameter("Angular Frequency", m_waveFreq, m_pi);
90  m_session->LoadParameter("Rotational Angle", m_RotAngle, 0.0);
91  m_session->LoadParameter("Velocity Projection", m_VelProjection, 0);
92 
93  // Read the advection velocities from session file
94  m_session->LoadParameter("advx", m_advx, 1.0);
95  m_session->LoadParameter("advy", m_advy, 1.0);
96  m_session->LoadParameter("advz", m_advz, 1.0);
97 
98  std::vector<std::string> vel;
99  vel.push_back("Vx");
100  vel.push_back("Vy");
101  vel.push_back("Vz");
102 
103  // Resize the advection velocities vector to dimension of the problem
104  vel.resize(m_spacedim);
105 
106  // Store in the global variable m_velocity the advection velocities
107 
108  m_velocity = Array<OneD, Array<OneD, NekDouble>>(m_spacedim);
109  for (int k = 0; k < m_spacedim; ++k)
110  {
111  m_velocity[k] = Array<OneD, NekDouble>(nq);
112  }
113 
114  switch (m_surfaceType)
115  {
120  {
121  // true = project velocity onto the tangent plane
123  }
124  break;
125 
126  case SolverUtils::ePlane:
127  case SolverUtils::eCube:
128  {
129  GetFunction("AdvectionVelocity")->Evaluate(vel, m_velocity);
130  }
131  break;
132 
133  default:
134  break;
135  }
136 
137  std::cout << "|Velocity vector| = ( " << RootMeanSquare(m_velocity[0])
138  << " , " << RootMeanSquare(m_velocity[1]) << " , "
139  << RootMeanSquare(m_velocity[2]) << " ) " << std::endl;
140 
141  // Define the normal velocity fields
142  if (m_fields[0]->GetTrace())
143  {
144  m_traceVn = Array<OneD, NekDouble>(GetTraceNpoints());
145  }
146 
147  std::string advName;
148  std::string riemName;
149  m_session->LoadSolverInfo(
150  "AdvectionType", advName, "WeakDG");
152  GetAdvectionFactory().CreateInstance(advName, advName);
153  m_advObject->SetFluxVector(
155  m_session->LoadSolverInfo(
156  "UpwindType", riemName, "Upwind");
159  m_riemannSolver->SetScalar(
160  "Vn", &MMFAdvection::GetNormalVelocity, this);
161 
162  m_advObject->SetRiemannSolver(m_riemannSolver);
163  m_advObject->InitObject(m_session, m_fields);
164 
165  // Compute m_traceVn = n \cdot v
167 
168  // Compute m_vellc = nabal a^j \cdot m_vel
170  std::cout << "m_vellc is generated with mag = " << AvgInt(m_vellc)
171  << std::endl;
172 
173  // Compute vel \cdot MF
175 
176  // Modify e^i as v^i e^i
177  for (int j = 0; j < m_shapedim; j++)
178  {
179  for (int k = 0; k < m_spacedim; k++)
180  {
181  Vmath::Vmul(nq, &m_veldotMF[j][0], 1, &m_movingframes[j][k * nq], 1,
182  &m_movingframes[j][k * nq], 1);
183  }
184  }
185 
186  // Reflect it into m_ncdotMFFwd and Bwd
187  ComputencdotMF();
188 
189  // If explicit it computes RHS and PROJECTION for the time integration
191  {
194  }
195  // Otherwise it gives an error (no implicit integration)
196  else
197  {
198  ASSERTL0(false, "Implicit unsteady Advection not set up.");
199  }
200 }
Array< OneD, NekDouble > m_vellc
Definition: MMFAdvection.h:95
void ComputeveldotMF(Array< OneD, Array< OneD, NekDouble >> &veldotMF)
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
Compute the projection.
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
void EvaluateAdvectionVelocity(Array< OneD, Array< OneD, NekDouble >> &velocity)
const char *const TestTypeMap[]
Definition: MMFDiffusion.h:58
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
SOLVER_UTILS_EXPORT void ComputencdotMF()
Definition: MMFSystem.cpp:320
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
Array< OneD, Array< OneD, NekDouble > > m_velocity
Advection velocity.
Definition: MMFAdvection.h:91
Array< OneD, Array< OneD, NekDouble > > m_veldotMF
Definition: MMFAdvection.h:94
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
Compute the RHS.
Array< OneD, Array< OneD, NekDouble > > m_movingframes
Definition: MMFSystem.h:180
void GetFluxVector(const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)
Evaluate the flux at each solution point.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void ComputeNablaCdotVelocity(Array< OneD, NekDouble > &vellc)
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
SOLVER_UTILS_EXPORT NekDouble RootMeanSquare(const Array< OneD, const NekDouble > &inarray)
Definition: MMFSystem.cpp:2367
RiemannSolverFactory & GetRiemannSolverFactory()
int m_spacedim
Spatial dimension (>= expansion dim).
Array< OneD, NekDouble > & GetNormalVelocity()
Get the normal velocity.
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
Definition: Advection.cpp:47
Length of enum list.
Definition: MMFDiffusion.h:55
SOLVER_UTILS_EXPORT void MMFInitObject(const Array< OneD, const Array< OneD, NekDouble >> &Anisotropy, const int TangentXelem=-1)
Definition: MMFSystem.cpp:53
virtual SOLVER_UTILS_EXPORT void v_InitObject()
Init object for UnsteadySystem class.
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.
Array< OneD, NekDouble > m_traceVn
Definition: MMFAdvection.h:92
SOLVER_UTILS_EXPORT int GetTraceNpoints()
SOLVER_UTILS_EXPORT NekDouble AvgInt(const Array< OneD, const NekDouble > &inarray)
Definition: MMFSystem.cpp:2321
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
Definition: MMFAdvection.h:82
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:186

◆ v_SetInitialConditions()

void Nektar::MMFAdvection::v_SetInitialConditions ( const NekDouble  initialtime,
bool  dumpInitialConditions,
const int  domain 
)
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 from Nektar::SolverUtils::EquationSystem.

Definition at line 1002 of file MMFAdvection.cpp.

References AdvectionBellPlane(), AdvectionBellSphere(), eAdvectionBell, Nektar::eTestCube, Nektar::eTestPlane, eTestPlaneMassConsv, Nektar::SolverUtils::EquationSystem::m_fields, m_Mass0, Nektar::SolverUtils::EquationSystem::m_sessionName, m_TestType, Test2Dproblem(), Test3Dproblem(), and Nektar::SolverUtils::EquationSystem::WriteFld().

1005 {
1006  boost::ignore_unused(domain);
1007 
1008  int nq = m_fields[0]->GetNpoints();
1009 
1010  Array<OneD, NekDouble> u(nq);
1011 
1012  switch (m_TestType)
1013  {
1014  case eAdvectionBell:
1015  {
1017  m_fields[0]->SetPhys(u);
1018 
1019  m_Mass0 = m_fields[0]->PhysIntegral(u);
1020 
1021  // forward transform to fill the modal coeffs
1022  for (int i = 0; i < m_fields.num_elements(); ++i)
1023  {
1024  m_fields[i]->SetPhysState(true);
1025  m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),
1026  m_fields[i]->UpdateCoeffs());
1027  }
1028  }
1029  break;
1030 
1031  case eTestPlane:
1032  {
1033  Test2Dproblem(initialtime, u);
1034  m_fields[0]->SetPhys(u);
1035 
1036  m_Mass0 = m_fields[0]->PhysIntegral(u);
1037 
1038  // forward transform to fill the modal coeffs
1039  for (int i = 0; i < m_fields.num_elements(); ++i)
1040  {
1041  m_fields[i]->SetPhysState(true);
1042  m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),
1043  m_fields[i]->UpdateCoeffs());
1044  }
1045  }
1046  break;
1047 
1048  case eTestPlaneMassConsv:
1049  {
1050  AdvectionBellPlane(u);
1051  m_fields[0]->SetPhys(u);
1052 
1053  m_Mass0 = m_fields[0]->PhysIntegral(u);
1054  std::cout << "m_Mass0 = " << m_Mass0 << std::endl;
1055 
1056  // forward transform to fill the modal coeffs
1057  for (int i = 0; i < m_fields.num_elements(); ++i)
1058  {
1059  m_fields[i]->SetPhysState(true);
1060  m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),
1061  m_fields[i]->UpdateCoeffs());
1062  }
1063  }
1064  break;
1065 
1066  case eTestCube:
1067  {
1068  Test3Dproblem(initialtime, u);
1069  m_fields[0]->SetPhys(u);
1070 
1071  // forward transform to fill the modal coeffs
1072  for (int i = 0; i < m_fields.num_elements(); ++i)
1073  {
1074  m_fields[i]->SetPhysState(true);
1075  m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),
1076  m_fields[i]->UpdateCoeffs());
1077  }
1078  }
1079  break;
1080 
1081  default:
1082  break;
1083  }
1084 
1085  if (dumpInitialConditions)
1086  {
1087  // dump initial conditions to file
1088  std::string outname = m_sessionName + "_initial.chk";
1089  WriteFld(outname);
1090  }
1091 }
void AdvectionBellPlane(Array< OneD, NekDouble > &outfield)
std::string m_sessionName
Name of the session.
void Test3Dproblem(const NekDouble time, Array< OneD, NekDouble > &outfield)
void AdvectionBellSphere(Array< OneD, NekDouble > &outfield)
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.
void Test2Dproblem(const NekDouble time, Array< OneD, NekDouble > &outfield)

◆ WeakDGDirectionalAdvection()

void Nektar::MMFAdvection::WeakDGDirectionalAdvection ( const Array< OneD, Array< OneD, NekDouble >> &  InField,
Array< OneD, Array< OneD, NekDouble >> &  OutField 
)
protected

Definition at line 540 of file MMFAdvection.cpp.

References Nektar::SolverUtils::EquationSystem::GetNcoeffs(), Nektar::SolverUtils::EquationSystem::GetTraceNpoints(), Nektar::SolverUtils::EquationSystem::m_fields, Nektar::SolverUtils::MMFSystem::m_movingframes, Nektar::SolverUtils::MMFSystem::m_ncdotMFBwd, Nektar::SolverUtils::MMFSystem::m_ncdotMFFwd, Nektar::SolverUtils::MMFSystem::m_shapedim, m_traceVn, Vmath::Neg(), Vmath::Vadd(), and Vmath::Vmul().

Referenced by DoOdeRhs().

543 {
544  int i, j;
545  int ncoeffs = GetNcoeffs();
546  int nTracePointsTot = GetTraceNpoints();
547  int nvariables = m_fields.num_elements();
548 
549  Array<OneD, Array<OneD, NekDouble>> physfield(nvariables);
550 
551  // Get the variables in physical space
552  // already in physical space
553  for (i = 0; i < nvariables; ++i)
554  {
555  physfield[i] = InField[i];
556  }
557 
558  Array<OneD, Array<OneD, NekDouble>> WeakDeriv(m_shapedim);
559  for (i = 0; i < nvariables; ++i)
560  {
561  for (j = 0; j < m_shapedim; ++j)
562  {
563  WeakDeriv[j] = Array<OneD, NekDouble>(ncoeffs, 0.0);
564 
565  // Directional derivation with respect to the j'th moving frame
566  // tmp[j] = \nabla \physfield[i] \cdot \mathbf{e}^j
567  // Implemented at TriExp::v_IProductWRTDirectionalDerivBase_SumFa
568  m_fields[0]->IProductWRTDirectionalDerivBase(
569  m_movingframes[j], physfield[i], WeakDeriv[j]);
570  }
571 
572  // Get the numerical flux and add to the modal coeffs
573  // if the NumericalFluxs function already includes the
574  // normal in the output
575 
576  Array<OneD, NekDouble> Fwd(nTracePointsTot);
577  Array<OneD, NekDouble> Bwd(nTracePointsTot);
578 
579  Array<OneD, NekDouble> flux(nTracePointsTot, 0.0);
580  Array<OneD, NekDouble> fluxFwd(nTracePointsTot);
581  Array<OneD, NekDouble> fluxBwd(nTracePointsTot);
582 
583  // Evaluate numerical flux in physical space which may in
584  // general couple all component of vectors
585  m_fields[i]->GetFwdBwdTracePhys(physfield[i], Fwd, Bwd);
586 
587  // evaulate upwinded m_fields[i]
588  m_fields[i]->GetTrace()->Upwind(m_traceVn, Fwd, Bwd, flux);
589 
590  OutField[i] = Array<OneD, NekDouble>(ncoeffs, 0.0);
591  for (j = 0; j < m_shapedim; ++j)
592  {
593  // calculate numflux = (n \cdot MF)*flux
594  Vmath::Vmul(nTracePointsTot, &flux[0], 1, &m_ncdotMFFwd[j][0], 1,
595  &fluxFwd[0], 1);
596  Vmath::Vmul(nTracePointsTot, &flux[0], 1, &m_ncdotMFBwd[j][0], 1,
597  &fluxBwd[0], 1);
598  Vmath::Neg(ncoeffs, WeakDeriv[j], 1);
599 
600  // FwdBwdtegral because generallize (N \cdot MF)_{FWD} \neq -(N
601  // \cdot MF)_{BWD}
602  m_fields[i]->AddFwdBwdTraceIntegral(fluxFwd, fluxBwd, WeakDeriv[j]);
603  m_fields[i]->SetPhysState(false);
604 
605  Vmath::Vadd(ncoeffs, &WeakDeriv[j][0], 1, &OutField[i][0], 1,
606  &OutField[i][0], 1);
607  }
608  }
609 }
Array< OneD, Array< OneD, NekDouble > > m_ncdotMFBwd
Definition: MMFSystem.h:184
Array< OneD, Array< OneD, NekDouble > > m_movingframes
Definition: MMFSystem.h:180
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:399
Array< OneD, Array< OneD, NekDouble > > m_ncdotMFFwd
Definition: MMFSystem.h:183
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
Array< OneD, NekDouble > m_traceVn
Definition: MMFAdvection.h:92
SOLVER_UTILS_EXPORT int GetTraceNpoints()
SOLVER_UTILS_EXPORT int GetNcoeffs()
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:302
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:186

Friends And Related Function Documentation

◆ MemoryManager< MMFAdvection >

friend class MemoryManager< MMFAdvection >
friend

Definition at line 61 of file MMFAdvection.h.

Member Data Documentation

◆ className

std::string Nektar::MMFAdvection::className
static
Initial value:

Name of class.

Definition at line 74 of file MMFAdvection.h.

◆ m_advx

NekDouble Nektar::MMFAdvection::m_advx
protected

Definition at line 84 of file MMFAdvection.h.

Referenced by Test2Dproblem(), Test3Dproblem(), and v_InitObject().

◆ m_advy

NekDouble Nektar::MMFAdvection::m_advy
protected

Definition at line 84 of file MMFAdvection.h.

Referenced by Test2Dproblem(), Test3Dproblem(), and v_InitObject().

◆ m_advz

NekDouble Nektar::MMFAdvection::m_advz
protected

Definition at line 84 of file MMFAdvection.h.

Referenced by Test3Dproblem(), and v_InitObject().

◆ m_Mass0

NekDouble Nektar::MMFAdvection::m_Mass0
protected

Definition at line 87 of file MMFAdvection.h.

Referenced by v_DoSolve(), and v_SetInitialConditions().

◆ m_planeNumber

int Nektar::MMFAdvection::m_planeNumber
protected

Definition at line 99 of file MMFAdvection.h.

Referenced by MMFAdvection().

◆ m_riemannSolver

SolverUtils::RiemannSolverSharedPtr Nektar::MMFAdvection::m_riemannSolver
protected

Definition at line 82 of file MMFAdvection.h.

Referenced by v_InitObject().

◆ m_RotAngle

NekDouble Nektar::MMFAdvection::m_RotAngle
protected

Definition at line 85 of file MMFAdvection.h.

Referenced by EvaluateAdvectionVelocity(), v_GenerateSummary(), and v_InitObject().

◆ m_TestType

TestType Nektar::MMFAdvection::m_TestType

◆ m_traceVn

Array<OneD, NekDouble> Nektar::MMFAdvection::m_traceVn
protected

Definition at line 92 of file MMFAdvection.h.

Referenced by GetNormalVelocity(), v_InitObject(), and WeakDGDirectionalAdvection().

◆ m_veldotMF

Array<OneD, Array<OneD, NekDouble> > Nektar::MMFAdvection::m_veldotMF
protected

Definition at line 94 of file MMFAdvection.h.

Referenced by v_InitObject().

◆ m_vellc

Array<OneD, NekDouble> Nektar::MMFAdvection::m_vellc
protected

Definition at line 95 of file MMFAdvection.h.

Referenced by v_InitObject().

◆ m_velocity

Array<OneD, Array<OneD, NekDouble> > Nektar::MMFAdvection::m_velocity
protected

◆ m_VelProjection

int Nektar::MMFAdvection::m_VelProjection
protected

Definition at line 88 of file MMFAdvection.h.

Referenced by EvaluateAdvectionVelocity(), and v_InitObject().

◆ m_waveFreq

NekDouble Nektar::MMFAdvection::m_waveFreq
protected

Definition at line 85 of file MMFAdvection.h.

Referenced by EvaluateAdvectionVelocity(), and v_InitObject().