MaMiCo 1.2
|
This class relaxes velocities of molecules towards an interpolated avergaged velocity value. More...
#include <VelocityGradientRelaxationMapping.h>
Public Member Functions | |
VelocityGradientRelaxationMapping (const double &velocityRelaxationFactor, const tarch::la::Vector< dim, double > ¤tVelocity, const I02 &cellIndex, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, const coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > *const couplingCells) | |
virtual | ~VelocityGradientRelaxationMapping () |
void | beginCellIteration () |
void | endCellIteration () |
void | handleCell (LinkedCell &cell) |
Protected Member Functions | |
virtual bool | relaxMolecule (const tarch::la::Vector< dim, double > &position) const |
bool | ignoreThisCell (const I02 &idx) const |
Protected Attributes | |
coupling::interface::MDSolverInterface< LinkedCell, dim > *const | _mdSolverInterface |
const coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > *const | _couplingCells |
const double | _velocityRelaxationFactor |
const tarch::la::Vector< dim, double > | _currentVelocity |
const tarch::la::Vector< dim, double > | _innerLowerLeft |
const tarch::la::Vector< dim, double > | _innerUpperRight |
const tarch::la::Vector< dim, double > | _outerLowerLeft |
const tarch::la::Vector< dim, double > | _outerUpperRight |
I02 | _cellIdx |
bool | _ignoreThisCell |
Private Member Functions | |
tarch::la::Vector< dim, double > | getInnerLowerLeftCorner () const |
tarch::la::Vector< dim, double > | getInnerUpperRightCorner () const |
tarch::la::Vector< dim, double > | getOuterLowerLeftCorner () const |
tarch::la::Vector< dim, double > | getOuterUpperRightCorner () const |
void | createCouplingCellIndex4SecondOrderInterpolation (const tarch::la::Vector< dim, double > &position, tarch::la::Vector< dim, double > &normalisedPosition, bool &secondCake, I02 *res) const |
void | interpolateVelocitySecondOrder (I02 *cellIndex, const tarch::la::Vector< dim, double > &normalisedPosition, const bool &secondCake, tarch::la::Vector< dim, double > &newVelocity) const |
This class relaxes velocities of molecules towards an interpolated avergaged velocity value.
This class relaxes velocities of molecules towards an interpolated avergaged velocity value. Only molecules within a three cell-wide boundary strip are considered if they are inside the one cell-wide boundary strip that is spanned by the outermost non-ghost coupling cell midpoints. Currently, a second-order interpolation of the molecules in the outer boundary strip is used (that is the first layer with three coupling cells needs to be initialised with valid LB velocities).
LinkedCell | cell type |
dim | Number of dimensions; it can be 1, 2 or 3 |
|
inline |
obtains relaxation factor and current velocity (the velocity towards which the relaxation shall be done is later obtained from the microscopicmomentum-buffers).
velocityRelaxationFactor | |
currentVelocity | |
cellIndex | |
mdSolverInterface | |
couplingCells |
|
inlinevirtual |
Destructor
|
inline |
empty function
|
inlineprivate |
creates a coupling cell index for the second order interpolation.
position | |
normalisedPosition | |
secondCake | |
res |
|
inline |
empty function
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
computes the current velocity directly from coupling cell and the new velocity (microscopicMomentum) with second-order interpolation multiplies the difference between the two with the velocity relaxation factor add it to the velocity of the molecule and applies it to the molecule.
cell |
|
inlineprotected |
idx |
|
inlineprivate |
carries out second order interpolation of the velocity value (microscopicmomentum-buffer) at position 'position'
cellIndex | |
normalisedPosition | |
secondCake | |
newVelocity |
|
inlineprotectedvirtual |
position |
Reimplemented in coupling::cellmappings::VelocityGradientRelaxationTopOnlyMapping< LinkedCell, dim >.
|
protected |
current velocity in this coupling cell
|
protected |
true, if all molecules in this cell do not require any velocity relaxation
|
protected |
boundary points of the boundary strip under consideration
|
protected |
relaxation factor for velocity relaxation