Nektar++
|
Base class for mapping to be applied to the coordinate system. More...
#include <Mapping.h>
Public Member Functions | |
virtual GLOBAL_MAPPING_EXPORT | ~Mapping () |
Destructor. More... | |
GLOBAL_MAPPING_EXPORT void | InitObject (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping) |
Initialise the mapping object. More... | |
GLOBAL_MAPPING_EXPORT void | ReplaceField (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields) |
Replace the Expansion List used by the mapping. More... | |
GLOBAL_MAPPING_EXPORT void | Output (LibUtilities::FieldMetaDataMap &fieldMetaDataMap, const std::string &outname) |
Output function called when a chk or fld file is written. More... | |
GLOBAL_MAPPING_EXPORT void | ContravarToCartesian (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Convert a contravariant vector to the Cartesian system. More... | |
GLOBAL_MAPPING_EXPORT void | CovarToCartesian (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Convert a covariant vector to the Cartesian system. More... | |
GLOBAL_MAPPING_EXPORT void | ContravarFromCartesian (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Convert a contravariant vector to the transformed system. More... | |
GLOBAL_MAPPING_EXPORT void | CovarFromCartesian (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Convert a covariant vector to the transformed system. More... | |
GLOBAL_MAPPING_EXPORT void | GetCartesianCoordinates (Array< OneD, NekDouble > &out0, Array< OneD, NekDouble > &out1, Array< OneD, NekDouble > &out2) |
Get the Cartesian coordinates in the field. More... | |
GLOBAL_MAPPING_EXPORT void | GetJacobian (Array< OneD, NekDouble > &outarray) |
Get the Jacobian of the transformation. More... | |
GLOBAL_MAPPING_EXPORT void | DotGradJacobian (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray) |
Calculate the dot product with the gradient of the Jacobian. More... | |
GLOBAL_MAPPING_EXPORT void | GetMetricTensor (Array< OneD, Array< OneD, NekDouble > > &outarray) |
Get the metric tensor \(g_{ij}\). More... | |
GLOBAL_MAPPING_EXPORT void | GetInvMetricTensor (Array< OneD, Array< OneD, NekDouble > > &outarray) |
Get the inverse of metric tensor \(g^{ij}\). More... | |
GLOBAL_MAPPING_EXPORT void | LowerIndex (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Lower index of vector: \(v_{i} = g_{ij}*v^{j}\). More... | |
GLOBAL_MAPPING_EXPORT void | RaiseIndex (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Raise index of vector: \(v^{i} = g^{ij}*v_{j}\). More... | |
GLOBAL_MAPPING_EXPORT void | ApplyChristoffelContravar (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Apply the Christoffel symbols to a contravariant vector. More... | |
GLOBAL_MAPPING_EXPORT void | ApplyChristoffelCovar (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Apply the Christoffel symbols to a covariant vector. More... | |
GLOBAL_MAPPING_EXPORT void | GetCoordVelocity (Array< OneD, Array< OneD, NekDouble > > &outarray) |
Obtain the velocity of the coordinates. More... | |
GLOBAL_MAPPING_EXPORT void | Divergence (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray) |
Calculate the generalised divergence operator. More... | |
GLOBAL_MAPPING_EXPORT void | VelocityLaplacian (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble alpha=0.0) |
Generalised (correction to the) velocity Laplacian operator. More... | |
GLOBAL_MAPPING_EXPORT void | gradgradU (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Second order covariant derivatives of a contravariant vector. More... | |
GLOBAL_MAPPING_EXPORT void | CurlCurlField (Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const bool generalized) |
CurlCurl calculated on the whole field. More... | |
GLOBAL_MAPPING_EXPORT bool | IsTimeDependent () |
Get flag defining if mapping is time-dependent. More... | |
GLOBAL_MAPPING_EXPORT void | SetTimeDependent (const bool value) |
Set flag defining if mapping is time-dependent. More... | |
GLOBAL_MAPPING_EXPORT bool | IsFromFunction () |
Get flag defining if mapping is defined by a function. More... | |
GLOBAL_MAPPING_EXPORT void | SetFromFunction (const bool value) |
Set flag defining if mapping is defined by a function. More... | |
GLOBAL_MAPPING_EXPORT bool | HasConstantJacobian () |
Get flag defining if mapping has constant Jacobian. More... | |
GLOBAL_MAPPING_EXPORT bool | IsDefined () |
Get flag determining if the mapping was defined or is trivial. More... | |
GLOBAL_MAPPING_EXPORT void | UpdateBCs (const NekDouble time) |
Update the Dirichlet Boundary Conditions when using Mappings. More... | |
GLOBAL_MAPPING_EXPORT void | UpdateMapping (const NekDouble time, const Array< OneD, Array< OneD, NekDouble > > &coords=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &coordsVel=NullNekDoubleArrayOfArray) |
Update the Mapping with new coordinates. More... | |
GLOBAL_MAPPING_EXPORT void | UpdateGeomInfo () |
Recompute the metric terms of the Mapping. More... | |
Static Public Member Functions | |
static GLOBAL_MAPPING_EXPORT MappingSharedPtr | Load (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields) |
Return a pointer to the mapping, creating it on first call. More... | |
Protected Attributes | |
LibUtilities::SessionReaderSharedPtr | m_session |
Session reader. More... | |
LibUtilities::FieldIOSharedPtr | m_fld |
Array< OneD, MultiRegions::ExpListSharedPtr > | m_fields |
Array< OneD, Array< OneD, NekDouble > > | m_coords |
Array with the Cartesian coordinates. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_coordsVel |
Array with the velocity of the coordinates. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_GeometricInfo |
Array with metric terms of the mapping. More... | |
int | m_nConvectiveFields |
Number of velocity components. More... | |
std::string | m_funcName |
Name of the function containing the coordinates. More... | |
std::string | m_velFuncName |
Name of the function containing the velocity of the coordinates. More... | |
bool | m_constantJacobian |
Flag defining if the Jacobian is constant. More... | |
bool | m_timeDependent |
Flag defining if the Mapping is time-dependent. More... | |
bool | m_fromFunction |
Flag defining if the Mapping is defined by a function. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_wk1 |
Array< OneD, Array< OneD, NekDouble > > | m_wk2 |
Array< OneD, Array< OneD, NekDouble > > | m_tmp |
Static Protected Attributes | |
static MappingSharedPtr | m_mappingPtr = MappingSharedPtr() |
static bool | m_init = false |
static bool | m_isDefined = false |
Base class for mapping to be applied to the coordinate system.
|
inlinevirtual |
|
protected |
Constructor.
Definition at line 55 of file Mapping.cpp.
References ASSERTL0, Nektar::LibUtilities::FieldIO::CreateDefault(), Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, m_fields, m_fld, and m_nConvectiveFields.
|
inline |
Apply the Christoffel symbols to a contravariant vector.
This function is used apply the Christoffel symbols \( \left( i,pk\right)\) to a contravariant vector \(u^p\), following the relation
\[ (out)^{i}_{k} = \left( i,pk\right)u^p \]
inarray | Contravariant vector \(u^p\) |
outarray | Result of applying Christoffel symbols to \(u^p\) |
Definition at line 209 of file Mapping.h.
References v_ApplyChristoffelContravar().
Referenced by v_gradgradU(), and v_VelocityLaplacian().
|
inline |
Apply the Christoffel symbols to a covariant vector.
This function is used apply the Christoffel symbols \( \left( p,ik\right)\) to a covariant vector \(u_p\), following the relation
\[ (out)_{ik} = \left( p,ik\right)u_p \]
inarray | Contravariant vector \(u_p\) |
outarray | Result of applying Christoffel symbols to \(u_p\) |
Definition at line 227 of file Mapping.h.
References v_ApplyChristoffelCovar().
Referenced by v_gradgradU().
void Nektar::GlobalMapping::Mapping::ContravarFromCartesian | ( | const Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Convert a contravariant vector to the transformed system.
This function converts a contravariant vector in Cartesian space \(\bar{v}^{i}\) to the corresponding \(v^{j}\) in transformed space using the relation
\[v^{j} = \frac{\partial x^j}{\partial \bar{x}^i}\bar{v}^{i}\]
inarray | Components of the vector in Cartesian space ( \(\bar{v}^{i}\)) |
outarray | Components of the vector in transformed space ( \(v^{j}\)) |
Definition at line 541 of file Mapping.cpp.
References m_fields, m_nConvectiveFields, m_tmp, v_ContravarFromCartesian(), and Vmath::Vcopy().
Referenced by v_UpdateBCs().
void Nektar::GlobalMapping::Mapping::ContravarToCartesian | ( | const Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Convert a contravariant vector to the Cartesian system.
This function converts a contravariant vector in transformed space \(v^{j}\) to the corresponding \(\bar{v}^{i}\) in Cartesian (physical) space using the relation
\[\bar{v}^{i} = \frac{\partial \bar{x}^i}{\partial x^j}v^{j}\]
inarray | Components of the vector in transformed space ( \(v^{j}\)) |
outarray | Components of the vector in Cartesian space ( \(\bar{v}^{i}\)) |
Definition at line 479 of file Mapping.cpp.
References m_fields, m_nConvectiveFields, m_tmp, v_ContravarToCartesian(), and Vmath::Vcopy().
void Nektar::GlobalMapping::Mapping::CovarFromCartesian | ( | const Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Convert a covariant vector to the transformed system.
This function converts a covariant vector in Cartesian space \(\bar{v}_{i}\) to the corresponding \(v_{j}\) in transformed space using the relation
\[\bar{v}_{j} = \frac{\partial \bar{x}^i}{\partial x^j}v_{i}\]
inarray | Components of the vector in Cartesian space ( \(\bar{v}_{i}\)) |
outarray | Components of the vector in transformed space ( \(v_{j}\)) |
Definition at line 572 of file Mapping.cpp.
References m_fields, m_nConvectiveFields, m_tmp, v_CovarFromCartesian(), and Vmath::Vcopy().
void Nektar::GlobalMapping::Mapping::CovarToCartesian | ( | const Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Convert a covariant vector to the Cartesian system.
This function converts a covariant vector in transformed space \(v_{j}\) to the corresponding \(\bar{v}_{i}\) in Cartesian (physical) space using the relation
\[\bar{v}_{i} = \frac{\partial x^j}{\partial \bar{x}^i}v_{j}\]
inarray | Components of the vector in transformed space ( \(v_{j}\)) |
outarray | Components of the vector in Cartesian space ( \(\bar{v}_{i}\)) |
Definition at line 510 of file Mapping.cpp.
References m_fields, m_nConvectiveFields, m_tmp, v_CovarToCartesian(), and Vmath::Vcopy().
|
inline |
CurlCurl calculated on the whole field.
This function can be used to compute both the generalised CurlCurl or the typical (Cartesian) CurlCurl, depending on the flag generalized
inarray | Contravariant vector \(u^i\) |
outarray | CurlCurl of \(u\) |
generalized | Flag defining if generalised or typical CurlCurl |
Definition at line 322 of file Mapping.h.
References v_CurlCurlField().
|
inline |
Calculate the generalised divergence operator.
This function is used to calculate the generalised divergence of a contravariant vector, defined as
\[ D = u^i_{,i} = \frac{1}{J}\frac{\partial(Ju^i)}{\partial x^i}\]
inarray | Contravariant vector \(u^i\) |
outarray | Divergence of \(u^i\) |
Definition at line 264 of file Mapping.h.
References v_Divergence().
|
inline |
Calculate the dot product with the gradient of the Jacobian.
This function calculates the dot product of an array against the gradient of the Jacobian of the Mapping.
inarray | Input array |
outarray | Output array |
Definition at line 167 of file Mapping.h.
References v_DotGradJacobian().
|
protected |
Definition at line 400 of file Mapping.cpp.
References ASSERTL0, Nektar::LibUtilities::FieldIO::CreateForFile(), Nektar::LibUtilities::eFunctionTypeExpression, Nektar::LibUtilities::eFunctionTypeFile, m_fields, and Vmath::Zero().
Referenced by v_InitObject(), and v_UpdateMapping().
|
protected |
Definition at line 382 of file Mapping.cpp.
References ASSERTL0.
|
inline |
Get the Cartesian coordinates in the field.
This function is used to obtain the Cartesian coordinates associated withthe Mapping
out0 | Coordinates in the x-direction |
out1 | Coordinates in the y-direction |
out2 | Coordinates in the z-direction |
Definition at line 133 of file Mapping.h.
References v_GetCartesianCoordinates().
Referenced by v_UpdateBCs().
|
inline |
Obtain the velocity of the coordinates.
This function is used to obtain the velocity of the coordinates associated with the Mapping
outarray | Velocity of the coordinates |
Definition at line 242 of file Mapping.h.
References v_GetCoordVelocity().
Referenced by v_UpdateBCs().
|
inline |
Get the inverse of metric tensor \(g^{ij}\).
Definition at line 182 of file Mapping.h.
References v_GetInvMetricTensor().
Referenced by Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), and v_RaiseIndex().
|
inline |
Get the Jacobian of the transformation.
This function is used to obtain the Jacobian of the Mapping.
outarray | Array containing the Jacobian |
Definition at line 153 of file Mapping.h.
References v_GetJacobian().
Referenced by v_Divergence(), v_DotGradJacobian(), and Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor().
|
inline |
Get the metric tensor \(g_{ij}\).
Definition at line 175 of file Mapping.h.
References v_GetMetricTensor().
Referenced by Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), and v_LowerIndex().
|
inline |
Second order covariant derivatives of a contravariant vector.
This function computes the second order covariant derivatives of a contravariant vector, resulting in \(u^{i}_{,jk}\)
inarray | Contravariant vector \(u^i\) |
outarray | Second order derivatives \(u^{i}_{,jk}\) |
Definition at line 304 of file Mapping.h.
References v_gradgradU().
Referenced by v_CurlCurlField().
|
inline |
Get flag defining if mapping has constant Jacobian.
Definition at line 360 of file Mapping.h.
References m_constantJacobian.
Referenced by v_DotGradJacobian().
|
inline |
Initialise the mapping object.
Definition at line 75 of file Mapping.h.
References v_InitObject().
Referenced by ReplaceField().
|
inline |
Get flag determining if the mapping was defined or is trivial.
Definition at line 366 of file Mapping.h.
References m_isDefined.
|
inline |
Get flag defining if mapping is defined by a function.
Definition at line 348 of file Mapping.h.
References m_fromFunction.
|
inline |
Get flag defining if mapping is time-dependent.
Definition at line 336 of file Mapping.h.
References m_timeDependent.
Referenced by v_UpdateBCs().
|
static |
Return a pointer to the mapping, creating it on first call.
This function is responsible for loading the Mapping, guaranteeing that a single instance of this class exists. When it is first called, it creates a Mapping and returns a pointer to it. On subsequent calls, it just returns the pointer.
pSession | Session reader object |
pFields | Fields which will be used by the Mapping |
Definition at line 266 of file Mapping.cpp.
References Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::GlobalMapping::GetMappingFactory(), Nektar::LibUtilities::SessionReader::GetXMLElementTimeLevel(), m_init, m_isDefined, and m_mappingPtr.
Referenced by Nektar::FieldUtils::ProcessMapping::GetMapping(), Nektar::MappingExtrapolate::MappingExtrapolate(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::SolverUtils::FilterAeroForces::v_Initialise(), Nektar::VCSMapping::v_InitObject(), Nektar::ForcingMovingBody::v_InitObject(), and Nektar::SolverUtils::EquationSystem::WriteFld().
void Nektar::GlobalMapping::Mapping::LowerIndex | ( | const Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Lower index of vector: \(v_{i} = g_{ij}*v^{j}\).
This function lowers the index of the contravariant vector \(v^{i}\), transforming it into its associated covariant vector \(v_{j}\) according to the relation
\[v_{j} = g_{ij}v^{i}\]
where \(g_{ij}\) is the metric tensor.
inarray | Components of the contravariant vector \(v^{i}\) |
outarray | Components of the covariant vector \(v_{j}\) |
Definition at line 603 of file Mapping.cpp.
References m_fields, m_nConvectiveFields, m_tmp, v_LowerIndex(), and Vmath::Vcopy().
void Nektar::GlobalMapping::Mapping::Output | ( | LibUtilities::FieldMetaDataMap & | fieldMetaDataMap, |
const std::string & | outname | ||
) |
Output function called when a chk or fld file is written.
This function should be called before writing a fld or chk file. It updates the metadata with information from the Mapping. Also, if the mapping is not defined by a function, it writes a .map file containing the coordinates and velocity of the coordinates.
fieldMetaDataMap | Metadata of the output file |
outname | Name of the output file |
Definition at line 304 of file Mapping.cpp.
References m_coords, m_coordsVel, m_fields, m_fld, m_fromFunction, m_funcName, m_isDefined, m_timeDependent, and m_velFuncName.
void Nektar::GlobalMapping::Mapping::RaiseIndex | ( | const Array< OneD, Array< OneD, NekDouble > > & | inarray, |
Array< OneD, Array< OneD, NekDouble > > & | outarray | ||
) |
Raise index of vector: \(v^{i} = g^{ij}*v_{j}\).
This function raises the index of the covariant vector \(v_{j}\), transforming it into its associated contravariant vector \(v^{i}\) according to the relation
\[v^{i} = g^{ij}v_{j}\]
where \(g^{ij}\) is the inverse of the metric tensor.
inarray | Components of the contravariant vector \(v^{i}\) |
outarray | Components of the covariant vector \(v_{j}\) |
Definition at line 633 of file Mapping.cpp.
References m_fields, m_nConvectiveFields, m_tmp, v_RaiseIndex(), and Vmath::Vcopy().
Referenced by v_CurlCurlField(), and v_VelocityLaplacian().
void Nektar::GlobalMapping::Mapping::ReplaceField | ( | const Array< OneD, MultiRegions::ExpListSharedPtr > & | pFields | ) |
Replace the Expansion List used by the mapping.
This function replaces the expansion list contained in m_fields, and then proceeds reinitialising the Mapping with this new field.
pFields | New field to be used by the Mapping |
Definition at line 241 of file Mapping.cpp.
References Nektar::LibUtilities::SessionReader::GetXMLElementTimeLevel(), InitObject(), m_fields, and m_session.
|
inline |
Set flag defining if mapping is defined by a function.
Definition at line 354 of file Mapping.h.
References m_fromFunction.
|
inline |
Set flag defining if mapping is time-dependent.
Definition at line 342 of file Mapping.h.
References m_timeDependent.
|
inline |
Update the Dirichlet Boundary Conditions when using Mappings.
Definition at line 376 of file Mapping.h.
References v_UpdateBCs().
|
inline |
Recompute the metric terms of the Mapping.
Definition at line 393 of file Mapping.h.
References v_UpdateGeomInfo().
Referenced by v_InitObject(), and v_UpdateMapping().
|
inline |
Update the Mapping with new coordinates.
Definition at line 382 of file Mapping.h.
References v_UpdateMapping().
|
protectedvirtual |
Definition at line 987 of file Mapping.cpp.
References gradgradU(), m_fields, m_nConvectiveFields, m_tmp, CellMLToNektar.cellml_metadata::p, RaiseIndex(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vsub().
Referenced by CurlCurlField().
|
protectedvirtual |
Definition at line 750 of file Mapping.cpp.
References Nektar::MultiRegions::DirCartesianMap, GetJacobian(), m_fields, m_nConvectiveFields, Vmath::Vadd(), Vmath::Vdiv(), Vmath::Vmul(), and Vmath::Zero().
Referenced by Divergence().
|
protectedvirtual |
Reimplemented in Nektar::GlobalMapping::MappingTranslation, Nektar::GlobalMapping::MappingXofXZ, Nektar::GlobalMapping::MappingXofZ, and Nektar::GlobalMapping::MappingXYofZ.
Definition at line 679 of file Mapping.cpp.
References Nektar::MultiRegions::DirCartesianMap, GetJacobian(), HasConstantJacobian(), m_fields, m_nConvectiveFields, and Vmath::Vvtvp().
Referenced by DotGradJacobian().
|
protectedvirtual |
Definition at line 653 of file Mapping.cpp.
References m_coords, m_fields, and Vmath::Vcopy().
Referenced by GetCartesianCoordinates().
|
protectedvirtual |
Definition at line 668 of file Mapping.cpp.
References m_coordsVel, m_fields, m_nConvectiveFields, and Vmath::Vcopy().
Referenced by GetCoordVelocity().
|
protectedpure virtual |
|
protectedvirtual |
Definition at line 879 of file Mapping.cpp.
References ApplyChristoffelContravar(), ApplyChristoffelCovar(), m_fields, m_nConvectiveFields, m_wk1, m_wk2, CellMLToNektar.cellml_metadata::p, Vmath::Vadd(), and Vmath::Vsub().
Referenced by gradgradU().
|
protectedvirtual |
This function initialises the Mapping object. It computes the coordinates and velocity coordinates, initialises the workspace variables, and calls UpdateGeomInfo, which will perform the calculations specific for each type of Mapping.
pFields | ExpList array used in the mapping |
pMapping | xml element describing the mapping |
Reimplemented in Nektar::GlobalMapping::MappingGeneral, Nektar::GlobalMapping::MappingTranslation, Nektar::GlobalMapping::MappingXofXZ, Nektar::GlobalMapping::MappingXofZ, Nektar::GlobalMapping::MappingXYofXY, and Nektar::GlobalMapping::MappingXYofZ.
Definition at line 97 of file Mapping.cpp.
References ASSERTL0, Nektar::MultiRegions::e3DH1D, EvaluateFunction(), m_coords, m_coordsVel, m_fields, m_fromFunction, m_funcName, m_nConvectiveFields, m_session, m_timeDependent, m_tmp, m_velFuncName, m_wk1, m_wk2, UpdateGeomInfo(), Vmath::Vcopy(), and Vmath::Zero().
Referenced by InitObject(), Nektar::GlobalMapping::MappingGeneral::v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), Nektar::GlobalMapping::MappingXofXZ::v_InitObject(), Nektar::GlobalMapping::MappingXofZ::v_InitObject(), Nektar::GlobalMapping::MappingXYofXY::v_InitObject(), and Nektar::GlobalMapping::MappingXYofZ::v_InitObject().
|
protectedvirtual |
Reimplemented in Nektar::GlobalMapping::MappingTranslation, Nektar::GlobalMapping::MappingXofXZ, and Nektar::GlobalMapping::MappingXofZ.
Definition at line 708 of file Mapping.cpp.
References GetMetricTensor(), m_fields, m_nConvectiveFields, and Vmath::Vvtvp().
Referenced by LowerIndex().
|
protectedvirtual |
Reimplemented in Nektar::GlobalMapping::MappingTranslation, Nektar::GlobalMapping::MappingXofXZ, and Nektar::GlobalMapping::MappingXofZ.
Definition at line 729 of file Mapping.cpp.
References GetInvMetricTensor(), m_fields, m_nConvectiveFields, and Vmath::Vvtvp().
Referenced by RaiseIndex().
Definition at line 1049 of file Mapping.cpp.
References ASSERTL0, ContravarFromCartesian(), Nektar::MultiRegions::e3DH1D, Nektar::SpatialDomains::eDirichlet, Nektar::LibUtilities::Equation::Evaluate(), GetCartesianCoordinates(), GetCoordVelocity(), IsTimeDependent(), m_fields, m_nConvectiveFields, Vmath::Vadd(), and Vmath::Vcopy().
Referenced by UpdateBCs().
|
protectedpure virtual |
|
protectedvirtual |
Definition at line 1207 of file Mapping.cpp.
References ASSERTL0, Nektar::MultiRegions::e3DH1D, EvaluateFunction(), m_coords, m_coordsVel, m_fields, m_fromFunction, m_funcName, m_nConvectiveFields, m_session, m_velFuncName, UpdateGeomInfo(), and Vmath::Vcopy().
Referenced by UpdateMapping().
|
protectedvirtual |
Definition at line 778 of file Mapping.cpp.
References ApplyChristoffelContravar(), Nektar::MultiRegions::DirCartesianMap, m_fields, m_nConvectiveFields, m_tmp, m_wk1, m_wk2, CellMLToNektar.cellml_metadata::p, RaiseIndex(), Vmath::Smul(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vsub().
Referenced by VelocityLaplacian().
|
inline |
Generalised (correction to the) velocity Laplacian operator.
This function is used to calculate a correction defined as the difference between the generalised Laplacian and the original Laplacian multiplied by a constant \(\alpha\), resulting in
\[ L^i = g^{jk}u^{i}_{,jk} - \alpha \frac{\partial^2 x^i} {\partial x^j \partial x^j}\]
By default, \(\alpha\) is zero, resulting in the generalised Laplacian.
inarray | Contravariant vector \(u^i\) |
outarray | Result of the operation |
alpha | The constant \(\alpha\) |
Definition at line 287 of file Mapping.h.
References v_VelocityLaplacian().
|
protected |
Flag defining if the Jacobian is constant.
Definition at line 421 of file Mapping.h.
Referenced by HasConstantJacobian(), Nektar::GlobalMapping::MappingGeneral::v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), Nektar::GlobalMapping::MappingXofXZ::v_InitObject(), Nektar::GlobalMapping::MappingXofZ::v_InitObject(), Nektar::GlobalMapping::MappingXYofXY::v_InitObject(), and Nektar::GlobalMapping::MappingXYofZ::v_InitObject().
Array with the Cartesian coordinates.
Definition at line 406 of file Mapping.h.
Referenced by Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Output(), v_GetCartesianCoordinates(), v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), Nektar::GlobalMapping::MappingXofXZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXofZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofXY::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofZ::v_UpdateGeomInfo(), and v_UpdateMapping().
Array with the velocity of the coordinates.
Definition at line 408 of file Mapping.h.
Referenced by Output(), v_GetCoordVelocity(), v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), and v_UpdateMapping().
|
protected |
Definition at line 404 of file Mapping.h.
Referenced by Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateMetricTensor(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), ContravarFromCartesian(), ContravarToCartesian(), CovarFromCartesian(), CovarToCartesian(), EvaluateFunction(), LowerIndex(), Mapping(), Output(), RaiseIndex(), ReplaceField(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingTranslation::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingTranslation::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingGeneral::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), v_CurlCurlField(), v_Divergence(), v_DotGradJacobian(), Nektar::GlobalMapping::MappingTranslation::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXofXZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXofZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXYofZ::v_DotGradJacobian(), v_GetCartesianCoordinates(), v_GetCoordVelocity(), Nektar::GlobalMapping::MappingGeneral::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingTranslation::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingGeneral::v_GetJacobian(), Nektar::GlobalMapping::MappingTranslation::v_GetJacobian(), Nektar::GlobalMapping::MappingXofXZ::v_GetJacobian(), Nektar::GlobalMapping::MappingXofZ::v_GetJacobian(), Nektar::GlobalMapping::MappingXYofXY::v_GetJacobian(), Nektar::GlobalMapping::MappingXYofZ::v_GetJacobian(), Nektar::GlobalMapping::MappingGeneral::v_GetMetricTensor(), Nektar::GlobalMapping::MappingTranslation::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), v_gradgradU(), v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), v_LowerIndex(), Nektar::GlobalMapping::MappingTranslation::v_LowerIndex(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), v_RaiseIndex(), Nektar::GlobalMapping::MappingTranslation::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), v_UpdateBCs(), Nektar::GlobalMapping::MappingXofXZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXofZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofXY::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofZ::v_UpdateGeomInfo(), v_UpdateMapping(), and v_VelocityLaplacian().
|
protected |
|
protected |
Flag defining if the Mapping is defined by a function.
Definition at line 425 of file Mapping.h.
Referenced by IsFromFunction(), Output(), SetFromFunction(), v_InitObject(), and v_UpdateMapping().
|
protected |
Name of the function containing the coordinates.
Definition at line 415 of file Mapping.h.
Referenced by Output(), v_InitObject(), and v_UpdateMapping().
Array with metric terms of the mapping.
Definition at line 410 of file Mapping.h.
Referenced by Nektar::GlobalMapping::MappingXYofXY::CalculateMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetJacobian(), Nektar::GlobalMapping::MappingXYofXY::v_GetJacobian(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXofZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofXY::v_UpdateGeomInfo(), and Nektar::GlobalMapping::MappingXYofZ::v_UpdateGeomInfo().
|
staticprotected |
|
staticprotected |
Definition at line 430 of file Mapping.h.
Referenced by IsDefined(), Load(), and Output().
|
staticprotected |
|
protected |
Number of velocity components.
Definition at line 412 of file Mapping.h.
Referenced by Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), ContravarFromCartesian(), ContravarToCartesian(), CovarFromCartesian(), CovarToCartesian(), LowerIndex(), Mapping(), RaiseIndex(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingTranslation::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingTranslation::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingGeneral::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), v_CurlCurlField(), v_Divergence(), v_DotGradJacobian(), v_GetCoordVelocity(), Nektar::GlobalMapping::MappingGeneral::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingTranslation::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingGeneral::v_GetMetricTensor(), Nektar::GlobalMapping::MappingTranslation::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), v_gradgradU(), v_InitObject(), Nektar::GlobalMapping::MappingGeneral::v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), Nektar::GlobalMapping::MappingXofXZ::v_InitObject(), Nektar::GlobalMapping::MappingXofZ::v_InitObject(), Nektar::GlobalMapping::MappingXYofXY::v_InitObject(), Nektar::GlobalMapping::MappingXYofZ::v_InitObject(), v_LowerIndex(), Nektar::GlobalMapping::MappingTranslation::v_LowerIndex(), v_RaiseIndex(), Nektar::GlobalMapping::MappingTranslation::v_RaiseIndex(), v_UpdateBCs(), v_UpdateMapping(), and v_VelocityLaplacian().
|
protected |
Session reader.
Definition at line 400 of file Mapping.h.
Referenced by ReplaceField(), v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), and v_UpdateMapping().
|
protected |
Flag defining if the Mapping is time-dependent.
Definition at line 423 of file Mapping.h.
Referenced by IsTimeDependent(), Output(), SetTimeDependent(), v_InitObject(), and Nektar::GlobalMapping::MappingTranslation::v_InitObject().
Definition at line 435 of file Mapping.h.
Referenced by ContravarFromCartesian(), ContravarToCartesian(), CovarFromCartesian(), CovarToCartesian(), LowerIndex(), RaiseIndex(), v_CurlCurlField(), v_InitObject(), Nektar::GlobalMapping::MappingTranslation::v_InitObject(), and v_VelocityLaplacian().
|
protected |
Name of the function containing the velocity of the coordinates.
Definition at line 417 of file Mapping.h.
Referenced by Output(), v_InitObject(), and v_UpdateMapping().
Definition at line 433 of file Mapping.h.
Referenced by v_gradgradU(), v_InitObject(), and v_VelocityLaplacian().
Definition at line 434 of file Mapping.h.
Referenced by v_gradgradU(), v_InitObject(), and v_VelocityLaplacian().