116 if (exp->GetNcoeffs() == exp->GetTotPoints())
154 const auto shape = exp->DetShapeType();
158 exp->IsNodalNonTensorialExp() ||
159 static_cast<unsigned int>(exp->GetTotPoints()) >
164 const auto pointsKeys = exp->GetPointsKeys();
165 for (
int tr = 0; tr < exp->GetNtraces(); ++tr)
167 unsigned int collocated = 0;
168 for (
unsigned int d = 0; d < 2; ++d)
170 const auto traceKey = exp->GetTraceBasisKey(tr, d).GetPointsKey();
172 pointsKeys[exp->GetGeom()->GetDir(tr, d)] == traceKey ? 1 : 0;
190template <
typename TData>
192 :
public ElmtBlockOp<FieldState::Phys, FieldState::Phys, TData>
197 static std::shared_ptr<PhysLiftProjectBlockOp<TData>>
Create(
198 const unsigned int block_idx,
201 const std::string &execStr,
const std::string &implStr)
204 template Create<PhysLiftProjectBlockOp>(
205 block_idx, exp, dataWarehouse, execStr, implStr);
210 static inline const std::string
name =
"BlockPhysLiftProject";
254 std::unique_ptr<LibUtilities::BlockAccessor<TData, FieldState::Phys>>
256 std::unique_ptr<LibUtilities::BlockAccessor<TData, FieldState::Coeff>>
260 const unsigned int block_idx,
276 void CreateChain(
const std::string &execStr,
const std::string &implStr)
301 template <
typename MemSpace>
305 const unsigned int streamID = 0)
307 const unsigned int ncomp = in.GetNumComponents();
308 const unsigned int nhomo = in.GetNumHomoModes();
312 const size_t nelmtPad = in.GetNumElementsWithPadding();
313 const unsigned int nmTot = this->
m_exp->GetNcoeffs();
316 in.GetNumElements(), nelmtPad, in.GetNumData(), 1,
319 nullptr, ncomp, nhomo);
322 in.GetNumElements(), nelmtPad, nmTot, 1,
325 nullptr, ncomp, nhomo);
328 in.GetNumElements(), nelmtPad, nmTot, 1,
331 nullptr, ncomp, nhomo);
333 m_chainVol->template Copy<MemSpace>(in, streamID);
Per-block interface class of the backward-transform operator.
Block-level base class, implementation-strategy tags and device launch helpers shared by every elemen...
Per-block interface of the IProductWRTBase element operator.
Per-block interface class of the discontinuous Galerkin lifting operator IProductWRTPhysTrace.
Per-block interface of the MultiplyByElmtInvMass element operator.
Get the BlockAttributes for a given field state from an ExpList. This method basically captures ident...
A MemoryRegion represents a memory region.
unsigned int m_block_idx
Index of the block within the expansion list's Collections.
LocalRegions::ExpansionSharedPtr m_exp
Representative expansion of the block (its first element).
LibUtilities::NekDataWarehouseSharedPtr m_dataWarehouse
Data warehouse shared with the other operators on the expansion list.
static std::shared_ptr< BwdTransBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create one backward-transform block operator through the block-operator factory, under the key "Block...
Base class of the per-family block operators: applies one element operation to every element of one b...
static std::shared_ptr< IProductWRTBaseBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create one IProductWRTBase block operator through the block-operator factory.
static std::shared_ptr< IProductWRTPhysTraceBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create one trace inner-product block operator through the block-operator factory, under the key "Bloc...
static std::shared_ptr< MultiplyByElmtInvMassBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create one inverse mass block operator through the block-operator factory.
Base class of the per-block lift-and-project operators: physical space in, with the trace values thro...
std::unique_ptr< LibUtilities::BlockAccessor< TData, FieldState::Coeff > > m_chainCoef2
void SetScale(const TData &scale)
The factor the result is scaled by.
void SetAppend(const bool &append)
Accumulate onto the output instead of overwriting it.
~PhysLiftProjectBlockOp() override=default
static std::shared_ptr< PhysLiftProjectBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create a block operator through the block-operator factory; see ElmtBlockOp::Create().
void ApplyLift(LibUtilities::BlockAccessor< TData, FieldState::Phys > &inblock, LibUtilities::BlockAccessor< TData, FieldState::Phys > &trace, LibUtilities::BlockAccessor< TData, FieldState::Phys > &outblock)
Apply the block's operator to inblock with the lift of the block of trace values trace onto it; Apply...
void ApplyElmtInvMass(LibUtilities::BlockAccessor< TData, FieldState::Phys > &in, LibUtilities::BlockAccessor< TData, FieldState::Phys > &out, const unsigned int streamID=0)
The ElmtInvMass form, master's chain: in copied into the scratch, the trace lifted onto it,...
PhysLiftProjectBlockOp(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse)
void CreateChain(const std::string &execStr, const std::string &implStr)
Create the block operators of the ElmtInvMass form in execution space execStr: IProductWRTPhysTrace a...
std::shared_ptr< BwdTransBlockOp< TData > > m_chainBwdTrans
std::unique_ptr< LibUtilities::BlockAccessor< TData, FieldState::Coeff > > m_chainCoef
std::unique_ptr< LibUtilities::BlockAccessor< TData, FieldState::Phys > > m_chainVol
std::shared_ptr< IProductWRTPhysTraceBlockOp< TData > > m_chainLift
The ElmtInvMass form (CreateChain()): master's four block operators and the scratch of the inner prod...
static const std::string name
Block-operator base name; the factory key appends the execution space and the implementation.
virtual void v_ApplyLift(LibUtilities::BlockAccessor< TData, FieldState::Phys > &inblock, LibUtilities::BlockAccessor< TData, FieldState::Phys > &trace, LibUtilities::BlockAccessor< TData, FieldState::Phys > &outblock)=0
The implementation's ApplyLift().
std::shared_ptr< MultiplyByElmtInvMassBlockOp< TData > > m_chainInvMass
LibUtilities::BlockAccessor< TData, FieldState::Phys > * m_trace
The block of trace values lifted onto the inner products, set by v_ApplyLift() for that application a...
std::shared_ptr< IProductWRTBaseBlockOp< TData > > m_chainBasisTranspose
std::shared_ptr< NekDataWarehouse > NekDataWarehouseSharedPtr
std::shared_ptr< Expansion > ExpansionSharedPtr
static constexpr unsigned int physLiftProjectDenseTailMaxPoints
The most points per element the Device SumFacTOP implementation applies the StdInvMass form of a coll...
bool PhysLiftProjectDenseTail(const LocalRegions::ExpansionSharedPtr &exp)
Whether the Device SumFacTOP implementation applies the block whose representative expansion is exp t...
PhysLiftProjectForm
How a block applies .
@ StdInvMass
Affine elements: the basis transpose, the standard inverse mass over the element's Jacobian and the b...
@ Pointwise
As many modes as quadrature points: B is square, so , a pointwise scale by the quadrature weight and ...
@ ElmtInvMass
Deformed elements: IProductWRTPhysTrace, IProductWRTBase, MultiplyByElmtInvMass with each element's o...
PhysLiftProjectForm PhysLiftProjectFormOf(const LocalRegions::ExpansionSharedPtr &exp)
The form the block whose representative expansion is exp takes. The square test is on the total count...
PhysLiftProjectKernel
Which of the Device fused kernels of the StdInvMass form a shared-memory size is for.
@ ScaleBwdTrans
The scale and the backward transform, after it (PhysLiftProjectScaleBwdTransKernelLauncher()).
@ Fused
The lift and the form with a diagonal standard inverse mass in one launch (PhysLiftProjectKernelLaunc...
@ LiftBasisTranspose
The lift and the basis transpose, before the dense product (PhysLiftProjectLiftBasisTransposeKernelLa...
@ eDeformed
Geometry is curved or has non-constant factors.
FieldState
Possible states for Field data.
static const std::string name