Nektar++
|
#include <MappingXYofXY.h>
Static Public Member Functions | |
static GLOBAL_MAPPING_EXPORT MappingSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping) |
Creates an instance of this class. More... | |
Static Public Member Functions inherited from Nektar::GlobalMapping::Mapping | |
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... | |
Static Public Attributes | |
static std::string | className |
Name of the class. More... | |
Protected Attributes | |
Array< OneD, Array< OneD, NekDouble > > | m_metricTensor |
Array< OneD, Array< OneD, NekDouble > > | m_Christoffel |
Protected Attributes inherited from Nektar::GlobalMapping::Mapping | |
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 |
Friends | |
class | MemoryManager< MappingXYofXY > |
Additional Inherited Members | |
Public Member Functions inherited from Nektar::GlobalMapping::Mapping | |
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 . More... | |
GLOBAL_MAPPING_EXPORT void | GetInvMetricTensor (Array< OneD, Array< OneD, NekDouble > > &outarray) |
Get the inverse of metric tensor . More... | |
GLOBAL_MAPPING_EXPORT void | LowerIndex (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Lower index of vector: . More... | |
GLOBAL_MAPPING_EXPORT void | RaiseIndex (const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Raise index of vector: . 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 (const 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 Protected Attributes inherited from Nektar::GlobalMapping::Mapping | |
static MappingSharedPtr | m_mappingPtr = MappingSharedPtr() |
static bool | m_init = false |
static bool | m_isDefined = false |
This class implements a mapping defined by the transformation
where are the Cartesian (physical) coordinates and are the transformed (computational) coordinates.
Definition at line 52 of file MappingXYofXY.h.
|
protected |
Definition at line 58 of file MappingXYofXY.cpp.
|
protected |
Definition at line 421 of file MappingXYofXY.cpp.
References Nektar::MultiRegions::DirCartesianMap, Nektar::GlobalMapping::Mapping::GetInvMetricTensor(), Nektar::GlobalMapping::Mapping::GetMetricTensor(), m_Christoffel, Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Smul(), Vmath::Vadd(), Vmath::Vsub(), and Vmath::Vvtvp().
Referenced by v_UpdateGeomInfo().
|
protected |
Definition at line 392 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, m_metricTensor, Vmath::Vmul(), and Vmath::Vvtvp().
Referenced by v_UpdateGeomInfo().
|
inlinestatic |
Creates an instance of this class.
Definition at line 60 of file MappingXYofXY.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::GlobalMapping::MappingSharedPtr.
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 274 of file MappingXYofXY.cpp.
References m_Christoffel, Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Vmul(), and Vmath::Vvtvp().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 317 of file MappingXYofXY.cpp.
References m_Christoffel, Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Vmul(), and Vmath::Vvtvp().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 138 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Vcopy(), Vmath::Vdiv(), Vmath::Vmul(), and Vmath::Vvtvm().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 81 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Vcopy(), Vmath::Vmul(), and Vmath::Vvtvp().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 170 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Vcopy(), Vmath::Vmul(), and Vmath::Vvtvp().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 106 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Vcopy(), Vmath::Vdiv(), Vmath::Vmul(), and Vmath::Vvtvm().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 231 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::GetJacobian(), Nektar::GlobalMapping::Mapping::m_fields, m_metricTensor, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Neg(), Vmath::Sadd(), Vmath::Vcopy(), Vmath::Vdiv(), and Vmath::Vmul().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 195 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, and Vmath::Vabs().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 202 of file MappingXYofXY.cpp.
References Nektar::GlobalMapping::Mapping::m_fields, m_metricTensor, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, Vmath::Sadd(), and Vmath::Vcopy().
|
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 from Nektar::GlobalMapping::Mapping.
Definition at line 69 of file MappingXYofXY.cpp.
References ASSERTL0, Nektar::GlobalMapping::Mapping::m_constantJacobian, Nektar::GlobalMapping::Mapping::m_nConvectiveFields, and Nektar::GlobalMapping::Mapping::v_InitObject().
|
protectedvirtual |
Implements Nektar::GlobalMapping::Mapping.
Definition at line 359 of file MappingXYofXY.cpp.
References CalculateChristoffel(), CalculateMetricTensor(), Nektar::MultiRegions::DirCartesianMap, Nektar::GlobalMapping::Mapping::m_coords, Nektar::GlobalMapping::Mapping::m_fields, Nektar::GlobalMapping::Mapping::m_GeometricInfo, Vmath::Vmul(), and Vmath::Vvtvm().
|
friend |
Definition at line 56 of file MappingXYofXY.h.
|
static |
Name of the class.
Definition at line 73 of file MappingXYofXY.h.
Definition at line 83 of file MappingXYofXY.h.
Referenced by CalculateChristoffel(), v_ApplyChristoffelContravar(), and v_ApplyChristoffelCovar().
Definition at line 82 of file MappingXYofXY.h.
Referenced by CalculateMetricTensor(), v_GetInvMetricTensor(), and v_GetMetricTensor().