1 #ifndef UTIL_F_ARRAY_PARAM_H 2 #define UTIL_F_ARRAY_PARAM_H 11 #include <util/param/Parameter.h> 12 #include <util/containers/FArray.h> 25 template <
class Type,
int N>
87 template <
class Type,
int N>
96 template <
class Type,
int N>
99 for (
int i = 0; i < N; ++i) {
100 in >> (*arrayPtr_)[i];
107 template <
class Type,
int N>
109 { ar >> *arrayPtr_; }
114 template <
class Type,
int N>
116 { ar << *arrayPtr_; }
122 template <
class Type,
int N>
130 template <
class Type,
int N>
135 for (
int i = 0; i < N; ++i) {
141 out << std::right << std::scientific
std::string label() const
Return label string.
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
FArrayParam(const char *label, FArray< Type, N > &array, 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.
void writeParam(std::ostream &out)
Write FArray parameter to stream.
MPI::Intracomm & ioCommunicator() const
Get the MPI communicator by reference.
Utility classes for scientific computation.
static const int Precision
Precision for io of floating point data field.
bool isActive() const
Is this parameter active?
A label string in a file format.
Saving archive for binary istream.
static const int Width
Width of output field for a scalar variable.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
virtual void bcastValue()
Broadcast parameter value within the ioCommunicator.
bool isRequired() const
Is this an optional parameter?
virtual void readValue(std::istream &in)
Read parameter value from an input stream.
std::string indent() const
Return indent string for this object (string of spaces).
A Parameter associated with a FArray container.