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

provides access to the coupling cells with linked cells. More...

#include <LinkedCellContainer.h>

Inheritance diagram for coupling::datastructures::LinkedCellContainer< LinkedCell, dim >:
Collaboration diagram for coupling::datastructures::LinkedCellContainer< LinkedCell, dim >:

Public Member Functions

 LinkedCellContainer (tarch::la::Vector< dim, unsigned int > numberLinkedCellsPerCouplingCell, coupling::interface::MDSolverInterface< LinkedCell, dim > *mdSolverInterface)
 
 ~LinkedCellContainer ()
 
coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > * getLinkedCellContainer ()
 
template<class A>
void applyToLocalNonGhostCouplingCellsWithLinkedCells (A &a)
 
template<class A>
void applyToLocalGhostCouplingCellsWithLinkedCells (A &a)
 
template<class A>
void applyToAllLocalCouplingCellsWithLinkedCells (A &a)
 
template<class A>
void applyToFirstLayerOfGlobalNonGhostCellsWithLinkedCells (A &a)
 
template<class A>
void applyXLayersOfGlobalNonGhostCellsWithLinkedCells (A &a, unsigned int layers2Use)
 
- Public Member Functions inherited from coupling::datastructures::CellContainer< I02, dim >
 CellContainer (std::vector< coupling::datastructures::CouplingCell< dim > * > couplingCells)
 
coupling::datastructures::CouplingCell< dim > * operator[] (I02 index) const
 
void operator<< (coupling::datastructures::CouplingCell< dim > *couplingCell)
 
unsigned int size () const
 
Iterator begin () const
 
Iterator end () const
 
 CellContainer (std::vector< coupling::datastructures::CouplingCell< dim > * > couplingCells)
 
coupling::datastructures::CouplingCell< dim > * operator[] (I02 index) const
 
void operator<< (coupling::datastructures::CouplingCell< dim > *couplingCell)
 
unsigned int size () const
 
Iterator begin () const
 
Iterator end () const
 

Private Member Functions

coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > * initLinkedCellContainer (tarch::la::Vector< dim, unsigned int > numberLinkedCellsPerCouplingCell, coupling::interface::MDSolverInterface< LinkedCell, dim > *mdSolverInterface) const
 
std::vector< coupling::datastructures::CouplingCell< dim > * > initCouplingCells () const
 

Private Attributes

coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > * _couplingCellsWithLinkedCells
 

Additional Inherited Members

- Protected Attributes inherited from coupling::datastructures::CellContainer< I02, dim >
std::vector< coupling::datastructures::CouplingCell< dim > * > _couplingCells
 
std::vector< coupling::datastructures::CouplingCell< dim > * > _couplingCells
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::datastructures::LinkedCellContainer< LinkedCell, dim >

provides access to the coupling cells with linked cells.

Template Parameters
LinkedCelllinked cells that build up the CouplingCellWithLinkedCells
dimNumber of dimensions; it can be 1, 2 or 3

Constructor & Destructor Documentation

◆ LinkedCellContainer()

template<class LinkedCell, unsigned int dim>
coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::LinkedCellContainer ( tarch::la::Vector< dim, unsigned int > numberLinkedCellsPerCouplingCell,
coupling::interface::MDSolverInterface< LinkedCell, dim > * mdSolverInterface )

Constructor: initialises the coupling cell with linked cells

Parameters
numberLinkedCellsPerCouplingCell
mdSolverInterface

◆ ~LinkedCellContainer()

template<class LinkedCell, unsigned int dim>
coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::~LinkedCellContainer ( )

Destructor

Member Function Documentation

◆ applyToAllLocalCouplingCellsWithLinkedCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::applyToAllLocalCouplingCellsWithLinkedCells ( A & a)

apply the function apply(CouplingCell&,const unsigned int&) of a generic class A to all local coupling cells. We can have the same traversal by applying both applyToLocalGhostCouplingCellsWithLinkedCells and applyToLocalNonGhostCouplingCellsWithLinkedCells. However, this implementation is more efficient.

◆ applyToFirstLayerOfGlobalNonGhostCellsWithLinkedCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::applyToFirstLayerOfGlobalNonGhostCellsWithLinkedCells ( A & a)

apply the function apply(CouplingCell&,const unsigned int&) of a generic class A to the first layer of GLOBAL non-ghost cells. If a cell is a local ghost cell (due to parallelization, not due to being located outside MD domain!), it will not be handled by this method. If a cell is a local non-ghost cell and is not located at the boundary of the MD domain, it will not be handled by this method. We use this traversal, e.g., for applying boundary forces to molecules close to the outer boundary.

Template Parameters
A
Parameters
a

◆ applyToLocalGhostCouplingCellsWithLinkedCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::applyToLocalGhostCouplingCellsWithLinkedCells ( A & a)

apply the function apply(CouplingCell&,const unsigned int&) of a generic class A to all local ghost coupling cells.

Template Parameters
A
Parameters
a

◆ applyToLocalNonGhostCouplingCellsWithLinkedCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::applyToLocalNonGhostCouplingCellsWithLinkedCells ( A & a)

apply the function apply(CouplingCell&,const unsigned int&) of a generic class A to all local non-ghost coupling cells. This functionality is used from the CouplingCellService to apply various functionalities (such as momentum transfer) to the coupling cells which cover the MD domain.

◆ applyXLayersOfGlobalNonGhostCellsWithLinkedCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::applyXLayersOfGlobalNonGhostCellsWithLinkedCells ( A & a,
unsigned int layers2Use )
Todo
Helene!!

◆ getLinkedCellContainer()

template<class LinkedCell, unsigned int dim>
coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > * coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::getLinkedCellContainer ( )

returns the pointer to the coupling cells with access to linked cell structur.

◆ initCouplingCells()

template<class LinkedCell, unsigned int dim>
std::vector< coupling::datastructures::CouplingCell< dim > * > coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::initCouplingCells ( ) const
private

initialises the coupling cells (without linked cells).

◆ initLinkedCellContainer()

template<class LinkedCell, unsigned int dim>
coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > * coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::initLinkedCellContainer ( tarch::la::Vector< dim, unsigned int > numberLinkedCellsPerCouplingCell,
coupling::interface::MDSolverInterface< LinkedCell, dim > * mdSolverInterface ) const
private

initialises the coupling cells: creates the buffer for the cells and embeds linked cells into the coupling cells.

Parameters
numberLinkedCellsPerCouplingCell
mdSolverInterface

Member Data Documentation

◆ _couplingCellsWithLinkedCells

template<class LinkedCell, unsigned int dim>
coupling::datastructures::CouplingCellWithLinkedCells<LinkedCell, dim>* coupling::datastructures::LinkedCellContainer< LinkedCell, dim >::_couplingCellsWithLinkedCells
private

holds the coupling cells with linked cells.


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