Simpatico  v1.10
SimulationAccess.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 "SimulationAccess.h"
9 #include "Simulation.h"
10 
11 namespace DdMd
12 {
13 
14  /*
15  * Constructor.
16  */
18  :
19  atomTypes_(),
20  simulationPtr_(&simulation),
21  boundaryPtr_(&simulation.boundary_),
22  atomStoragePtr_(&simulation.atomStorage_),
23  #ifdef SIMP_BOND
24  bondStoragePtr_(&simulation.bondStorage_),
25  #endif
26  #ifdef SIMP_ANGLE
27  angleStoragePtr_(&simulation.angleStorage_),
28  #endif
29  #ifdef SIMP_DIHEDRAL
30  dihedralStoragePtr_(&simulation.dihedralStorage_),
31  #endif
32  pairPotentialPtr_(simulation.pairPotentialPtr_),
33  #ifdef SIMP_BOND
34  bondPotentialPtr_(simulation.bondPotentialPtr_),
35  #endif
36  #ifdef SIMP_ANGLE
37  anglePotentialPtr_(simulation.anglePotentialPtr_),
38  #endif
39  #ifdef SIMP_DIHEDRAL
40  dihedralPotentialPtr_(simulation.dihedralPotentialPtr_),
41  #endif
42  #ifdef SIMP_EXTERNAL
43  externalPotentialPtr_(simulation.externalPotentialPtr_),
44  #endif
45  energyEnsemblePtr_(simulation.energyEnsemblePtr_),
46  boundaryEnsemblePtr_(simulation.boundaryEnsemblePtr_),
47  randomPtr_(&simulation.random_),
48  domainPtr_(&simulation.domain_),
49  exchangerPtr_(&simulation.exchanger_),
50  fileMasterPtr_(simulation.fileMasterPtr_),
51  nAtomType_(simulation.nAtomType_),
52  #ifdef SIMP_BOND
53  nBondType_(simulation.nBondType_),
54  #endif
55  #ifdef SIMP_ANGLE
56  nAngleType_(simulation.nAngleType_),
57  #endif
58  #ifdef SIMP_DIHEDRAL
59  nDihedralType_(simulation.nDihedralType_),
60  #endif
61  #ifdef SIMP_EXTERNAL
62  hasExternal_(simulation.hasExternal_),
63  #endif
64  maskedPairPolicy_(simulation.maskedPairPolicy_),
65  reverseUpdateFlag_(simulation.reverseUpdateFlag_)
66  {
67  atomTypes_.associate(simulation.atomTypes_);
68  // RArray atomsTypes_ wraps the same C array as that
69  // owned by atomTypes_ DArray in the parent Simulation.
70  }
71 
72  /*
73  * Destructor.
74  */
76  {}
77 
78 }
SimulationAccess(Simulation &simulation)
Constructor.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
~SimulationAccess()
Destructor.