Nektar++
|
Defines a callback function which evaluates the flux vector. More...
#include <Advection.h>
Public Member Functions | |
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) |
Interface function to advect the vector field. 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) |
Set the base flow used for linearised advection objects. More... | |
Protected Member Functions | |
virtual SOLVER_UTILS_EXPORT void | v_InitObject (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
Initialises the advection object. More... | |
virtual SOLVER_UTILS_EXPORT void | v_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)=0 |
Advects a vector field. More... | |
virtual SOLVER_UTILS_EXPORT void | v_SetBaseFlow (const Array< OneD, Array< OneD, NekDouble > > &inarray) |
Overrides the base flow used during linearised advection. More... | |
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... | |
Defines a callback function which evaluates the flux vector.
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 69 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 | ||
) |
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 76 of file Advection.cpp.
References v_Advect().
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 60 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 124 of file Advection.h.
References v_SetBaseFlow().
|
inline |
Set the flux vector callback function.
This routine is a utility function to avoid the explicit use of boost::bind. A function and object can be passed to this function instead.
Definition at line 94 of file Advection.h.
References m_fluxVector.
|
inline |
Set the flux vector callback function.
fluxVector | The callback function to override. |
Definition at line 114 of file Advection.h.
References m_fluxVector.
|
inline |
Set a Riemann solver object for this advection object.
riemann | The RiemannSolver object. |
Definition at line 104 of file Advection.h.
References m_riemann.
|
protectedpure virtual |
Advects a vector field.
Implemented in Nektar::AdjointAdvection, Nektar::LinearisedAdvection, Nektar::SolverUtils::AdvectionFR, Nektar::SolverUtils::Advection3DHomogeneous1D, Nektar::NavierStokesAdvection, Nektar::SkewSymmetricAdvection, Nektar::AlternateSkewAdvection, Nektar::NoAdvection, Nektar::SolverUtils::AdvectionNonConservative, and Nektar::SolverUtils::AdvectionWeakDG.
Referenced by Advect().
|
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::AdjointAdvection, Nektar::LinearisedAdvection, Nektar::SolverUtils::AdvectionFR, Nektar::SolverUtils::Advection3DHomogeneous1D, Nektar::NavierStokesAdvection, Nektar::SkewSymmetricAdvection, Nektar::AlternateSkewAdvection, Nektar::NoAdvection, Nektar::SolverUtils::AdvectionNonConservative, and Nektar::SolverUtils::AdvectionWeakDG.
Definition at line 97 of file Advection.cpp.
References ASSERTL0, and m_spaceDim.
Referenced by InitObject(), Nektar::SolverUtils::AdvectionNonConservative::v_InitObject(), Nektar::SolverUtils::AdvectionWeakDG::v_InitObject(), Nektar::SkewSymmetricAdvection::v_InitObject(), Nektar::NavierStokesAdvection::v_InitObject(), Nektar::SolverUtils::AdvectionFR::v_InitObject(), Nektar::LinearisedAdvection::v_InitObject(), and Nektar::AdjointAdvection::v_InitObject().
|
protectedvirtual |
Overrides the base flow used during linearised advection.
Reimplemented in Nektar::AdjointAdvection, and Nektar::LinearisedAdvection.
Definition at line 124 of file Advection.cpp.
References ASSERTL0.
Referenced by SetBaseFlow().
|
protected |
Callback function to the flux vector (set when advection is in conservative form).
Definition at line 132 of file Advection.h.
Referenced by SetFluxVector(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::SolverUtils::Advection3DHomogeneous1D::v_Advect(), and Nektar::SolverUtils::AdvectionFR::v_Advect().
|
protected |
Riemann solver for DG-type schemes.
Definition at line 134 of file Advection.h.
Referenced by SetRiemannSolver(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), and Nektar::SolverUtils::Advection3DHomogeneous1D::v_InitObject().
|
protected |
Storage for space dimension. Used for homogeneous extension.
Definition at line 136 of file Advection.h.
Referenced by Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), and v_InitObject().