MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim > Class Template Reference

#include <DifferenceTransferStrategy.h>

Inheritance diagram for coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >:
Collaboration diagram for coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >:

Public Member Functions

 DifferenceTransferStrategy (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, unsigned int numberMDsteps)
 a simple constructor
virtual ~DifferenceTransferStrategy ()
 a dummy destructor
void processInnerCouplingCellBeforeReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
void processOuterCouplingCellBeforeReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 the microscopicMass and -Momentum are reseted to zero
void processInnerCouplingCellAfterReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 difference between microscopic and macroscopic values is evaluated and stored in the macroscopic quantity
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)
void processInnerCouplingCellAfterMDTimestep (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 compute current mass and momentum and add it to averaged buffer value
Public Member Functions inherited from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >
 TransferStrategy (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 a simple destructor
virtual ~TransferStrategy ()
 a dummy destructor
virtual void beginProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData ()
 the method is called before the cells are processed, e.g. general values might be set here
virtual void endProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData ()
 the method is called after the cells are processed, e.g. some general evaluation might happen like sum/counter
virtual void beginProcessOuterCouplingCellsBeforeReceivingMacroscopicSolverData ()
 the method is called before the outer cells are processed, e.g. general values might be set here
virtual void endProcessOuterCouplingCellsBeforeReceivingMacroscopicSolverData ()
 the method is called after the outer cells are processed, e.g. general values might be set here
virtual void beginProcessInnerCouplingCellsAfterReceivingMacroscopicSolverData ()
 the method is called before the inner cells are processed, e.g. general values might be set here
virtual void endProcessInnerCouplingCellsAfterReceivingMacroscopicSolverData ()
 the method is called after the inner cells are processed, e.g. general values might be set here
virtual void processOuterCouplingCellAfterReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index)
 is called for every coupling cell after the microscopicMass and -Momentum have been filled in with data from the macroscopic solver.
virtual void beginProcessOuterCouplingCellsAfterReceivingMacroscopicSolverData ()
 the method is called before the outer cells are processed, e.g. general values might be set here
virtual void endProcessOuterCouplingCellsAfterReceivingMacroscopicSolverData ()
 the method is called after the outer cells are processed, e.g. general values might be set here
virtual void beginProcessInnerCouplingCellsBeforeSendingMDSolverData ()
 the method is called before the inner cell data is send, e.g. general values might be set here
virtual void endProcessInnerCouplingCellsBeforeSendingMDSolverData ()
 the method is called after the inner cell data is send, e.g. general values might be set here
virtual void processOuterCouplingCellBeforeSendingMDSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index)
 is called for outer coupling cell before sending the macroscopicMass and -Momentum data to the macroscopic solver and before noise reduction invocation.
virtual void beginProcessOuterCouplingCellsBeforeSendingMDSolverData ()
 the method is called before the outer cells are processed, e.g. general values might be set here
virtual void endProcessOuterCouplingCellsBeforeSendingMDSolverData ()
 the method is called after the outer cells are processed, e.g. general values might be set here
virtual void beginProcessInnerCouplingCellsAfterMDTimestep ()
 the method is called before the inner cell data is send, e.g. general values might be set here
virtual void endProcessInnerCouplingCellsAfterMDTimestep ()
 the method is called after the inner cell data is send, e.g. general values might be set here

Private Attributes

const unsigned int _numberMDsteps
const tarch::la::Vector< dim, double > _zero
coupling::cellmappings::ComputeMassMapping< LinkedCell, dim > _massMapping
coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim > _momentumMapping

Additional Inherited Members

Protected Attributes inherited from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >

from MD to macroscopic solver: mass and momentum are computed at the current timestep and mapped to macroscopic solver. The values are averaged over a certain time. from macroscopic solver to MD: The difference in mass and momentum between both solvers is computed and introduced on MD side.

Author
Philipp Neumann
Template Parameters
LinkedCellthe LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation
dimrefers to the spacial dimension of the simulation, can be 1, 2, or 3

Constructor & Destructor Documentation

◆ DifferenceTransferStrategy()

template<class LinkedCell, unsigned int dim>
coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::DifferenceTransferStrategy ( coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface,
unsigned int numberMDsteps )
inline

a simple constructor

Parameters
mdSolverInterfaceinterface for the md solver
numberMDStepsnumber of md steps within one coupling time step

Member Function Documentation

◆ processInnerCouplingCellAfterMDTimestep()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::processInnerCouplingCellAfterMDTimestep ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
inlineoverridevirtual

compute current mass and momentum and add it to averaged buffer value

Parameters
cellcoupling cell to process
indexindex of the coupling cell

Reimplemented from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >.

◆ processInnerCouplingCellAfterReceivingMacroscopicSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::processInnerCouplingCellAfterReceivingMacroscopicSolverData ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
inlineoverridevirtual

difference between microscopic and macroscopic values is evaluated and stored in the macroscopic quantity

Parameters
cellcoupling cell to process
indexindex of the coupling cell

Reimplemented from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >.

◆ processInnerCouplingCellBeforeReceivingMacroscopicSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::processInnerCouplingCellBeforeReceivingMacroscopicSolverData ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
inlineoverridevirtual
Parameters
cellcoupling cell to process
indexindex of the coupling cell

Reimplemented from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >.

◆ processInnerCouplingCellBeforeSendingMDSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::processInnerCouplingCellBeforeSendingMDSolverData ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
inlineoverridevirtual

the quantities (mass & momentum) are averaged (divided by the amount of md time steps)

Parameters
cellcoupling cell to process
indexindex of the coupling cell

Reimplemented from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >.

◆ processOuterCouplingCellBeforeReceivingMacroscopicSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::processOuterCouplingCellBeforeReceivingMacroscopicSolverData ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
inlineoverridevirtual

the microscopicMass and -Momentum are reseted to zero

Parameters
cellcoupling cell to process
indexindex of the coupling cell

Reimplemented from coupling::transferstrategies::TransferStrategy< LinkedCell, dim >.

Member Data Documentation

◆ _massMapping

template<class LinkedCell, unsigned int dim>
coupling::cellmappings::ComputeMassMapping<LinkedCell, dim> coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::_massMapping
private

class to compute the mass within every single cell

◆ _momentumMapping

template<class LinkedCell, unsigned int dim>
coupling::cellmappings::ComputeMomentumMapping<LinkedCell, dim> coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::_momentumMapping
private

class to compute the momentum within every single cell

◆ _numberMDsteps

template<class LinkedCell, unsigned int dim>
const unsigned int coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::_numberMDsteps
private

number of md time steps within one coupling time step

◆ _zero

template<class LinkedCell, unsigned int dim>
const tarch::la::Vector<dim, double> coupling::transferstrategies::DifferenceTransferStrategy< LinkedCell, dim >::_zero
private

vector containing zeros, the dimension is the spacial dimension of the simulation


The documentation for this class was generated from the following file: