109template <
typename TData>
144 static std::shared_ptr<PhysDerivOp<TData>>
Create(
145 const MultiRegions::ExpListSharedPtr &expansionList,
146 const std::vector<std::string> &components,
147 const std::string &execStr = "", const std::string &implStr = "")
150 template Create<PhysDerivOp, PhysDerivBlockOp>(
151 expansionList, components, execStr, implStr);
157 static inline const std::string
name =
"PhysDeriv";
162 std::vector<std::shared_ptr<PhysDerivBlockOp<TData>>>
m_blockOp;
173 const std::vector<std::string> &components)
202 out.GetNumComponents() /
203 (in.GetNumHomoModes() == 1
204 ?
static_cast<unsigned int>(
205 this->m_expansionList->GetCoordim(0))
207 "Number of input and output components differ");
209 ASSERTL1(in.GetNumHomoModes() == out.GetNumHomoModes(),
210 "Number of input and output homogeneous modes differ");
213 for (
unsigned int blk = 0; blk < this->m_blockOp.size(); ++blk)
216 auto &inblock = in.GetBlocks()[blk];
217 auto &outblock = out.GetBlocks()[blk];
219 this->m_blockOp[blk]->Apply(inblock, outblock);
Whole-field base class and factory machinery shared by every element-operator family in the MultiRegi...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Per-block interface class of the physical-derivative operator.
A Field represents expansion data to be operated on.
Common base class of the element-operator interfaces: an operator applied independently to every elem...
Element-block operator that computes the physical-space derivative over a collection of elements.
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...
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,...
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 3...
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 f...
std::vector< std::shared_ptr< PhysDerivBlockOp< TData > > > m_blockOp
One block operator per element block of the expansion list; populated by ElmtOp::Create().
static const std::string name
Operator base name; ElmtOp::Create() appends the execution space to it to form the factory key,...
~PhysDerivOp() override=default
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
FieldState
Possible states for Field data.