Nektar++
Loading...
Searching...
No Matches
Classes | Namespaces
MassOp.hpp File Reference

Whole-field interface of the Mass element operator, which applies every element's mass matrix to a coefficient-space field. More...

#include <MultiRegions/ElmtOps/ElmtOp.hpp>
#include <MultiRegions/ElmtOps/Mass/MassBlockOp.hpp>

Go to the source code of this file.

Classes

class  Nektar::MultiRegions::MassOp< TData >
 Whole-field interface of the mass operator: applies each element's mass matrix to a coefficient-space field. More...
 

Namespaces

namespace  Nektar
 
namespace  Nektar::MultiRegions
 

Detailed Description

Whole-field interface of the Mass element operator, which applies every element's mass matrix to a coefficient-space field.

For every element the operator integrates the expansion against each of that element's own basis functions,

\[ I_n = \int_{\Omega^e} \phi_n\,u \,\mathrm{d}x = \sum_m \hat{u}_m \int_{\Omega^e} \phi_n\,\phi_m \,\mathrm{d}x \approx \sum_i w_i\,J_i\,\phi_n(\xi_i) \sum_m \hat{u}_m\,\phi_m(\xi_i), \]

that is, it applies the element mass matrix to the input coefficients. Written that way the operator is the composition of the two families it is built from: BwdTrans evaluates \(u(\xi_i) = \sum_m \hat{u}_m \phi_m(\xi_i)\) at the quadrature points, and IProductWRTBase integrates that result against the basis, supplying the quadrature metric – the tensor product of the expansion's per-direction weight tables \(w_i\) times the element Jacobian \(J_i\) (one value per element for a regular geometry, one per quadrature point for a deformed one). Every implementation in this family reuses those two families' kernels or standard-region matrices for the two stages; they differ in where the quadrature metric is applied, set out below, and in that the regular-geometry StdMat path collapses the pair into the single precomputed standard-region mass matrix.

Where the metric enters depends on the implementation:

MassOp is the whole-field interface class of the family (see ElmtOp.hpp for the two-level element-operator structure); the per-block interface is MassBlockOp (MassBlockOp.hpp) and the factory shell detail::MassOpImpl (MassOpImpl.hpp). The numerical work lives in the detail::MassBlockOpImpl definitions – MassBlockOpSerialAVXStdMat.hpp and MassBlockOpSerialAVXSumFac.hpp for the Serial and AVX execution spaces, MassBlockOpDeviceStdMat.hpp for the Device StdMat implementation and MassBlockOpDeviceSumFac.hpp for both Device sum-factorisation strategies (SumFac and SumFacTOP) – registered with the block-operator factory by CMake-generated translation units, one per execution space, implementation and data type. The sum-factorised kernel launchers are in MassBlockOpSerialAVXSumFacKernels.hpp, MassBlockOpDeviceSumFacKernels.hpp and MassBlockOpDeviceSumFacTOPKernels.hpp.

See also
BwdTransOp.hpp and IProductWRTBaseOp.hpp for the two operators composed here, in particular the note in the latter on the weight tables of the collapsed shapes.

Definition in file MassOp.hpp.