Simpatico  v1.10
List of all members | Public Member Functions | Public Attributes
Simp::OrthoRegion Struct Reference

Detailed Description

A region with orthogonal edges parallel to the x, y, and z axes.

This struct is intended to be used as a private or protected component, i.e., a private or protected member or base class of another class.

Definition at line 27 of file OrthoRegion.h.

#include <OrthoRegion.h>

Inheritance diagram for Simp::OrthoRegion:
Simp::OrthorhombicBoundary

Public Member Functions

 OrthoRegion ()
 Constructor. More...
 
void resetRegion ()
 Set lengths and volume to values consistent with minima and maxima. More...
 
bool isValid ()
 Return true if valid, or throw Exception. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize to/from an archive. More...
 

Public Attributes

Vector minima_
 Minimum coordinates: Require r[i] >= minima_[i]. More...
 
Vector maxima_
 Maximum coordinates: Require r[i] < maxima_[i]. More...
 
Vector lengths_
 OrthoRegion lengths: lengths_[i] = maxima_[i] - minima_[i]. More...
 
Vector halfLengths_
 Half region lengths: halfLengths_[i] = 0.5*lengths_[i]. More...
 
double volume_
 Volume: V = lengths_[0]*lengths_[1]*lengths_[2]. More...
 

Constructor & Destructor Documentation

Simp::OrthoRegion::OrthoRegion ( )

Constructor.

Initialize to minima_ = {0.0, 0.0, 0.0} and maxima_ = {1.0, 1.0, 1.0}

Definition at line 23 of file OrthoRegion.cpp.

References Util::Dimension, halfLengths_, lengths_, maxima_, minima_, and volume_.

Member Function Documentation

void Simp::OrthoRegion::resetRegion ( )

Set lengths and volume to values consistent with minima and maxima.

Definition at line 37 of file OrthoRegion.cpp.

References Util::Dimension, halfLengths_, lengths_, maxima_, minima_, and volume_.

Referenced by Simp::OrthorhombicBoundary::setCubic().

bool Simp::OrthoRegion::isValid ( )

Return true if valid, or throw Exception.

Definition at line 50 of file OrthoRegion.cpp.

References Util::Dimension, Util::feq(), halfLengths_, lengths_, maxima_, minima_, Util::product(), UTIL_THROW, and volume_.

Referenced by Simp::OrthorhombicBoundary::isValid().

template<class Archive >
void Simp::OrthoRegion::serialize ( Archive &  ar,
const unsigned int  version 
)

Serialize to/from an archive.

Parameters
arsaving or loading archive
versionarchive version id

Definition at line 79 of file OrthoRegion.h.

References halfLengths_, lengths_, maxima_, minima_, and volume_.

Referenced by Simp::OrthorhombicBoundary::serialize().

Member Data Documentation

Vector Simp::OrthoRegion::minima_
Vector Simp::OrthoRegion::maxima_
Vector Simp::OrthoRegion::lengths_
Vector Simp::OrthoRegion::halfLengths_

Half region lengths: halfLengths_[i] = 0.5*lengths_[i].

Definition at line 42 of file OrthoRegion.h.

Referenced by Simp::OrthorhombicBoundary::distanceSq(), Simp::OrthorhombicBoundary::isMinImageCart(), isValid(), OrthoRegion(), resetRegion(), and serialize().

double Simp::OrthoRegion::volume_

Volume: V = lengths_[0]*lengths_[1]*lengths_[2].

Definition at line 45 of file OrthoRegion.h.

Referenced by isValid(), OrthoRegion(), resetRegion(), serialize(), and Simp::OrthorhombicBoundary::volume().


The documentation for this struct was generated from the following files: