Simpatico  v1.10
ExternalPotential.cpp
1 /*
2 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
3 *
4 * Copyright 2010 - 2017, The Regents of the University of Minnesota
5 * Distributed under the terms of the GNU General Public License.
6 */
7 
8 #include "ExternalPotential.h"
9 #include <ddMd/simulation/Simulation.h>
10 #include <ddMd/storage/AtomStorage.h>
11 #include <ddMd/storage/AtomIterator.h>
12 #include <util/space/Vector.h>
13 #include <util/global.h>
14 
15 namespace DdMd
16 {
17  using namespace Util;
18 
19  /*
20  * Constructor.
21  */
23  : simulationPtr_(&simulation),
24  boundaryPtr_(&simulation.boundary()),
25  storagePtr_(&simulation.atomStorage())
26  { setClassName("ExternalPotential"); }
27 
28  /*
29  * Default constructor (for unit testing).
30  */
32  : boundaryPtr_(0),
33  storagePtr_(0)
34  {}
35 
36  /*
37  * Associate with related objects. (for unit testing).
38  */
40  {
41  boundaryPtr_ = &boundary;
42  storagePtr_ = &storage;
43  }
44 
45  /*
46  * Destructor.
47  */
49  {}
50 
51 }
Boundary & boundary()
Get the Boundary by reference.
An orthorhombic periodic unit cell.
File containing preprocessor macros for error handling.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
Utility classes for scientific computation.
Definition: accumulators.mod:1
A container for all the atoms and ghost atoms on this processor.
AtomStorage & storage()
Get the AtomStorage by reference.
ExternalPotential()
Default constructor (for unit testing).
void setClassName(const char *className)
Set class name string.
virtual void associate(Boundary &boundary, AtomStorage &storage)
Associate with related objects.
virtual ~ExternalPotential()
Destructor.