Nektar++
|
An abstract base class encapsulating the concept of advection of a vector field. More...
#include <Advection.h>
Public Member Functions | |
virtual SOLVER_UTILS_EXPORT | ~Advection () |
SOLVER_UTILS_EXPORT void | InitObject (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
Interface function to initialise the advection object. More... | |
SOLVER_UTILS_EXPORT void | Advect (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &advVel, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray) |
Interface function to advect the vector field. More... | |
SOLVER_UTILS_EXPORT void | AdvectVolumeFlux (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble >> &pAdvVel, const Array< OneD, Array< OneD, NekDouble >> &pInarray, TensorOfArray3D< NekDouble > &pVolumeFlux, const NekDouble &pTime) |
Interface function to advect the Volume field. More... | |
SOLVER_UTILS_EXPORT void | AdvectTraceFlux (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble >> &pAdvVel, const Array< OneD, Array< OneD, NekDouble >> &pInarray, Array< OneD, Array< OneD, NekDouble >> &pTraceFlux, const NekDouble &pTime, const Array< OneD, Array< OneD, NekDouble >> &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble >> &pBwd=NullNekDoubleArrayOfArray) |
Interface function to advect the Trace field. More... | |
SOLVER_UTILS_EXPORT void | AdvectCoeffs (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &advVel, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray) |
Similar with Advection::Advect(): calculate the advection flux The difference is in the outarray: it is the coefficients of basis for AdvectCoeffs() it is the physics on quadrature points for Advect() More... | |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetFluxVector (FuncPointerT func, ObjectPointerT obj) |
Set the flux vector callback function. More... | |
void | SetRiemannSolver (RiemannSolverSharedPtr riemann) |
Set a Riemann solver object for this advection object. More... | |
void | SetFluxVector (AdvectionFluxVecCB fluxVector) |
Set the flux vector callback function. More... | |
void | SetBaseFlow (const Array< OneD, Array< OneD, NekDouble > > &inarray, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields) |
Set the base flow used for linearised advection objects. More... | |
template<typename DataType , typename TypeNekBlkMatSharedPtr > | |
SOLVER_UTILS_EXPORT void | AddTraceJacToMat (const int nConvectiveFields, const int nSpaceDim, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, TypeNekBlkMatSharedPtr > &TracePntJacCons, Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, const Array< OneD, TypeNekBlkMatSharedPtr > &TracePntJacGrad, const Array< OneD, Array< OneD, DataType > > &TracePntJacGradSign) |
template<typename DataType , typename TypeNekBlkMatSharedPtr > | |
void | CalcJacobTraceInteg (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const int m, const int n, const Array< OneD, const TypeNekBlkMatSharedPtr > &PntJac, const Array< OneD, const Array< OneD, DataType > > &PntJacSign, Array< OneD, DNekMatSharedPtr > &TraceJacFwd, Array< OneD, DNekMatSharedPtr > &TraceJacBwd) |
SOLVER_UTILS_EXPORT void | AddVolumJacToMat (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const int &nConvectiveFields, const TensorOfArray5D< NekDouble > &ElmtJacArray, Array< OneD, Array< OneD, SNekBlkMatSharedPtr >> &gmtxarray) |
template<typename DataType , typename TypeNekBlkMatSharedPtr > | |
void | AddTraceJacToMat (const int nConvectiveFields, const int nSpaceDim, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, TypeNekBlkMatSharedPtr > &TracePntJacCons, Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, const Array< OneD, TypeNekBlkMatSharedPtr > &TracePntJacGrad, const Array< OneD, Array< OneD, DataType > > &TracePntJacGradSign) |
Protected Attributes | |
AdvectionFluxVecCB | m_fluxVector |
Callback function to the flux vector (set when advection is in conservative form). More... | |
RiemannSolverSharedPtr | m_riemann |
Riemann solver for DG-type schemes. More... | |
int | m_spaceDim |
Storage for space dimension. Used for homogeneous extension. More... | |
An abstract base class encapsulating the concept of advection of a vector field.
Subclasses override the Advection::v_InitObject function to initialise the object and the Advection::v_Advect function to evaluate the advection of the vector field.
Definition at line 72 of file Advection.h.
|
inlinevirtual |
Definition at line 76 of file Advection.h.
void Nektar::SolverUtils::Advection::AddTraceJacToMat | ( | const int | nConvectiveFields, |
const int | nSpaceDim, | ||
const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, | ||
const Array< OneD, TypeNekBlkMatSharedPtr > & | TracePntJacCons, | ||
Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > & | gmtxarray, | ||
const Array< OneD, TypeNekBlkMatSharedPtr > & | TracePntJacGrad, | ||
const Array< OneD, Array< OneD, DataType > > & | TracePntJacGradSign | ||
) |
Definition at line 89 of file Advection.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), CalcJacobTraceInteg(), Nektar::Array< OneD, const DataType >::size(), Vmath::Vadd(), and Vmath::Vcopy().
SOLVER_UTILS_EXPORT void Nektar::SolverUtils::Advection::AddTraceJacToMat | ( | const int | nConvectiveFields, |
const int | nSpaceDim, | ||
const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, | ||
const Array< OneD, TypeNekBlkMatSharedPtr > & | TracePntJacCons, | ||
Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > & | gmtxarray, | ||
const Array< OneD, TypeNekBlkMatSharedPtr > & | TracePntJacGrad, | ||
const Array< OneD, Array< OneD, DataType > > & | TracePntJacGradSign | ||
) |
|
inline |
Definition at line 209 of file Advection.h.
void Nektar::SolverUtils::Advection::Advect | ( | const int | nConvectiveFields, |
const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, | ||
const Array< OneD, Array< OneD, NekDouble > > & | pAdvVel, | ||
const Array< OneD, Array< OneD, NekDouble > > & | pInarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | pOutarray, | ||
const NekDouble & | pTime, | ||
const Array< OneD, Array< OneD, NekDouble > > & | pFwd = NullNekDoubleArrayOfArray , |
||
const Array< OneD, Array< OneD, NekDouble > > & | pBwd = NullNekDoubleArrayOfArray |
||
) |
Interface function to advect the vector field.
nConvectiveFields | Number of velocity components. |
pFields | Expansion lists for scalar fields. |
pAdvVel | Advection velocity. |
pInarray | Scalar data to advect. |
pOutarray | Advected scalar data. |
pTime | Simulation time. |
Definition at line 74 of file Advection.cpp.
References v_Advect().
void Nektar::SolverUtils::Advection::AdvectCoeffs | ( | const int | nConvectiveFields, |
const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, | ||
const Array< OneD, Array< OneD, NekDouble > > & | pAdvVel, | ||
const Array< OneD, Array< OneD, NekDouble > > & | pInarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | pOutarray, | ||
const NekDouble & | pTime, | ||
const Array< OneD, Array< OneD, NekDouble > > & | pFwd = NullNekDoubleArrayOfArray , |
||
const Array< OneD, Array< OneD, NekDouble > > & | pBwd = NullNekDoubleArrayOfArray |
||
) |
Similar with Advection::Advect(): calculate the advection flux The difference is in the outarray: it is the coefficients of basis for AdvectCoeffs() it is the physics on quadrature points for Advect()
nConvectiveFields | Number of velocity components. |
pFields | Expansion lists for scalar fields. |
pAdvVel | Advection velocity. |
pInarray | Scalar data to advect. |
pOutarray | Advected scalar data. |
pTime | Simulation time. |
Definition at line 343 of file Advection.cpp.
References v_AdvectCoeffs().
|
inline |
Interface function to advect the Trace field.
Definition at line 109 of file Advection.h.
|
inline |
Interface function to advect the Volume field.
Definition at line 96 of file Advection.h.
void Nektar::SolverUtils::Advection::CalcJacobTraceInteg | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, |
const int | m, | ||
const int | n, | ||
const Array< OneD, const TypeNekBlkMatSharedPtr > & | PntJac, | ||
const Array< OneD, const Array< OneD, DataType > > & | PntJacSign, | ||
Array< OneD, DNekMatSharedPtr > & | TraceJacFwd, | ||
Array< OneD, DNekMatSharedPtr > & | TraceJacBwd | ||
) |
void Nektar::SolverUtils::Advection::InitObject | ( | LibUtilities::SessionReaderSharedPtr | pSession, |
Array< OneD, MultiRegions::ExpListSharedPtr > | pFields | ||
) |
Interface function to initialise the advection object.
pSession | Session configuration data. |
pFields | Array of ExpList objects. |
Definition at line 58 of file Advection.cpp.
References v_InitObject().
|
inline |
Set the base flow used for linearised advection objects.
inarray | Vector to use as baseflow |
Definition at line 182 of file Advection.h.
|
inline |
Set the flux vector callback function.
fluxVector | The callback function to override. |
Definition at line 172 of file Advection.h.
|
inline |
Set the flux vector callback function.
This routine is a utility function to avoid the explicit use of std::bind. A function and object can be passed to this function instead.
Definition at line 151 of file Advection.h.
|
inline |
Set a Riemann solver object for this advection object.
riemann | The RiemannSolver object. |
Definition at line 162 of file Advection.h.
|
protectedvirtual |
Reimplemented in Nektar::SolverUtils::AdvectionWeakDG.
Definition at line 418 of file Advection.cpp.
References ASSERTL0.
|
protectedpure virtual |
Advects a vector field.
Implemented in Nektar::SolverUtils::Advection3DHomogeneous1D, Nektar::SkewSymmetricAdvection, Nektar::NoAdvection, Nektar::NavierStokesAdvection, Nektar::LinearisedAdvection, Nektar::AlternateSkewAdvection, Nektar::AdjointAdvection, Nektar::SolverUtils::AdvectionFR, Nektar::SolverUtils::AdvectionWeakDG, and Nektar::SolverUtils::AdvectionNonConservative.
Referenced by Advect().
|
protectedvirtual |
Reimplemented in Nektar::SolverUtils::AdvectionWeakDG.
Definition at line 403 of file Advection.cpp.
References ASSERTL0.
Referenced by AdvectCoeffs().
|
protectedvirtual |
Advects Trace Flux.
calculate the advection flux in the cell the trace integration
Definition at line 315 of file Advection.cpp.
References ASSERTL0.
|
protectedvirtual |
|
protectedvirtual |
Initialises the advection object.
This function should be overridden in derived classes to initialise the specific advection data members. However, this base class function should be called as the first statement of the overridden function to ensure the base class is correctly initialised in order.
pSession | Session information. |
pFields | Expansion lists for scalar fields. |
Reimplemented in Nektar::SkewSymmetricAdvection, Nektar::NoAdvection, Nektar::NavierStokesAdvection, Nektar::LinearisedAdvection, Nektar::AlternateSkewAdvection, Nektar::SolverUtils::AdvectionWeakDG, Nektar::SolverUtils::AdvectionNonConservative, Nektar::SolverUtils::AdvectionFR, and Nektar::SolverUtils::Advection3DHomogeneous1D.
Definition at line 366 of file Advection.cpp.
References Nektar::ErrorUtil::efatal, m_spaceDim, and NEKERROR.
Referenced by InitObject(), Nektar::SolverUtils::AdvectionFR::v_InitObject(), Nektar::SolverUtils::AdvectionNonConservative::v_InitObject(), Nektar::SolverUtils::AdvectionWeakDG::v_InitObject(), Nektar::LinearisedAdvection::v_InitObject(), Nektar::NavierStokesAdvection::v_InitObject(), and Nektar::SkewSymmetricAdvection::v_InitObject().
|
protectedvirtual |
Overrides the base flow used during linearised advection.
Reimplemented in Nektar::LinearisedAdvection.
Definition at line 394 of file Advection.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
protected |
Callback function to the flux vector (set when advection is in conservative form).
Definition at line 221 of file Advection.h.
Referenced by Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::SolverUtils::Advection3DHomogeneous1D::v_Advect(), and Nektar::SolverUtils::AdvectionWeakDG::v_AdvectVolumeFlux().
|
protected |
Riemann solver for DG-type schemes.
Definition at line 223 of file Advection.h.
Referenced by Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::SolverUtils::AdvectionWeakDG::v_AdvectTraceFlux(), and Nektar::SolverUtils::Advection3DHomogeneous1D::v_InitObject().
|
protected |
Storage for space dimension. Used for homogeneous extension.
Definition at line 225 of file Advection.h.
Referenced by Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::SolverUtils::AdvectionWeakDG::v_AdvectCoeffs(), Nektar::SolverUtils::AdvectionWeakDG::v_AdvectTraceFlux(), and v_InitObject().