Element-block operator that computes the physical-space derivative \(\nabla u\) over a collection of elements.
More...
|
| static std::shared_ptr< PhysDerivOp< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="") |
| | Create a physical-derivative operator, its per-block operators and, for a multi-plane 3DH1 expansion, its homogeneous z-derivative.
|
| |
| static std::shared_ptr< TOperator< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="") |
| | Build a complete element operator: the whole-field interface object plus one block operator per element block.
|
| |
| static std::string | GetOpImpl (const std::string &opName, const std::string &opExecSpace, LibUtilities::SessionReaderSharedPtr session, const StdRegions::StdExpansionSharedPtr &exp=nullptr, const std::string &policyName="") |
| | Return the implementation for an operator.
|
| |
| template<template< typename > typename TOperator> |
| static std::shared_ptr< TOperator< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components, const std::string &execStr) |
| | Create a concrete operator instance through the operator factory.
|
| |
| static std::string | GetOpExecSpace (std::shared_ptr< LibUtilities::SessionReader > session, const bool warn=true) |
| | Return the execution space name ("opExecSpace") for an operator.
|
| |
| static const DefaultOpImplRule * | GetDefaultOpImplRule (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| | Return the row of the default implementation table (DefaultOpImplTable.hpp) that a block of elements takes, or null if none does.
|
| |
| static std::string | GetDefaultOpImpl (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| | Return the implementation a block of elements takes when neither the command line nor the session names one for its operator.
|
| |
| static std::vector< unsigned int > | GetDefaultInterleaveWidths (const MultiRegions::ExpListSharedPtr &expansionList) |
| | Return the default interleave widths, one per block of expansionList, that persistent Fields (e.g. solution storage, time-integration and linear-solver workspace) built on it should be constructed with.
|
| |
| static bool | IsDiscontinuousProjection (std::shared_ptr< LibUtilities::SessionReader > session) |
| | Return true if the session uses a Discontinuous (DG) projection.
|
| |
|
| | PhysDerivOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) |
| | Construct the interface part of a concrete implementation; called by the factory-registered creator functions.
|
| |
| | ~PhysDerivOp () override=default |
| |
| void | v_Apply (LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Phys > &out) override |
| | Apply the physical derivative block by block, adding the homogeneous z-derivative for a multi-plane 3DH1 field.
|
| |
| virtual void | v_ApplyFFT (LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Phys > &out)=0 |
| | Homogeneous z-derivative, called by v_Apply() after the block loop; writes the z component of every output block of a multi-plane 3DH1 field and leaves any other field untouched.
|
| |
| | ElmtOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) |
| | Construct the interface part of a concrete operator; called by the factory-registered creator functions.
|
| |
| | ~ElmtOp () override=default |
| |
| virtual void | v_Apply (LibUtilities::Field< TData, TFieldIn > &in, LibUtilities::Field< TData, TFieldOut > &out)=0 |
| | Implementation hook for Apply().
|
| |
template<typename TData>
class Nektar::MultiRegions::PhysDerivOp< TData >
Element-block operator that computes the physical-space derivative \(\nabla u\) over a collection of elements.
Definition at line 110 of file PhysDerivOp.hpp.
template<typename TData >
Create a physical-derivative operator, its per-block operators and, for a multi-plane 3DH1 expansion, its homogeneous z-derivative.
Builds the interface object under the factory key "PhysDeriv" + execStr and one block operator per element block under "BlockPhysDeriv" + execStr + implStr; see ElmtOp::Create for the two-stage construction and for the session defaults used when execStr or implStr are empty. If expansionList is a 3D-homogeneous-1D expansion holding more than one homogeneous plane on this rank, the constructor of detail::PhysDerivOpImpl additionally builds its z-derivative, detail::PhysDerivOpImpl::m_zOp; for every other expansion that is left null.
- Parameters
-
| expansionList | Expansion list the operator acts on. |
| components | Names of the field components the operator is set up for; these name the input components, the output field carrying coordDim (or, for multi-plane 3DH1, three) of them each. |
| execStr | Execution space ("Serial", "AVX" or "Device"); session default if empty. |
| implStr | Block implementation ("StdMat", "SumFac" or, on the Device space, "SumFacTOP"); session default if empty. |
- Returns
- The fully assembled operator, ready to Apply.
Definition at line 144 of file PhysDerivOp.hpp.
148 {
150 template Create<PhysDerivOp, PhysDerivBlockOp>(
151 expansionList, components, execStr, implStr);
152 }
Referenced by Nektar::detail::HOutflowBndCondOpImpl< ExecSpace, TData >::BuildBoundaryElementData(), TestFusedElmt< Policy, VISCOUS >::Reference(), and TestPhysDeriv< TData >::RunTestCase().
template<typename TData >
Apply the physical derivative block by block, adding the homogeneous z-derivative for a multi-plane 3DH1 field.
Requires that the fields conform – out must have exactly coordDim times as many components as in for a field with a single homogeneous mode and exactly three times as many for one with several, and the same number of homogeneous modes – then hands each pair of blocks to the corresponding entry of m_blockOp. It then calls v_ApplyFFT(), which for a field with more than one homogeneous mode writes the z component of every output block.
- Parameters
-
| in | Physical-space input field. |
| out | Physical-space output field, overwritten; see the file notes for its component count. |
Definition at line 198 of file PhysDerivOp.hpp.
200 {
202 out.GetNumComponents() /
203 (
in.GetNumHomoModes() == 1
204 ? static_cast<unsigned int>(
205 this->m_expansionList->GetCoordim(0))
206 : 3u),
207 "Number of input and output components differ");
208
210 "Number of input and output homogeneous modes differ");
211
212
213 for (
unsigned int blk = 0; blk < this->
m_blockOp.size(); ++blk)
214 {
215
216 auto &inblock =
in.GetBlocks()[blk];
217 auto &outblock =
out.GetBlocks()[blk];
218
219 this->
m_blockOp[blk]->Apply(inblock, outblock);
220 }
221
222
224 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
virtual void v_ApplyFFT(LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Phys > &out)=0
Homogeneous z-derivative, called by v_Apply() after the block loop; writes the z component of every o...
std::vector< std::shared_ptr< PhysDerivBlockOp< TData > > > m_blockOp
One block operator per element block of the expansion list; populated by ElmtOp::Create().
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT in
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT out
References ASSERTL1, and Nektar::MultiRegions::PhysDerivOp< TData >::v_ApplyFFT().