101template <
typename TData>
103 :
public ElmtOp<FieldState::Coeff, FieldState::Coeff, TData>
133 static std::shared_ptr<MultiplyByElmtInvMassOp<TData>>
Create(
134 const MultiRegions::ExpListSharedPtr &expansionList,
135 const std::vector<std::string> &components,
136 const std::string &execStr = "", const std::string &implStr = "")
141 expansionList, components, execStr, implStr);
146 static inline const std::string
name =
"MultiplyByElmtInvMass";
150 std::vector<std::shared_ptr<MultiplyByElmtInvMassBlockOp<TData>>>
m_blockOp;
161 const std::vector<std::string> &components)
182 ASSERTL1(in.GetNumComponents() == out.GetNumComponents(),
183 "Number of input and output components differ");
185 ASSERTL1(in.GetNumHomoModes() == out.GetNumHomoModes(),
186 "Number of input and output homogeneous modes differ");
189 for (
unsigned int blk = 0; blk < this->m_blockOp.size(); ++blk)
192 auto &inblock = in.GetBlocks()[blk];
193 auto &outblock = out.GetBlocks()[blk];
195 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 of the MultiplyByElmtInvMass element 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...
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 eleme...
Base class of the per-block inverse mass operators: applies each element's inverse mass matrix to tha...
Whole-field interface of the element-wise inverse mass operator: replaces every element's coefficient...
static const std::string name
Operator base name; Create() appends the execution space to it to form the operator-factory key.
static std::shared_ptr< MultiplyByElmtInvMassOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
Build a complete element-wise inverse mass operator through the operator and block-operator factories...
std::vector< std::shared_ptr< MultiplyByElmtInvMassBlockOp< TData > > > m_blockOp
One block operator per element block, filled by Create().
void v_Apply(LibUtilities::Field< TData, FieldState::Coeff > &in, LibUtilities::Field< TData, FieldState::Coeff > &out) override
Apply the operator block by block.
MultiplyByElmtInvMassOp(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...
~MultiplyByElmtInvMassOp() override=default
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
FieldState
Possible states for Field data.