1#ifndef UTIL_SCALAR_PARAM_H
2#define UTIL_SCALAR_PARAM_H
11#include <util/param/Parameter.h>
12#include <util/archives/Serializable_includes.h>
16#include <util/mpi/MpiSendRecv.h>
89 virtual void bcastValue();
110 template <
class Type>
117 template <
class Type>
119 { in >> *valuePtr_; }
121 template <
class Type>
125 template <
class Type>
130 template <
class Type>
132 { bcast<Type>(ioCommunicator(), *valuePtr_, 0); }
138 template <
class Type>
144 out << std::right << std::scientific
154 template <
class Type>
156 { valuePtr_ = &value; }
std::string indent() const
Return indent string for this object (string of spaces).
std::string label() const
Return label string.
Parameter(const char *label, bool isRequired=true)
Constructor.
static const int Precision
Precision for io of floating point data field.
bool isRequired() const
Is this an optional parameter?
Label label_
Label object that contains parameter label string.
bool isActive() const
Is this parameter active?
static const int Width
Width of output field for a scalar variable.
Template for a Parameter object associated with a scalar variable.
virtual void readValue(std::istream &in)
Read parameter value from an input stream.
void setValue(Type &value)
Set the pointer to point a specific variable.
virtual void saveValue(Serializable::OArchive &ar)
Save parameter value to an archive.
void writeParam(std::ostream &out) const
Write parameter to stream.
virtual void loadValue(Serializable::IArchive &ar)
Load bare parameter value from an archive.
ScalarParam(const char *label, Type &value, bool isRequired=true)
Constructor.
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.