5#ifndef _MOLECULARDYNAMICS_COUPLING_NIEVELOCITYIMPOSITION_H_
6#define _MOLECULARDYNAMICS_COUPLING_NIEVELOCITYIMPOSITION_H_
8#include "coupling/MomentumInsertion.h"
9#include "coupling/cell-mappings/ComputeAvgForceAndVelocity.h"
10#include "coupling/cell-mappings/NieVelocityImpositionMapping.h"
11#include "coupling/interface/MDSolverInterface.h"
35 _impositionEnabled(impositionEnabled), _enableInnerImposition(false) {}
87 for (
unsigned int d = 0; d < dim; d++) {
88 if (_impositionEnabled[d * 2]) {
92 if (_impositionEnabled[d * 2 + 1]) {
97 return (_enableInnerImposition || !inner) && !outer;
105 bool _enableInnerImposition;
used to manipulate the momentum/ velocity of the molecules contained in a coupling cell.
Definition MomentumInsertion.h:23
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
Definition MomentumInsertion.h:50
MomentumInsertion(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
a simple constructor
Definition MomentumInsertion.h:27
Velocity imposition scheme following the respective paper by Nie et al., J. Fluid....
Definition NieVelocityImposition.h:25
virtual ~NieVelocityImposition()
a simple destructor
Definition NieVelocityImposition.h:38
const unsigned int _innermostLayer
the index of the innermost cell layer
Definition NieVelocityImposition.h:103
bool isInsideImpositionLayer(I01 globalCellIndex) const
based on the cell index, the function tells if the cell is inside the imposition layer
Definition NieVelocityImposition.h:83
NieVelocityImposition(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, const unsigned int &outermostLayer, const unsigned int &innermostLayer, const tarch::la::Vector< 2 *dim, bool > impositionEnabled)
a simple constructor
Definition NieVelocityImposition.h:32
void insertMomentum(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 idx) const override
inserts momentum to a cell
Definition NieVelocityImposition.h:48
void setInnerImposition(bool enable) override
Definition NieVelocityImposition.h:67
const unsigned int _outermostLayer
the index of the outermost cell layer
Definition NieVelocityImposition.h:101
unsigned int getTimeIntervalPerMomentumInsertion() const override
momentum shall be inserted in every md time step, so this returns 1
Definition NieVelocityImposition.h:42
This class sums up all force/velocity vectors and counts molecules inside a linked cell.
Definition ComputeAvgForceAndVelocity.h:26
tarch::la::Vector< dim, double > getAvgVelocity() const
Definition ComputeAvgForceAndVelocity.h:82
tarch::la::Vector< dim, double > getAvgForce() const
Definition ComputeAvgForceAndVelocity.h:77
This class employs an acceleration based on velocity gradients (in time) using the forcing term of th...
Definition NieVelocityImpositionMapping.h:34
defines the cell type with cell-averaged quantities. Derived from the class coupling::datastructures:...
Definition CouplingCellWithLinkedCells.h:26
void iterateConstCells(A &a) const
Definition CouplingCellWithLinkedCells.h:90
void iterateCells(A &a)
Definition CouplingCellWithLinkedCells.h:74
const tarch::la::Vector< dim, double > & getMicroscopicMomentum() const
Definition CouplingCell.h:51
static tarch::la::Vector< dim, unsigned int > numberCellsInDomain
Definition CellIndex.h:264
value_T get() const
Definition CellIndex.h:138
interface to the MD simulation
Definition MDSolverInterface.h:25
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15