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

Public interface of the IProductWRTPhysTrace element operator, the discontinuous Galerkin lifting term, which maps a field living on an element's traces into an array shaped like the element's volume physical space. More...

#include <MultiRegions/ElmtOps/ElmtOp.hpp>
#include <MultiRegions/ElmtOps/IProductWRTPhysTrace/IProductWRTPhysTraceBlockOp.hpp>

Go to the source code of this file.

Classes

class  Nektar::MultiRegions::IProductWRTPhysTraceOp< TData >
 Whole-field interface of the DG lifting term: lifts trace data into a volume physical-space shaped array for every element. More...
 

Namespaces

namespace  Nektar
 
namespace  Nektar::MultiRegions
 

Detailed Description

Public interface of the IProductWRTPhysTrace element operator, the discontinuous Galerkin lifting term, which maps a field living on an element's traces into an array shaped like the element's volume physical space.

Given a field already evaluated at the quadrature points of an element's traces, typically a numerical flux \(\hat f\), this operator accumulates

\[ \Lambda_{\boldsymbol p} \mathrel{+}= \sum_{F \in \partial E} \int_F \hat f \; h_{\boldsymbol p}\big|_F \; J_F \, \mathrm{d}s , \]

where \(h_{\boldsymbol p}(\boldsymbol\xi) = \prod_a h_{p_a}(\xi_a)\) is the tensor product of the cardinal (hat) functions of the volume quadrature grid, \(h_p(\xi_q) = \delta_{pq}\), \(J_F\) is the trace Jacobian, and the traces \(F\) of an element \(E\) are its endpoint vertices in one dimension, its edges in two and its faces in three.

The entries of \(\Lambda\) are therefore surface inner products of the trace field against a single cardinal function of the volume grid. They are not modal coefficients and not point values of any function. The modal right-hand side is recovered downstream by a transposed basis contraction carrying neither quadrature weights nor volume Jacobian – in the operator pipeline that is IProductWRTBase created with SetIntegration(false), i.e. \(B^{\mathsf{T}}\) rather than \(B^{\mathsf{T}} W\) – because the surface rule's weights and the face Jacobian are already inside \(\Lambda\).

On a direction- \(a\) trace at \(\xi_a = \pm 1\) the tensor product factorises as

\[ h_{\boldsymbol p}\big|_{\xi_a = \pm 1} = h_{p_a}(\pm 1) \prod_{b \neq a} h_{p_b}(\xi_b) , \]

the normal-direction value times the hat functions of the in-trace directions. That is the structure the kernels exploit: a sum-factorised inner product over the trace quadrature points followed by a rank-1 lift along the normal direction.

The family follows the standard element-operator layout (see ElmtOp.hpp):

The per-shape entry points, the ShapeBlock() specialisations, come from the generated translation-unit template LibUtilities/BasicUtils/Switch/BlockOpShapeBlock.cpp.in, so the size-templated OperatorND() instantiations of the SumFac families are kept. They expand the switch template LibUtilities/BasicUtils/Switch/BlockOpSwitchPhysTraceExtract.h.in, whose per-shape template arguments carry trace point counts per normal direction.

Note
There is one trace inner-product algorithm, registered under MultiRegions::SumFac and, for some execution spaces, also under MultiRegions::SumFacTOP. A StdMat request is mapped to SumFac on the host and SumFacTOP on the device by IProductWRTPhysTraceBlockOp::Create(), so a whole-field selection of StdMat, SumFac or SumFacTOP can include this operator.
Warning
A nodal expansion gets a result in the modal space. The operator integrates against the volume basis and stops, whereas a nodal expansion's coefficients are the ones StdNodalTriExp::v_IProductWRTBase reaches by following that integral with NodalToModalTranspose. That transform is applied nowhere here, so every coefficient a NodalTri, NodalTet or NodalPrism produces is wrong. The nodal meshes under UnitTests/run are registered as fixtures but no test case uses them for this operator, the four that would be written failing on this.
See also
PhysTraceExtractOp.hpp for the adjoint operator, which interpolates a volume field onto the trace points and applies the same interpolation tables untransposed. It maps physical values to physical values and so is not affected by the nodal coefficient space.

Definition in file IProductWRTPhysTraceOp.hpp.