MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::solvers::LBCouetteSolverInterface Class Reference

interface for the LBCouetteSolver More...

#include <LBCouetteSolverInterface.h>

Inheritance diagram for coupling::solvers::LBCouetteSolverInterface:
Collaboration diagram for coupling::solvers::LBCouetteSolverInterface:

Public Member Functions

 LBCouetteSolverInterface (tarch::la::Vector< 3, unsigned int > avgNumberLBCells, tarch::la::Vector< 3, unsigned int > numberProcesses, tarch::la::Vector< 3, unsigned int > offsetMDDomain, tarch::la::Vector< 3, unsigned int > globalNumberCouplingCells, unsigned int outerRegion=1)
 a simple constructor
 
unsigned int getOuterRegion () override
 
std::vector< unsigned int > getRanks (I01 idx) override
 returns for a given coupling cell index, which rank holds the correct data @oaram idx global dimensioned cell index to check for
 
std::vector< unsigned int > getSourceRanks (I01 idx) override
 returns for a given coupling cell index, which source rank holds the correct data
 
- Public Member Functions inherited from coupling::interface::MacroscopicSolverInterface< 3 >
 MacroscopicSolverInterface ()
 
virtual ~MacroscopicSolverInterface ()
 
virtual std::vector< unsigned int > getTargetRanks (I01 idx)
 

Private Attributes

const tarch::la::Vector< 3, unsigned int > _avgNumberLBCells
 avg. number of LB cells per LB process (must be same for Interface and LBCouetteSolver)
 
const tarch::la::Vector< 3, unsigned int > _numberProcesses
 number of processes used by LB solver
 
const tarch::la::Vector< 3, unsigned int > _offsetMDDomain
 offset of MD domain (excl. any ghost layers on MD or LB side)
 
const unsigned int _outerRegion
 defines an offset of cells which is considered to be the outer region
 
const tarch::la::Vector< 3, unsigned int > _globalNumberCouplingCells
 global number of coupling cells
 

Detailed Description

interface for the LBCouetteSolver

We only receive data from MD in the inner region, and we only send data for the outer region to MD. What "outer" means is specified by the arguments of the interface; moreover, we do not send the ghost layer data from Couette to MD. "inner" refers to "not outer" ;-) By default, the argument outerRegion is set to 1: this yields that only the first non-ghost layer of coupling cells shall be sent to MD, and all other inner coupling cells are received from MD.

Author
Philipp Neumann

Constructor & Destructor Documentation

◆ LBCouetteSolverInterface()

coupling::solvers::LBCouetteSolverInterface::LBCouetteSolverInterface ( tarch::la::Vector< 3, unsigned int > avgNumberLBCells,
tarch::la::Vector< 3, unsigned int > numberProcesses,
tarch::la::Vector< 3, unsigned int > offsetMDDomain,
tarch::la::Vector< 3, unsigned int > globalNumberCouplingCells,
unsigned int outerRegion = 1 )
inline

a simple constructor

Parameters
avgNumberLBCellsthe average number of cells per process of the lattice Boltzmann solver (dimensioned)
numberProcessesthe total number of mpi processes on which the solver is parallelised
offsetMDDomainoffset (measured in cell units) of the MD domain (excluding any (LB/MD) ghost layers)
globalNumberCouplingCellsthe total number of coupling cells
outerRegiondefines, how many cell layers will be sent to the macro solver

Member Function Documentation

◆ getOuterRegion()

unsigned int coupling::solvers::LBCouetteSolverInterface::getOuterRegion ( )
inlineoverridevirtual

◆ getRanks()

std::vector< unsigned int > coupling::solvers::LBCouetteSolverInterface::getRanks ( I01 idx)
inlineoverridevirtual

returns for a given coupling cell index, which rank holds the correct data @oaram idx global dimensioned cell index to check for

Returns
a vector containing all correct ranks

Implements coupling::interface::MacroscopicSolverInterface< 3 >.

◆ getSourceRanks()

std::vector< unsigned int > coupling::solvers::LBCouetteSolverInterface::getSourceRanks ( I01 idx)
inlineoverridevirtual

returns for a given coupling cell index, which source rank holds the correct data

provides the ranks of the Couette solver that send valid LB flow data to the coupling tool. Since we may have multiple copies of a cell due to the ghost layers of the LBCouetteSolver, those ghost cell copies do not contain valid information. We therefore need to come up with a special implementation for getSourceRanks(). This implementation only returns one rank per cell, that is the rank which holds the non-ghost cell copy.

Parameters
idxglobal dimensioned cell index to check for
Returns
the vector of the correct rank

Reimplemented from coupling::interface::MacroscopicSolverInterface< 3 >.


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