41 namespace GlobalMapping
71 const TiXmlElement *pMapping)
78 "Mapping X = X(x,z) needs 3 velocity components.");
85 int physTot =
m_fields[0]->GetTotPoints();
91 outarray[0], 1, outarray[0],1);
104 int physTot =
m_fields[0]->GetTotPoints();
118 Vmath::Vsub(physTot, inarray[2], 1, wk, 1, outarray[2], 1);
125 int physTot =
m_fields[0]->GetTotPoints();
134 Vmath::Vsub(physTot, outarray[0], 1, wk, 1, outarray[0], 1);
147 int physTot =
m_fields[0]->GetTotPoints();
158 inarray[0], 1, outarray[2], 1);
159 Vmath::Vadd(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
165 int physTot =
m_fields[0]->GetTotPoints();
173 int physTot =
m_fields[0]->GetTotPoints();
177 outarray, 1, outarray,1);
183 int physTot =
m_fields[0]->GetTotPoints();
187 for (
int i=0; i<nvel*nvel; i++)
192 for (
int i=1; i<nvel; i++)
195 outarray[i+nvel*i], 1);
212 outarray[2*nvel+2], 1);
218 int physTot =
m_fields[0]->GetTotPoints();
222 for (
int i=0; i<nvel*nvel; i++)
227 for (
int i=0; i<nvel; i++)
230 outarray[i+nvel*i], 1);
244 outarray[0*nvel+0], 1);
249 outarray[0*nvel+0], 1);
256 int physTot =
m_fields[0]->GetTotPoints();
262 Vmath::Vmul(physTot, wk, 1, inarray[2], 1, outarray[0], 1);
263 Vmath::Vmul(physTot, wk, 1, inarray[0], 1, outarray[2], 1);
269 Vmath::Vadd(physTot, outarray[0], 1, wk, 1, outarray[0], 1);
280 Vmath::Vadd(physTot, wk, 1, outarray[2],1, outarray[2], 1);
287 int physTot =
m_fields[0]->GetTotPoints();
294 Vmath::Vmul(physTot, wk, 1, inarray[0], 1, outarray[2], 1);
295 Vmath::Vsub(physTot, inarray[2], 1, outarray[2], 1, outarray[2], 1);
298 Vmath::Vmul(physTot, wk, 1, inarray[2], 1, outarray[0], 1);
306 Vmath::Vsub(physTot, wk, 1, outarray[0], 1, outarray[0], 1);
318 int physTot =
m_fields[0]->GetTotPoints();
322 for (
int i = 0; i< nvel; i++)
324 for (
int j = 0; j< nvel; j++)
334 Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+0],1);
336 Vmath::Vvtvp(physTot,wk,1,inarray[2],1,outarray[0*nvel+0],1,
337 outarray[0*nvel+0],1);
340 Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+2],1);
342 Vmath::Vvtvp(physTot,wk,1,inarray[2],1,outarray[0*nvel+2],1,
343 outarray[0*nvel+2],1);
351 int physTot =
m_fields[0]->GetTotPoints();
355 for (
int i = 0; i< nvel; i++)
357 for (
int j = 0; j< nvel; j++)
367 Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+0],1);
371 Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[0*nvel+2],1);
372 Vmath::Vcopy(physTot,outarray[0*nvel+2],1,outarray[2*nvel+0],1);
376 Vmath::Vmul(physTot,wk,1,inarray[0],1,outarray[2*nvel+2],1);
381 int phystot =
m_fields[0]->GetTotPoints();
389 bool waveSpace =
m_fields[0]->GetWaveSpace();
405 m_fields[0]->SetWaveSpace(waveSpace);
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)
virtual GLOBAL_MAPPING_EXPORT void v_LowerIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
virtual GLOBAL_MAPPING_EXPORT void v_GetJacobian(Array< OneD, NekDouble > &outarray)
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_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
static std::string className
Name of the class.
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
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.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
int m_nConvectiveFields
Number of velocity components.
virtual GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
virtual GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual GLOBAL_MAPPING_EXPORT void v_RaiseIndex(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_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_ContravarToCartesian(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.
virtual GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
MappingXofXZ(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
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.
MultiRegions::Direction const DirCartesianMap[]
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_DotGradJacobian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray)
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.
virtual GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo()
virtual GLOBAL_MAPPING_EXPORT void v_CovarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.