MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / HybridDGFESpace

Method HybridDGFESpace

comp/facetfespace.cpp:1412–1459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410
1411
1412 HybridDGFESpace :: HybridDGFESpace (shared_ptr<MeshAccess> ama,
1413 const Flags & flags)
1414 : CompoundFESpace (ama, flags)
1415 {
1416 type = "HDG";
1417 Flags l2flags(flags), facetflags(flags);
1418
1419 int order = int (flags.GetNumFlag ("order", 1));
1420
1421 if (flags.GetDefineFlag("l2_dofs_together")){
1422 l2flags.SetFlag ("all_dofs_together");
1423 cout << "l2_dofs_together active" << endl;
1424 }
1425
1426 facetflags.SetFlag("orderfacet", order);
1427 if (flags.NumListFlagDefined ("dirichlet"))
1428 facetflags.SetFlag ("dirichlet", flags.GetNumListFlag ("dirichlet"));
1429
1430 if (flags.NumFlagDefined ("relorder")) facetflags.SetFlag("variableorder");
1431
1432 // const FESpaceClasses::FESpaceInfo * info;
1433 auto info = GetFESpaceClasses().GetFESpace("DGhotp");
1434 if (!info) info = GetFESpaceClasses().GetFESpace("l2hotp");
1435 if (!info) info = GetFESpaceClasses().GetFESpace("l2ho");
1436
1437 AddSpace (info->creator(ma, l2flags));
1438 AddSpace (make_shared<FacetFESpace> (ma, facetflags));
1439
1440 if (flags.GetDefineFlag ("edges"))
1441 throw Exception ("HDG fespace with edges not supported");
1442
1443 static ConstantCoefficientFunction one(1);
1444 integrator[VOL] = GetIntegrators().CreateBFI("HDG_mass", ma->GetDimension(), &one);
1445
1446 if (ma->GetDimension() == 2)
1447 {
1448 // integrator = new HDG_MassIntegrator<2> (&one);
1449 integrator[BND].reset (new RobinIntegrator<2> (&one));
1450 evaluator[VOL] = make_shared<T_DifferentialOperator<ngcomp::DiffOpIdHDG<2>>>();
1451 }
1452 else
1453 {
1454 // integrator = new HDG_MassIntegrator<3> (&one);
1455 integrator[BND] = make_shared<RobinIntegrator<3>> (&one);
1456 evaluator[VOL] = make_shared<T_DifferentialOperator<ngcomp::DiffOpIdHDG<3>>>();
1457 }
1458 integrator[BND] = make_shared<CompoundBilinearFormIntegrator> (integrator[BND], 1);
1459 }
1460
1461 HybridDGFESpace :: ~HybridDGFESpace () { ; }
1462

Callers

nothing calls this directly

Calls 4

GetFESpaceMethod · 0.80
CreateBFIMethod · 0.80
SetFlagMethod · 0.45
GetDimensionMethod · 0.45

Tested by

no test coverage detected