当前位置: 首页>>代码示例>>C++>>正文


C++ Flags::GetStringFlag方法代码示例

本文整理汇总了C++中Flags::GetStringFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ Flags::GetStringFlag方法的具体用法?C++ Flags::GetStringFlag怎么用?C++ Flags::GetStringFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Flags的用法示例。


在下文中一共展示了Flags::GetStringFlag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: NumProcLinearHyperbolic

  NumProcLinearHyperbolic (shared_ptr<PDE> apde, const Flags & flags)
    : NumProc (apde), 
      timer_element("convection - time element"), 
      timer_facet("convection - time facet"),
      timer_mass("convection - time mass")
  {
    gfu = apde->GetGridFunction (flags.GetStringFlag ("gridfunction", "u"));
    cfflow = apde->GetCoefficientFunction (flags.GetStringFlag ("flow", "flow"));

    dt = flags.GetNumFlag ("dt", 0.001);
    tend = flags.GetNumFlag ("tend", 1);
  }
开发者ID:mliertzer,项目名称:ngsolve,代码行数:12,代码来源:linhypDG.cpp

示例2: NumProc

 NumProc :: NumProc (weak_ptr<PDE> apde, const Flags & flags) 
   : NGS_Object (shared_ptr<PDE> (apde)->GetMeshAccess(int(flags.GetNumFlag("mesh",1))-1), "numproc"), 
     pde(apde)
 {
   if (flags.StringFlagDefined ("name"))
     SetName (flags.GetStringFlag ("name",""));
 }
开发者ID:mliertzer,项目名称:ngsolve,代码行数:7,代码来源:basenumproc.cpp

示例3: MyVTKOutput

 MyVTKOutput<D>::MyVTKOutput(const Array<shared_ptr<CoefficientFunction>> & a_coefs,
                             const Flags & flags,
                             shared_ptr<MeshAccess> ama)
   : MyVTKOutput(ama, a_coefs,
                 flags.GetStringListFlag("fieldnames" ),
                 flags.GetStringFlag("filename","output"),
                 (int) flags.GetNumFlag("subdivision", 0),
                 (int) flags.GetNumFlag("only_element", -1),
                 flags.GetDefineFlag("nocache"))
 {;}
开发者ID:schruste,项目名称:ngsapps,代码行数:10,代码来源:myvtkoutput.cpp

示例4: 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;
}
开发者ID:imago,项目名称:mfes,代码行数:52,代码来源:energydiff.cpp

示例5: NumProcSumUp

 NumProcSumUp (PDE & apde, const Flags & flags)
   : NumProc (apde)
 {
   gfu = pde.GetGridFunction (flags.GetStringFlag ("gridfunction", "u"));
 }
开发者ID:mliertzer,项目名称:ngsolve,代码行数:5,代码来源:sumup.cpp


注:本文中的Flags::GetStringFlag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。