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.
Projection of a grid function to a partial quadrature function
The update function allows projecting a grid function to a
partial quadrature function.
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, can be extrapolated
at nodes:
the
makeGridFunctioncreates theGridFunctionand the associated finite element space.the
updateGridFunctionfills theGridFunctionwith the values of the partial quadrature functions.
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:
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 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:
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);