9 #include <util/param/Parameter.h> 47 out << atomType.name_;
48 out.setf(std::ios::scientific);
51 out << atomType.mass_;
73 void send<DdMd::AtomType>(MPI::Comm& comm,
DdMd::AtomType& data,
int dest,
int tag)
75 std::string
name = data.name();
76 double mass = data.mass();
77 send<std::string>(comm,
name, dest, tag);
78 send<double>(comm,
mass, dest, tag);
82 void recv<DdMd::AtomType>(MPI::Comm& comm,
DdMd::AtomType& data,
int source,
int tag)
86 recv<std::string>(comm,
name, source, tag);
87 recv<double>(comm,
mass, source, tag);
93 void bcast<DdMd::AtomType>(MPI::Intracomm& comm,
DdMd::AtomType& data,
int root)
97 int rank = comm.Get_rank();
102 bcast<std::string>(comm,
name, root);
103 bcast<double>(comm,
mass, root);
117 #endif // ifdef UTIL_MPI
static void initStatic()
Call this to guarantee initialization of static data.
const std::string & name() const
Get the name string.
double mass() const
Get the mass.
Parallel domain decomposition (DD) MD simulation.
friend std::istream & operator>>(std::istream &in, AtomType &atomType)
istream extractor (>>) for an AtomType.
Utility classes for scientific computation.
static const int Precision
Precision for io of floating point data field.
static const int Width
Width of output field for a scalar variable.
friend std::ostream & operator<<(std::ostream &out, const AtomType &atomType)
ostream inserter (<<) for an AtomType.
Descriptor for a type of Atom.
void setId(int Id)
Set the type index.
int id() const
Get the index.