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

Public interface of the PhysTraceExtract element operator, which interpolates a volume physical-space field onto the quadrature points of the element's traces. More...

#include <MultiRegions/ElmtOps/ElmtOp.hpp>
#include <MultiRegions/ElmtOps/PhysTraceExtract/PhysTraceExtractBlockOp.hpp>

Go to the source code of this file.

Classes

class  Nektar::MultiRegions::PhysTraceExtractOp< TData >
 Whole-field interface of the trace extraction: interpolates the volume field of every element onto that element's trace quadrature points. More...
 

Namespaces

namespace  Nektar
 
namespace  Nektar::MultiRegions
 

Detailed Description

Public interface of the PhysTraceExtract element operator, which interpolates a volume physical-space field onto the quadrature points of the element's traces.

Given a field at the volume quadrature points of an element, this operator evaluates it at the trace quadrature points,

\[ u(\boldsymbol\xi^{tr}) = \sum_{\boldsymbol p} u_{\boldsymbol p}\, h_{\boldsymbol p}(\boldsymbol\xi^{tr}) , \]

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}\), the \(u_{\boldsymbol p}\) are the field values at the volume quadrature points, and the traces of an element are its endpoint vertices in one dimension, its edges in two and its faces in three.

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) , \]

so the evaluation splits into a normal-direction interpolation with \(h_{p_a}(\pm 1)\), which collapses the volume array onto the trace's plane, followed by a tangential interpolation of that plane onto the trace quadrature points with \(h_{p_b}(\xi_b^{tr})\). That is the structure the kernels exploit.

Both stages use eInterp tables taken from the data warehouse at setup: the normal-direction table \(h_p(\pm 1)\) (called ntbasis in this operator's kernels, nbasis in IProductWRTPhysTrace's) and the trace table \(h_p(\xi^{tr})\) (tbasis). Neither is an expansion basis evaluated anywhere, and nm throughout this family holds GetNumPoints, that is volume quadrature counts and not modes. The operator is a pure interpolation: no quadrature weights and no Jacobian enter it.

It is the adjoint of IProductWRTPhysTrace in the hat basis. Both build their eInterp BasisDataKeys from the same basis key, point count and points type. This operator applies the tables untransposed where IProductWRTPhysTrace applies them transposed and additionally weights them with the trace quadrature weights and the trace Jacobian.

The operator only ever interpolates point values. Nothing in this repository calls it outside its unit tests.

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

The per-shape entry points are generated from LibUtilities/BasicUtils/Switch/BlockOpShapeBlock.cpp.in, one translation unit per shape, execution space and data type, so the size-templated OperatorND instantiations of the SumFac families are kept. Those units include the switch template LibUtilities/BasicUtils/Switch/BlockOpSwitchPhysTraceExtract.h.in, which is named after this operator: its per-shape template arguments carry trace point counts per normal direction.

Note
There is one trace-extraction algorithm, registered under MultiRegions::SumFac and, where an execution space provides it, MultiRegions::SumFacTOP. A StdMat request is mapped to SumFac on the host and SumFacTOP on the device by PhysTraceExtractBlockOp::Create(), so a whole-field selection of StdMat, SumFac or SumFacTOP can include this operator.
Warning
For three-dimensional shapes the general normal-direction interpolation, the arm taken when the volume rule of the normal direction contains no domain endpoints (Gauss-type rules), produces wrong values on the bulk path. Its location has not been established: the ntbasis row strides the per-trace path dispatches are correct, that path taking its stride as an explicit tstride argument rather than from the face-loop bound. No three-dimensional Gauss fixture exists, so the unit-test suites stay green regardless.
See also
IProductWRTPhysTraceOp.hpp for the adjoint operator, the discontinuous Galerkin lifting term, which maps trace data back into a volume-shaped array.

Definition in file PhysTraceExtractOp.hpp.