8 #include "BoundaryEnsemble.h" 10 #include <util/mpi/MpiStructBuilder.h> 48 read<Type>(in,
"type", type_);
50 read<double>(in,
"pressure", pressure_);
59 loadParameter<Type>(ar,
"type", type_);
61 loadParameter<double>(ar,
"pressure", pressure_);
83 if (buffer ==
"RIGID" || buffer ==
"rigid") {
84 type = BoundaryEnsemble::RIGID;
86 if (buffer ==
"ISOBARIC" || buffer ==
"isobaric") {
87 type = BoundaryEnsemble::ISOBARIC;
89 UTIL_THROW(
"Invalid BoundaryEnsemble::Type value input");
99 if (type == BoundaryEnsemble::RIGID) {
102 if (type == BoundaryEnsemble::ISOBARIC) {
105 if (type == BoundaryEnsemble::UNKNOWN) {
121 builder.
addMember(&
object.pressure_, MPI::DOUBLE);
122 builder.
addMember(&
object.type_, MPI::INT);
void addMember(void *memberAddress, MPI::Datatype type, int count=1)
Add a new member variable to the type map.
bool isIsobaric() const
Is this an Isobaric ensemble?
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
double pressure() const
Get the target pressure.
Statistical ensemble for changes in the periodic unit cell size.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
BoundaryEnsemble(Type type=UNKNOWN)
Constructor.
Classes used by all simpatico molecular simulations.
std::istream & operator>>(std::istream &in, MonoclinicBoundary &boundary)
istream extractor for a MonoclinicBoundary.
void setBase(void *objectAddress)
Set address of an class instance.
void commit(MPI::Datatype &newType)
Build and commit a user-defined MPI Struct datatype.
Saving / output archive for binary ostream.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Type
Enumeration of the allowed types of BoundaryEnsemble.
Utility classes for scientific computation.
std::ostream & operator<<(std::ostream &out, const MonoclinicBoundary &boundary)
ostream inserter for an MonoclinicBoundary.
virtual void readParameters(std::istream &in)
Read the type and (if necessary) pressure from file.
A MpiStructBuilder objects is used to create an MPI Struct datatype.
~BoundaryEnsemble()
Destructor.
Saving archive for binary istream.
void setPressure(double pressure)
Set the pressure.
void setClassName(const char *className)
Set class name string.
static void commitMpiType()
Commit associated MPI DataType.