68 const TiXmlElement *pMapping)
75 "Mapping X = x + f(z) needs 3 velocity components.");
82 int physTot =
m_fields[0]->GetTotPoints();
87 Vmath::Vadd(physTot, wk, 1, inarray[0], 1, outarray[0], 1);
100 int physTot =
m_fields[0]->GetTotPoints();
111 Vmath::Vsub(physTot, inarray[2], 1, wk, 1, outarray[2], 1);
118 int physTot =
m_fields[0]->GetTotPoints();
123 Vmath::Vsub(physTot, inarray[0], 1, wk, 1, outarray[0], 1);
136 int physTot =
m_fields[0]->GetTotPoints();
146 Vmath::Vadd(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
151 int physTot =
m_fields[0]->GetTotPoints();
159 int physTot =
m_fields[0]->GetTotPoints();
167 int physTot =
m_fields[0]->GetTotPoints();
170 for (
int i = 0; i < nvel * nvel; i++)
175 for (
int i = 0; i < nvel; i++)
177 Vmath::Sadd(physTot, 1.0, outarray[i + nvel * i], 1,
178 outarray[i + nvel * i], 1);
187 outarray[2 * nvel + 2], 1);
193 int physTot =
m_fields[0]->GetTotPoints();
197 for (
int i = 0; i < nvel * nvel; i++)
202 for (
int i = 0; i < nvel; i++)
204 Vmath::Sadd(physTot, 1.0, outarray[i + nvel * i], 1,
205 outarray[i + nvel * i], 1);
211 Vmath::Vcopy(physTot, wk, 1, outarray[0 * nvel + 2], 1);
212 Vmath::Vcopy(physTot, wk, 1, outarray[2 * nvel + 0], 1);
216 outarray[0 * nvel + 0], 1);
223 int physTot =
m_fields[0]->GetTotPoints();
232 Vmath::Vadd(physTot, outarray[0], 1, inarray[0], 1, outarray[0], 1);
240 Vmath::Vadd(physTot, wk, 1, outarray[2], 1, outarray[2], 1);
247 int physTot =
m_fields[0]->GetTotPoints();
255 Vmath::Vsub(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
263 Vmath::Vsub(physTot, wk, 1, outarray[0], 1, outarray[0], 1);
270 int physTot =
m_fields[0]->GetTotPoints();
273 for (
int i = 0; i < nvel; i++)
275 for (
int j = 0; j < nvel; j++)
285 outarray[0 * nvel + 2], 1);
292 int physTot =
m_fields[0]->GetTotPoints();
295 for (
int i = 0; i < nvel; i++)
297 for (
int j = 0; j < nvel; j++)
307 outarray[2 * nvel + 2], 1);
312 int phystot =
m_fields[0]->GetTotPoints();
320 bool waveSpace =
m_fields[0]->GetWaveSpace();
331 m_fields[0]->SetWaveSpace(waveSpace);
#define ASSERTL0(condition, msg)
Base class for mapping to be applied to the coordinate system.
int m_nConvectiveFields
Number of velocity components.
Array< OneD, Array< OneD, NekDouble > > m_GeometricInfo
Array with metric terms of the mapping.
Array< OneD, Array< OneD, NekDouble > > m_coords
Array with the Cartesian coordinates.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
bool m_constantJacobian
Flag defining if the Jacobian is constant.
GLOBAL_MAPPING_EXPORT void v_GetMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray) override
MappingXofZ(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
GLOBAL_MAPPING_EXPORT void v_RaiseIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_CovarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
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.
static std::string className
Name of the class.
GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override
GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_LowerIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping) override
GLOBAL_MAPPING_EXPORT void v_DotGradJacobian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray) override
GLOBAL_MAPPING_EXPORT void v_GetJacobian(Array< OneD, NekDouble > &outarray) override
GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
MultiRegions::Direction const DirCartesianMap[]
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Neg(int n, T *x, const int incx)
Negate x = -x.
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.