5#ifndef _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_AVERAGINGTRANSFERSTRATEGY_H_
6#define _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_AVERAGINGTRANSFERSTRATEGY_H_
8#include "coupling/cell-mappings/ComputeMassMapping.h"
9#include "coupling/cell-mappings/ComputeMomentumMapping.h"
10#include "coupling/indexing/IndexingService.h"
11#include "coupling/transferstrategies/TransferStrategy.h"
31template <
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
const tarch::la::Vector< dim, double > & getMacroscopicMomentum() const
Definition CouplingCell.h:64
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
interface to the MD simulation
Definition MDSolverInterface.h:25
Definition AveragingTransferStrategy.h:32
coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim > _momentumMapping
Definition AveragingTransferStrategy.h:100
void beginProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData() override
reset the sample counter before processing any cell
Definition AveragingTransferStrategy.h:44
tarch::la::Vector< dim, double > _avgMomentum
Definition AveragingTransferStrategy.h:107
const unsigned int _rank
Definition AveragingTransferStrategy.h:104
AveragingTransferStrategy(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
a simple constructor
Definition AveragingTransferStrategy.h:36
void beginProcessInnerCouplingCellsAfterMDTimestep() override
values are reseted before the cells are processes and on rank=0 info is written to the stdstream
Definition AveragingTransferStrategy.h:63
virtual ~AveragingTransferStrategy()
a dummy destructor
Definition AveragingTransferStrategy.h:41
coupling::cellmappings::ComputeMassMapping< LinkedCell, dim > _massMapping
Definition AveragingTransferStrategy.h:98
double _avgMass
Definition AveragingTransferStrategy.h:110
void processInnerCouplingCellBeforeReceivingMacroscopicSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
macroscopicMass and -Momentum are reset before the data from the macro solver is transferred
Definition AveragingTransferStrategy.h:53
unsigned int _sampleCounter
Definition AveragingTransferStrategy.h:102
void processInnerCouplingCellAfterMDTimestep(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
the averaging operation is applied to the cell
Definition AveragingTransferStrategy.h:79
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