本文整理汇总了C++中libutilities::SessionReaderSharedPtr::DefinesCmdLineArgument方法的典型用法代码示例。如果您正苦于以下问题:C++ SessionReaderSharedPtr::DefinesCmdLineArgument方法的具体用法?C++ SessionReaderSharedPtr::DefinesCmdLineArgument怎么用?C++ SessionReaderSharedPtr::DefinesCmdLineArgument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libutilities::SessionReaderSharedPtr
的用法示例。
在下文中一共展示了SessionReaderSharedPtr::DefinesCmdLineArgument方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
it->second->m_basisKeyVector[i] = LibUtilities::BasisKey(
tmp1.GetBasisType(), tmp1.GetNumModes(),
LibUtilities::PointsKey(tmp1.GetNumModes(),
LibUtilities::ePolyEvenlySpaced));
}
}
//----------------------------------------------
//----------------------------------------------
// Define Expansion
int expdim = graphShPt->GetMeshDimension();
Array<OneD, MultiRegions::ExpListSharedPtr> Exp(1);
switch(expdim)
{
case 1:
{
MultiRegions::ExpList1DSharedPtr Exp1D;
Exp1D = MemoryManager<MultiRegions::ExpList1D>::AllocateSharedPtr(vSession,graphShPt);
Exp[0] = Exp1D;
break;
}
case 2:
{
if(vSession->DefinesSolverInfo("HOMOGENEOUS"))
{
std::string HomoStr = vSession->GetSolverInfo("HOMOGENEOUS");
MultiRegions::ExpList3DHomogeneous1DSharedPtr Exp3DH1;
ASSERTL0(
HomoStr == "HOMOGENEOUS1D" || HomoStr == "Homogeneous1D" ||
HomoStr == "1D" || HomoStr == "Homo1D",
"Only 3DH1D supported for XML output currently.");
int nplanes;
vSession->LoadParameter("HomModesZ", nplanes);
// choose points to be at evenly spaced points at nplanes + 1
// points
const LibUtilities::PointsKey Pkey(
nplanes + 1, LibUtilities::ePolyEvenlySpaced);
const LibUtilities::BasisKey Bkey(
LibUtilities::eFourier, nplanes, Pkey);
NekDouble lz = vSession->GetParameter("LZ");
Exp3DH1 = MemoryManager<MultiRegions::ExpList3DHomogeneous1D>
::AllocateSharedPtr(
vSession, Bkey, lz, false, false, graphShPt);
Exp[0] = Exp3DH1;
}
else
{
MultiRegions::ExpList2DSharedPtr Exp2D;
Exp2D = MemoryManager<MultiRegions::ExpList2D>::AllocateSharedPtr(vSession,graphShPt);
Exp[0] = Exp2D;
}
break;
}
case 3:
{
MultiRegions::ExpList3DSharedPtr Exp3D;
Exp3D = MemoryManager<MultiRegions::ExpList3D>::AllocateSharedPtr(vSession,graphShPt);
Exp[0] = Exp3D;
break;
}
default:
ASSERTL0(false,"Expansion dimension not recognised");
break;
}
//-----------------------------------------------
//----------------------------------------------
// Write solution depending on #define
string outfile(strtok(argv[argc-1],"."));
outfile += ".dat";
ofstream outstrm(outfile.c_str());
Exp[0]->WriteTecplotHeader(outstrm);
if (vSession->DefinesCmdLineArgument("multi-zone"))
{
int nExp = Exp[0]->GetExpSize();
for (int i = 0; i < nExp; ++i)
{
Exp[0]->WriteTecplotZone (outstrm, i);
Exp[0]->WriteTecplotConnectivity(outstrm, i);
}
}
else
{
Exp[0]->WriteTecplotZone (outstrm);
Exp[0]->WriteTecplotConnectivity(outstrm);
}
outstrm.close();
//----------------------------------------------
return 0;
}