MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::datastructures::FlexibleCellContainer< dim > Class Template Reference

provides access to coupling cells, which may belong to different indexing domains More...

#include <FlexibleCellContainer.h>

Classes

class  Iterator
 Provides iterator functionality (increment, access as <*cell, index> pair, equality) More...
 

Public Member Functions

 FlexibleCellContainer (std::vector< coupling::datastructures::CouplingCell< dim > * > couplingCells, std::vector< I01 > idxs)
 
template<class Container_T>
 FlexibleCellContainer (Container_T cells)
 
void operator<< (std::pair< coupling::datastructures::CouplingCell< dim > *, I01 > pair)
 
unsigned int size () const
 
Iterator begin () const
 
Iterator end () const
 

Private Attributes

std::vector< coupling::datastructures::CouplingCell< dim > * > _couplingCells
 
std::vector< I01_idxs
 

Detailed Description

template<unsigned int dim>
class coupling::datastructures::FlexibleCellContainer< dim >

provides access to coupling cells, which may belong to different indexing domains

The FlexibleCellContainer is intended for use in cell domains which do not neatly correspond to a predefined indexing domain. For example, a CellContainer cannot store cells in the macro2md overlap layers, and hence a FlexibleCellContainer is needed. Due to the "holes" expected due to the non-contiguous nature of this container, index-based access is not possible or expected.

Template Parameters
dimNumber of dimensions; it can be 1, 2 or 3

Member Function Documentation

◆ begin()

template<unsigned int dim>
Iterator coupling::datastructures::FlexibleCellContainer< dim >::begin ( ) const
inline

Provides pointer to beginning of iterator of this container

◆ end()

template<unsigned int dim>
Iterator coupling::datastructures::FlexibleCellContainer< dim >::end ( ) const
inline

Provides pointer to end of iterator of this container

◆ operator<<()

template<unsigned int dim>
void coupling::datastructures::FlexibleCellContainer< dim >::operator<< ( std::pair< coupling::datastructures::CouplingCell< dim > *, I01 > pair)
inline

Adds a new coupling cell to the datastructure at the next index

Parameters
cella pointer to the cell to be inserted

◆ size()

template<unsigned int dim>
unsigned int coupling::datastructures::FlexibleCellContainer< dim >::size ( ) const
inline

Returns size of the underlying container.

The number of indices stored should be equal to the number of cells stored, hence returning either is okay

Returns
the number of cells stored currently

Member Data Documentation

◆ _couplingCells

template<unsigned int dim>
std::vector<coupling::datastructures::CouplingCell<dim>*> coupling::datastructures::FlexibleCellContainer< dim >::_couplingCells
private

Vector to store pointers to cells

◆ _idxs

template<unsigned int dim>
std::vector<I01> coupling::datastructures::FlexibleCellContainer< dim >::_idxs
private

Vector to store indices corresponding to cells in container Since the cells can be part of any domain, they're stores as I01 (global noghost) type.


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