5#ifndef _MOLECULARDYNAMICS_COUPLING_COUPLINGMDDEFINITIONS_H_
6#define _MOLECULARDYNAMICS_COUPLING_COUPLINGMDDEFINITIONS_H_
8#define COUPLING_MD_NO 0
9#define COUPLING_MD_YES 1
11#if defined(MDCoupledDebug)
12#define COUPLING_MD_DEBUG COUPLING_MD_YES
14#define COUPLING_MD_DEBUG COUPLING_MD_NO
17#if defined(MDCoupledError)
18#define COUPLING_MD_ERROR COUPLING_MD_YES
20#define COUPLING_MD_ERROR COUPLING_MD_NO
23#if defined(MDCoupledParallel)
24#define COUPLING_MD_PARALLEL COUPLING_MD_YES
26#define COUPLING_MD_PARALLEL COUPLING_MD_NO
32#define TAG_FROM_MD2MACRO 100000
33#define TAG_FROM_MACRO2MD 500000
35#define IDXS coupling::indexing::IndexingService<dim>::getInstance()
37#include "tarch/la/Vector.h"
38#include "tarch/utils/OstreamOperators.h"
62 for (
unsigned int d = 0; d < dim; d++) {
77 for (
unsigned int d = 0; d < dim; d++) {
91 for (
unsigned int d = 1; d < dim; d++) {
92 divFactor[d] = divFactor[d - 1] * (numberCells[d - 1]);
107template <
unsigned int dim>
110 unsigned int help = cellIndex;
111 for (
int d = dim - 1; d > 0; d--) {
112 myVector[d] = help / divisionFactor[d];
113 help = help - myVector[d] * divisionFactor[d];
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15
tarch::la::Vector< dim, unsigned int > initDimVector(tarch::la::Vector< 3, unsigned int > vec)
reduces three-dimensional vector to vector of size dim (assumes that dim<= 3).
Definition CouplingMDDefinitions.h:75
tarch::la::Vector< 3, unsigned int > initRange(tarch::la::Vector< dim, unsigned int > vec)
initialises the range for looping over Cartesian grid for general case
Definition CouplingMDDefinitions.h:60
MacroscopicSolverID
Definition CouplingMDDefinitions.h:46
@ PEANO_LATTICEBOLTZMANN_ID
test1
Definition CouplingMDDefinitions.h:47
@ TEST_LOCAL_MACROSCOPIC_SOLVER_ID
test2
Definition CouplingMDDefinitions.h:48
tarch::la::Vector< dim, unsigned int > initDivisionFactor(tarch::la::Vector< dim, unsigned int > numberCells)
Definition CouplingMDDefinitions.h:89
tarch::la::Vector< dim, unsigned int > getVectorCellIndex(unsigned int cellIndex, const tarch::la::Vector< dim, unsigned int > &divisionFactor)
converts linearised cell index to a vector cell index using predefined division factors.
Definition CouplingMDDefinitions.h:108