122template <
typename TData>
150 static std::shared_ptr<DivergenceOp<TData>>
Create(
151 const MultiRegions::ExpListSharedPtr &expansionList,
152 const std::vector<std::string> &components,
153 const std::string &execStr = "", const std::string &implStr = "")
156 template Create<DivergenceOp, DivergenceBlockOp>(
157 expansionList, components, execStr, implStr);
162 static inline const std::string
name =
"Divergence";
167 std::vector<std::shared_ptr<DivergenceBlockOp<TData>>>
m_blockOp;
178 const std::vector<std::string> &components)
201 ASSERTL1(in.GetNumHomoModes() == out.GetNumHomoModes(),
202 "Number of input and output homogeneous modes differ");
205 for (
unsigned int blk = 0; blk < this->m_blockOp.size(); ++blk)
208 auto &inblock = in.GetBlocks()[blk];
209 auto &outblock = out.GetBlocks()[blk];
211 this->m_blockOp[blk]->Apply(inblock, outblock);
Per-block interface of the Divergence element operator.
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....
A Field represents expansion data to be operated on.
Whole-field interface of the divergence operator: sums the physical derivatives of the first shape-d...
void v_Apply(LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Phys > &out) override
Apply the divergence block by block.
std::vector< std::shared_ptr< DivergenceBlockOp< TData > > > m_blockOp
One block operator per element block, filled by ElmtOp::Create and driven in order by v_Apply().
DivergenceOp(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
Construct the interface part of a concrete operator; called by the factory-registered creator functio...
~DivergenceOp() override=default
static std::shared_ptr< DivergenceOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
Create a divergence operator through the operator and block-operator factories.
virtual void v_ApplyFFT(LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Phys > &out)=0
Add to out; called by v_Apply() after the block loop.
static const std::string name
Operator base name; Create() appends the execution space to it to form the factory key.
Common base class of the element-operator interfaces: an operator applied independently to every elem...
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
FieldState
Possible states for Field data.