本文整理汇总了C++中Flags::GetNumListFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ Flags::GetNumListFlag方法的具体用法?C++ Flags::GetNumListFlag怎么用?C++ Flags::GetNumListFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flags
的用法示例。
在下文中一共展示了Flags::GetNumListFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NumProcEnergyCalc
NumProcEnergyCalc :: NumProcEnergyCalc (PDE & apde, const Flags & flags)
: NumProc (apde), point(1)
{
bfa = pde.GetBilinearForm (flags.GetStringFlag ("bilinearform", ""), 1);
lff = pde.GetLinearForm (flags.GetStringFlag ("linearform", ""), 1);
gfu = pde.GetGridFunction (flags.GetStringFlag ("gridfunction", ""), 0);
gfu0 = pde.GetGridFunction (flags.GetStringFlag ("gridfunction0", ""), 0);
gfv = pde.GetGridFunction (flags.GetStringFlag ("gridfunction2", ""), 1);
pqrfile = flags.GetStringFlag ("pqrfile","pqr");
showsteps = flags.GetStringFlag (flags.GetStringFlag ("showsteps", ""), 0);
readMolecule();
variablename = flags.GetStringFlag ("resultvariable", "");
point.SetSize(3);
if (flags.NumListFlagDefined ("point"))
{
const Array<double> & p = flags.GetNumListFlag ("point");
point.SetSize(p.Size());
for (int i = 0; i < p.Size(); i++)
point(i) = p[i];
cout << "point = " << point << endl;
}
integrateonplanes = flags.GetDefineFlag("integrateonplanes");
variabledirection = static_cast<int>(flags.GetNumFlag("variabledirection",0))-1;
n[0] = static_cast<int>(flags.GetNumFlag("n1",0));
n[1] = static_cast<int>(flags.GetNumFlag("n2",0));
n[2] = static_cast<int>(flags.GetNumFlag("n3",0));
text = flags.GetStringFlag ("text","energydiff");
if(flags.StringFlagDefined("filename"))
filename = pde.GetDirectory() + dirslash + flags.GetStringFlag("filename","");
else
filename = "err.out";
applyd = flags.GetDefineFlag ("applyd");
hermitsch = flags.GetDefineFlag ("hermitsch");
outputprecision = (pde.ConstantUsed("outputprecision")) ? int(pde.GetConstant("outputprecision")) : -1;
if(flags.NumFlagDefined("outputprecision"))
outputprecision = int(flags.GetNumFlag("outputprecision",-1));
component = static_cast<int>(flags.GetNumFlag("cachecomp",1))-1;
}