Partial quadrature functions

Partial quadrature functions map quadrature points to values. A partial quadrature function is defined on the quadrature points associated with a unique material or a unique boundary.

Projection of a grid function to a partial quadrature function

The update function allows projecting a grid function to a partial quadrature function.

The grid function may be defined on the mesh of the partial quadrature function or on another mesh containing its material or boundary, for instance a submesh. In this case, the mapping between the elements of both meshes is computed internally and, in parallel, the call is collective. A boundary can only be seen through a submesh defined on materials if the boundary elements of the submesh are oriented as in the parent mesh.

Example of usage

const auto success = update(ctx, dest, src);

Extrapolating quadrature functions at nodes

Using a so-called GridFunction, a set of partial quadrature functions, each associated with a distinct material or each associated with a distinct boundary, can be extrapolated at nodes:

  • the makeGridFunction creates the GridFunction and the associated finite element space.

  • the updateGridFunction fills the GridFunction with the values of the partial quadrature functions.

The GridFunction can be defined on the whole mesh or on a submesh. Functions defined on materials require a mesh built on materials (the whole mesh or a submesh of materials), and functions defined on boundaries require a submesh built on boundaries. The partial quadrature functions must be defined on all the materials (or all the boundaries) of this mesh, and on those only. Functions defined on materials and on boundaries can not be mixed.

A GridFunction being an MFEM object, the reader may refer to the MFEM documentation for further details. In particular, a GridFunction can easily be exported to Paraview using MFEM’s ParaViewDataCollection.

Projecting quadrature functions at nodes

The \(L_{2}\) projection \(\bar{f}\) of a scalar quadrature function \(f\) is obtained by minimizing the following functional:

\[\int_{\Omega} \left(\bar{f}-f\right)^{2}\,\mathrm{d}\,V\]

where \(\Omega\) is the domain on which f is defined.

For a set of quadrature functions, the projection is computed on the union of the domains of the quadrature functions. For quadrature functions defined on boundaries, the integral is computed on those boundaries and the result is defined on the submesh of those boundaries.

For vectorial functions, the projection is computed component-wise.

Available functions

The computeL2Projection function allows projecting a set of quadrature functions on nodes by minimizing the \(L_{2}\) norm of the difference of the projection and the values of the quadrature functions.

The computeL2Projection function internally calls successively the functions createL2ProjectionResult and updateL2Projection. Those functions can be used directly if the projection has to be performed several times.

Example of usage

auto f = LinearFactor<parallel>::getFactory();
auto fct = PartialQuadratureFunction::evaluate(
    fespace, [](const real x, const real y) noexcept { return cos(x) * y; });
auto os = f.generate(ctx, "MUMPSSolver", fespace, {});
const auto oresult = computeL2Projection<parallel>(ctx, *os, {*fct});

Implicit gradient regularization

For a scalar function \(f\), the implicit gradient regularization \(\bar{f}\) is defined as the solution of:

\[\bar{f}-l_{c}^{2}\cdot\Delta\bar{f}=f\]

where \(l_{c}\) is a characteristic length.

See [PDBBDV96] for details.

For a vectorial function, the implicit gradient regularization is computed component-wise.

Available functions

The computeImplicitGradientRegularization function solves the previous equation to determine \(\bar{f}\).

The computeImplicitGradientRegularization function internally calls successively the functions createL2Projection and updateImplicitGradientRegularization. Those functions can be used directly if the projection has to be performed several times.

Example of usage

auto fct = PartialQuadratureFunction::evaluate(
    space, [](const real x, const real) noexcept {
      const auto c = std::cos(4 * pi * x);
      return (1 + l0 * l0 * 16 * pi * pi) * c;
    });
auto os = f.generate(ctx, "MUMPSSolver", fespace, {});
const auto oresult =
    computeImplicitGradientRegularization<parallel>(ctx, *os, {*fct}, l0);

Miscellaneous functions

rotateThermodynamicForcesToGlobalFrame