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");
101 const TiXmlElement *pMapping)
103 int phystot =
m_fields[0]->GetTotPoints();
109 for (
int i = 0; i < 3; i++)
117 const TiXmlElement* timeDep = pMapping->
118 FirstChildElement(
"TIMEDEPENDENT");
121 string sTimeDep = timeDep->GetText();
123 ( boost::iequals(sTimeDep,
"yes"));
131 string fieldNames[3] = {
"x",
"y",
"z"};
132 const TiXmlElement* funcNameElmt = pMapping->FirstChildElement(
"COORDS");
137 "Function '" +
m_funcName +
"' not defined.");
140 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
142 std::string s_FieldStr;
145 for(
int i = 0; i < 3; i++)
147 s_FieldStr = fieldNames[i];
155 "3DH1D does not support mapping in the z-direction.");
167 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
168 for(
int i = 0; i < 3; i++)
179 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
180 const TiXmlElement* velFuncNameElmt = pMapping->FirstChildElement(
"VEL");
187 std::string s_FieldStr;
190 for(
int i = 0; i < 3; i++)
192 s_FieldStr = velFieldNames[i];
200 "3DH1D does not support mapping in the z-direction.");
212 for(
int i = 0; i < 3; i++)
223 for (
int i=0; i< nvel; i++)
226 for (
int j=0; j< nvel; j++)
247 TiXmlElement* vMapping = NULL;
249 if (
m_session->DefinesElement(
"Nektar/Mapping"))
251 vMapping =
m_session->GetElement(
"Nektar/Mapping");
271 TiXmlElement* vMapping = NULL;
273 if (pSession->DefinesElement(
"Nektar/Mapping"))
275 vMapping = pSession->GetElement(
"Nektar/Mapping");
276 vType = vMapping->Attribute(
"TYPE");
281 vType =
"Translation";
285 vType, pSession, pFields,
304 const std::string &outname)
309 fieldMetaDataMap[
"MappingCartesianVel"] = std::string(
"False");
313 fieldMetaDataMap[
"MappingType"] = std::string(
"Expression");
314 fieldMetaDataMap[
"MappingExpression"] =
m_funcName;
322 int expdim =
m_fields[0]->GetGraph()->GetMeshDimension();
323 string fieldNames[3] = {
"x",
"y",
"z"};
324 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
326 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
327 =
m_fields[0]->GetFieldDefinitions();
328 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
330 int ncoeffs =
m_fields[0]->GetNcoeffs();
333 bool wavespace =
m_fields[0]->GetWaveSpace();
336 for(
int j = 0; j < expdim; ++j)
340 for(
int i = 0; i < FieldDef.size(); ++i)
343 FieldDef[i]->m_fields.push_back(fieldNames[j]);
344 m_fields[0]->AppendFieldData(FieldDef[i], FieldData[i],
351 for(
int j = 0; j < expdim; ++j)
356 for(
int i = 0; i < FieldDef.size(); ++i)
359 FieldDef[i]->m_fields.push_back(velFieldNames[j]);
360 m_fields[0]->AppendFieldData(FieldDef[i],
367 std::string outfile = outname;
368 outfile.erase(outfile.end()-4, outfile.end());
371 m_fld->Write(outfile,FieldDef,FieldData,fieldMetaDataMap);
374 fieldMetaDataMap[
"MappingType"] = std::string(
"File");
375 fieldMetaDataMap[
"FileName"] = outfile;
377 m_fields[0]->SetWaveSpace(wavespace);
384 std::string pFieldName,
386 const std::string& pFunctionName,
389 ASSERTL0(pSession->DefinesFunction(pFunctionName),
390 "Function '" + pFunctionName +
"' does not exist.");
393 pSession->GetFunction(pFunctionName, pFieldName);
399 ffunc->Evaluate(x0, x1, x2, pTime, pArray);
406 std::string pFieldName,
408 const std::string& pFunctionName,
411 ASSERTL0(pSession->DefinesFunction(pFunctionName),
412 "Function '" + pFunctionName +
"' does not exist.");
414 unsigned int nq = pFields[0]->GetNpoints();
415 if (pArray.num_elements() != nq)
421 vType = pSession->GetFunctionType(pFunctionName, pFieldName);
428 pFields[0]->GetCoords(x0, x1, x2);
430 pSession->GetFunction(pFunctionName, pFieldName);
432 ffunc->Evaluate(x0, x1, x2, pTime, pArray);
436 std::string filename = pSession->GetFunctionFilename(
440 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
441 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++)
873 for (
int j=0; j< nvel; j++)
881 for (
int j=0; j< nvel; j++)
883 for (
int p=0;
p< nvel;
p++)
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++)
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++)
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,
1065 m_fields[0]->CurlCurl(inarray, outarray);
1069 m_fields[0]->SetWaveSpace(wavespace);
1074 int physTot =
m_fields[0]->GetTotPoints();
1076 int nfields =
m_fields.num_elements();
1077 int nbnds =
m_fields[0]->GetBndConditions().num_elements();
1096 for (
int i=0; i < nfields; i++)
1104 for (
int i = 0; i< nvel; i++)
1117 for (
int dir=0; dir < 3; dir++)
1124 for(
int n = 0 ; n < nbnds ; ++n)
1127 for (
int i = 0; i < nfields; ++i)
1129 BndConds =
m_fields[i]->GetBndConditions();
1130 BndExp =
m_fields[i]->GetBndCondExpansions();
1131 if ( BndConds[n]->GetBoundaryConditionType() ==
1134 isDirichlet[i] =
true;
1139 for (
int j = 0; j < nvel; ++j)
1142 GetBoundaryConditionType() ==
1144 "Mapping only supported when all velocity components have the same type of boundary conditions");
1149 "Time-dependent Dirichlet boundary conditions not supported with mapping yet.");
1153 boost::static_pointer_cast<
1156 m_dirichletCondition;
1158 condition.
Evaluate(coords[0], coords[1], coords[2],
1163 isDirichlet[i] =
false;
1167 if ( isDirichlet[0])
1169 for (
int i = 0; i < nvel; ++i)
1174 for (
int i = 0; i < nvel; ++i)
1181 for (
int i = 0; i < nfields; ++i)
1183 BndConds =
m_fields[i]->GetBndConditions();
1184 BndExp =
m_fields[i]->GetBndCondExpansions();
1189 for(
int m = 0 ; m < nbnds; ++m)
1191 int exp_size = BndExp[m]->GetExpSize();
1192 if (m==n && isDirichlet[i])
1194 for (
int j = 0; j < exp_size; ++j, cnt++)
1196 m_fields[i]->GetBoundaryToElmtMap(BCtoElmtID,
1199 Bc = boost::dynamic_pointer_cast<
1201 (BndExp[n]->GetExp(j));
1203 elmt =
m_fields[i]->GetExp(BCtoElmtID[cnt]);
1205 ElmtVal = values[i] +
1209 elmt->GetTracePhysVals(BCtoTraceID[cnt],
1210 Bc, ElmtVal, BndVal);
1213 Vals = BndExp[n]->UpdatePhys()
1214 + BndExp[n]->GetPhys_Offset(j);
1218 BndVal, 1, Vals, 1);
1222 BndConds[n]->GetUserDefined() ==
1226 coordVelElmt = coordVel[i] +
1231 elmt->GetTracePhysVals(
1232 BCtoTraceID[cnt], Bc,
1233 coordVelElmt, coordVelBnd);
1251 for (
int i = 0; i <
m_fields.num_elements(); ++i)
1254 BndConds =
m_fields[i]->GetBndConditions();
1255 BndExp =
m_fields[i]->GetBndCondExpansions();
1256 for(
int n = 0 ; n < BndConds.num_elements(); ++n)
1258 if ( BndConds[n]->GetBoundaryConditionType() ==
1261 BndExp[n]->FwdTrans_BndConstrained(BndExp[n]->GetPhys(),
1262 BndExp[n]->UpdateCoeffs());
1265 BndExp[n]->HomogeneousFwdTrans(BndExp[n]->GetCoeffs(),
1266 BndExp[n]->UpdateCoeffs());
1280 std::string s_FieldStr;
1281 string fieldNames[3] = {
"x",
"y",
"z"};
1282 string velFieldNames[3] = {
"vx",
"vy",
"vz"};
1286 for(
int i = 0; i < 3; i++)
1288 s_FieldStr = fieldNames[i];
1296 "3DH1D does not support mapping in the z-direction.");
1299 s_FieldStr = velFieldNames[i];
1307 "3DH1D does not support mapping in the z-direction.");
1314 int physTot =
m_fields[0]->GetTotPoints();
1317 for(
int i = 0; i < 3; i++)
1322 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.
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
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[]
static boost::shared_ptr< FieldIO > CreateDefault(const LibUtilities::SessionReaderSharedPtr session)
Returns an object for the default FieldIO method.
static boost::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
GLOBAL_MAPPING_EXPORT void EvaluateTimeFunction(LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
virtual GLOBAL_MAPPING_EXPORT void v_CurlCurlField(Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const bool generalized)
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)