MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
maia::post::collector::PostCellCollector< nDim > Class Template Reference

Class that represents Post cell collector. More...

#include <postcartesiancellcollector.h>

Inheritance diagram for maia::post::collector::PostCellCollector< nDim >:
[legend]
Collaboration diagram for maia::post::collector::PostCellCollector< nDim >:
[legend]

Public Types

template<class T >
using Invalid = typename maia::post::collector::Invalid< T >
 

Public Member Functions

constexpr PostCellCollector ()=default
 Default c'tor does nothing. More...
 
MFloatvariable (const MInt id, const MInt dim)
 Accessor for variables. More...
 
MFloat variable (const MInt id, const MInt dim) const
 Accessor for variables (const version). More...
 
constexpr MInt noVariables () const
 Return number of variables. More...
 
BitsetType::reference hasProperty (const MInt id, const PostCell p)
 Accessor for properties. More...
 
MBool hasProperty (const MInt id, const PostCell p) const
 Accessor for properties (const version). More...
 
void resetProperties (const MInt id)
 Reset all properties. More...
 
BitsetTypeproperties (const MInt id)
 Accessor for properties. More...
 
void setNoVariables (const MInt noVars_)
 
- Public Member Functions inherited from maia::container::Container< PostCellCollector< nDim >, Invalid >
constexpr Container ()=default
 Default c'tor does nothing. More...
 
constexpr MInt capacity () const
 Return capacity (i.e., maximum number of nodes) More...
 
void reset (const MInt capacity)
 Reset tree, re-create data structures with given capacity, and set size to zero. More...
 
void resize (const MInt capacity)
 Resize the container capacity. More...
 
constexpr MInt size () const
 Return size (i.e., currently used number of nodes) More...
 
void size (const MInt size_)
 Resize tree WITHOUT CONSIDERING ANY NODE CONSISTENCY! Use at own risk and remove ASAP... More...
 
void append (const MInt count)
 Append nodes to end of tree. More...
 
void append ()
 
void shrink (const MInt count)
 Remove nodes from end of tree. More...
 
void shrink ()
 
void copy (const T &source, const MInt begin, const MInt end, const MInt to)
 Copy nodes to another location without changing any parent/child/neighbor information. More...
 
void copy (const T &source, const MInt from, const MInt to)
 
void copy (const MInt begin, const MInt end, const MInt to)
 
void copy (const MInt from, const MInt to)
 
void move (const MInt begin, const MInt end, const MInt to)
 Move nodes to another location and update parent/child/neighbor information accordingly. More...
 
void move (const MInt from, const MInt to)
 
void swap (const MInt a, const MInt b)
 Swap two nodes and update parent/child/neighbor information accordingly. More...
 
void insert (const MInt begin, const MInt count)
 
void insert (const MInt id)
 
void erase (const MInt begin, const MInt end)
 Erase nodes in range [begin, end) and update parent/child/neighbor information. More...
 
void erase (const MInt id)
 
void removeAndShift (const MInt begin, const MInt end)
 
void removeAndShift (const MInt id)
 
void removeAndFill (const MInt begin, const MInt end)
 
void removeAndFill (const MInt id)
 
void clear ()
 Clear tree by invalidating all nodes and setting size to zero. More...
 
PostCellCollector< nDim > & derived ()
 
const PostCellCollector< nDim > & derived () const
 
void rawCopy (const T &source, const MInt begin, const MInt end, const MInt to)
 Copy range of nodes [begin, end) to range starting at 'to'. More...
 
void rawCopy (const T &source, const MInt from, const MInt to)
 
void deleteConnectivity (const MInt NotUsed(begin), const MInt NotUsed(end))
 
void moveConnectivity (const MInt NotUsed(begin), const MInt NotUsed(end), const MInt NotUsed(to))
 
void moveConnectivity (const MInt from, const MInt to)
 
constexpr MInt dummy () const
 

Private Types

using Base = maia::container::Container< PostCellCollector< nDim >, Invalid >
 
template<class T >
using Storage = typename Base::template Storage< T >
 
using BitsetType = maia::post::cell::BitsetType
 

Private Member Functions

void reset ()
 Reset tree, re-create data structures with given capacity, and set size to zero. More...
 
void invalidate (const MInt begin, const MInt end)
 Erase range of nodes such that they contain no sensible values anymore. More...
 
template<class Functor , class T >
void rawCopyGeneric (Functor &&c, const T &source, const MInt begin, const MInt end, const MInt destination)
 Helper function for rawCopy(). Destination may refer to beginning or end of target range. More...
 

Private Attributes

MInt m_noVariables = 0
 Number of variables. More...
 
Storage< MFloatm_Variables {}
 
Storage< BitsetTypem_properties {}
 

Friends

class maia::container::Container< PostCellCollector< nDim >, Invalid >
 

Additional Inherited Members

- Protected Types inherited from maia::container::Container< PostCellCollector< nDim >, Invalid >
using Storage = std::vector< T >
 
- Protected Member Functions inherited from maia::container::Container< PostCellCollector< nDim >, Invalid >
virtual void resize ()
 
void resetStorage (const MInt n, Storage< T > &c)
 Create new container with given size and replace original one. More...
 
void resizeStorage (const MInt n, Storage< T > &c)
 Resize container with given size. More...
 
void fill_invalid (Container_ &c, const MInt begin, const MInt end, const MInt solverSize=1, const T value=Invalid< T >::value())
 
void copyData (const Container_ &source, Container_ &target, Functor &&f, const MInt begin, const MInt end, const MInt dest, const MInt solverSize=1)
 Copy [begin, end) range with given solver size from source to dest position of target. More...
 
MBool isValidId (const MInt id) const
 Return whether given id refers to a valid node (auxiliary method). More...
 

Detailed Description

template<MInt nDim>
class maia::post::collector::PostCellCollector< nDim >

Definition at line 51 of file postcartesiancellcollector.h.

Member Typedef Documentation

◆ Base

Definition at line 56 of file postcartesiancellcollector.h.

◆ BitsetType

template<MInt nDim>
using maia::post::collector::PostCellCollector< nDim >::BitsetType = maia::post::cell::BitsetType
private

Definition at line 60 of file postcartesiancellcollector.h.

◆ Invalid

template<MInt nDim>
template<class T >
using maia::post::collector::PostCellCollector< nDim >::Invalid = typename maia::post::collector::Invalid<T>

Definition at line 65 of file postcartesiancellcollector.h.

◆ Storage

template<MInt nDim>
template<class T >
using maia::post::collector::PostCellCollector< nDim >::Storage = typename Base::template Storage<T>
private

Definition at line 59 of file postcartesiancellcollector.h.

Constructor & Destructor Documentation

◆ PostCellCollector()

template<MInt nDim>
constexpr maia::post::collector::PostCellCollector< nDim >::PostCellCollector ( )
constexprdefault

Member Function Documentation

◆ hasProperty() [1/2]

template<MInt nDim>
BitsetType::reference maia::post::collector::PostCellCollector< nDim >::hasProperty ( const MInt  id,
const PostCell  p 
)

Definition at line 132 of file postcartesiancellcollector.h.

132 {
134}
Storage< BitsetType > m_properties
MInt id
Definition: maiatypes.h:71
constexpr std::underlying_type< PostCell >::type p(const PostCell property)
Converts property name to underlying integer value.

◆ hasProperty() [2/2]

template<MInt nDim>
MBool maia::post::collector::PostCellCollector< nDim >::hasProperty ( const MInt  id,
const PostCell  p 
) const

Definition at line 138 of file postcartesiancellcollector.h.

138 {
140}

◆ invalidate()

template<MInt nDim>
void maia::post::collector::PostCellCollector< nDim >::invalidate ( const MInt  begin,
const MInt  end 
)
private

Definition at line 150 of file postcartesiancellcollector.h.

150 {
151 // variables
152 fill_invalid(m_Variables, begin, end, noVariables());
153
154 // Properties
155 fill_invalid(m_properties, begin, end);
156}
void fill_invalid(Container_ &c, const MInt begin, const MInt end, const MInt solverSize=1, const T value=Invalid< T >::value())
Definition: container.h:131
Storage< MFloat > m_Variables
constexpr MInt noVariables() const
Return number of variables.

◆ noVariables()

template<MInt nDim>
constexpr MInt maia::post::collector::PostCellCollector< nDim >::noVariables ( ) const
inlineconstexpr

Definition at line 79 of file postcartesiancellcollector.h.

79{ return m_noVariables; }
MInt m_noVariables
Number of variables.

◆ properties()

template<MInt nDim>
BitsetType & maia::post::collector::PostCellCollector< nDim >::properties ( const MInt  id)

Definition at line 160 of file postcartesiancellcollector.h.

160 {
161 // ENSURE_VALID_ID_ACCESSOR(id);
162 return m_properties[id];
163}

◆ rawCopyGeneric()

template<MInt nDim>
template<class Functor , class T >
void maia::post::collector::PostCellCollector< nDim >::rawCopyGeneric ( Functor &&  c,
const T &  source,
const MInt  begin,
const MInt  end,
const MInt  destination 
)
private

Definition at line 168 of file postcartesiancellcollector.h.

169 {
170 // variables
171 copyData(source.m_Variables, m_Variables, c, begin, end, destination, noVariables());
172 // Properties
173 copyData(source.m_properties, m_properties, c, begin, end, destination);
174}
void copyData(const Container_ &source, Container_ &target, Functor &&f, const MInt begin, const MInt end, const MInt dest, const MInt solverSize=1)
Copy [begin, end) range with given solver size from source to dest position of target.
Definition: container.h:138

◆ reset()

template<MInt nDim>
void maia::post::collector::PostCellCollector< nDim >::reset
private

Definition at line 113 of file postcartesiancellcollector.h.

113 {
116}
void resetStorage(const MInt n, Storage< T > &c)
Create new container with given size and replace original one.
Definition: container.h:420

◆ resetProperties()

template<MInt nDim>
void maia::post::collector::PostCellCollector< nDim >::resetProperties ( const MInt  id)

Definition at line 144 of file postcartesiancellcollector.h.

144 {
145 m_properties.at(id).reset();
146}

◆ setNoVariables()

template<MInt nDim>
void maia::post::collector::PostCellCollector< nDim >::setNoVariables ( const MInt  noVars_)

Definition at line 107 of file postcartesiancellcollector.h.

107 {
108 m_noVariables = noVars_;
109}

◆ variable() [1/2]

template<MInt nDim>
MFloat & maia::post::collector::PostCellCollector< nDim >::variable ( const MInt  id,
const MInt  dim 
)

Definition at line 120 of file postcartesiancellcollector.h.

120 {
121 return m_Variables[id * noVariables() + varId];
122}

◆ variable() [2/2]

template<MInt nDim>
MFloat maia::post::collector::PostCellCollector< nDim >::variable ( const MInt  id,
const MInt  dim 
) const

Definition at line 126 of file postcartesiancellcollector.h.

126 {
127 return m_Variables[id * noVariables() + varId];
128}

Friends And Related Function Documentation

◆ maia::container::Container< PostCellCollector< nDim >, Invalid >

template<MInt nDim>
friend class maia::container::Container< PostCellCollector< nDim >, Invalid >
friend

Definition at line 46 of file postcartesiancellcollector.h.

Member Data Documentation

◆ m_noVariables

template<MInt nDim>
MInt maia::post::collector::PostCellCollector< nDim >::m_noVariables = 0
private

Definition at line 92 of file postcartesiancellcollector.h.

◆ m_properties

template<MInt nDim>
Storage<BitsetType> maia::post::collector::PostCellCollector< nDim >::m_properties {}
private

Definition at line 96 of file postcartesiancellcollector.h.

◆ m_Variables

template<MInt nDim>
Storage<MFloat> maia::post::collector::PostCellCollector< nDim >::m_Variables {}
private

Definition at line 95 of file postcartesiancellcollector.h.


The documentation for this class was generated from the following file: