Simpatico  v1.10
ddMd/misc/initStatic.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 "initStatic.h"
9 #include <ddMd/modifiers/Modifier.h>
10 #include <util/global.h>
11 
12 namespace DdMd
13 {
14 
15  /*
16  * Initialize all static class members in DdMd namespace.
17  */
18  void initStatic()
19  {
20  // Precondition: This function should only be called once.
21  static int nCall = 0;
22  if (nCall == 0) {
23  // Call initStatic() methods of all relevant classes.
25  }
26  ++nCall;
27  }
28 
29 }
File containing preprocessor macros for error handling.
Parallel domain decomposition (DD) MD simulation.
static void initStatic()
Call this to guarantee initialization of static variables.
Definition: Modifier.cpp:37
void initStatic()
Guarantee initialization of all static class members in DdMd namespace.