40 namespace GlobalMapping
51 Loki::NoDestroy > Type;
52 return Type::Instance();
57 : m_session(pSession), m_fields(pFields)
82 ASSERTL0(0,
"Dimension not supported");
87 (pSession->GetComm());
100 const TiXmlElement *pMapping)
102 int phystot =
m_fields[0]->GetTotPoints();
108 for (
int i = 0; i < 3; i++)
116 const TiXmlElement* timeDep = pMapping->
117 FirstChildElement(
"TIMEDEPENDENT");
120 string sTimeDep = timeDep->GetText();
122 ( boost::iequals(sTimeDep,
"yes"));
130 string fieldNames[3] = {
"x",
"y",
"z"};
131 const TiXmlElement* funcNameElmt = pMapping->FirstChildElement(
"COORDS");
136 "Function '" +
m_funcName +
"' not defined.");
139 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
141 std::string s_FieldStr;
144 for(
int i = 0; i < 3; i++)
146 s_FieldStr = fieldNames[i];
154 "3DH1D does not support mapping in the z-direction.");
166 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
167 for(
int i = 0; i < 3; i++)
178 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
179 const TiXmlElement* velFuncNameElmt = pMapping->FirstChildElement(
"VEL");
186 std::string s_FieldStr;
189 for(
int i = 0; i < 3; i++)
191 s_FieldStr = velFieldNames[i];
199 "3DH1D does not support mapping in the z-direction.");
211 for(
int i = 0; i < 3; i++)
222 for (
int i=0; i< nvel; i++)
225 for (
int j=0; j< nvel; j++)
246 TiXmlElement* vMapping = NULL;
248 if (
m_session->DefinesElement(
"Nektar/Mapping"))
250 vMapping =
m_session->GetElement(
"Nektar/Mapping");
270 TiXmlElement* vMapping = NULL;
272 if (pSession->DefinesElement(
"Nektar/Mapping"))
274 vMapping = pSession->GetElement(
"Nektar/Mapping");
275 vType = vMapping->Attribute(
"TYPE");
280 vType =
"Translation";
284 vType, pSession, pFields,
303 const std::string &outname)
308 fieldMetaDataMap[
"MappingCartesianVel"] = std::string(
"False");
312 fieldMetaDataMap[
"MappingType"] = std::string(
"Expression");
313 fieldMetaDataMap[
"MappingExpression"] =
m_funcName;
321 int expdim =
m_fields[0]->GetGraph()->GetMeshDimension();
322 string fieldNames[3] = {
"x",
"y",
"z"};
323 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
325 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
326 =
m_fields[0]->GetFieldDefinitions();
327 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
329 int ncoeffs =
m_fields[0]->GetNcoeffs();
332 bool wavespace =
m_fields[0]->GetWaveSpace();
335 for(
int j = 0; j < expdim; ++j)
339 for(
int i = 0; i < FieldDef.size(); ++i)
342 FieldDef[i]->m_fields.push_back(fieldNames[j]);
343 m_fields[0]->AppendFieldData(FieldDef[i], FieldData[i],
350 for(
int j = 0; j < expdim; ++j)
355 for(
int i = 0; i < FieldDef.size(); ++i)
358 FieldDef[i]->m_fields.push_back(velFieldNames[j]);
359 m_fields[0]->AppendFieldData(FieldDef[i],
366 std::string outfile = outname;
367 outfile.erase(outfile.end()-4, outfile.end());
370 m_fld->Write(outfile,FieldDef,FieldData,fieldMetaDataMap);
373 fieldMetaDataMap[
"MappingType"] = std::string(
"File");
374 fieldMetaDataMap[
"FileName"] = outfile;
376 m_fields[0]->SetWaveSpace(wavespace);
383 std::string pFieldName,
385 const std::string& pFunctionName,
388 ASSERTL0(pSession->DefinesFunction(pFunctionName),
389 "Function '" + pFunctionName +
"' does not exist.");
392 pSession->GetFunction(pFunctionName, pFieldName);
398 ffunc->Evaluate(x0, x1, x2, pTime, pArray);
405 std::string pFieldName,
407 const std::string& pFunctionName,
410 ASSERTL0(pSession->DefinesFunction(pFunctionName),
411 "Function '" + pFunctionName +
"' does not exist.");
413 unsigned int nq = pFields[0]->GetNpoints();
414 if (pArray.num_elements() != nq)
420 vType = pSession->GetFunctionType(pFunctionName, pFieldName);
427 pFields[0]->GetCoords(x0, x1, x2);
429 pSession->GetFunction(pFunctionName, pFieldName);
431 ffunc->Evaluate(x0, x1, x2, pTime, pArray);
435 std::string filename = pSession->GetFunctionFilename(
439 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
440 std::vector<std::vector<NekDouble> > FieldData;
447 fld->Import(filename, FieldDef, FieldData);
450 for (
int i = 0; i < FieldDef.size(); ++i)
452 for (
int j = 0; j < FieldDef[i]->m_fields.size(); ++j)
454 if (FieldDef[i]->
m_fields[j] == pFieldName)
462 pFields[0]->ExtractDataToCoeffs(
470 cout <<
"Field " + pFieldName +
" not found." << endl;
473 pFields[0]->BwdTrans_IterPerExp(vCoeffs, pArray);
490 if(inarray == outarray)
492 int physTot =
m_fields[0]->GetTotPoints();
495 for (
int i=0; i< nvel; i++)
520 if(inarray == outarray)
522 int physTot =
m_fields[0]->GetTotPoints();
525 for (
int i=0; i< nvel; i++)
550 if(inarray == outarray)
552 int physTot =
m_fields[0]->GetTotPoints();
555 for (
int i=0; i< nvel; i++)
580 if(inarray == outarray)
582 int physTot =
m_fields[0]->GetTotPoints();
585 for (
int i=0; i< nvel; i++)
611 if(inarray == outarray)
613 int physTot =
m_fields[0]->GetTotPoints();
616 for (
int i=0; i< nvel; i++)
642 if(inarray == outarray)
644 int physTot =
m_fields[0]->GetTotPoints();
647 for (
int i=0; i< nvel; i++)
664 int physTot =
m_fields[0]->GetTotPoints();
678 int physTot =
m_fields[0]->GetTotPoints();
691 int physTot =
m_fields[0]->GetTotPoints();
697 bool wavespace =
m_fields[0]->GetWaveSpace();
711 outarray, 1, outarray, 1);
713 m_fields[0]->SetWaveSpace(wavespace);
721 int physTot =
m_fields[0]->GetTotPoints();
728 for (
int i=0; i< nvel; i++)
731 for (
int j=0; j< nvel; j++)
744 int physTot =
m_fields[0]->GetTotPoints();
751 for (
int i=0; i< nvel; i++)
754 for (
int j=0; j< nvel; j++)
767 int physTot =
m_fields[0]->GetTotPoints();
773 bool wavespace =
m_fields[0]->GetWaveSpace();
785 Vmath::Vadd(physTot, wk, 1, outarray, 1, outarray, 1);
789 m_fields[0]->SetWaveSpace(wavespace);
797 int physTot =
m_fields[0]->GetTotPoints();
803 bool wavespace =
m_fields[0]->GetWaveSpace();
808 for (
int i=0; i< nvel; i++)
823 for (
int k=0; k< nvel; k++)
830 for (
int i=0; i< nvel; i++)
832 for (
int k=0; k< nvel; k++)
834 tmp[k] =
m_wk1[i*nvel+k];
837 for (
int j=0; j<nvel; j++)
848 for (
int i=0; i< nvel; i++)
851 for (
int j=0; j< nvel; j++)
866 for (
int i=0; i< nvel; i++)
868 for (
int p=0; p< nvel; p++)
870 tmp[p] =
m_wk1[i*nvel+p];
873 for (
int j=0; j< nvel; j++)
881 for (
int j=0; j< nvel; j++)
883 for (
int p=0; p< nvel; p++)
885 tmp[p] =
m_wk1[p*nvel+j];
888 for (
int i=0; i< nvel; i++)
896 m_fields[0]->SetWaveSpace(wavespace);
903 int physTot =
m_fields[0]->GetTotPoints();
909 for (
int i=0; i< nvel*nvel*nvel; i++)
915 bool wavespace =
m_fields[0]->GetWaveSpace();
920 for (
int i=0; i< nvel; i++)
935 for (
int j=0; j< nvel; j++)
947 for (
int i=0; i< nvel; i++)
949 for (
int j=0; j< nvel; j++)
954 outarray[i*nvel*nvel+j*nvel+0],
955 outarray[i*nvel*nvel+j*nvel+1]);
960 outarray[i*nvel*nvel+j*nvel+0],
961 outarray[i*nvel*nvel+j*nvel+1],
962 outarray[i*nvel*nvel+j*nvel+2]);
968 for (
int i=0; i< nvel; i++)
970 for (
int p=0; p< nvel; p++)
972 tmp[p] =
m_wk1[i*nvel+p];
975 for (
int j=0; j< nvel; j++)
977 for (
int k=0; k< nvel; k++)
979 Vmath::Vsub(physTot,outarray[i*nvel*nvel+j*nvel+k],1,
981 outarray[i*nvel*nvel+j*nvel+k], 1);
987 for (
int j=0; j< nvel; j++)
989 for (
int p=0; p< nvel; p++)
991 tmp[p] =
m_wk1[p*nvel+j];
994 for (
int i=0; i< nvel; i++)
996 for (
int k=0; k< nvel; k++)
998 Vmath::Vadd(physTot,outarray[i*nvel*nvel+j*nvel+k],1,
1000 outarray[i*nvel*nvel+j*nvel+k], 1);
1006 m_fields[0]->SetWaveSpace(wavespace);
1012 const bool generalized)
1014 int physTot =
m_fields[0]->GetTotPoints();
1018 bool wavespace =
m_fields[0]->GetWaveSpace();
1031 for (
int i = 0; i < nvel; ++i)
1033 for (
int k = 0; k < nvel; ++k)
1036 for (
int j = 0; j < nvel; ++j)
1038 tmp[j] = ddU[i*nvel*nvel+j*nvel+k];
1041 for (
int p=0; p<nvel; ++p)
1044 ddU[i*nvel*nvel+p*nvel+k], 1);
1049 for (
int i = 0; i < nvel; ++i)
1052 for (
int k = 0; k < nvel; ++k)
1055 ddU[k*nvel*nvel+i*nvel+k], 1,
1058 ddU[i*nvel*nvel+k*nvel+k], 1,
1080 m_fields[0]->PhysDeriv(Dummy,outarray[1],outarray[0]);
1082 Vmath::Smul(physTot, -1.0, outarray[1], 1, outarray[1], 1);
1131 Vmath::Vsub(physTot, Dummy1, 1, Dummy2, 1, outarray[0], 1);
1148 Vmath::Vsub(physTot, Dummy1, 1, Dummy2, 1, outarray[1], 1);
1165 Vmath::Vsub(physTot, Dummy1, 1, Dummy2, 1, outarray[2], 1);
1182 m_fields[0]->SetWaveSpace(wavespace);
1187 int physTot =
m_fields[0]->GetTotPoints();
1189 int nfields =
m_fields.num_elements();
1190 int nbnds =
m_fields[0]->GetBndConditions().num_elements();
1209 for (
int i=0; i < nfields; i++)
1217 for (
int i = 0; i< nvel; i++)
1230 for (
int dir=0; dir < 3; dir++)
1237 for(
int n = 0 ; n < nbnds ; ++n)
1240 for (
int i = 0; i < nfields; ++i)
1242 BndConds =
m_fields[i]->GetBndConditions();
1243 BndExp =
m_fields[i]->GetBndCondExpansions();
1244 if ( BndConds[n]->GetBoundaryConditionType() ==
1247 isDirichlet[i] =
true;
1252 for (
int j = 0; j < nvel; ++j)
1255 GetBoundaryConditionType() ==
1257 "Mapping only supported when all velocity components have the same type of boundary conditions");
1262 "Time-dependent Dirichlet boundary conditions not supported with mapping yet.");
1266 boost::static_pointer_cast<
1269 m_dirichletCondition;
1271 condition.
Evaluate(coords[0], coords[1], coords[2],
1276 isDirichlet[i] =
false;
1280 if ( isDirichlet[0])
1282 for (
int i = 0; i < nvel; ++i)
1287 for (
int i = 0; i < nvel; ++i)
1294 for (
int i = 0; i < nfields; ++i)
1296 BndConds =
m_fields[i]->GetBndConditions();
1297 BndExp =
m_fields[i]->GetBndCondExpansions();
1302 for(
int m = 0 ; m < nbnds; ++m)
1304 int exp_size = BndExp[m]->GetExpSize();
1305 if (m==n && isDirichlet[i])
1307 for (
int j = 0; j < exp_size; ++j, cnt++)
1309 m_fields[i]->GetBoundaryToElmtMap(BCtoElmtID,
1312 Bc = boost::dynamic_pointer_cast<
1314 (BndExp[n]->GetExp(j));
1316 elmt =
m_fields[i]->GetExp(BCtoElmtID[cnt]);
1318 ElmtVal = values[i] +
1322 elmt->GetTracePhysVals(BCtoTraceID[cnt],
1323 Bc, ElmtVal, BndVal);
1326 Vals = BndExp[n]->UpdatePhys()
1327 + BndExp[n]->GetPhys_Offset(j);
1331 BndVal, 1, Vals, 1);
1335 BndConds[n]->GetUserDefined() ==
1339 coordVelElmt = coordVel[i] +
1344 elmt->GetTracePhysVals(
1345 BCtoTraceID[cnt], Bc,
1346 coordVelElmt, coordVelBnd);
1364 for (
int i = 0; i <
m_fields.num_elements(); ++i)
1367 BndConds =
m_fields[i]->GetBndConditions();
1368 BndExp =
m_fields[i]->GetBndCondExpansions();
1369 for(
int n = 0 ; n < BndConds.num_elements(); ++n)
1371 if ( BndConds[n]->GetBoundaryConditionType() ==
1374 BndExp[n]->FwdTrans_BndConstrained(BndExp[n]->GetPhys(),
1375 BndExp[n]->UpdateCoeffs());
1378 BndExp[n]->HomogeneousFwdTrans(BndExp[n]->GetCoeffs(),
1379 BndExp[n]->UpdateCoeffs());
1393 std::string s_FieldStr;
1394 string fieldNames[3] = {
"x",
"y",
"z"};
1395 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
1399 for(
int i = 0; i < 3; i++)
1401 s_FieldStr = fieldNames[i];
1409 "3DH1D does not support mapping in the z-direction.");
1412 s_FieldStr = velFieldNames[i];
1420 "3DH1D does not support mapping in the z-direction.");
1427 int physTot =
m_fields[0]->GetTotPoints();
1430 for(
int i = 0; i < 3; i++)
1435 for(
int i = 0; i < nvel; i++)
static MappingSharedPtr m_mappingPtr
GLOBAL_MAPPING_EXPORT void InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
Initialise the mapping object.
virtual GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)=0
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_VelocityLaplacian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble alpha)
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.
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
GLOBAL_MAPPING_EXPORT void GetMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
Get the metric tensor .
virtual GLOBAL_MAPPING_EXPORT void v_GetCoordVelocity(Array< OneD, Array< OneD, NekDouble > > &outarray)
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.
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
Array< OneD, Array< OneD, NekDouble > > m_wk2
GLOBAL_MAPPING_EXPORT void GetCoordVelocity(Array< OneD, Array< OneD, NekDouble > > &outarray)
Obtain the velocity of the coordinates.
GLOBAL_MAPPING_EXPORT void GetCartesianCoordinates(Array< OneD, NekDouble > &out0, Array< OneD, NekDouble > &out1, Array< OneD, NekDouble > &out2)
Get the Cartesian coordinates in the field.
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.
GLOBAL_MAPPING_EXPORT void GetJacobian(Array< OneD, NekDouble > &outarray)
Get the Jacobian of the transformation.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
int m_nConvectiveFields
Number of velocity components.
std::map< std::string, std::string > FieldMetaDataMap
GLOBAL_MAPPING_EXPORT void Output(LibUtilities::FieldMetaDataMap &fieldMetaDataMap, const std::string &outname)
Output function called when a chk or fld file is written.
GLOBAL_MAPPING_EXPORT void RaiseIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Raise index of vector: .
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)=0
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
The base class for all shapes.
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
bool m_timeDependent
Flag defining if the Mapping is time-dependent.
string m_velFuncName
Name of the function containing the velocity of the coordinates.
virtual GLOBAL_MAPPING_EXPORT void v_GetCartesianCoordinates(Array< OneD, NekDouble > &out0, Array< OneD, NekDouble > &out1, Array< OneD, NekDouble > &out2)
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.
NekDouble Evaluate() const
Array< OneD, Array< OneD, NekDouble > > m_coordsVel
Array with the velocity of the coordinates.
LibUtilities::FieldIOSharedPtr m_fld
GLOBAL_MAPPING_EXPORT bool HasConstantJacobian()
Get flag defining if mapping has constant Jacobian.
virtual GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)=0
virtual GLOBAL_MAPPING_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const TiXmlElement *pMapping)
boost::shared_ptr< FieldIO > FieldIOSharedPtr
virtual GLOBAL_MAPPING_EXPORT void v_CurlCurlField(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const bool generalized)
Array< OneD, Array< OneD, NekDouble > > m_tmp
virtual GLOBAL_MAPPING_EXPORT void v_gradgradU(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
GLOBAL_MAPPING_EXPORT typedef boost::shared_ptr< Mapping > MappingSharedPtr
A shared pointer to a Mapping object.
boost::shared_ptr< Equation > EquationSharedPtr
virtual GLOBAL_MAPPING_EXPORT void v_UpdateMapping(const NekDouble time, const Array< OneD, Array< OneD, NekDouble > > &coords=NullNekDoubleArrayofArray, const Array< OneD, Array< OneD, NekDouble > > &coordsVel=NullNekDoubleArrayofArray)
virtual GLOBAL_MAPPING_EXPORT void v_Divergence(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray)
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.
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[]
string m_funcName
Name of the function containing the coordinates.
GLOBAL_MAPPING_EXPORT void EvaluateTimeFunction(LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
GLOBAL_MAPPING_EXPORT Mapping(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
Constructor.
LibUtilities::NekFactory< std::string, Mapping, const LibUtilities::SessionReaderSharedPtr &, const Array< OneD, MultiRegions::ExpListSharedPtr > &, const TiXmlElement * > MappingFactory
Declaration of the mapping factory.
GLOBAL_MAPPING_EXPORT void EvaluateFunction(Array< OneD, MultiRegions::ExpListSharedPtr > pFields, LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
GLOBAL_MAPPING_EXPORT void LowerIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Lower index of vector: .
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.
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.
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.
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_LowerIndex(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
GLOBAL_MAPPING_EXPORT void ReplaceField(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
Replace the Expansion List used by the mapping.
virtual GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)=0
Array< OneD, Array< OneD, NekDouble > > m_wk1
void Zero(int n, T *x, const int incx)
Zero vector.
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
bool m_fromFunction
Flag defining if the Mapping is defined by a function.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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.
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.
GLOBAL_MAPPING_EXPORT bool IsTimeDependent()
Get flag defining if mapping is time-dependent.
Provides a generic Factory class.
GLOBAL_MAPPING_EXPORT void GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble > > &outarray)
Get the inverse of metric tensor .
GLOBAL_MAPPING_EXPORT void UpdateGeomInfo()
Recompute the metric terms of the Mapping.
virtual GLOBAL_MAPPING_EXPORT void v_UpdateBCs(const NekDouble time)