52 static std::shared_ptr<BndCondPhysOp<TData>>
Create(
54 const std::vector<std::string> &components,
55 const std::string &execStr =
"")
58 expansionList, components, execStr);
61 static inline const std::string
name =
"BndCondPhys";
145 const unsigned int streamID = 0)
199 const unsigned blk,
const unsigned comp)
const
218 const unsigned comp)
const
252 const std::string &
name, TData &value)
const
269 const std::vector<std::string> &components)
270 :
Operator<TData>(expansionList, components)
279 size_t &offset,
size_t &compOffset) = 0;
284 const unsigned int streamID) = 0;
287 const unsigned int streamID) = 0;
294 const unsigned blk,
const unsigned comp)
const = 0;
298 const std::string &
name,
299 TData &value)
const = 0;
302 const unsigned blk,
const unsigned comp)
const = 0;
Whole-field operator base class and factory machinery shared by every operator family in the MultiReg...
bool m_hasTimeDependentBndPhys
static constexpr unsigned int m_defaultStreamID
Stream the storage is refilled on unless SetStreamID() says otherwise.
size_t GetNumComponents() const
Components held per block, i.e. the range valid for GetBndCondType().
~BndCondPhysOp() override=default
virtual bool v_HasTrace(const size_t tid) const =0
static std::shared_ptr< BndCondPhysOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="")
void GetTraceLocation(const size_t tid, unsigned &blk, size_t &offset, size_t &compOffset)
Where the data for global trace tid lives.
void SetStreamID(const unsigned int streamID)
Refill the storage on stream streamID, the default stream unless set. The trace flux operator sets th...
void UpdateBndPhys(const TData &time=0.0)
Bring the stored values up to date for time time.
BndCondPhysOp(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
virtual const TData * v_GetBlockNormals(const unsigned blk)=0
virtual TData * v_UpdateBlockPtr(const unsigned blk, const unsigned int streamID)=0
SpatialDomains::BoundaryConditionType GetBndCondType(const unsigned blk, const unsigned comp) const
Condition type component comp of block blk carries.
const TData * GetBlockPtr(const unsigned blk, const unsigned int streamID=0)
Base pointer for block blk, fetched through the memory manager on stream streamID.
virtual size_t v_GetNumBlocks() const =0
virtual const TData * v_GetBlockPtr(const unsigned blk, const unsigned int streamID)=0
void ResetStreamID()
Refill on the default stream again, undoing SetStreamID().
bool GetBndUserDefinedParam(const unsigned blk, const unsigned comp, const std::string &name, TData &value) const
A named parameter carried on the boundary tag.
bool HasTrace(const size_t tid) const
Does this operator hold boundary data for global trace tid?
const TData * GetBlockNormals(const unsigned blk)
Outward normals of block blk, in the same layout as its values: component major, GetBlockCompStride()...
virtual void v_UpdateBndPhys(const TData &time)=0
bool m_bndPhysInitialised
Set once the constructor's initial evaluation has happened, so that UpdateBndPhys() can skip regions ...
static const std::string name
unsigned int m_opStreamID
Stream the storage is refilled on. See SetStreamID().
size_t GetNumBlocks() const
Number of blocks the boundary data is stored in.
const std::string & GetBndUserDefined(const unsigned blk, const unsigned comp) const
USERDEFINEDTYPE of component comp of block blk.
virtual SpatialDomains::BoundaryConditionType v_GetBndCondType(const unsigned blk, const unsigned comp) const =0
virtual void v_GetTraceLocation(const size_t tid, unsigned &blk, size_t &offset, size_t &compOffset)=0
size_t GetBlockCompStride(const unsigned blk) const
Phys points in block blk, i.e. the stride between its components and equally the number of points to ...
virtual const std::string & v_GetBndUserDefined(const unsigned blk, const unsigned comp) const =0
virtual bool v_GetBndUserDefinedParam(const unsigned blk, const unsigned comp, const std::string &name, TData &value) const =0
TData * UpdateBlockPtr(const unsigned blk, const unsigned int streamID=0)
Writable base pointer for block blk.
virtual size_t v_GetBlockCompStride(const unsigned blk) const =0
Common base class of the operator family interfaces: holds the expansion list, component names and da...
std::vector< std::string > m_components
Names of the field components the operator was built for.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.