|
| MomentumController (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface) |
| a simple constructor
|
|
| ~MomentumController () |
|
void | computeMomentumAndMeanVelocity (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, tarch::la::Vector< dim, double > &momentum, tarch::la::Vector< dim, double > &meanVelocity) |
| computes and returns the momentum and mean velocity of a coupling cell
|
|
void | computeMomentum (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, tarch::la::Vector< dim, double > &momentum) |
| computes and returns the momentum of a coupling cell
|
|
void | computeMeanVelocity (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, tarch::la::Vector< dim, double > &meanVelocity) |
|
void | setMomentum (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, const tarch::la::Vector< dim, double > &newMomentum) |
| sets the momentum of a coupling cell to the input value.
|
|
template<class LinkedCell, unsigned int dim>
class coupling::MomentumController< LinkedCell, dim >
controls the momentum in a coupling cell.
This class can compute the momentum and set a certain value for the momentum.
- Author
- Philipp Neumann
- Template Parameters
-
LinkedCell | the LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation |
dim | refers to the spacial dimension of the simulation, can be 1, 2, or 3 |
template<class LinkedCell, unsigned int dim>
sets the momentum of a coupling cell to the input value.
This cell does not consider the kinetic energy of the system, so the kinetic energy will be different after executing this method! In order to also retain the kinetic energy, one might compute the kinetic energy before calling this method (using the KineticEnergyController) and set the old kinetic energy afterwards (again using the KineticEnergyController). This will then set the right kinetic energy again, conserving both mass and momentum over this cell.
- Parameters
-
cell | the coupling cell in which the momentum shall be changed |
newMomentum | the value to which the momentum will be set |