1 #ifndef UTIL_CARRAY_PARAM_H 2 #define UTIL_CARRAY_PARAM_H 4 #include <util/param/Parameter.h> 95 for (
int i = 0; i < n_; ++i) {
103 template <
class Type>
105 { ar.
unpack(value_, n_); }
110 template <
class Type>
112 { ar.
pack(value_, n_); }
118 template <
class Type>
126 template <
class Type>
131 for (
int i = 0; i < n_; ++i) {
137 out << std::right << std::scientific
std::string label() const
Return label string.
CArrayParam(const char *label, Type *value, int n, bool isRequired=true)
Constructor.
Label label_
Label object that contains parameter label string.
A single variable in a parameter file.
File containing preprocessor macros for error handling.
Saving / output archive for binary ostream.
virtual void readValue(std::istream &in)
Read parameter value from an input stream.
virtual void bcastValue()
Broadcast parameter value within the ioCommunicator.
void pack(const T &data)
Pack one object of type T.
MPI::Intracomm & ioCommunicator() const
Get the MPI communicator by reference.
Utility classes for scientific computation.
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
static const int Precision
Precision for io of floating point data field.
bool isActive() const
Is this parameter active?
A Parameter associated with a 1D C array.
void writeParam(std::ostream &out)
Write parameter to stream.
A label string in a file format.
void unpack(T &data)
Unpack a single T object.
Saving archive for binary istream.
static const int Width
Width of output field for a scalar variable.
This file contains templates for global functions send<T>, recv<T> and bcast<T>.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
bool isRequired() const
Is this an optional parameter?
std::string indent() const
Return indent string for this object (string of spaces).