Ejemplo n.º 1
0
  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);
  }
Ejemplo n.º 2
0
 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",""));
 }
Ejemplo n.º 3
0
 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"))
 {;}
Ejemplo n.º 4
0
  NumProcFluxError ( shared_ptr<PDE>  apde, const Flags & flags) : NumProc(apde) {

    fes    = GetPDE()->GetFESpace(flags.GetStringFlag("fespace",NULL));
    ext    = GetPDE()->GetFESpace(flags.GetStringFlag("extensionspace",NULL));
    hdivip = GetPDE()->GetBilinearForm(flags.GetStringFlag("hdivproduct",NULL));
    q      = GetPDE()->GetGridFunction(flags.GetStringFlag("discreteq",NULL));
    Q      = GetPDE()->GetGridFunction(flags.GetStringFlag("exactq",NULL));
    err    = GetPDE()->GetGridFunction(flags.GetStringFlag("errorsquareq",NULL));
  }
Ejemplo n.º 5
0
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;
}
Ejemplo n.º 6
0
 NumProc :: NumProc (const Flags & flags) 
   : NGS_Object (nullptr, "numproc")
 {
   if (flags.StringFlagDefined ("name"))
     SetName (flags.GetStringFlag ("name",""));
 }
Ejemplo n.º 7
0
 NumProcSumUp (PDE & apde, const Flags & flags)
   : NumProc (apde)
 {
   gfu = pde.GetGridFunction (flags.GetStringFlag ("gridfunction", "u"));
 }