180template <
typename TData>
182 :
public ElmtOp<FieldState::Phys, FieldState::Phys, TData>
208 static std::shared_ptr<PhysTraceExtractOp<TData>>
Create(
209 const MultiRegions::ExpListSharedPtr &expansionList,
210 const std::vector<std::string> &components,
211 const std::string &execStr = "", const std::string &implStr = "")
214 template Create<PhysTraceExtractOp, PhysTraceExtractBlockOp>(
215 expansionList, components, execStr, implStr);
220 static inline const std::string
name =
"PhysTraceExtract";
261 const unsigned outOffset)
264 for (
unsigned int blk = 0; blk < this->
m_blockOp.size(); ++blk)
266 ExtractTrace(traceid, in.GetBlocks()[blk], out.GetBlocks()[blk],
292 const unsigned traceid,
295 const unsigned outOffset,
const unsigned blk)
298 "Block index exceeds the number of blocks");
301 "Number of input and output components differ");
304 "Number of input and output homogeneous modes differ");
306 this->
m_blockOp[blk]->ExtractTrace(traceid, inblock, outblock,
337 for (
unsigned blk = 0; blk < this->
m_blockOp.size(); ++blk)
339 this->
m_blockOp[blk]->SetIsCollocated(isCollocated);
357 "The normal component is formed on the elements' own trace "
358 "points, not the Gauss-Lobatto ones.");
360 out.GetNumComponents() *
361 this->m_expansionList->GetCoordim(0),
362 "The input needs one component per output component and "
363 "coordinate direction");
364 bool needsScratch =
false;
365 for (
const auto &blockOp : this->
m_blockOp)
367 needsScratch |= blockOp->NormalComponentNeedsScratch();
374 "PhysTraceExtract normal component",
375 GetLocTraceBlockAttributes<TData, FieldState::Phys>(
379 for (
unsigned int blk = 0; blk < this->
m_blockOp.size(); ++blk)
381 this->
m_blockOp[blk]->ApplyNormalComponent(
384 out.GetBlocks()[blk]);
419 for (
unsigned blk = 0; blk < this->
m_blockOp.size(); ++blk)
421 this->
m_blockOp[blk]->SetUseGLLTracePoints(useGLLTracePoints);
428 std::vector<std::shared_ptr<PhysTraceExtractBlockOp<TData>>>
m_blockOp;
445 const std::vector<std::string> &components)
471 ASSERTL1(in.GetNumComponents() == out.GetNumComponents(),
472 "Number of input and output components differ");
474 ASSERTL1(in.GetNumHomoModes() == out.GetNumHomoModes(),
475 "Number of input and output homogeneous modes differ");
478 for (
unsigned int blk = 0; blk < this->m_blockOp.size(); ++blk)
481 auto &inblock = in.GetBlocks()[blk];
482 auto &outblock = out.GetBlocks()[blk];
484 this->m_blockOp[blk]->Apply(inblock, outblock);
Whole-field base class and factory machinery shared by every element-operator family in the MultiRegi...
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Get the BlockAttributes for a given field state from an ExpList. This method basically captures ident...
unsigned int GetNumComponents() const
Gets the number of components.
unsigned int GetNumHomoModes() const
Gets the number of homogeneous modes.
A Field represents expansion data to be operated on.
std::vector< BlockAccessor< TData, TState > > & GetBlocks()
Get BlockAccessors for the field.
unsigned int GetNumComponents() const
Gets the number of components for a vector field.
Common base class of the element-operator interfaces: an operator applied independently to every elem...
MultiRegions::ExpListSharedPtr m_expansionList
Expansion list the operator acts on.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
FieldState
Possible states for Field data.