41 namespace GlobalMapping
72 const TiXmlElement *pMapping)
79 "Mapping X = x + f(z) needs 3 velocity components.");
87 int physTot =
m_fields[0]->GetTotPoints();
92 Vmath::Vadd(physTot, wk, 1, inarray[0], 1, outarray[0],1);
105 int physTot =
m_fields[0]->GetTotPoints();
116 Vmath::Vsub(physTot, inarray[2], 1, wk, 1, outarray[2], 1);
123 int physTot =
m_fields[0]->GetTotPoints();
128 Vmath::Vsub(physTot, inarray[0], 1, wk, 1, outarray[0], 1);
141 int physTot =
m_fields[0]->GetTotPoints();
151 inarray[0], 1, outarray[2], 1);
152 Vmath::Vadd(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
158 int physTot =
m_fields[0]->GetTotPoints();
166 int physTot =
m_fields[0]->GetTotPoints();
174 int physTot =
m_fields[0]->GetTotPoints();
177 for (
int i=0; i<nvel*nvel; i++)
182 for (
int i=0; i<nvel; i++)
185 outarray[i+nvel*i], 1);
194 outarray[2*nvel+2], 1);
200 int physTot =
m_fields[0]->GetTotPoints();
204 for (
int i=0; i<nvel*nvel; i++)
209 for (
int i=0; i<nvel; i++)
212 outarray[i+nvel*i], 1);
223 outarray[0*nvel+0], 1);
230 int physTot =
m_fields[0]->GetTotPoints();
239 Vmath::Vadd(physTot, outarray[0], 1, inarray[0], 1,
248 Vmath::Vadd(physTot, wk, 1, outarray[2],1, outarray[2], 1);
255 int physTot =
m_fields[0]->GetTotPoints();
263 Vmath::Vsub(physTot, inarray[2], 1, outarray[2], 1,
272 Vmath::Vsub(physTot, wk, 1, outarray[0], 1, outarray[0], 1);
279 int physTot =
m_fields[0]->GetTotPoints();
282 for (
int i = 0; i< nvel; i++)
284 for (
int j = 0; j< nvel; j++)
294 outarray[0*nvel+2],1);
302 int physTot =
m_fields[0]->GetTotPoints();
305 for (
int i = 0; i< nvel; i++)
307 for (
int j = 0; j< nvel; j++)
317 outarray[2*nvel+2],1);
322 int phystot =
m_fields[0]->GetTotPoints();
330 bool waveSpace =
m_fields[0]->GetWaveSpace();
341 m_fields[0]->SetWaveSpace(waveSpace);
virtual GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
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.
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.
#define ASSERTL0(condition, msg)
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
virtual GLOBAL_MAPPING_EXPORT void v_DotGradJacobian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_CovarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
static std::string className
Name of the class.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
int m_nConvectiveFields
Number of velocity components.
virtual GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
virtual GLOBAL_MAPPING_EXPORT void v_RaiseIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
MappingXofZ(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
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.
void Neg(int n, T *x, const int incx)
Negate x = -x.
virtual GLOBAL_MAPPING_EXPORT void v_LowerIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
Base class for mapping to be applied to the coordinate system.
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.
virtual GLOBAL_MAPPING_EXPORT void v_GetJacobian(Array< OneD, NekDouble > &outarray)
MultiRegions::Direction const DirCartesianMap[]
virtual GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_GetMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo()
void Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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 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.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.