Line data Source code
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_NOPARTICLEINSERTION_H_
6 : #define _MOLECULARDYNAMICS_COUPLING_NOPARTICLEINSERTION_H_
7 :
8 : #include "coupling/ParticleInsertion.h"
9 :
10 : namespace coupling {
11 : template <class LinkedCell, unsigned int dim> class NoParticleInsertion;
12 : }
13 :
14 : /** @brief empty implementation of particle insertion (no particle
15 : * insertion/removal).
16 : * @author Philipp Neumann
17 : * @tparam LinkedCell the LinkedCell class is given by the implementation of
18 : * linked cells in the molecular dynamics simulation
19 : * @tparam dim refers to the spacial dimension of the simulation, can be 1, 2,
20 : * or 3
21 : */
22 : template <class LinkedCell, unsigned int dim> class coupling::NoParticleInsertion : public coupling::ParticleInsertion<LinkedCell, dim> {
23 : public:
24 : /** @brief dummy function, doesn't change or do something
25 : * @returns coupling::ParticleInsertion::NoAction since no mass is deleted or
26 : * inserted */
27 : virtual typename coupling::ParticleInsertion<LinkedCell, dim>::Action
28 0 : insertDeleteMass(coupling::datastructures::CouplingCellWithLinkedCells<LinkedCell, dim>& cell, const tarch::la::Vector<dim, double>& couplingCellPosition,
29 : const tarch::la::Vector<dim, double>& couplingCellSize, const tarch::la::Vector<dim, double>& meanVelocity, const double& temperature,
30 : const coupling::BoundaryForceController<LinkedCell, dim>& boundaryForceController) {
31 0 : return coupling::ParticleInsertion<LinkedCell, dim>::NoAction;
32 : }
33 :
34 : /** @brief returns false, since no energy landscape is needed in the dummy
35 : * class
36 : * @returns a bool that indicates if a potential energy landscape is
37 : * neccessary (true) or not (false) */
38 0 : virtual bool requiresPotentialEnergyLandscape() { return false; }
39 :
40 : /** @brief a simple constructor*/
41 4 : NoParticleInsertion() : coupling::ParticleInsertion<LinkedCell, dim>(1) {}
42 :
43 : /** @brief a simple destructor*/
44 0 : virtual ~NoParticleInsertion() {}
45 : };
46 : #endif // _MOLECULARDYNAMICS_COUPLING_NOPARTICLEINSERTION_H_
|