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

defines the cell type with cell-averaged quantities. Derived from the class coupling::datastructures::CouplingCell More...

#include <CouplingCellWithLinkedCells.h>

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

Public Member Functions

 CouplingCellWithLinkedCells (tarch::la::Vector< dim, unsigned int > blockSize)
 
virtual ~CouplingCellWithLinkedCells ()
 
void addLinkedCell (LinkedCell &cell, const unsigned int &index)
 
template<class A>
void iterateCells (A &a)
 
template<class A>
void iterateConstCells (A &a) const
 
- Public Member Functions inherited from coupling::datastructures::CouplingCell< dim >
 CouplingCell ()
 
virtual ~CouplingCell ()
 
void setMicroscopicMass (const double &mass)
 
const double & getMicroscopicMass () const
 
void setMicroscopicMomentum (const tarch::la::Vector< dim, double > &momentum)
 
const tarch::la::Vector< dim, double > & getMicroscopicMomentum () const
 
void setMacroscopicMass (const double &mass)
 
const double & getMacroscopicMass () const
 
void setMacroscopicMomentum (const tarch::la::Vector< dim, double > &momentum)
 
const tarch::la::Vector< dim, double > & getMacroscopicMomentum () const
 
const double & getPotentialEnergy () const
 
void setPotentialEnergy (const double &potentialEnergy)
 
void addMicroscopicMass (const double &mass)
 
void addMicroscopicMomentum (const tarch::la::Vector< dim, double > &momentum)
 
void addMacroscopicMass (const double &mass)
 
void addMacroscopicMomentum (const tarch::la::Vector< dim, double > &momentum)
 
void setCurrentVelocity (const tarch::la::Vector< dim, double > &velocity)
 
const tarch::la::Vector< dim, double > & getCurrentVelocity () const
 
void setTemperature (const double &temperature)
 
const double & getTemperature () const
 

Private Member Functions

unsigned int getNumberCells (tarch::la::Vector< dim, unsigned int > blockSize) const
 

Private Attributes

const unsigned int _numberCells
 
LinkedCell ** _linkedCells
 

Additional Inherited Members

- Public Attributes inherited from coupling::datastructures::CouplingCell< dim >
double _microscopicMass
 
tarch::la::Vector< dim, double > _microscopicMomentum
 
double _macroscopicMass
 
tarch::la::Vector< dim, double > _macroscopicMomentum
 
double _potentialEnergy
 
double _temperature
 
tarch::la::Vector< dim, double > _currentVelocity
 

Detailed Description

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

defines the cell type with cell-averaged quantities. Derived from the class coupling::datastructures::CouplingCell

describes a quadratic/ cubic coupling cell filled with fluid. It is built up by a certain number of linked cells (from the MD algorithm). The linked cells need to exactly fill this cell; no overlap/ non-fitting boundaries shall be allowed. We can use the CouplingCell-structure to evaluate macroscopic quantities over a certain MD volume and then map macroscopic conserved quantities between macro- and microscopic simulations.

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

Constructor & Destructor Documentation

◆ CouplingCellWithLinkedCells()

template<class LinkedCell, unsigned int dim>
coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::CouplingCellWithLinkedCells ( tarch::la::Vector< dim, unsigned int > blockSize)
inline

Constructor: initialises the coupling cell based on the assumption of having blockSize linked cells;

Parameters
blockSizerepresents the number of linked cells in all spatial directions.

◆ ~CouplingCellWithLinkedCells()

template<class LinkedCell, unsigned int dim>
virtual coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::~CouplingCellWithLinkedCells ( )
inlinevirtual

Destructor

Member Function Documentation

◆ addLinkedCell()

template<class LinkedCell, unsigned int dim>
void coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::addLinkedCell ( LinkedCell & cell,
const unsigned int & index )
inline

adds a linked cell to the coupling cell and puts it at position index. We refer to the lexicographic ordering of the linked cells here.

Parameters
cellthe linked cell that should be inserted into the coupling cell
indexspecifies the position, at which cell shoeld be inserted

◆ getNumberCells()

template<class LinkedCell, unsigned int dim>
unsigned int coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::getNumberCells ( tarch::la::Vector< dim, unsigned int > blockSize) const
inlineprivate

computes and returns the number of cells specified by the product of the entries of blockSize in all dimensions

Parameters
blockSizerepresents the number of linked cells in all spatial directions.

◆ iterateCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::iterateCells ( A & a)
inline

This template fuction applies class A to all linked cells of this coupling cell. The syntax is exactly the same as for regular cell mappings so that a general cell mapping can also be directly applied to single coupling cells only.

Template Parameters
A
Parameters
a

◆ iterateConstCells()

template<class LinkedCell, unsigned int dim>
template<class A>
void coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::iterateConstCells ( A & a) const
inline

This template function applies class A to all linked cells of this coupling cell. The syntax is exactly the same as for regular cell mappings so that a general cell mapping can also be directly applied to single coupling cells only. This method is const, i.e. id does not modify anything except for the object a. This allows for further optimisations.

Template Parameters
A
Parameters
a

Member Data Documentation

◆ _linkedCells

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

holds pointers to all linked cells that describe the microscopic dynamics within the coupling cell

◆ _numberCells

template<class LinkedCell, unsigned int dim>
const unsigned int coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim >::_numberCells
private

total number of linked cells contained in this coupling cell


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