70template <
typename TData>
72 :
public ElmtBlockOp<FieldState::Phys, FieldState::Phys, TData>
91 static std::shared_ptr<PhysInterp1DScaledBlockOp<TData>>
Create(
92 const unsigned int block_idx,
95 const std::string &execStr,
const std::string &implStr)
98 template Create<PhysInterp1DScaledBlockOp>(
99 block_idx, exp, dataWarehouse, execStr, implStr);
104 static inline const std::string
name =
"BlockPhysInterp1DScaled";
141 const unsigned int block_idx,
160 const std::vector<unsigned int> &nq,
const NekDouble scale)
162 std::vector<unsigned int> nqScaled;
163 nqScaled.reserve(nq.size());
165 for (
size_t d = 0; d < nq.size(); ++d)
167 nqScaled.push_back((d != 0 && nq[0] - nq[d] == 1)
168 ?
static_cast<unsigned int>(scale * nq[0]) -
170 :
static_cast<unsigned int>(scale * nq[d]));
Block-level base class, implementation-strategy tags and device launch helpers shared by every elemen...
Base class of the per-family block operators: applies one element operation to every element of one b...
Per-block interface of the scaled interpolation: interpolates every element of one block onto its res...
void SetScaleFactor(const TData &scale)
Set this block's scale factor, and with it the number of output points per direction.
static const std::string name
Block-operator base name; Create() appends the execution space and implementation to it to form the f...
PhysInterp1DScaledBlockOp(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse)
Construct the interface part of a concrete block operator; called by the factory-registered creator f...
static std::shared_ptr< PhysInterp1DScaledBlockOp< TData > > Create(const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
Create one scaled-interpolation block operator through the block-operator factory,...
TData m_scale
Scale factor most recently set, or -1 while unset – the value the sum-factorised implementations asse...
~PhysInterp1DScaledBlockOp() override=default
static std::vector< unsigned int > GetScaledNumPoints(const std::vector< unsigned int > &nq, const NekDouble scale)
The per-direction point counts of the scale over-integrated grid this operator's interpolation and pr...
virtual void v_SetScaleFactor(const TData &scale)=0
Implementation hook for SetScaleFactor().
std::shared_ptr< NekDataWarehouse > NekDataWarehouseSharedPtr
std::shared_ptr< Expansion > ExpansionSharedPtr
FieldState
Possible states for Field data.