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

Whole-field interface of the IProductWRTDerivBase element operator, which takes a vector-valued physical-space field to the inner product of that vector with the gradient of the basis. More...

#include <MultiRegions/ElmtOps/ElmtOp.hpp>
#include <MultiRegions/ElmtOps/IProductWRTDerivBase/IProductWRTDerivBaseBlockOp.hpp>

Go to the source code of this file.

Classes

class  Nektar::MultiRegions::IProductWRTDerivBaseOp< TFieldOut, TData >
 Whole-field interface of the inner product with the gradient of the basis: takes a physical-space field of coordDim components per output component to a field in state TFieldOut. More...
 

Namespaces

namespace  Nektar
 
namespace  Nektar::MultiRegions
 

Detailed Description

Whole-field interface of the IProductWRTDerivBase element operator, which takes a vector-valued physical-space field to the inner product of that vector with the gradient of the basis.

For every element the operator evaluates

\[ I_p = (\nabla \phi_p, {\bf f}) = \sum_k \int \frac{\partial \phi_p}{\partial x_k} f_k \, J \, \mathrm{d}\xi , \]

the weak-form contribution a divergence term makes to the right-hand side of a discretised equation. It is the block-operator equivalent of ExpList::IProductWRTDerivBase.

The integrand is evaluated on the reference element, so the chain rule is applied first: with \(\partial\phi_p/\partial x_k = \sum_d (\partial\xi_d/\partial x_k)\,\partial\phi_p/\partial\xi_d\) the sum over the coordinate directions k is folded into one physical-space field per reference direction d,

\[ g_d = \sum_{k} \frac{\partial \xi_d}{\partial x_k} f_k , \]

and the operator is the sum over the reference directions of the inner product of \(g_d\) with \(\partial\phi_p/\partial\xi_d\) on the reference element, weighted by the quadrature weights and the Jacobian. The \(\partial\xi_d/\partial x_k\) are the derivative factors held per block by the geometric data warehouse (DerivFactorKey; one set per element on a regular block, one set per quadrature point on a deformed one).

The input field therefore carries coordDim components per output component – one per coordinate direction of the (possibly embedded) element – with the direction index running fastest: output component c is formed from input components c * coordDim to c * coordDim + coordDim - 1. On a multi-plane 3DH1 expansion there are three per output component whatever coordDim, the block operators reading the first coordDim and the z term below the third. Every implementation assumes this layout; the whole-field v_Apply() checks only the homogeneous-mode counts, the two fields legitimately differing in their component counts.

The output state is a template parameter, and the two instantiations are separate operators with separate factory keys:

On a multi-plane 3DH1 expansion the block operators cover the x and y terms plane by plane, and for a Coeff output v_ApplyFFT() then subtracts the inner product with the basis of \(\partial f_z/\partial z\), the z term after integration by parts. The Phys output does not support homogeneous expansions.

IProductWRTDerivBaseOp is the whole-field interface class of the family (see ElmtOp.hpp for the two-level element-operator structure); the per-block interface is IProductWRTDerivBaseBlockOp (IProductWRTDerivBaseBlockOp.hpp). The numerical work lives in the detail::IProductWRTDerivBaseBlockOpImpl definitions – IProductWRTDerivBaseBlockOpSerialAVXStdMat.hpp and IProductWRTDerivBaseBlockOpSerialAVXSumFac.hpp for the Serial and AVX execution spaces, IProductWRTDerivBaseBlockOpDeviceStdMat.hpp and IProductWRTDerivBaseBlockOpDeviceSumFac.hpp for the Device execution space – registered with the block-operator factory by CMake-generated translation units, one per execution space, implementation and data type, each registering both output states.

Definition in file IProductWRTDerivBaseOp.hpp.