Nektar++
|
#include <LinearisedAdvection.h>
Static Public Member Functions | |
static SolverUtils::AdvectionSharedPtr | create (std::string) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of class. More... | |
Protected Attributes | |
LibUtilities::SessionReaderSharedPtr | m_session |
int | m_spacedim |
int | m_expdim |
Array< OneD, Array< OneD, NekDouble > > | m_baseflow |
Storage for base flow. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_gradBase |
int | m_start |
number of slices More... | |
int | m_skip |
int | m_slices |
NekDouble | m_period |
period length More... | |
int | m_isperiodic |
int | m_interporder |
Array< OneD, Array< OneD, NekDouble > > | m_interp |
interpolation vector More... | |
LibUtilities::NektarFFTSharedPtr | m_FFT |
auxiliary variables More... | |
Array< OneD, NekDouble > | m_tmpIN |
Array< OneD, NekDouble > | m_tmpOUT |
bool | m_useFFTW |
bool | m_singleMode |
flag to determine if use single mode or not More... | |
bool | m_halfMode |
flag to determine if use half mode or not More... | |
bool | m_multipleModes |
flag to determine if use multiple mode or not More... | |
FloquetBlockMatrixMapShPtr | m_FloquetBlockMat |
![]() | |
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... | |
Private Types | |
enum | FloquetMatType { eForwardsCoeff , eForwardsPhys } |
enum | HomogeneousType { eHomogeneous1D , eHomogeneous2D , eHomogeneous3D , eNotHomogeneous } |
Parameter for homogeneous expansions. More... | |
typedef std::map< FloquetMatType, DNekBlkMatSharedPtr > | FloquetBlockMatrixMap |
A map between matrix keys and their associated block matrices. More... | |
typedef std::shared_ptr< FloquetBlockMatrixMap > | FloquetBlockMatrixMapShPtr |
A shared pointer to a BlockMatrixMap. More... | |
Private Attributes | |
bool | m_useFFT |
flag to determine if use or not the FFT for transformations 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... | |
int | m_NumMode |
Mode to use in case of single mode analysis. More... | |
SpatialDomains::BoundaryConditionsSharedPtr | m_boundaryConditions |
Friends | |
class | MemoryManager< LinearisedAdvection > |
Additional Inherited Members | |
![]() | |
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) |
Definition at line 45 of file LinearisedAdvection.h.
|
private |
A map between matrix keys and their associated block matrices.
Definition at line 55 of file LinearisedAdvection.h.
|
private |
A shared pointer to a BlockMatrixMap.
Definition at line 57 of file LinearisedAdvection.h.
|
private |
|
private |
Parameter for homogeneous expansions.
Enumerator | |
---|---|
eHomogeneous1D | |
eHomogeneous2D | |
eHomogeneous3D | |
eNotHomogeneous |
Definition at line 157 of file LinearisedAdvection.h.
|
protected |
|
protectedvirtual |
Definition at line 263 of file LinearisedAdvection.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 63 of file LinearisedAdvection.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
protected |
Definition at line 669 of file LinearisedAdvection.cpp.
References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), eForwardsPhys, Nektar::eWrapper, GetFloquetBlockMatrix(), Nektar::LibUtilities::GetNektarFFTFactory(), ImportFldBase(), m_baseflow, m_FFT, m_interp, m_isperiodic, m_session, m_skip, m_slices, m_start, m_tmpIN, m_tmpOUT, Vmath::Vcopy(), and Vmath::Zero().
Referenced by v_InitObject().
|
protected |
|
protected |
Definition at line 630 of file LinearisedAdvection.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::eDIAGONAL, Nektar::LibUtilities::eFourier, Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::StdRegions::eFwdTrans, Nektar::StdRegions::StdExpansion::GetStdMatrix(), m_baseflow, and m_slices.
Referenced by DFT().
|
protected |
Import Base flow.
Import field from infile and load into m_fields. This routine will also perform a BwdTrans to ensure data is in both the physical and coefficient storage.
pInFile | Filename to read. |
pFields | Array of expansion lists |
Definition at line 418 of file LinearisedAdvection.cpp.
References ASSERTL0, Nektar::LibUtilities::FieldIO::CreateForFile(), Vmath::Fill(), m_baseflow, m_halfMode, m_interp, m_npointsZ, m_session, m_singleMode, m_slices, Nektar::LibUtilities::NullFieldMetaDataMap, and Vmath::Vcopy().
Referenced by DFT(), and v_InitObject().
|
protected |
Definition at line 511 of file LinearisedAdvection.cpp.
References m_baseflow, m_interporder, m_isperiodic, m_period, m_slices, Vmath::Svtvp(), Vmath::Vcopy(), and Vmath::Zero().
Referenced by Nektar::AdjointAdvection::v_Advect(), and v_Advect().
|
protected |
Definition at line 581 of file LinearisedAdvection.cpp.
References m_baseflow, m_gradBase, m_halfMode, m_singleMode, and m_spacedim.
Referenced by Nektar::AdjointAdvection::v_Advect(), v_Advect(), v_InitObject(), and v_SetBaseFlow().
|
protectedvirtual |
Advects a vector field.
Implements Nektar::SolverUtils::Advection.
Reimplemented in Nektar::AdjointAdvection.
Definition at line 270 of file LinearisedAdvection.cpp.
References ASSERTL1, m_baseflow, m_gradBase, m_halfMode, m_interp, m_multipleModes, m_period, m_singleMode, m_slices, m_spacedim, Vmath::Neg(), UpdateBase(), UpdateGradBase(), Vmath::Vmul(), and Vmath::Vvtvp().
|
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 from Nektar::SolverUtils::Advection.
Definition at line 60 of file LinearisedAdvection.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, DFT(), Nektar::LibUtilities::eFunctionTypeFile, eHomogeneous1D, eHomogeneous2D, eHomogeneous3D, eNotHomogeneous, ImportFldBase(), m_baseflow, m_boundaryConditions, m_expdim, m_gradBase, m_halfMode, m_HomoDirec, m_HomogeneousType, m_interporder, m_isperiodic, m_LhomX, m_LhomY, m_LhomZ, m_multipleModes, m_npointsX, m_npointsY, m_npointsZ, m_period, m_session, m_singleMode, m_skip, m_slices, m_spacedim, m_start, m_useFFT, UpdateGradBase(), and Nektar::SolverUtils::Advection::v_InitObject().
|
protectedvirtual |
Overrides the base flow used during linearised advection.
Reimplemented from Nektar::SolverUtils::Advection.
Definition at line 381 of file LinearisedAdvection.cpp.
References ASSERTL1, m_baseflow, m_session, UpdateGradBase(), and Vmath::Vcopy().
|
friend |
Definition at line 57 of file LinearisedAdvection.h.
|
static |
Name of class.
Definition at line 68 of file LinearisedAdvection.h.
Storage for base flow.
Definition at line 77 of file LinearisedAdvection.h.
Referenced by DFT(), GetFloquetBlockMatrix(), ImportFldBase(), UpdateBase(), UpdateGradBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), v_InitObject(), and v_SetBaseFlow().
|
private |
Definition at line 182 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
protected |
Definition at line 74 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
protected |
|
protected |
Definition at line 108 of file LinearisedAdvection.h.
Definition at line 78 of file LinearisedAdvection.h.
Referenced by UpdateGradBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
protected |
flag to determine if use half mode or not
Definition at line 98 of file LinearisedAdvection.h.
Referenced by ImportFldBase(), UpdateGradBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
private |
number of homogenous directions
Definition at line 178 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
private |
Definition at line 166 of file LinearisedAdvection.h.
Referenced by v_InitObject().
interpolation vector
Definition at line 89 of file LinearisedAdvection.h.
Referenced by DFT(), ImportFldBase(), Nektar::AdjointAdvection::v_Advect(), and v_Advect().
|
protected |
Definition at line 87 of file LinearisedAdvection.h.
Referenced by UpdateBase(), and v_InitObject().
|
protected |
Definition at line 86 of file LinearisedAdvection.h.
Referenced by DFT(), UpdateBase(), and v_InitObject().
|
private |
physical length in X direction (if homogeneous)
Definition at line 170 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
private |
physical length in Y direction (if homogeneous)
Definition at line 171 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
private |
physical length in Z direction (if homogeneous)
Definition at line 172 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
protected |
flag to determine if use multiple mode or not
Definition at line 100 of file LinearisedAdvection.h.
Referenced by Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
private |
number of points in X direction (if homogeneous)
Definition at line 174 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
private |
number of points in Y direction (if homogeneous)
Definition at line 175 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
private |
number of points in Z direction (if homogeneous)
Definition at line 176 of file LinearisedAdvection.h.
Referenced by ImportFldBase(), and v_InitObject().
|
private |
Mode to use in case of single mode analysis.
Definition at line 180 of file LinearisedAdvection.h.
|
protected |
period length
Definition at line 85 of file LinearisedAdvection.h.
Referenced by UpdateBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
protected |
Definition at line 71 of file LinearisedAdvection.h.
Referenced by DFT(), ImportFldBase(), v_InitObject(), and v_SetBaseFlow().
|
protected |
flag to determine if use single mode or not
Definition at line 96 of file LinearisedAdvection.h.
Referenced by ImportFldBase(), UpdateGradBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
protected |
Definition at line 82 of file LinearisedAdvection.h.
Referenced by DFT(), and v_InitObject().
|
protected |
Definition at line 83 of file LinearisedAdvection.h.
Referenced by DFT(), GetFloquetBlockMatrix(), ImportFldBase(), UpdateBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
protected |
Definition at line 73 of file LinearisedAdvection.h.
Referenced by UpdateGradBase(), Nektar::AdjointAdvection::v_Advect(), v_Advect(), and v_InitObject().
|
protected |
number of slices
Definition at line 81 of file LinearisedAdvection.h.
Referenced by DFT(), and v_InitObject().
Definition at line 92 of file LinearisedAdvection.h.
Referenced by DFT().
Definition at line 93 of file LinearisedAdvection.h.
Referenced by DFT().
|
private |
flag to determine if use or not the FFT for transformations
Definition at line 166 of file LinearisedAdvection.h.
Referenced by v_InitObject().
|
protected |
Definition at line 94 of file LinearisedAdvection.h.