Simpatico  v1.10
ModifierFactory.h
1 #ifndef DDMD_MODIFIER_FACTORY_H
2 #define DDMD_MODIFIER_FACTORY_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <util/param/Factory.h> // base class template
12 #include "Modifier.h" // base template parameter
13 
14 namespace DdMd
15 {
16 
17  using namespace Util;
18 
19  class Simulation;
20 
27  class ModifierFactory : public Factory<Modifier>
28  {
29 
30  public:
31 
36 
42  ModifierFactory(Simulation& simulation);
43 
50  virtual Modifier* factory(const std::string& className) const;
51 
52  protected:
53 
58  {
59  assert(simulationPtr_);
60  return *simulationPtr_;
61  }
62 
63  private:
64 
66  Simulation* simulationPtr_;
67 
68  };
69 
70 }
71 #endif
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
Simulation & simulation() const
Return reference to parent Simulation.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Factory for DdMd::Modifier objects.
Factory template.
Definition: Factory.h:32
A Modifier can modify the time evolution of the simulation.
Definition: Modifier.h:82