5#ifndef _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_DIFFERENCETRANSFERSTRATEGY_H_
6#define _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_DIFFERENCETRANSFERSTRATEGY_H_
8#include "coupling/cell-mappings/ComputeMassMapping.h"
9#include "coupling/cell-mappings/ComputeMomentumMapping.h"
10#include "coupling/transferstrategies/TransferStrategy.h"
11#include "tarch/la/Vector.h"
28template <
class LinkedCell,
unsigned int dim>
This class computes the mass over certain linked cells.
Definition ComputeMassMapping.h:23
This class computes the momentum over certain linked cells.
Definition ComputeMomentumMapping.h:24
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 addMacroscopicMomentum(const tarch::la::Vector< dim, double > &momentum)
Definition CouplingCell.h:85
const tarch::la::Vector< dim, double > & getMicroscopicMomentum() const
Definition CouplingCell.h:51
const tarch::la::Vector< dim, double > & getMacroscopicMomentum() const
Definition CouplingCell.h:64
void addMacroscopicMass(const double &mass)
Definition CouplingCell.h:82
void setMicroscopicMass(const double &mass)
Definition CouplingCell.h:42
const double & getMicroscopicMass() const
Definition CouplingCell.h:45
void setMacroscopicMomentum(const tarch::la::Vector< dim, double > &momentum)
Definition CouplingCell.h:61
const double & getMacroscopicMass() const
Definition CouplingCell.h:58
void setMacroscopicMass(const double &mass)
Definition CouplingCell.h:55
void setMicroscopicMomentum(const tarch::la::Vector< dim, double > &momentum)
Definition CouplingCell.h:48
interface to the MD simulation
Definition MDSolverInterface.h:25
Definition DifferenceTransferStrategy.h:29
void processInnerCouplingCellAfterMDTimestep(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
compute current mass and momentum and add it to averaged buffer value
Definition DifferenceTransferStrategy.h:95
DifferenceTransferStrategy(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, unsigned int numberMDsteps)
a simple constructor
Definition DifferenceTransferStrategy.h:34
const unsigned int _numberMDsteps
Definition DifferenceTransferStrategy.h:106
coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim > _momentumMapping
Definition DifferenceTransferStrategy.h:113
const tarch::la::Vector< dim, double > _zero
Definition DifferenceTransferStrategy.h:109
coupling::cellmappings::ComputeMassMapping< LinkedCell, dim > _massMapping
Definition DifferenceTransferStrategy.h:111
virtual ~DifferenceTransferStrategy()
a dummy destructor
Definition DifferenceTransferStrategy.h:39
void processInnerCouplingCellAfterReceivingMacroscopicSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
difference between microscopic and macroscopic values is evaluated and stored in the macroscopic quan...
Definition DifferenceTransferStrategy.h:65
void processOuterCouplingCellBeforeReceivingMacroscopicSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
the microscopicMass and -Momentum are reseted to zero
Definition DifferenceTransferStrategy.h:54
void processInnerCouplingCellBeforeReceivingMacroscopicSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
Definition DifferenceTransferStrategy.h:44
void processInnerCouplingCellBeforeSendingMDSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
the quantities (mass & momentum) are averaged (divided by the amount of md time steps)
Definition DifferenceTransferStrategy.h:83
Definition TransferStrategy.h:25
TransferStrategy(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
a simple destructor
Definition TransferStrategy.h:29
the namespace is used for transferstrategies
Definition AveragingTransferStrategy.h:18
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15