MaMiCo 1.2
Loading...
Searching...
No Matches
TransferStrategy4NieCoupling.h
1// Copyright (C) 2015 Technische Universitaet Muenchen
2// This file is part of the Mamico project. For conditions of distribution
3// and use, please see the copyright notice in Mamico's main folder, or at
4// www5.in.tum.de/mamico
5#ifndef _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_TRANSFERSTRATEGY4NIECOUPLING_H_
6#define _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_TRANSFERSTRATEGY4NIECOUPLING_H_
7
8#include "coupling/cell-mappings/ComputeMassMapping.h"
9#include "coupling/cell-mappings/ComputeMomentumMapping.h"
10#include "coupling/transferstrategies/TransferStrategy.h"
11
12namespace coupling {
13namespace transferstrategies {
14template <class LinkedCell, unsigned int dim> class TransferStrategy4NieCoupling;
15}
16} // namespace coupling
17
28template <class LinkedCell, unsigned int dim>
30public:
39 double shiftTimestep, tarch::la::Vector<2 * dim, bool> massFluxBoundary);
40
43
47
53 I02 index) override;
54
62 I02 index) override;
63
64 // virtual void beginProcessInnerCouplingCellsBeforeSendingMDSolverData();
65
69
70 // virtual void endProcessInnerCouplingCellsBeforeSendingMDSolverData();
71
74
80
81private:
84 double computeMassFlux(const double& mass, const tarch::la::Vector<dim, double>& velocity, I01 index);
95 const unsigned int _numberMDSteps;
101 const double _shiftTimestep;
103 const unsigned int _numberLocalCells;
106 unsigned int _timestepCounter;
108 double* _excessMass;
112};
113#include "coupling/transferstrategies/TransferStrategy4NieCoupling.cpph"
114
115#endif // _MOLECULARDYNAMICS_COUPLING_TRANSFERSTRATEGIES_TRANSFERSTRATEGY4NIECOUPLING_H_
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
interface to the MD simulation
Definition MDSolverInterface.h:25
Definition TransferStrategy4NieCoupling.h:29
void processInnerCouplingCellAfterReceivingMacroscopicSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
converts momentum into velocity values;
coupling::cellmappings::ComputeMassMapping< LinkedCell, dim > _massMapping
Definition TransferStrategy4NieCoupling.h:86
void beginProcessInnerCouplingCellsBeforeReceivingMacroscopicSolverData() override
stores the old cont.-velocity field solution and resets time step counter
unsigned int _timestepCounter
Definition TransferStrategy4NieCoupling.h:106
const unsigned int _numberLocalCells
Definition TransferStrategy4NieCoupling.h:103
const tarch::la::Vector< 2 *dim, bool > _massFluxBoundary
Definition TransferStrategy4NieCoupling.h:111
const unsigned int _numberMDSteps
Definition TransferStrategy4NieCoupling.h:95
tarch::la::Vector< dim, double > * _newSolution
Definition TransferStrategy4NieCoupling.h:93
void beginProcessInnerCouplingCellsAfterMDTimestep() override
increments time step counter
const double _shiftTimestep
Definition TransferStrategy4NieCoupling.h:101
void processInnerCouplingCellBeforeSendingMDSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
divides accumulated mass and momentum values by time step counter.
double * _excessMass
Definition TransferStrategy4NieCoupling.h:108
void processInnerCouplingCellAfterMDTimestep(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
computes current velocity (linear time interpolation) in this cell and accumulates mass/momentum for ...
void processInnerCouplingCellBeforeReceivingMacroscopicSolverData(coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 index) override
store old microscopic mass in excess-mass buffer and reset microscopic mass buffer
double computeMassFlux(const double &mass, const tarch::la::Vector< dim, double > &velocity, I01 index)
tarch::la::Vector< dim, double > * _oldSolution
Definition TransferStrategy4NieCoupling.h:91
TransferStrategy4NieCoupling(coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, unsigned int numberMDSteps, double shiftTimestep, tarch::la::Vector< 2 *dim, bool > massFluxBoundary)
a simple
coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim > _momentumMapping
Definition TransferStrategy4NieCoupling.h:88
Definition TransferStrategy.h:25
Definition Vector.h:24
the namespace is used for transferstrategies
Definition AveragingTransferStrategy.h:18
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15