1#ifndef UTIL_CARRAY_PARAM_H
2#define UTIL_CARRAY_PARAM_H
4#include <util/param/ArrayParam.h>
8#include <util/mpi/MpiSendRecv.h>
79 virtual void bcastValue();
102 template <
class Type>
109 template <
class Type>
111 { ar.
pack(value_,
n()); }
117 template <
class Type>
119 { bcast<Type>(ioCommunicator(), value_, n(), 0); }
int n() const
Get the logical array dimension.
ArrayParam(const char *label, int n, bool isRequired=true)
Constructor.
std::string label() const
Return label string.
void writeParam(std::ostream &out) const
Write an array-valued parameter to stream.
virtual void readValue(std::istream &in)
Read array of element values from an input stream.
bool isRequired() const
Is this an optional parameter?
void unpack(T &data)
Unpack a single T object.
void pack(const T &data)
Pack one object of type T.
A Parameter associated with a 1D C array.
Type const & element(int i) const
Return a reference to one element of the array (const ref).
CArrayParam(const char *label, Type *value, int n, bool isRequired=true)
Constructor.
Type & element(int i)
Return a reference to one element of the array (non const).
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
BinaryFileIArchive IArchive
Type of input archive used by load method.
BinaryFileOArchive OArchive
Type of output archive used by save method.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.