35 #include <boost/core/ignore_unused.hpp> 
   39 #include <boost/algorithm/string/predicate.hpp> 
   45 namespace GlobalMapping
 
   49 bool Mapping::m_init                   = 
false;
 
   50 bool Mapping::m_isDefined              = 
false;
 
   60     : m_session(pSession), m_fields(pFields)
 
   85             ASSERTL0(0, 
"Dimension not supported");
 
  102     const TiXmlElement *pMapping)
 
  104     boost::ignore_unused(pFields);
 
  106     int phystot    = 
m_fields[0]->GetTotPoints();
 
  112     for (
int i = 0; i < 3; i++)
 
  120     const TiXmlElement *timeDep = pMapping->FirstChildElement(
"TIMEDEPENDENT");
 
  123         string sTimeDep = timeDep->GetText();
 
  125                           (boost::iequals(sTimeDep, 
"yes"));
 
  133     string fieldNames[3]             = {
"x", 
"y", 
"z"};
 
  134     const TiXmlElement *funcNameElmt = pMapping->FirstChildElement(
"COORDS");
 
  139                  "Function '" + 
m_funcName + 
"' not defined.");
 
  142         m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
 
  144         std::string s_FieldStr;
 
  147         for (
int i = 0; i < 3; i++)
 
  149             s_FieldStr = fieldNames[i];
 
  158                         "3DH1D does not support mapping in the z-direction.");
 
  170         m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
 
  171         for (
int i = 0; i < 3; i++)
 
  182     string velFieldNames[3]             = {
"vx", 
"vy", 
"vz"};
 
  183     const TiXmlElement *velFuncNameElmt = pMapping->FirstChildElement(
"VEL");
 
  190         std::string s_FieldStr;
 
  193         for (
int i = 0; i < 3; i++)
 
  195             s_FieldStr = velFieldNames[i];
 
  204                         "3DH1D does not support mapping in the z-direction.");
 
  216         for (
int i = 0; i < 3; i++)
 
  227     for (
int i = 0; i < nvel; i++)
 
  230         for (
int j = 0; j < nvel; j++)
 
  251     TiXmlElement *vMapping = NULL;
 
  253     if (
m_session->DefinesElement(
"Nektar/Mapping"))
 
  255         vMapping = 
m_session->GetElement(
"Nektar/Mapping");
 
  275         TiXmlElement *vMapping = NULL;
 
  277         if (pSession->DefinesElement(
"Nektar/Mapping"))
 
  279             vMapping    = pSession->GetElement(
"Nektar/Mapping");
 
  280             vType       = vMapping->Attribute(
"TYPE");
 
  285             vType = 
"Translation";
 
  306                      const std::string &outname)
 
  311         fieldMetaDataMap[
"MappingCartesianVel"] = std::string(
"False");
 
  315             fieldMetaDataMap[
"MappingType"]       = std::string(
"Expression");
 
  316             fieldMetaDataMap[
"MappingExpression"] = 
m_funcName;
 
  324             int expdim           = 
m_fields[0]->GetGraph()->GetMeshDimension();
 
  325             string fieldNames[3] = {
"x", 
"y", 
"z"};
 
  326             string velFieldNames[3] = {
"vx", 
"vy", 
"vz"};
 
  328             std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef =
 
  330             std::vector<std::vector<NekDouble>> FieldData(FieldDef.size());
 
  332             int ncoeffs = 
m_fields[0]->GetNcoeffs();
 
  335             bool wavespace = 
m_fields[0]->GetWaveSpace();
 
  338             for (
int j = 0; j < expdim; ++j)
 
  342                 for (
int i = 0; i < FieldDef.size(); ++i)
 
  345                     FieldDef[i]->m_fields.push_back(fieldNames[j]);
 
  346                     m_fields[0]->AppendFieldData(FieldDef[i], FieldData[i],
 
  354                 for (
int j = 0; j < expdim; ++j)
 
  358                     for (
int i = 0; i < FieldDef.size(); ++i)
 
  361                         FieldDef[i]->m_fields.push_back(velFieldNames[j]);
 
  362                         m_fields[0]->AppendFieldData(FieldDef[i], FieldData[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);
 
  388     ASSERTL0(pSession->DefinesFunction(pFunctionName),
 
  389              "Function '" + pFunctionName + 
"' does not exist.");
 
  392         pSession->GetFunction(pFunctionName, pFieldName);
 
  398     ffunc->Evaluate(x0, x1, x2, pTime, pArray);
 
  407     ASSERTL0(pSession->DefinesFunction(pFunctionName),
 
  408              "Function '" + pFunctionName + 
"' does not exist.");
 
  410     unsigned int nq = pFields[0]->GetNpoints();
 
  411     if (pArray.size() != nq)
 
  417     vType = pSession->GetFunctionType(pFunctionName, pFieldName);
 
  424         pFields[0]->GetCoords(x0, x1, x2);
 
  426             pSession->GetFunction(pFunctionName, pFieldName);
 
  428         ffunc->Evaluate(x0, x1, x2, pTime, pArray);
 
  432         std::string filename =
 
  433             pSession->GetFunctionFilename(pFunctionName, pFieldName);
 
  435         std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
 
  436         std::vector<std::vector<NekDouble>> FieldData;
 
  442         fld->Import(filename, FieldDef, FieldData);
 
  445         for (
int i = 0; i < FieldDef.size(); ++i)
 
  447             for (
int j = 0; j < FieldDef[i]->m_fields.size(); ++j)
 
  449                 if (FieldDef[i]->
m_fields[j] == pFieldName)
 
  457                 pFields[0]->ExtractDataToCoeffs(FieldDef[i], FieldData[i],
 
  463                 cout << 
"Field " + pFieldName + 
" not found." << endl;
 
  466         pFields[0]->BwdTrans(vCoeffs, pArray);
 
  484     if (inarray == outarray)
 
  486         int physTot = 
m_fields[0]->GetTotPoints();
 
  489         for (
int i = 0; i < nvel; i++)
 
  515     if (inarray == outarray)
 
  517         int physTot = 
m_fields[0]->GetTotPoints();
 
  520         for (
int i = 0; i < nvel; i++)
 
  546     if (inarray == outarray)
 
  548         int physTot = 
m_fields[0]->GetTotPoints();
 
  551         for (
int i = 0; i < nvel; i++)
 
  577     if (inarray == outarray)
 
  579         int physTot = 
m_fields[0]->GetTotPoints();
 
  582         for (
int i = 0; i < nvel; i++)
 
  607     if (inarray == outarray)
 
  609         int physTot = 
m_fields[0]->GetTotPoints();
 
  612         for (
int i = 0; i < nvel; i++)
 
  637     if (inarray == outarray)
 
  639         int physTot = 
m_fields[0]->GetTotPoints();
 
  642         for (
int i = 0; i < nvel; i++)
 
  658     int physTot = 
m_fields[0]->GetTotPoints();
 
  671     int physTot = 
m_fields[0]->GetTotPoints();
 
  684     int physTot = 
m_fields[0]->GetTotPoints();
 
  690         bool wavespace = 
m_fields[0]->GetWaveSpace();
 
  702             Vmath::Vvtvp(physTot, inarray[i], 1, wk, 1, outarray, 1, outarray,
 
  705         m_fields[0]->SetWaveSpace(wavespace);
 
  712     int physTot = 
m_fields[0]->GetTotPoints();
 
  719     for (
int i = 0; i < nvel; i++)
 
  722         for (
int j = 0; j < nvel; j++)
 
  724             Vmath::Vvtvp(physTot, g[i * nvel + j], 1, inarray[j], 1,
 
  725                          outarray[i], 1, outarray[i], 1);
 
  733     int physTot = 
m_fields[0]->GetTotPoints();
 
  740     for (
int i = 0; i < nvel; i++)
 
  743         for (
int j = 0; j < nvel; j++)
 
  745             Vmath::Vvtvp(physTot, g[i * nvel + j], 1, inarray[j], 1,
 
  746                          outarray[i], 1, outarray[i], 1);
 
  754     int physTot = 
m_fields[0]->GetTotPoints();
 
  760     bool wavespace = 
m_fields[0]->GetWaveSpace();
 
  769         Vmath::Vmul(physTot, Jac, 1, inarray[i], 1, wk, 1); 
 
  772         Vmath::Vadd(physTot, wk, 1, outarray, 1, outarray, 1);
 
  774     Vmath::Vdiv(physTot, outarray, 1, Jac, 1, outarray, 1); 
 
  776     m_fields[0]->SetWaveSpace(wavespace);
 
  783     int physTot = 
m_fields[0]->GetTotPoints();
 
  789     bool wavespace = 
m_fields[0]->GetWaveSpace();
 
  794     for (
int i = 0; i < nvel; i++)
 
  799                                    m_wk2[i * nvel + 1]);
 
  806         for (
int k = 0; k < nvel; k++)
 
  809                         m_wk1[i * nvel + k], 1);
 
  813     for (
int i = 0; i < nvel; i++)
 
  815         for (
int k = 0; k < nvel; k++)
 
  817             tmp[k] = 
m_wk1[i * nvel + k];
 
  820         for (
int j = 0; j < nvel; j++)
 
  831     for (
int i = 0; i < nvel; i++)
 
  834         for (
int j = 0; j < nvel; j++)
 
  847     for (
int i = 0; i < nvel; i++)
 
  849         for (
int p = 0; 
p < nvel; 
p++)
 
  854         for (
int j = 0; j < nvel; j++)
 
  862     for (
int j = 0; j < nvel; j++)
 
  864         for (
int p = 0; 
p < nvel; 
p++)
 
  869         for (
int i = 0; i < nvel; i++)
 
  877     m_fields[0]->SetWaveSpace(wavespace);
 
  883     int physTot = 
m_fields[0]->GetTotPoints();
 
  889     for (
int i = 0; i < nvel * nvel * nvel; i++)
 
  895     bool wavespace = 
m_fields[0]->GetWaveSpace();
 
  900     for (
int i = 0; i < nvel; i++)
 
  905                                    m_wk2[i * nvel + 1]);
 
  912         for (
int j = 0; j < nvel; j++)
 
  915                         m_wk1[i * nvel + j], 1);
 
  924     for (
int i = 0; i < nvel; i++)
 
  926         for (
int j = 0; j < nvel; j++)
 
  932                     outarray[i * nvel * nvel + j * nvel + 0],
 
  933                     outarray[i * nvel * nvel + j * nvel + 1]);
 
  939                     outarray[i * nvel * nvel + j * nvel + 0],
 
  940                     outarray[i * nvel * nvel + j * nvel + 1],
 
  941                     outarray[i * nvel * nvel + j * nvel + 2]);
 
  947     for (
int i = 0; i < nvel; i++)
 
  949         for (
int p = 0; 
p < nvel; 
p++)
 
  954         for (
int j = 0; j < nvel; j++)
 
  956             for (
int k = 0; k < nvel; k++)
 
  958                 Vmath::Vsub(physTot, outarray[i * nvel * nvel + j * nvel + k],
 
  959                             1, 
m_wk2[j * nvel + k], 1,
 
  960                             outarray[i * nvel * nvel + j * nvel + k], 1);
 
  966     for (
int j = 0; j < nvel; j++)
 
  968         for (
int p = 0; 
p < nvel; 
p++)
 
  973         for (
int i = 0; i < nvel; i++)
 
  975             for (
int k = 0; k < nvel; k++)
 
  977                 Vmath::Vadd(physTot, outarray[i * nvel * nvel + j * nvel + k],
 
  978                             1, 
m_wk2[i * nvel + k], 1,
 
  979                             outarray[i * nvel * nvel + j * nvel + k], 1);
 
  985     m_fields[0]->SetWaveSpace(wavespace);
 
  990                               const bool generalized)
 
  992     int physTot = 
m_fields[0]->GetTotPoints();
 
  996     bool wavespace = 
m_fields[0]->GetWaveSpace();
 
 1009         for (
int i = 0; i < nvel; ++i)
 
 1011             for (
int k = 0; k < nvel; ++k)
 
 1014                 for (
int j = 0; j < nvel; ++j)
 
 1016                     tmp[j] = ddU[i * nvel * nvel + j * nvel + k];
 
 1019                 for (
int p = 0; 
p < nvel; ++
p)
 
 1022                                  ddU[i * nvel * nvel + 
p * nvel + k], 1);
 
 1027         for (
int i = 0; i < nvel; ++i)
 
 1030             for (
int k = 0; k < nvel; ++k)
 
 1033                             ddU[k * nvel * nvel + i * nvel + k], 1, outarray[i],
 
 1036                             ddU[i * nvel * nvel + k * nvel + k], 1, outarray[i],
 
 1043         m_fields[0]->CurlCurl(inarray, outarray);
 
 1047     m_fields[0]->SetWaveSpace(wavespace);
 
 1052     int physTot = 
m_fields[0]->GetTotPoints();
 
 1055     int nbnds   = 
m_fields[0]->GetBndConditions().size();
 
 1064     for (
int i = 0; i < nfields; i++)
 
 1072     for (
int i = 0; i < nvel; i++)
 
 1085     for (
int dir = 0; dir < 3; dir++)
 
 1092     for (
int n = 0; n < nbnds; ++n)
 
 1095         for (
int i = 0; i < nfields; ++i)
 
 1097             BndConds = 
m_fields[i]->GetBndConditions();
 
 1098             BndExp   = 
m_fields[i]->GetBndCondExpansions();
 
 1099             if (BndConds[n]->GetBoundaryConditionType() ==
 
 1102                 isDirichlet[i] = 
true;
 
 1107                     for (
int j = 0; j < nvel; ++j)
 
 1110                                          ->GetBndConditions()[n]
 
 1111                                          ->GetBoundaryConditionType() ==
 
 1113                                  "Mapping only supported when all velocity " 
 1114                                  "components have the same type of boundary " 
 1120                          "Time-dependent Dirichlet boundary conditions not " 
 1121                          "supported with mapping yet.");
 
 1125                     std::static_pointer_cast<
 
 1127                         ->m_dirichletCondition;
 
 1129                 condition.
Evaluate(coords[0], coords[1], coords[2], time,
 
 1134                 isDirichlet[i] = 
false;
 
 1140             for (
int i = 0; i < nvel; ++i)
 
 1145             for (
int i = 0; i < nvel; ++i)
 
 1152         for (
int i = 0; i < nfields; ++i)
 
 1154             BndConds = 
m_fields[i]->GetBndConditions();
 
 1155             BndExp   = 
m_fields[i]->GetBndCondExpansions();
 
 1156             if (BndConds[n]->GetUserDefined() == 
"" ||
 
 1157                 BndConds[n]->GetUserDefined() == 
"MovingBody")
 
 1159                 m_fields[i]->ExtractPhysToBnd(n, values[i],
 
 1160                                               BndExp[n]->UpdatePhys());
 
 1163                 if ((i < nvel) && BndConds[n]->GetUserDefined() == 
"MovingBody")
 
 1167                         BndExp[n]->GetTotPoints());
 
 1168                     m_fields[i]->ExtractPhysToBnd(n, coordVel[i], coordVelBnd);
 
 1171                     Vmath::Vadd(BndExp[n]->GetTotPoints(), coordVelBnd, 1,
 
 1172                                 BndExp[n]->UpdatePhys(), 1,
 
 1173                                 BndExp[n]->UpdatePhys(), 1);
 
 1180     for (
int i = 0; i < 
m_fields.size(); ++i)
 
 1183         BndConds = 
m_fields[i]->GetBndConditions();
 
 1184         BndExp   = 
m_fields[i]->GetBndCondExpansions();
 
 1185         for (
int n = 0; n < BndConds.size(); ++n)
 
 1187             if (BndConds[n]->GetBoundaryConditionType() ==
 
 1190                 if (BndConds[n]->GetUserDefined() == 
"" ||
 
 1191                     BndConds[n]->GetUserDefined() == 
"MovingBody")
 
 1195                         BndExp[n]->SetWaveSpace(
false);
 
 1198                     BndExp[n]->FwdTransBndConstrained(
 
 1199                         BndExp[n]->GetPhys(), BndExp[n]->UpdateCoeffs());
 
 1212         std::string s_FieldStr;
 
 1213         string fieldNames[3]    = {
"x", 
"y", 
"z"};
 
 1214         string velFieldNames[3] = {
"vx", 
"vy", 
"vz"};
 
 1218         for (
int i = 0; i < 3; i++)
 
 1220             s_FieldStr = fieldNames[i];
 
 1229                         "3DH1D does not support mapping in the z-direction.");
 
 1232             s_FieldStr = velFieldNames[i];
 
 1241                         "3DH1D does not support mapping in the z-direction.");
 
 1248         int physTot = 
m_fields[0]->GetTotPoints();
 
 1251         for (
int i = 0; i < 3; i++)
 
 1256         for (
int i = 0; i < nvel; i++)
 
#define ASSERTL0(condition, msg)
 
bool m_fromFunction
Flag defining if the Mapping is defined by a function.
 
int m_nConvectiveFields
Number of velocity components.
 
static MappingSharedPtr m_mappingPtr
 
virtual GLOBAL_MAPPING_EXPORT void v_GetCartesianCoordinates(Array< OneD, NekDouble > &out0, Array< OneD, NekDouble > &out1, Array< OneD, NekDouble > &out2)
 
GLOBAL_MAPPING_EXPORT void EvaluateTimeFunction(LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
 
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
 
virtual GLOBAL_MAPPING_EXPORT void v_UpdateBCs(const NekDouble time)
 
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 GetCartesianCoordinates(Array< OneD, NekDouble > &out0, Array< OneD, NekDouble > &out1, Array< OneD, NekDouble > &out2)
Get the Cartesian coordinates in the field.
 
GLOBAL_MAPPING_EXPORT bool IsTimeDependent()
Get flag defining if mapping is time-dependent.
 
virtual GLOBAL_MAPPING_EXPORT void v_VelocityLaplacian(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble alpha)
 
Array< OneD, Array< OneD, NekDouble > > m_wk2
 
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.
 
GLOBAL_MAPPING_EXPORT void UpdateGeomInfo()
Recompute the metric terms of the Mapping.
 
Array< OneD, Array< OneD, NekDouble > > m_coords
Array with the Cartesian coordinates.
 
Array< OneD, Array< OneD, NekDouble > > m_coordsVel
Array with the velocity of the coordinates.
 
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
 
std::string m_velFuncName
Name of the function containing the velocity of 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_CovarToCartesian(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)=0
 
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 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 GetCoordVelocity(Array< OneD, Array< OneD, NekDouble >> &outarray)
Obtain the velocity of the coordinates.
 
virtual GLOBAL_MAPPING_EXPORT void v_LowerIndex(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
Array< OneD, Array< OneD, NekDouble > > m_wk1
 
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))
 
virtual GLOBAL_MAPPING_EXPORT void v_CurlCurlField(Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const bool generalized)
 
virtual GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)=0
 
LibUtilities::FieldIOSharedPtr m_fld
 
GLOBAL_MAPPING_EXPORT void GetMetricTensor(Array< OneD, Array< OneD, NekDouble >> &outarray)
Get the metric tensor .
 
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.
 
virtual GLOBAL_MAPPING_EXPORT void v_gradgradU(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
GLOBAL_MAPPING_EXPORT bool HasConstantJacobian()
Get flag defining if mapping has constant Jacobian.
 
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.
 
GLOBAL_MAPPING_EXPORT void ReplaceField(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
Replace the Expansion List used by the mapping.
 
GLOBAL_MAPPING_EXPORT void GetInvMetricTensor(Array< OneD, Array< OneD, NekDouble >> &outarray)
Get the inverse of metric tensor .
 
virtual GLOBAL_MAPPING_EXPORT void v_DotGradJacobian(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, NekDouble > &outarray)
 
virtual GLOBAL_MAPPING_EXPORT void v_Divergence(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, NekDouble > &outarray)
 
virtual GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)=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 CovarToCartesian(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
Convert a covariant vector to the Cartesian system.
 
std::string m_funcName
Name of the function containing the coordinates.
 
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.
 
GLOBAL_MAPPING_EXPORT void GetJacobian(Array< OneD, NekDouble > &outarray)
Get the Jacobian of the transformation.
 
virtual GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian(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)
 
Array< OneD, Array< OneD, NekDouble > > m_tmp
 
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_RaiseIndex(const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
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.
 
bool m_timeDependent
Flag defining if the Mapping is time-dependent.
 
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_GetCoordVelocity(Array< OneD, Array< OneD, NekDouble >> &outarray)
 
NekDouble Evaluate() const
 
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
 
static std::shared_ptr< FieldIO > CreateDefault(const LibUtilities::SessionReaderSharedPtr session)
Returns an object for the default FieldIO method.
 
Provides a generic Factory class.
 
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
 
GLOBAL_MAPPING_EXPORT typedef std::shared_ptr< Mapping > MappingSharedPtr
A shared pointer to a Mapping object.
 
MappingFactory & GetMappingFactory()
Declaration of the mapping factory singleton.
 
std::shared_ptr< FieldIO > FieldIOSharedPtr
 
std::map< std::string, std::string > FieldMetaDataMap
 
std::shared_ptr< SessionReader > SessionReaderSharedPtr
 
std::shared_ptr< Equation > EquationSharedPtr
 
@ eFunctionTypeExpression
 
MultiRegions::Direction const DirCartesianMap[]
 
The above copyright notice and this permission notice shall be included.
 
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.
 
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
 
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 Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
 
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.
 
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 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.