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

#include <TransferStrategy4SchwarzCoupling.h>

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

Public Member Functions

 TransferStrategy4SchwarzCoupling (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, unsigned int numberMDSteps)
 a simple
 
virtual ~TransferStrategy4SchwarzCoupling ()
 a dummy destructor
 
void beginProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData () override
 the sample counter is reseted (0)
 
void processInnerCouplingCellAfterReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 the data received from the macro solver is processed
 
void processOuterCouplingCellAfterReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 the momentum is converted to velocity (velocity = momentum/mass) and stored in the microscopicMomentum the mass is not applied, therefore the macroscopicMass is set to 0 the macroscopic quantities are reseted (0)
 
void processInnerCouplingCellBeforeSendingMDSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 the data collected during the md time steps is averaged (/numberMDSteps)
 
void processOuterCouplingCellBeforeSendingMDSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 the macroscopic quantities are reseted (0)
 
void beginProcessInnerCouplingCellsAfterMDTimestep () override
 the _timestepCounter is incremented and if sample()==true the _sampleCounter too
 
void processInnerCouplingCellAfterMDTimestep (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
 the mass and momentum are evaluated in the cell and stored in the macroscopic quantities
 
- 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 processInnerCouplingCellBeforeReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index)
 is called on the inner coupling cells before the data from the macro solver is applied
 
virtual void endProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData ()
 the method is called after the cells are processed, e.g. some general evaluation might happen like sum/counter
 
virtual void processOuterCouplingCellBeforeReceivingMacroscopicSolverData (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index)
 is called on the outer coupling cells before the data from the macro solver is applied
 
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 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 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 endProcessInnerCouplingCellsAfterMDTimestep ()
 the method is called after the inner cell data is send, e.g. general values might be set here
 

Protected Member Functions

virtual bool sample () const
 depending on the sampling interval (_sampleEveryTimestep) true is returned if sampling has to be done in the current time step
 

Private Attributes

coupling::cellmappings::ComputeMassMapping< LinkedCell, dim > _massMapping
 
coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim > _momentumMapping
 
unsigned int _timestepCounter
 
unsigned int _sampleCounter
 
const unsigned int _numberMDSteps
 
const int _sampleEveryTimestep
 

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::TransferStrategy4SchwarzCoupling< LinkedCell, dim >

transfer strategy for Schwarz coupling algorithm, adopted from Dupuis et al. We currently sample over the last 20% of the coupling interval, i.e. of the numberMDsteps time steps in MD. The other 80% are used for equilibration.

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

◆ TransferStrategy4SchwarzCoupling()

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

a simple

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

Member Function Documentation

◆ beginProcessInnerCouplingCellsAfterMDTimestep()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::beginProcessInnerCouplingCellsAfterMDTimestep ( )
overridevirtual

the _timestepCounter is incremented and if sample()==true the _sampleCounter too

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

◆ beginProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::beginProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData ( )
overridevirtual

the sample counter is reseted (0)

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

◆ processInnerCouplingCellAfterMDTimestep()

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

the mass and momentum are evaluated in the cell and stored in the macroscopic quantities

Parameters
cellthe coupling cell to be processed
indexthe index of the coupling cell

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

◆ processInnerCouplingCellAfterReceivingMacroscopicSolverData()

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

the data received from the macro solver is processed

the momentum is converted to velocity (velocity = momentum/mass) and stored in the microscopicMomentum the mass is not applied, therefore the macroscopicMass is set to 0 the macroscopic quantities are reseted (0)

Parameters
cellthe coupling cell to be processed
indexthe index of the coupling cell

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

◆ processInnerCouplingCellBeforeSendingMDSolverData()

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

the data collected during the md time steps is averaged (/numberMDSteps)

Parameters
cellthe coupling cell to be processed
indexthe index of the coupling cell

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

◆ processOuterCouplingCellAfterReceivingMacroscopicSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::processOuterCouplingCellAfterReceivingMacroscopicSolverData ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
overridevirtual

the momentum is converted to velocity (velocity = momentum/mass) and stored in the microscopicMomentum the mass is not applied, therefore the macroscopicMass is set to 0 the macroscopic quantities are reseted (0)

the data received from the macro solver is processed

Parameters
cellthe coupling cell to be processed
indexthe index of the coupling cell

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

◆ processOuterCouplingCellBeforeSendingMDSolverData()

template<class LinkedCell, unsigned int dim>
void coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::processOuterCouplingCellBeforeSendingMDSolverData ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 index )
overridevirtual

the macroscopic quantities are reseted (0)

Parameters
cellthe coupling cell to be processed
indexthe index 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::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::_massMapping
private

computes the mass in every single cell

◆ _momentumMapping

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

computes the momentum in every single cell

◆ _numberMDSteps

template<class LinkedCell, unsigned int dim>
const unsigned int coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::_numberMDSteps
private

number of md time steps within one coupling time step

◆ _sampleCounter

template<class LinkedCell, unsigned int dim>
unsigned int coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::_sampleCounter
private

counter for the samples

◆ _sampleEveryTimestep

template<class LinkedCell, unsigned int dim>
const int coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::_sampleEveryTimestep
private

the interval of sample point; 1 means every md time step is sampled; 10 means every 10th is used

◆ _timestepCounter

template<class LinkedCell, unsigned int dim>
unsigned int coupling::transferstrategies::TransferStrategy4SchwarzCoupling< LinkedCell, dim >::_timestepCounter
private

counter for the time steps


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