42 namespace GlobalMapping
46 bool Mapping::m_init =
false;
47 bool Mapping::m_isDefined =
false;
53 Loki::NoDestroy > Type;
54 return Type::Instance();
59 : m_session(pSession), m_fields(pFields)
84 ASSERTL0(0,
"Dimension not supported");
89 (pSession->GetComm());
102 const TiXmlElement *pMapping)
104 int phystot =
m_fields[0]->GetTotPoints();
110 for (
int i = 0; i < 3; i++)
118 const TiXmlElement* timeDep = pMapping->
119 FirstChildElement(
"TIMEDEPENDENT");
122 string sTimeDep = timeDep->GetText();
124 ( boost::iequals(sTimeDep,
"yes"));
132 string fieldNames[3] = {
"x",
"y",
"z"};
133 const TiXmlElement* funcNameElmt = pMapping->FirstChildElement(
"COORDS");
138 "Function '" +
m_funcName +
"' not defined.");
141 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
143 std::string s_FieldStr;
146 for(
int i = 0; i < 3; i++)
148 s_FieldStr = fieldNames[i];
156 "3DH1D does not support mapping in the z-direction.");
168 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
169 for(
int i = 0; i < 3; i++)
180 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
181 const TiXmlElement* velFuncNameElmt = pMapping->FirstChildElement(
"VEL");
188 std::string s_FieldStr;
191 for(
int i = 0; i < 3; i++)
193 s_FieldStr = velFieldNames[i];
201 "3DH1D does not support mapping in the z-direction.");
213 for(
int i = 0; i < 3; i++)
224 for (
int i=0; i< nvel; i++)
227 for (
int j=0; j< nvel; j++)
248 TiXmlElement* vMapping = NULL;
250 if (
m_session->DefinesElement(
"Nektar/Mapping"))
252 vMapping =
m_session->GetElement(
"Nektar/Mapping");
272 TiXmlElement* vMapping = NULL;
274 if (pSession->DefinesElement(
"Nektar/Mapping"))
276 vMapping = pSession->GetElement(
"Nektar/Mapping");
277 vType = vMapping->Attribute(
"TYPE");
282 vType =
"Translation";
286 vType, pSession, pFields,
305 const std::string &outname)
310 fieldMetaDataMap[
"MappingCartesianVel"] = std::string(
"False");
314 fieldMetaDataMap[
"MappingType"] = std::string(
"Expression");
315 fieldMetaDataMap[
"MappingExpression"] =
m_funcName;
323 int expdim =
m_fields[0]->GetGraph()->GetMeshDimension();
324 string fieldNames[3] = {
"x",
"y",
"z"};
325 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
327 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
328 =
m_fields[0]->GetFieldDefinitions();
329 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
331 int ncoeffs =
m_fields[0]->GetNcoeffs();
334 bool wavespace =
m_fields[0]->GetWaveSpace();
337 for(
int j = 0; j < expdim; ++j)
341 for(
int i = 0; i < FieldDef.size(); ++i)
344 FieldDef[i]->m_fields.push_back(fieldNames[j]);
345 m_fields[0]->AppendFieldData(FieldDef[i], FieldData[i],
352 for(
int j = 0; j < expdim; ++j)
357 for(
int i = 0; i < FieldDef.size(); ++i)
360 FieldDef[i]->m_fields.push_back(velFieldNames[j]);
361 m_fields[0]->AppendFieldData(FieldDef[i],
368 std::string outfile = outname;
369 outfile.erase(outfile.end()-4, outfile.end());
372 m_fld->Write(outfile,FieldDef,FieldData,fieldMetaDataMap);
375 fieldMetaDataMap[
"MappingType"] = std::string(
"File");
376 fieldMetaDataMap[
"FileName"] = outfile;
378 m_fields[0]->SetWaveSpace(wavespace);
385 std::string pFieldName,
387 const std::string& pFunctionName,
390 ASSERTL0(pSession->DefinesFunction(pFunctionName),
391 "Function '" + pFunctionName +
"' does not exist.");
394 pSession->GetFunction(pFunctionName, pFieldName);
400 ffunc->Evaluate(x0, x1, x2, pTime, pArray);
407 std::string pFieldName,
409 const std::string& pFunctionName,
412 ASSERTL0(pSession->DefinesFunction(pFunctionName),
413 "Function '" + pFunctionName +
"' does not exist.");
415 unsigned int nq = pFields[0]->GetNpoints();
416 if (pArray.num_elements() != nq)
422 vType = pSession->GetFunctionType(pFunctionName, pFieldName);
429 pFields[0]->GetCoords(x0, x1, x2);
431 pSession->GetFunction(pFunctionName, pFieldName);
433 ffunc->Evaluate(x0, x1, x2, pTime, pArray);
437 std::string filename = pSession->GetFunctionFilename(
441 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
442 std::vector<std::vector<NekDouble> > FieldData;
449 fld->Import(filename, FieldDef, FieldData);
452 for (
int i = 0; i < FieldDef.size(); ++i)
454 for (
int j = 0; j < FieldDef[i]->m_fields.size(); ++j)
456 if (FieldDef[i]->
m_fields[j] == pFieldName)
464 pFields[0]->ExtractDataToCoeffs(
472 cout <<
"Field " + pFieldName +
" not found." << endl;
475 pFields[0]->BwdTrans_IterPerExp(vCoeffs, pArray);
492 if(inarray == outarray)
494 int physTot =
m_fields[0]->GetTotPoints();
497 for (
int i=0; i< nvel; i++)
522 if(inarray == outarray)
524 int physTot =
m_fields[0]->GetTotPoints();
527 for (
int i=0; i< nvel; i++)
552 if(inarray == outarray)
554 int physTot =
m_fields[0]->GetTotPoints();
557 for (
int i=0; i< nvel; i++)
582 if(inarray == outarray)
584 int physTot =
m_fields[0]->GetTotPoints();
587 for (
int i=0; i< nvel; i++)
613 if(inarray == outarray)
615 int physTot =
m_fields[0]->GetTotPoints();
618 for (
int i=0; i< nvel; i++)
644 if(inarray == outarray)
646 int physTot =
m_fields[0]->GetTotPoints();
649 for (
int i=0; i< nvel; i++)
666 int physTot =
m_fields[0]->GetTotPoints();
680 int physTot =
m_fields[0]->GetTotPoints();
693 int physTot =
m_fields[0]->GetTotPoints();
699 bool wavespace =
m_fields[0]->GetWaveSpace();
713 outarray, 1, outarray, 1);
715 m_fields[0]->SetWaveSpace(wavespace);
723 int physTot =
m_fields[0]->GetTotPoints();
730 for (
int i=0; i< nvel; i++)
733 for (
int j=0; j< nvel; j++)
746 int physTot =
m_fields[0]->GetTotPoints();
753 for (
int i=0; i< nvel; i++)
756 for (
int j=0; j< nvel; j++)
769 int physTot =
m_fields[0]->GetTotPoints();
775 bool wavespace =
m_fields[0]->GetWaveSpace();
787 Vmath::Vadd(physTot, wk, 1, outarray, 1, outarray, 1);
791 m_fields[0]->SetWaveSpace(wavespace);
799 int physTot =
m_fields[0]->GetTotPoints();
805 bool wavespace =
m_fields[0]->GetWaveSpace();
810 for (
int i=0; i< nvel; i++)
825 for (
int k=0; k< nvel; k++)
832 for (
int i=0; i< nvel; i++)
834 for (
int k=0; k< nvel; k++)
836 tmp[k] =
m_wk1[i*nvel+k];
839 for (
int j=0; j<nvel; j++)
850 for (
int i=0; i< nvel; i++)
853 for (
int j=0; j< nvel; j++)
868 for (
int i=0; i< nvel; i++)
870 for (
int p=0; p< nvel; p++)
872 tmp[p] =
m_wk1[i*nvel+p];
875 for (
int j=0; j< nvel; j++)
883 for (
int j=0; j< nvel; j++)
885 for (
int p=0; p< nvel; p++)
887 tmp[p] =
m_wk1[p*nvel+j];
890 for (
int i=0; i< nvel; i++)
898 m_fields[0]->SetWaveSpace(wavespace);
905 int physTot =
m_fields[0]->GetTotPoints();
911 for (
int i=0; i< nvel*nvel*nvel; i++)
917 bool wavespace =
m_fields[0]->GetWaveSpace();
922 for (
int i=0; i< nvel; i++)
937 for (
int j=0; j< nvel; j++)
949 for (
int i=0; i< nvel; i++)
951 for (
int j=0; j< nvel; j++)
956 outarray[i*nvel*nvel+j*nvel+0],
957 outarray[i*nvel*nvel+j*nvel+1]);
962 outarray[i*nvel*nvel+j*nvel+0],
963 outarray[i*nvel*nvel+j*nvel+1],
964 outarray[i*nvel*nvel+j*nvel+2]);
970 for (
int i=0; i< nvel; i++)
972 for (
int p=0; p< nvel; p++)
974 tmp[p] =
m_wk1[i*nvel+p];
977 for (
int j=0; j< nvel; j++)
979 for (
int k=0; k< nvel; k++)
981 Vmath::Vsub(physTot,outarray[i*nvel*nvel+j*nvel+k],1,
983 outarray[i*nvel*nvel+j*nvel+k], 1);
989 for (
int j=0; j< nvel; j++)
991 for (
int p=0; p< nvel; p++)
993 tmp[p] =
m_wk1[p*nvel+j];
996 for (
int i=0; i< nvel; i++)
998 for (
int k=0; k< nvel; k++)
1000 Vmath::Vadd(physTot,outarray[i*nvel*nvel+j*nvel+k],1,
1002 outarray[i*nvel*nvel+j*nvel+k], 1);
1008 m_fields[0]->SetWaveSpace(wavespace);
1014 const bool generalized)
1016 int physTot =
m_fields[0]->GetTotPoints();
1020 bool wavespace =
m_fields[0]->GetWaveSpace();
1033 for (
int i = 0; i < nvel; ++i)
1035 for (
int k = 0; k < nvel; ++k)
1038 for (
int j = 0; j < nvel; ++j)
1040 tmp[j] = ddU[i*nvel*nvel+j*nvel+k];
1043 for (
int p=0; p<nvel; ++p)
1046 ddU[i*nvel*nvel+p*nvel+k], 1);
1051 for (
int i = 0; i < nvel; ++i)
1054 for (
int k = 0; k < nvel; ++k)
1057 ddU[k*nvel*nvel+i*nvel+k], 1,
1060 ddU[i*nvel*nvel+k*nvel+k], 1,
1082 m_fields[0]->PhysDeriv(Dummy,outarray[1],outarray[0]);
1084 Vmath::Smul(physTot, -1.0, outarray[1], 1, outarray[1], 1);
1133 Vmath::Vsub(physTot, Dummy1, 1, Dummy2, 1, outarray[0], 1);
1150 Vmath::Vsub(physTot, Dummy1, 1, Dummy2, 1, outarray[1], 1);
1167 Vmath::Vsub(physTot, Dummy1, 1, Dummy2, 1, outarray[2], 1);
1184 m_fields[0]->SetWaveSpace(wavespace);
1189 int physTot =
m_fields[0]->GetTotPoints();
1191 int nfields =
m_fields.num_elements();
1192 int nbnds =
m_fields[0]->GetBndConditions().num_elements();
1211 for (
int i=0; i < nfields; i++)
1219 for (
int i = 0; i< nvel; i++)
1232 for (
int dir=0; dir < 3; dir++)
1239 for(
int n = 0 ; n < nbnds ; ++n)
1242 for (
int i = 0; i < nfields; ++i)
1244 BndConds =
m_fields[i]->GetBndConditions();
1245 BndExp =
m_fields[i]->GetBndCondExpansions();
1246 if ( BndConds[n]->GetBoundaryConditionType() ==
1249 isDirichlet[i] =
true;
1254 for (
int j = 0; j < nvel; ++j)
1257 GetBoundaryConditionType() ==
1259 "Mapping only supported when all velocity components have the same type of boundary conditions");
1264 "Time-dependent Dirichlet boundary conditions not supported with mapping yet.");
1268 boost::static_pointer_cast<
1271 m_dirichletCondition;
1273 condition.
Evaluate(coords[0], coords[1], coords[2],
1278 isDirichlet[i] =
false;
1282 if ( isDirichlet[0])
1284 for (
int i = 0; i < nvel; ++i)
1289 for (
int i = 0; i < nvel; ++i)
1296 for (
int i = 0; i < nfields; ++i)
1298 BndConds =
m_fields[i]->GetBndConditions();
1299 BndExp =
m_fields[i]->GetBndCondExpansions();
1304 for(
int m = 0 ; m < nbnds; ++m)
1306 int exp_size = BndExp[m]->GetExpSize();
1307 if (m==n && isDirichlet[i])
1309 for (
int j = 0; j < exp_size; ++j, cnt++)
1311 m_fields[i]->GetBoundaryToElmtMap(BCtoElmtID,
1314 Bc = boost::dynamic_pointer_cast<
1316 (BndExp[n]->GetExp(j));
1318 elmt =
m_fields[i]->GetExp(BCtoElmtID[cnt]);
1320 ElmtVal = values[i] +
1324 elmt->GetTracePhysVals(BCtoTraceID[cnt],
1325 Bc, ElmtVal, BndVal);
1328 Vals = BndExp[n]->UpdatePhys()
1329 + BndExp[n]->GetPhys_Offset(j);
1333 BndVal, 1, Vals, 1);
1337 BndConds[n]->GetUserDefined() ==
1341 coordVelElmt = coordVel[i] +
1346 elmt->GetTracePhysVals(
1347 BCtoTraceID[cnt], Bc,
1348 coordVelElmt, coordVelBnd);
1366 for (
int i = 0; i <
m_fields.num_elements(); ++i)
1369 BndConds =
m_fields[i]->GetBndConditions();
1370 BndExp =
m_fields[i]->GetBndCondExpansions();
1371 for(
int n = 0 ; n < BndConds.num_elements(); ++n)
1373 if ( BndConds[n]->GetBoundaryConditionType() ==
1376 BndExp[n]->FwdTrans_BndConstrained(BndExp[n]->GetPhys(),
1377 BndExp[n]->UpdateCoeffs());
1380 BndExp[n]->HomogeneousFwdTrans(BndExp[n]->GetCoeffs(),
1381 BndExp[n]->UpdateCoeffs());
1395 std::string s_FieldStr;
1396 string fieldNames[3] = {
"x",
"y",
"z"};
1397 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
1401 for(
int i = 0; i < 3; i++)
1403 s_FieldStr = fieldNames[i];
1411 "3DH1D does not support mapping in the z-direction.");
1414 s_FieldStr = velFieldNames[i];
1422 "3DH1D does not support mapping in the z-direction.");
1429 int physTot =
m_fields[0]->GetTotPoints();
1432 for(
int i = 0; i < 3; i++)
1437 for(
int i = 0; i < nvel; i++)
static MappingSharedPtr m_mappingPtr
std::string m_funcName
Name of the function containing the coordinates.
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
std::string m_velFuncName
Name of the function containing the velocity of the coordinates.
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.
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[]
GLOBAL_MAPPING_EXPORT void EvaluateTimeFunction(LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
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)