Nektar++
|
Defines a forcing term to be explicitly applied. More...
#include <Forcing.h>
Public Member Functions | |
virtual SOLVER_UTILS_EXPORT | ~Forcing () |
SOLVER_UTILS_EXPORT void | InitObject (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) |
Initialise the forcing object. More... | |
SOLVER_UTILS_EXPORT void | Apply (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) |
Apply the forcing. More... | |
SOLVER_UTILS_EXPORT void | PreApply (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) |
Change the advection velocity before applying the forcing. For example, subtracting the frame velocity from the advection velocity in the MovingRefercenceFrame. More... | |
SOLVER_UTILS_EXPORT void | ApplyCoeff (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time) |
Apply the forcing. More... | |
SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & | GetForces () |
SOLVER_UTILS_EXPORT Array< OneD, Array< OneD, NekDouble > > & | UpdateForces () |
Static Public Member Functions | |
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > | Load (const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0) |
Protected Attributes | |
LibUtilities::SessionReaderSharedPtr | m_session |
Session reader. More... | |
const std::weak_ptr< EquationSystem > | m_equ |
Weak pointer to equation system using this forcing. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_Forcing |
Evaluated forcing function. More... | |
int | m_NumVariable |
Number of variables. More... | |
std::map< std::string, SolverUtils::SessionFunctionSharedPtr > | m_sessionFunctions |
Map of known SessionFunctions. More... | |
|
inlinevirtual |
|
protected |
Constructor.
Definition at line 50 of file Forcing.cpp.
void Nektar::SolverUtils::Forcing::Apply | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, |
const Array< OneD, Array< OneD, NekDouble > > & | inarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble & | time | ||
) |
Apply the forcing.
fields | Expansion lists corresponding to input arrays |
inarray | u^n from previous timestep |
outarray | output array to append forcing to |
Definition at line 68 of file Forcing.cpp.
References v_Apply().
void Nektar::SolverUtils::Forcing::ApplyCoeff | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, |
const Array< OneD, Array< OneD, NekDouble > > & | inarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble & | time | ||
) |
Apply the forcing.
fields | Expansion lists corresponding to input arrays |
inarray | u^n from previous timestep |
outarray | output array to append forcing to |
Definition at line 109 of file Forcing.cpp.
References v_ApplyCoeff().
|
protected |
Definition at line 184 of file Forcing.cpp.
|
protected |
Definition at line 170 of file Forcing.cpp.
References ASSERTL0, and EvaluateTimeFunction().
Referenced by EvaluateTimeFunction(), Nektar::SolverUtils::ForcingBody::v_Apply(), and Nektar::SolverUtils::ForcingBody::v_ApplyCoeff().
const Nektar::Array< OneD, const Array< OneD, NekDouble > > & Nektar::SolverUtils::Forcing::GetForces | ( | ) |
Definition at line 165 of file Forcing.cpp.
References m_Forcing.
|
protected |
Get a SessionFunction by name.
Definition at line 194 of file Forcing.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and m_sessionFunctions.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingBody::Update(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), and Nektar::ForcingQuasi1D::v_InitObject().
void Nektar::SolverUtils::Forcing::InitObject | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields, |
const unsigned int & | pNumForcingFields, | ||
const TiXmlElement * | pForce | ||
) |
Initialise the forcing object.
Definition at line 56 of file Forcing.cpp.
References v_InitObject().
|
static |
Definition at line 120 of file Forcing.cpp.
References Nektar::SolverUtils::GetForcingFactory(), and Nektar::LibUtilities::SessionReader::GetXMLElementTimeLevel().
Referenced by Nektar::IncNavierStokes::v_InitObject(), Nektar::AcousticSystem::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::UnsteadyInviscidBurger::v_InitObject(), Nektar::UnsteadyReactionDiffusion::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), Nektar::CompressibleFlowSystem::v_InitObject(), and Nektar::Dummy::v_InitObject().
void Nektar::SolverUtils::Forcing::PreApply | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | fields, |
const Array< OneD, Array< OneD, NekDouble > > & | inarray, | ||
Array< OneD, Array< OneD, NekDouble > > & | outarray, | ||
const NekDouble & | time | ||
) |
Change the advection velocity before applying the forcing. For example, subtracting the frame velocity from the advection velocity in the MovingRefercenceFrame.
Definition at line 76 of file Forcing.cpp.
References v_PreApply().
Nektar::Array< OneD, Array< OneD, NekDouble > > & Nektar::SolverUtils::Forcing::UpdateForces | ( | ) |
|
protectedpure virtual |
Implemented in Nektar::SolverUtils::ForcingAbsorption, Nektar::SolverUtils::ForcingBody, Nektar::SolverUtils::ForcingMovingReferenceFrame, Nektar::SolverUtils::ForcingNoise, Nektar::SolverUtils::ForcingProgrammatic, Nektar::ForcingAxiSymmetric, Nektar::ForcingQuasi1D, Nektar::ForcingMovingBody, and Nektar::ForcingStabilityCoupledLNS.
Referenced by Apply().
|
protectedvirtual |
Reimplemented in Nektar::SolverUtils::ForcingAbsorption, and Nektar::SolverUtils::ForcingBody.
Definition at line 219 of file Forcing.cpp.
References ASSERTL0.
Referenced by ApplyCoeff().
|
protectedpure virtual |
Implemented in Nektar::SolverUtils::ForcingAbsorption, Nektar::SolverUtils::ForcingBody, Nektar::SolverUtils::ForcingMovingReferenceFrame, Nektar::SolverUtils::ForcingNoise, Nektar::SolverUtils::ForcingProgrammatic, Nektar::ForcingAxiSymmetric, Nektar::ForcingQuasi1D, Nektar::ForcingMovingBody, and Nektar::ForcingStabilityCoupledLNS.
Referenced by InitObject().
|
protectedvirtual |
Reimplemented in Nektar::SolverUtils::ForcingMovingReferenceFrame.
Definition at line 84 of file Forcing.cpp.
References Vmath::Vcopy().
Referenced by PreApply().
|
protected |
Weak pointer to equation system using this forcing.
Definition at line 119 of file Forcing.h.
Referenced by Nektar::ForcingMovingBody::InitialiseFilter(), Nektar::SolverUtils::ForcingMovingReferenceFrame::Update(), and Nektar::SolverUtils::ForcingMovingReferenceFrame::v_InitObject().
Evaluated forcing function.
Definition at line 121 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), GetForces(), Nektar::SolverUtils::ForcingBody::Update(), UpdateForces(), Nektar::SolverUtils::ForcingProgrammatic::UpdateForces(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingBody::v_Apply(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_ApplyCoeff(), Nektar::SolverUtils::ForcingBody::v_ApplyCoeff(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), Nektar::SolverUtils::ForcingProgrammatic::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), and Nektar::ForcingQuasi1D::v_InitObject().
|
protected |
Number of variables.
Definition at line 123 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_ApplyCoeff(), Nektar::SolverUtils::ForcingBody::v_ApplyCoeff(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_InitObject(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), Nektar::SolverUtils::ForcingProgrammatic::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), and Nektar::ForcingQuasi1D::v_InitObject().
|
protected |
Session reader.
Definition at line 117 of file Forcing.h.
Referenced by Nektar::SolverUtils::ForcingAbsorption::CalcAbsorption(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::SolverUtils::ForcingMovingReferenceFrame::CheckForRestartTheta(), Nektar::ForcingMovingBody::CheckIsFromFile(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::ForcingMovingBody::Newmark_betaSolver(), Nektar::ForcingMovingBody::SetDynEqCoeffMatrix(), Nektar::SolverUtils::ForcingBody::Update(), Nektar::SolverUtils::ForcingMovingReferenceFrame::UpdateTheta(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_InitObject(), Nektar::SolverUtils::ForcingBody::v_InitObject(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_InitObject(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), Nektar::ForcingAxiSymmetric::v_InitObject(), Nektar::ForcingQuasi1D::v_InitObject(), and Nektar::ForcingMovingBody::v_InitObject().
|
protected |
Map of known SessionFunctions.
Definition at line 126 of file Forcing.h.
Referenced by GetFunction().