Evaluation of Quantities of Interest

After solving a PDE system, the solution is available in form of finite element functions. Besides visualizing the solution (see Output), evaluating certain quantities of interest is usually desired, such as the value of solutions at particular points, averages of the solution, fluxes, solution norms, or more complex quantities like von Mises equivalent stress in solid mechanics or lift and drag in fluid mechanics.

Pointwise evaluations

FE functions support the evaluation of values and derivatives by global position or local position for a given cell. Note that evaluation by global position involves a search for the cell in which the position is located, is therefore extremely expensive in large meshes, and should be avoided in production code.

auto uVal = u.value(GlobalPosition<Grid>({0.1,0.2,0.3});
auto uDeriv = u.derivative(cell,LocalPosition<Grid>({0.02,0.02,0.02}));

For a function with \( m \) components, a vector of type Dune::FieldVector<Scalar,m> is returned as value, even if \( m=1 \). The derivative evaluation consequently returns a Dune::FieldMatrix<Scalar,m,d>, where \( d \) the spatial dimension of the reference element.

Norms and integrals

Function views


Page last modified: 2022-01-11 21:28:39 +0100 CET