Simpatico  v1.10
OrthoRegion.h
1 #ifndef SIMP_ORTHO_REGION_H
2 #define SIMP_ORTHO_REGION_H
3 
4 /*
5 * Util Package - C++ Utilities for Scientific Computation
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/space/Vector.h>
12 
13 namespace Simp
14 {
15 
16  using namespace Util;
17 
27  struct OrthoRegion
28  {
29 
30  public:
31 
34 
37 
40 
43 
45  double volume_;
46 
52  OrthoRegion();
53 
57  void resetRegion();
58 
62  bool isValid();
63 
70  template <class Archive>
71  void serialize(Archive& ar, const unsigned int version);
72 
73  };
74 
75  /*
76  * Serialize an OrthoRegion to/from an archive.
77  */
78  template <class Archive>
79  void OrthoRegion::serialize(Archive& ar, const unsigned int version)
80  {
81  ar & minima_;
82  ar & maxima_;
83  ar & lengths_;
84  ar & halfLengths_;
85  ar & volume_;
86  }
87 
88 
89 }
90 #endif
bool isValid()
Return true if valid, or throw Exception.
Definition: OrthoRegion.cpp:50
A Vector is a Cartesian vector.
Definition: Vector.h:75
void resetRegion()
Set lengths and volume to values consistent with minima and maxima.
Definition: OrthoRegion.cpp:37
Classes used by all simpatico molecular simulations.
Vector minima_
Minimum coordinates: Require r[i] >= minima_[i].
Definition: OrthoRegion.h:33
Vector lengths_
OrthoRegion lengths: lengths_[i] = maxima_[i] - minima_[i].
Definition: OrthoRegion.h:39
OrthoRegion()
Constructor.
Definition: OrthoRegion.cpp:23
Utility classes for scientific computation.
Definition: accumulators.mod:1
Vector maxima_
Maximum coordinates: Require r[i] < maxima_[i].
Definition: OrthoRegion.h:36
void serialize(Archive &ar, const unsigned int version)
Serialize to/from an archive.
Definition: OrthoRegion.h:79
double volume_
Volume: V = lengths_[0]*lengths_[1]*lengths_[2].
Definition: OrthoRegion.h:45
A region with orthogonal edges parallel to the x, y, and z axes.
Definition: OrthoRegion.h:27
Vector halfLengths_
Half region lengths: halfLengths_[i] = 0.5*lengths_[i].
Definition: OrthoRegion.h:42