126template <
typename TData>
128 :
public ElmtOp<FieldState::Phys, FieldState::Coeff, TData>
154 static std::shared_ptr<IProductWRTBaseOp<TData>>
Create(
155 const MultiRegions::ExpListSharedPtr &expansionList,
156 const std::vector<std::string> &components,
157 const std::string &execStr = "", const std::string &implStr = "")
160 template Create<IProductWRTBaseOp, IProductWRTBaseBlockOp>(
161 expansionList, components, execStr, implStr);
166 static inline const std::string
name =
"IProductWRTBase";
181 for (
unsigned int blk = 0; blk < this->
m_blockOp.size(); ++blk)
201 for (
unsigned int blk = 0; blk < this->
m_blockOp.size(); ++blk)
203 this->
m_blockOp[blk]->SetIntegration(value);
219 for (
unsigned int blk = 0; blk < this->
m_blockOp.size(); ++blk)
227 std::vector<std::shared_ptr<IProductWRTBaseBlockOp<TData>>>
m_blockOp;
238 const std::vector<std::string> &components)
260 ASSERTL1(in.GetNumComponents() == out.GetNumComponents(),
261 "Number of input and output components differ");
263 ASSERTL1(in.GetNumHomoModes() == out.GetNumHomoModes(),
264 "Number of input and output homogeneous modes differ");
267 for (
unsigned int blk = 0; blk < this->m_blockOp.size(); ++blk)
270 auto &inblock = in.GetBlocks()[blk];
271 auto &outblock = out.GetBlocks()[blk];
273 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 IProductWRTBase 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...
Whole-field interface of the inner product with the basis: integrates a physical-space field against ...
std::vector< std::shared_ptr< IProductWRTBaseBlockOp< TData > > > m_blockOp
One block operator per element block, filled by Create().
void SetIntegration(bool value)
Switch the quadrature metric on (the initial state) or off for every block operator.
void v_Apply(LibUtilities::Field< TData, FieldState::Phys > &in, LibUtilities::Field< TData, FieldState::Coeff > &out) override
Apply the operator block by block.
static std::shared_ptr< IProductWRTBaseOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
Build a complete IProductWRTBase operator through the operator and block-operator factories.
IProductWRTBaseOp(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...
void SetScale(const TData &scale)
Set the factor every block operator multiplies its result by.
void SetAppend(const bool &append)
Switch all block operators between overwrite and accumulate mode.
static const std::string name
Operator base name; Create() appends the execution space to it to form the operator-factory key.
~IProductWRTBaseOp() override=default
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
FieldState
Possible states for Field data.