PSCF v1.1
Namespaces | Classes | Typedefs | Functions | Variables
Util Namespace Reference

Utility classes for scientific computation. More...

Namespaces

namespace  BracketPolicy
 Namespace to define of policies for brackets on arrays and matrices.
 

Classes

class  Ar1Process
 Generator for a discrete AR(1) Markov process. More...
 
class  Array
 Array container class template. More...
 
class  ArrayIterator
 Forward iterator for an Array or a C array. More...
 
class  ArrayParam
 An array-valued parameter in a parameter file. More...
 
class  ArraySet
 A set of pointers to a subset of elements of an array. More...
 
class  ArrayStack
 A stack of fixed capacity, which stores pointers to elements. More...
 
class  AutoCorr
 Auto-correlation function for one sequence of Data values. More...
 
class  AutoCorrArray
 Auto-correlation function for an ensemble of sequences. More...
 
class  AutoCorrelation
 Auto-correlation function, using hierarchical algorithm. More...
 
class  AutoCorrStage
 Hierarchical auto-correlation function algorithm. More...
 
class  Average
 Calculates the average and variance of a sampled property. More...
 
class  AverageStage
 Evaluate average with hierarchical blocking error analysis. More...
 
class  Begin
 Beginning line of a composite parameter block. More...
 
class  BinaryFileIArchive
 Saving archive for binary istream. More...
 
class  BinaryFileOArchive
 Saving / output archive for binary ostream. More...
 
class  Binomial
 Class for binomial coefficients (all static members) More...
 
class  Bit
 Represents a specific bit location within an unsigned int. More...
 
class  Blank
 An empty line within a parameter file. More...
 
class  Bool
 Wrapper for an bool value, for formatted ostream output. More...
 
class  CardinalBSpline
 A cardinal B-spline basis function. More...
 
class  CArray2DParam
 A Parameter associated with a 2D built-in C array. More...
 
class  CArrayParam
 A Parameter associated with a 1D C array. More...
 
class  Constants
 Mathematical constants. More...
 
class  ConstArrayIterator
 Forward const iterator for an Array or a C array. More...
 
class  ConstPArrayIterator
 Forward iterator for a PArray. More...
 
class  DArray
 Dynamically allocatable contiguous array template. More...
 
class  DArrayParam
 A Parameter associated with a DArray container. More...
 
class  Dbl
 Wrapper for a double precision number, for formatted ostream output. More...
 
class  Distribution
 A distribution (or histogram) of values for a real variable. More...
 
class  DMatrix
 Dynamically allocated Matrix. More...
 
class  DMatrixParam
 A Parameter associated with a 2D built-in C array. More...
 
class  DPArray
 A dynamic array that only holds pointers to its elements. More...
 
class  DRaggedMatrix
 Dynamically allocated RaggedMatrix. More...
 
class  DSArray
 Dynamically allocated array with variable logical size. More...
 
class  DSymmMatrixParam
 A Parameter associated with a square symmetric DMatrix. More...
 
class  End
 End bracket of a ParamComposite parameter block. More...
 
class  Exception
 A user-defined exception. More...
 
class  Factory
 Factory template. More...
 
class  FArray
 A fixed size (static) contiguous array template. More...
 
class  FArrayParam
 A Parameter associated with a FArray container. More...
 
class  FileMaster
 A FileMaster manages input and output files for a simulation. More...
 
class  FlagSet
 A set of boolean variables represented by characters. More...
 
class  FlexPtr
 A pointer that may or may not own the object to which it points. More...
 
class  FMatrix
 Fixed Size Matrix. More...
 
class  Format
 Base class for output wrappers for formatted C++ ostream output. More...
 
class  FPArray
 Statically allocated pointer array. More...
 
class  FSArray
 A fixed capacity (static) contiguous array with a variable logical size. More...
 
class  FSArrayParam
 A Parameter associated with a FSArray container. More...
 
class  GArray
 An automatically growable array, analogous to a std::vector. More...
 
class  GPArray
 An automatically growable PArray. More...
 
class  Grid
 A grid of points indexed by integer coordinates. More...
 
class  GridArray
 Multi-dimensional array with the dimensionality of space. More...
 
class  GStack
 An automatically growable Stack. More...
 
class  IFunctor
 Interface for functor that wraps a void function with one argument (abstract). More...
 
class  IFunctor< void >
 Interface for functor that wraps a void function with no arguments (abstract). More...
 
class  Int
 Wrapper for an int, for formatted ostream output. More...
 
class  IntDistribution
 A distribution (or histogram) of values for an int variable. More...
 
class  IntVector
 An IntVector is an integer Cartesian vector. More...
 
class  Label
 A label string in a file format. More...
 
class  List
 Linked list class template. More...
 
class  ListArray
 An array of objects that are accessible by one or more linked List objects. More...
 
class  ListIterator
 Bidirectional iterator for a List. More...
 
class  Lng
 Wrapper for a long int, for formatted ostream output. More...
 
class  Log
 A static class that holds a log output stream. More...
 
class  Manager
 Template container for pointers to objects with a common base class. More...
 
class  Matrix
 Two-dimensional array container template (abstract). More...
 
class  MatrixParam
 An array-valued parameter in a parameter file. More...
 
class  MeanSqDispArray
 Mean-squared displacement (MSD) vs. More...
 
class  Memory
 Provides method to allocate array. More...
 
class  MemoryCounter
 Archive to computed packed size of a sequence of objects, in bytes. More...
 
class  MemoryIArchive
 Input archive for packed heterogeneous binary data. More...
 
class  MemoryOArchive
 Save archive for packed heterogeneous binary data. More...
 
class  MethodFunctor
 Functor that wraps a one-argument class member function. More...
 
class  MethodFunctor< Object, void >
 Functor that wraps a class member function with no arguments. More...
 
class  MpiFileIo
 Identifies whether this processor may do file I/O. More...
 
class  MpiLoader
 Provides methods for MPI-aware loading of data from input archive. More...
 
class  MpiLogger
 Allows information from every processor in a communicator, to be output in rank sequence. More...
 
class  MpiStructBuilder
 A MpiStructBuilder objects is used to create an MPI Struct datatype. More...
 
class  MpiTraits
 Default MpiTraits class. More...
 
class  MpiTraits< bool >
 MpiTraits<bool> explicit specialization. More...
 
class  MpiTraits< char >
 MpiTraits<char> explicit specialization. More...
 
class  MpiTraits< double >
 MpiTraits<double> explicit specialization. More...
 
class  MpiTraits< float >
 MpiTraits<float> explicit specialization. More...
 
class  MpiTraits< int >
 MpiTraits<int> explicit specialization. More...
 
class  MpiTraits< IntVector >
 Explicit specialization MpiTraits<IntVector>. More...
 
class  MpiTraits< long >
 MpiTraits<long> explicit specialization. More...
 
class  MpiTraits< long double >
 MpiTraits<long double> explicit specialization. More...
 
class  MpiTraits< Rational >
 Explicit specialization MpiTraits<Rational>. More...
 
class  MpiTraits< short >
 MpiTraits<short> explicit specialization. More...
 
class  MpiTraits< Tensor >
 Explicit specialization MpiTraits<Tensor>. More...
 
class  MpiTraits< unsigned char >
 MpiTraits<unsigned char> explicit specialization. More...
 
class  MpiTraits< unsigned int >
 MpiTraits<unsigned int> explicit specialization. More...
 
class  MpiTraits< unsigned long >
 MpiTraits<unsigned long> explicit specialization. More...
 
class  MpiTraits< unsigned short >
 MpiTraits<unsigned short> explicit specialization. More...
 
class  MpiTraits< Vector >
 Explicit specialization MpiTraits<Vector>. More...
 
class  MpiTraitsNoType
 Base class for MpiTraits with no type. More...
 
class  MTRand
 Generates double floating point numbers in the half-open interval [0, 1) More...
 
class  MTRand53
 generates 53 bit resolution doubles in the half-open interval [0, 1) More...
 
class  MTRand_closed
 Generates double floating point numbers in the closed interval [0, 1]. More...
 
class  MTRand_int32
 Mersenne Twister random number generator engine. More...
 
class  MTRand_open
 Generates double floating point numbers in the open interval (0, 1). More...
 
class  Node
 Linked List Node, class template. More...
 
class  Notifier
 Abstract template for a notifier (or subject) in the Observer design pattern. More...
 
class  Observer
 Abstract class template for observer in the observer design pattern. More...
 
class  OptionalLabel
 An optional Label string in a file format. More...
 
class  Pair
 An array of exactly 2 objects. More...
 
class  ParamComponent
 Abstract base class for classes that input and ouput parameters to file. More...
 
class  ParamComposite
 An object that can read multiple parameters from file. More...
 
class  Parameter
 A single variable in a parameter file. More...
 
class  PArray
 An array that only holds pointers to its elements. More...
 
class  PArrayIterator
 Forward iterator for a PArray. More...
 
class  Polynomial
 A Polynomial (i.e,. More...
 
class  RadialDistribution
 Distribution (or histogram) of values for particle separations. More...
 
class  RaggedMatrix
 A 2D array in which different rows can have different lengths. More...
 
class  Random
 Random number generator. More...
 
class  RArray
 An Array that acts as a reference to another Array or C array. More...
 
class  Rational
 A Rational number (a ratio of integers). More...
 
class  RingBuffer
 Class for storing history of previous values in an array. More...
 
class  ScalarParam
 Template for a Parameter object associated with a scalar variable. More...
 
class  ScopedPtr
 A very simple RAII pointer. More...
 
class  Serializable
 Abstract class for serializable objects. More...
 
class  Setable
 Template for a value that can be set or declared null (i.e., unknown). More...
 
class  Signal
 Notifier (or subject) in the Observer design pattern. More...
 
class  Signal< void >
 Notifier (or subject) in the Observer design pattern (zero parameters). More...
 
class  SSet
 Statically allocated array of pointers to an unordered set. More...
 
class  Str
 Wrapper for a std::string, for formatted ostream output. More...
 
class  SymmTensorAverage
 Calculates averages of all components of a Tensor-valued variable. More...
 
class  Tensor
 A Tensor represents a Cartesian tensor. More...
 
class  TensorAverage
 Calculates averages of all components of a Tensor-valued variable. More...
 
class  TextFileIArchive
 Loading archive for text istream. More...
 
class  TextFileOArchive
 Saving archive for character based ostream. More...
 
class  Timer
 Wall clock timer. More...
 
class  Vector
 A Vector is a Cartesian vector. More...
 
class  XdrFileIArchive
 Loading / input archive for binary XDR file. More...
 
class  XdrFileOArchive
 Saving / output archive for binary XDR file. More...
 
class  XmlAttribute
 Parser for an XML attribute. More...
 
class  XmlBase
 Base class for classes that parse XML markup tags. More...
 
class  XmlEndTag
 Parser for an XML end tag. More...
 
class  XmlStartTag
 Parser for an XML start tag. More...
 
class  XmlXmlTag
 Parser for an XML file declaration tag (first line in file). More...
 

Typedefs

typedef unsigned char Byte
 Define a "Byte" type. More...
 

Functions

float product (float a, float b)
 Product for float Data. More...
 
double product (double a, double b)
 Product for double Data. More...
 
double product (const Vector &a, const Vector &b)
 Dot product for Vector Data. More...
 
double product (const Tensor &a, const Tensor &b)
 Double contraction for Tensor Data. More...
 
complex< float > product (complex< float > a, complex< float > b)
 Inner product for complex<float> Data. More...
 
complex< double > product (complex< double > a, complex< double > b)
 Inner product for complex<double> Data. More...
 
void setToZero (int &value)
 Set an int variable to zero. More...
 
void setToZero (float &value)
 Set a float variable to zero. More...
 
void setToZero (double &value)
 Set a double variable to zero. More...
 
void setToZero (Vector &value)
 Set a Vector variable to zero. More...
 
void setToZero (Tensor &value)
 Set a Vector variable to zero. More...
 
void setToZero (complex< float > &value)
 Set a complex<float> variable to zero. More...
 
void setToZero (complex< double > &value)
 Set a complex<double> variable to zero. More...
 
template<typename T >
int memorySize (T &data)
 Function template to compute memory size of one object. More...
 
template<class Archive , typename T >
void serialize (Archive &ar, T &data, const unsigned int version)
 Serialize one object of type T. More...
 
template<class Archive , typename T >
void serializeEnum (Archive &ar, T &data, const unsigned int version=0)
 Serialize an enumeration value. More...
 
template<class Archive , typename T >
void serializeCheck (Archive &ar, T &data, const char *label="")
 Save a value, or save and check correctness on loading. More...
 
template<typename Data >
std::istream & operator>> (std::istream &in, Pair< Data > &pair)
 Input a Pair from an istream. More...
 
template<typename Data >
std::ostream & operator<< (std::ostream &out, const Pair< Data > &pair)
 Output a Pair to an ostream, without line breaks. More...
 
std::istream & operator>> (std::istream &in, Bool &object)
 Input stream extractor for an Bool object. More...
 
std::ostream & operator<< (std::ostream &out, const Bool &object)
 Output stream inserter for an Bool object. More...
 
std::istream & operator>> (std::istream &in, Dbl &object)
 Input stream extractor for an Dbl object. More...
 
std::ostream & operator<< (std::ostream &out, const Dbl &object)
 Output stream inserter for an Dbl object. More...
 
std::istream & operator>> (std::istream &in, Int &object)
 Input stream extractor for an Int object. More...
 
std::ostream & operator<< (std::ostream &out, const Int &object)
 Output stream inserter for an Int object. More...
 
std::istream & operator>> (std::istream &in, Lng &object)
 Input stream extractor for an Lng object. More...
 
std::ostream & operator<< (std::ostream &out, const Lng &object)
 Output stream inserter for an Lng object. More...
 
std::istream & operator>> (std::istream &in, Str &object)
 Input stream extractor for an Str object. More...
 
std::ostream & operator<< (std::ostream &out, const Str &object)
 Output stream inserter for an Str object. More...
 
template<>
void write (std::ostream &out, double data)
 Explicit specialization of write for double data. More...
 
template<>
void write (std::ostream &out, std::complex< double > data)
 Explicit specialization of write for double data. More...
 
template<>
void write (std::ostream &out, int data)
 Explicit specialization of write for int data. More...
 
template<>
void write (std::ostream &out, long data)
 Explicit specialization of write for long data. More...
 
template<>
void write (std::ostream &out, bool data)
 Explicit specialization of write for bool data. More...
 
template<typename Type >
void write (std::ostream &out, Type data)
 Function template for output in a standard format. More...
 
template<>
void write (std::ostream &out, double data)
 Explicit specialization of write for double data. More...
 
template<>
void write (std::ostream &out, std::complex< double > data)
 Explicit specialization of write for double data. More...
 
template<>
void write (std::ostream &out, int data)
 Explicit specialization of write for int data. More...
 
template<>
void write (std::ostream &out, long data)
 Explicit specialization of write for long data. More...
 
template<>
void write (std::ostream &out, bool data)
 Explicit specialization of write for bool data. More...
 
template<>
void write (std::ostream &out, std::string data)
 Explicit specialization of write for std::string data. More...
 
bool feq (double x, double y, double eps=1.0E-10)
 Are two floating point numbers equal to within round-off error? More...
 
int gcd (int a, int b)
 Compute greatest common divisor (gcd) of two integers. More...
 
template<typename T >
bool operator== (Polynomial< T > const &a, Polynomial< T > const &b)
 Equality operator for polynomials. More...
 
template<typename T >
bool operator!= (Polynomial< T > const &a, Polynomial< T > const &b)
 Inequality operator for polynomials. More...
 
template<typename T >
Polynomial< T > operator- (Polynomial< T > const &a)
 Unary negation of polynomial. More...
 
std::ostream & operator<< (std::ostream &out, Rational const &rational)
 Output stream inserter for a Rational. More...
 
Rational operator+ (Rational const &a, Rational const &b)
 Compute sum of two rationals. More...
 
Rational operator+ (Rational const &a, int b)
 Compute sum of rational and integer. More...
 
Rational operator+ (int b, Rational const &a)
 Compute sum of integer and integer. More...
 
Rational operator- (Rational const &a, Rational const &b)
 Compute difference of rationals. More...
 
Rational operator- (Rational const &a, int b)
 Compute difference of rational and integer. More...
 
Rational operator- (int b, Rational const &a)
 Compute difference of integer and rational. More...
 
Rational operator* (Rational const &a, Rational const &b)
 Compute product of rationals. More...
 
Rational operator* (Rational const &a, int b)
 Compute product of rational and integer. More...
 
Rational operator* (int b, Rational const &a)
 Compute product of integer and rational. More...
 
Rational operator/ (Rational const &a, Rational const &b)
 Compute quotient of two rationals. More...
 
Rational operator/ (Rational const &a, int b)
 Compute quotient Rational divided by integer. More...
 
Rational operator/ (int b, Rational const &a)
 Compute quotient integer divided by Rational. More...
 
Rational operator- (Rational const &a)
 Unary negation of Rational. More...
 
bool operator== (Rational const &a, Rational const &b)
 Equality operators. More...
 
bool operator== (Rational const &a, int b)
 Equality operator for a Rational and an integer. More...
 
bool operator== (int b, Rational const &a)
 Equality operator for an integer and a Rational. More...
 
bool operator!= (Rational const &a, Rational const &b)
 Inequality operators. More...
 
bool operator!= (Rational const &a, int b)
 Inequality operator for a Rational and an integer. More...
 
bool operator!= (int b, Rational const &a)
 Inequality operator for an integer and a Rational. More...
 
void MpiThrow (Exception &e)
 Function to throw exception in MPI code. More...
 
void initStatic ()
 Guarantee initialization of all static class members in Util namespace. More...
 
int rStrip (std::string &string)
 Strip trailing whitespace from a string. More...
 
void checkString (std::istream &in, const std::string &expected)
 Extract string from stream, and compare to expected value. More...
 
std::string toString (int n)
 Return string representation of an integer. More...
 
bool getLine (std::istream &in, std::stringstream &line)
 Read the next line into a stringstream. More...
 
bool getNextLine (std::istream &in, std::string &line)
 Read the next non-empty line into a string, strip trailing whitespace. More...
 
bool getNextLine (std::istream &in, std::stringstream &line)
 Read next non-empty line into a stringstream, strip trailing whitespace. More...
 
void checkRequiredIstream (std::istream &in)
 Check status of a std::istream just before reading required variable. More...
 
template<typename D , typename B , typename M >
ptrdiff_t memberOffset (D &object, M B::*memPtr)
 Template for calculating offsets of data members. More...
 
template<typename D , typename B >
ptrdiff_t baseOffset (D &object)
 Template for calculating offsets of base class subobjects. More...
 
template<>
void send< bool > (MPI::Comm &comm, bool &data, int dest, int tag)
 Explicit specialization of send for bool data. More...
 
template<>
void recv< bool > (MPI::Comm &comm, bool &data, int source, int tag)
 Explicit specialization of recv for bool data. More...
 
template<>
void bcast< bool > (MPI::Intracomm &comm, bool &data, int root)
 Explicit specialization of bcast for bool data. More...
 
template<>
void send< std::string > (MPI::Comm &comm, std::string &data, int dest, int tag)
 Explicit specialization of send for std::string data. More...
 
template<>
void recv< std::string > (MPI::Comm &comm, std::string &data, int source, int tag)
 Explicit specialization of recv for std::string data. More...
 
template<>
void bcast< std::string > (MPI::Intracomm &comm, std::string &data, int root)
 Explicit specialization of bcast for std::string data. More...
 
template<typename T >
void send (MPI::Comm &comm, T &data, int dest, int tag)
 Send a single T value. More...
 
template<typename T >
void recv (MPI::Comm &comm, T &data, int source, int tag)
 Receive a single T value. More...
 
template<typename T >
void bcast (MPI::Intracomm &comm, T &data, int root)
 Broadcast a single T value. More...
 
template<typename T >
void send (MPI::Comm &comm, T *array, int count, int dest, int tag)
 Send a C-array of T values. More...
 
template<typename T >
void recv (MPI::Comm &comm, T *array, int count, int source, int tag)
 Receive a C-array of T objects. More...
 
template<typename T >
void bcast (MPI::Intracomm &comm, T *array, int count, int root)
 Broadcast a C-array of T objects. More...
 
template<typename T >
void send (MPI::Comm &comm, DArray< T > &array, int count, int dest, int tag)
 Send a DArray<T> container. More...
 
template<typename T >
void recv (MPI::Comm &comm, DArray< T > &array, int count, int source, int tag)
 Receive a DArray<T> container. More...
 
template<typename T >
void bcast (MPI::Intracomm &comm, DArray< T > &array, int count, int root)
 Broadcast a DArray<T> container. More...
 
template<typename T >
void send (MPI::Comm &comm, DMatrix< T > &matrix, int m, int n, int dest, int tag)
 Send a DMatrix<T> container. More...
 
template<typename T >
void recv (MPI::Comm &comm, DMatrix< T > &matrix, int m, int n, int source, int tag)
 Receive a DMatrix<T> container. More...
 
template<typename T >
void bcast (MPI::Intracomm &comm, DMatrix< T > &matrix, int m, int n, int root)
 Broadcast a DMatrix<T> container. More...
 
template<>
void send< bool > (MPI::Comm &comm, bool &data, int dest, int tag)
 Explicit specialization of send for bool data. More...
 
template<>
void recv< bool > (MPI::Comm &comm, bool &data, int source, int tag)
 Explicit specialization of recv for bool data. More...
 
template<>
void bcast< bool > (MPI::Intracomm &comm, bool &data, int root)
 Explicit specialization of bcast for bool data. More...
 
template<>
void send< std::string > (MPI::Comm &comm, std::string &data, int dest, int tag)
 Explicit specialization of send for std::string data. More...
 
template<>
void recv< std::string > (MPI::Comm &comm, std::string &data, int source, int tag)
 Explicit specialization of recv for std::string data. More...
 
template<>
void bcast< std::string > (MPI::Intracomm &comm, std::string &data, int root)
 Explicit specialization of bcast for std::string data. More...
 
std::istream & operator>> (std::istream &in, Label label)
 Extractor for Label. More...
 
std::ostream & operator<< (std::ostream &out, Label label)
 Inserter for Label. More...
 
template<typename T >
bool isNull (FlexPtr< T > p)
 Return true iff the enclosed built-in pointer is null. More...
 
template<typename T >
bool isNull (T *ptr)
 Return true iff a built-in pointer is null. More...
 
template<typename T >
bool isNull (ScopedPtr< T > p)
 Return true iff the enclosed built-in pointer is null. More...
 
bool operator== (const IntVector &v1, const IntVector &v2)
 Equality for IntVectors. More...
 
bool operator== (const IntVector &v1, const int *v2)
 Equality of IntVector and C array. More...
 
bool operator== (const int *v1, const IntVector &v2)
 Equality of C array and IntVector. More...
 
bool operator!= (const IntVector &v1, const IntVector &v2)
 Inequality of two IntVectors. More...
 
bool operator!= (const IntVector &v1, const int *v2)
 Inequality of IntVector and C array. More...
 
bool operator!= (const int *v1, const IntVector &v2)
 Inequality of C array and IntVector. More...
 
std::istream & operator>> (std::istream &in, IntVector &vector)
 istream extractor for a IntVector. More...
 
std::ostream & operator<< (std::ostream &out, const IntVector &vector)
 ostream inserter for a IntVector. More...
 
bool operator== (const Tensor &t1, const Tensor &t2)
 Equality for Tensors. More...
 
bool operator== (const Tensor &t1, const double t2[][Dimension])
 Equality of Tensor and 2D C array. More...
 
bool operator== (const double t1[][Dimension], const Tensor &t2)
 Equality of C array and Tensor. More...
 
bool operator!= (const Tensor &t1, const Tensor &t2)
 Negation of t1 == t2 (tensors t1 and t2) More...
 
bool operator!= (const Tensor &t1, const double a2[][Dimension])
 Negation of t1 == a2 (tensor t1, 2D array a2) More...
 
bool operator!= (const double a1[][Dimension], const Tensor &t2)
 Negation of t1 == a2 (tensor t2, 2D array a1) More...
 
std::istream & operator>> (std::istream &in, Tensor &tensor)
 istream extractor for a Tensor. More...
 
std::ostream & operator<< (std::ostream &out, const Tensor &tensor)
 ostream inserter for a Tensor. More...
 
bool operator== (const Vector &v1, const Vector &v2)
 Equality for Vectors. More...
 
bool operator== (const Vector &v1, const double *v2)
 Equality of Vector and C array. More...
 
bool operator== (const double *v1, const Vector &v2)
 Equality of C array and Vector. More...
 
bool operator!= (const Vector &v1, const Vector &v2)
 Inequality of two Vectors. More...
 
bool operator!= (const Vector &v1, const double *v2)
 Inequality of Vector and C array. More...
 
bool operator!= (const double *v1, const Vector &v2)
 Inequality of C array and Vector. More...
 
std::istream & operator>> (std::istream &in, Vector &vector)
 istream extractor for a Vector. More...
 
std::ostream & operator<< (std::ostream &out, const Vector &vector)
 ostream inserter for a Vector. More...
 

Variables

const int Dimension = 3
 Dimensionality of space. More...
 
const int DimensionSq = Dimension*Dimension
 Square of Dimensionality of space. More...
 

Detailed Description

Utility classes for scientific computation.

Typedef Documentation

◆ Byte

typedef unsigned char Util::Byte

Define a "Byte" type.

Definition at line 19 of file Byte.h.

Function Documentation

◆ product() [1/6]

float Util::product ( float  a,
float  b 
)
inline

◆ product() [2/6]

double Util::product ( double  a,
double  b 
)
inline

Product for double Data.

Definition at line 28 of file product.h.

◆ product() [3/6]

double Util::product ( const Vector a,
const Vector b 
)
inline

Dot product for Vector Data.

Definition at line 34 of file product.h.

References Util::Vector::dot().

◆ product() [4/6]

double Util::product ( const Tensor a,
const Tensor b 
)
inline

Double contraction for Tensor Data.

Definition at line 40 of file product.h.

References Dimension.

◆ product() [5/6]

complex< float > Util::product ( complex< float >  a,
complex< float >  b 
)
inline

Inner product for complex<float> Data.

Definition at line 55 of file product.h.

◆ product() [6/6]

complex< double > Util::product ( complex< double >  a,
complex< double >  b 
)
inline

Inner product for complex<double> Data.

Definition at line 61 of file product.h.

◆ setToZero() [1/7]

void Util::setToZero ( int &  value)
inline

◆ setToZero() [2/7]

void Util::setToZero ( float &  value)
inline

Set a float variable to zero.

Parameters
valuevalue to be zeroed.

Definition at line 33 of file setToZero.h.

◆ setToZero() [3/7]

void Util::setToZero ( double &  value)
inline

Set a double variable to zero.

Parameters
valuevalue to be zeroed.

Definition at line 41 of file setToZero.h.

◆ setToZero() [4/7]

void Util::setToZero ( Vector value)
inline

Set a Vector variable to zero.

Parameters
valuevalue to be zeroed.

Definition at line 49 of file setToZero.h.

References Util::Vector::zero().

◆ setToZero() [5/7]

void Util::setToZero ( Tensor value)
inline

Set a Vector variable to zero.

Parameters
valuevalue to be zeroed.

Definition at line 57 of file setToZero.h.

References Util::Tensor::zero().

◆ setToZero() [6/7]

void Util::setToZero ( complex< float > &  value)
inline

Set a complex<float> variable to zero.

Parameters
valuevalue to be zeroed.

Definition at line 65 of file setToZero.h.

◆ setToZero() [7/7]

void Util::setToZero ( complex< double > &  value)
inline

Set a complex<double> variable to zero.

Parameters
valuevalue to be zeroed.

Definition at line 73 of file setToZero.h.

◆ memorySize()

template<typename T >
int Util::memorySize ( T &  data)

Function template to compute memory size of one object.

Definition at line 130 of file MemoryCounter.h.

References Util::MemoryCounter::size().

◆ operator>>() [1/10]

template<typename Data >
std::istream & Util::operator>> ( std::istream &  in,
Pair< Data > &  pair 
)

Input a Pair from an istream.

Parameters
inistream from which to read
pairPair to be read

Definition at line 44 of file Pair.h.

◆ operator<<() [1/11]

template<typename Data >
std::ostream & Util::operator<< ( std::ostream &  out,
const Pair< Data > &  pair 
)

Output a Pair to an ostream, without line breaks.

Parameters
outostream to which to write
pairPair to be written

Definition at line 57 of file Pair.h.

◆ operator>>() [2/10]

std::istream & Util::operator>> ( std::istream &  in,
Bool object 
)

Input stream extractor for an Bool object.

Parameters
ininput stream
objectBool object to be read from stream
Returns
modified input stream

Definition at line 47 of file Bool.cpp.

◆ operator<<() [2/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Bool object 
)

Output stream inserter for an Bool object.

Parameters
outoutput stream
objectBool to be written to stream
Returns
modified output stream

Definition at line 56 of file Bool.cpp.

◆ operator>>() [3/10]

std::istream & Util::operator>> ( std::istream &  in,
Dbl object 
)

Input stream extractor for an Dbl object.

Parameters
ininput stream
objectDbl object to be read from stream
Returns
modified input stream

Definition at line 73 of file Dbl.cpp.

◆ operator<<() [3/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Dbl object 
)

Output stream inserter for an Dbl object.

Parameters
outoutput stream
objectDbl to be written to stream
Returns
modified output stream

Definition at line 86 of file Dbl.cpp.

◆ operator>>() [4/10]

std::istream & Util::operator>> ( std::istream &  in,
Int object 
)

Input stream extractor for an Int object.

Parameters
ininput stream
objectInt object to be read from stream
Returns
modified input stream

Definition at line 71 of file Int.cpp.

◆ operator<<() [4/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Int object 
)

Output stream inserter for an Int object.

Parameters
outoutput stream
objectInt to be written to stream
Returns
modified output stream

Definition at line 84 of file Int.cpp.

◆ operator>>() [5/10]

std::istream & Util::operator>> ( std::istream &  in,
Lng object 
)

Input stream extractor for an Lng object.

Parameters
ininput stream
objectLng object to be read from stream
Returns
modified input stream

Definition at line 53 of file Lng.cpp.

◆ operator<<() [5/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Lng object 
)

Output stream inserter for an Lng object.

Parameters
outoutput stream
objectLng to be written to stream
Returns
modified output stream

Definition at line 66 of file Lng.cpp.

◆ operator>>() [6/10]

std::istream & Util::operator>> ( std::istream &  in,
Str object 
)

Input stream extractor for an Str object.

Parameters
ininput stream
objectStr object to be read from stream
Returns
modified input stream

Definition at line 49 of file Str.cpp.

◆ operator<<() [6/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Str object 
)

Output stream inserter for an Str object.

Parameters
outoutput stream
objectStr to be written to stream
Returns
modified output stream

Definition at line 58 of file Str.cpp.

◆ write() [1/11]

template<>
void Util::write ( std::ostream &  out,
double  data 
)

Explicit specialization of write for double data.

Definition at line 20 of file write.cpp.

◆ write() [2/11]

template<>
void Util::write ( std::ostream &  out,
std::complex< double >  data 
)

Explicit specialization of write for double data.

Definition at line 24 of file write.cpp.

◆ write() [3/11]

template<>
void Util::write ( std::ostream &  out,
int  data 
)

Explicit specialization of write for int data.

Definition at line 28 of file write.cpp.

◆ write() [4/11]

template<>
void Util::write ( std::ostream &  out,
long  data 
)

Explicit specialization of write for long data.

Definition at line 32 of file write.cpp.

◆ write() [5/11]

template<>
void Util::write ( std::ostream &  out,
bool  data 
)

Explicit specialization of write for bool data.

Definition at line 36 of file write.cpp.

◆ write() [6/11]

template<>
void Util::write ( std::ostream &  out,
double  data 
)

Explicit specialization of write for double data.

Definition at line 20 of file write.cpp.

◆ write() [7/11]

template<>
void Util::write ( std::ostream &  out,
std::complex< double >  data 
)

Explicit specialization of write for double data.

Definition at line 24 of file write.cpp.

◆ write() [8/11]

template<>
void Util::write ( std::ostream &  out,
int  data 
)

Explicit specialization of write for int data.

Definition at line 28 of file write.cpp.

◆ write() [9/11]

template<>
void Util::write ( std::ostream &  out,
long  data 
)

Explicit specialization of write for long data.

Definition at line 32 of file write.cpp.

◆ write() [10/11]

template<>
void Util::write ( std::ostream &  out,
bool  data 
)

Explicit specialization of write for bool data.

Definition at line 36 of file write.cpp.

◆ write() [11/11]

template<>
void Util::write ( std::ostream &  out,
std::string  data 
)

Explicit specialization of write for std::string data.

◆ operator==() [1/13]

template<typename T >
bool Util::operator== ( Polynomial< T > const &  a,
Polynomial< T > const &  b 
)

Equality operator for polynomials.

Two polynomials are equal iff they have the same degree and the the same values for all coefficients.

Parameters
a1st polynomial
b2nd polynomial
Returns
true if a != b

Definition at line 675 of file Polynomial.h.

◆ operator!=() [1/13]

template<typename T >
bool Util::operator!= ( Polynomial< T > const &  a,
Polynomial< T > const &  b 
)

Inequality operator for polynomials.

Parameters
a1st polynomial
b2nd polynomial
Returns
true if a != b

Definition at line 694 of file Polynomial.h.

◆ operator-() [1/5]

template<typename T >
Polynomial< T > Util::operator- ( Polynomial< T > const &  a)
inline

Unary negation of polynomial.

Parameters
ainput polynomial
Returns
negated polynomial -a

Definition at line 705 of file Polynomial.h.

◆ operator<<() [7/11]

std::ostream & Util::operator<< ( std::ostream &  out,
Rational const &  rational 
)

Output stream inserter for a Rational.

Output elements of a rational to stream, without line breaks.

Parameters
outoutput stream
rationalRational to be written to stream
Returns
modified output stream

Definition at line 16 of file Rational.cpp.

◆ operator+() [1/3]

Rational Util::operator+ ( Rational const &  a,
Rational const &  b 
)
inline

Compute sum of two rationals.

Parameters
a1st argument
b2st argument
Returns
sum a + b

Definition at line 490 of file Rational.h.

◆ operator+() [2/3]

Rational Util::operator+ ( Rational const &  a,
int  b 
)
inline

Compute sum of rational and integer.

Parameters
aRational argument
binteger argument
Returns
sum a + b

Definition at line 505 of file Rational.h.

◆ operator+() [3/3]

Rational Util::operator+ ( int  b,
Rational const &  a 
)
inline

Compute sum of integer and integer.

Parameters
binteger argument
aRational argument
Returns
sum a + b

Definition at line 519 of file Rational.h.

◆ operator-() [2/5]

Rational Util::operator- ( Rational const &  a,
Rational const &  b 
)
inline

Compute difference of rationals.

Parameters
a1st argument
b2st argument
Returns
difference a - b

Definition at line 530 of file Rational.h.

◆ operator-() [3/5]

Rational Util::operator- ( Rational const &  a,
int  b 
)
inline

Compute difference of rational and integer.

Parameters
aRational argument
binteger argument
Returns
difference a - b

Definition at line 545 of file Rational.h.

◆ operator-() [4/5]

Rational Util::operator- ( int  b,
Rational const &  a 
)
inline

Compute difference of integer and rational.

Parameters
binteger argument
aRational argument
Returns
difference b - a

Definition at line 559 of file Rational.h.

◆ operator*() [1/3]

Rational Util::operator* ( Rational const &  a,
Rational const &  b 
)
inline

Compute product of rationals.

Parameters
a1st Rational argument
b2st Rational argument
Returns
product a*b

Definition at line 573 of file Rational.h.

◆ operator*() [2/3]

Rational Util::operator* ( Rational const &  a,
int  b 
)
inline

Compute product of rational and integer.

Parameters
aRational argument
binteger argument
Returns
product a*b

Definition at line 588 of file Rational.h.

◆ operator*() [3/3]

Rational Util::operator* ( int  b,
Rational const &  a 
)
inline

Compute product of integer and rational.

Parameters
binteger argument
aRational argument
Returns
product a*b

Definition at line 599 of file Rational.h.

◆ operator/() [1/3]

Rational Util::operator/ ( Rational const &  a,
Rational const &  b 
)
inline

Compute quotient of two rationals.

Parameters
a1st Rational argument (numerator)
b2st Rational argument (denominator)
Returns
ratio a/b

Definition at line 610 of file Rational.h.

◆ operator/() [2/3]

Rational Util::operator/ ( Rational const &  a,
int  b 
)
inline

Compute quotient Rational divided by integer.

Parameters
aRational argument (numerator)
binteger argument (denominator)
Returns
ratio a/b

Definition at line 628 of file Rational.h.

◆ operator/() [3/3]

Rational Util::operator/ ( int  b,
Rational const &  a 
)
inline

Compute quotient integer divided by Rational.

Parameters
binteger argument (numerator)
aRational argument (denominator)
Returns
ratio b/a

Definition at line 644 of file Rational.h.

◆ operator-() [5/5]

Rational Util::operator- ( Rational const &  a)
inline

Unary negation of Rational.

Parameters
aRational number
Returns
negation -a

Definition at line 661 of file Rational.h.

◆ operator==() [2/13]

bool Util::operator== ( Rational const &  a,
Rational const &  b 
)
inline

Equality operators.

Equality operator for two Rational numbers.

Parameters
a1st Rational
b2nd Rational
Returns
true if equal, false otherwise

Definition at line 674 of file Rational.h.

◆ operator==() [3/13]

bool Util::operator== ( Rational const &  a,
int  b 
)
inline

Equality operator for a Rational and an integer.

Parameters
aRational number
binteger number
Returns
true if equal, false otherwise

Definition at line 684 of file Rational.h.

◆ operator==() [4/13]

bool Util::operator== ( int  b,
Rational const &  a 
)
inline

Equality operator for an integer and a Rational.

Parameters
binteger number
aRational number
Returns
true if equal, false otherwise

Definition at line 694 of file Rational.h.

◆ operator!=() [2/13]

bool Util::operator!= ( Rational const &  a,
Rational const &  b 
)
inline

Inequality operators.

Inequality operator for two Rational numbers.

Parameters
a1st Rational
b2nd Rational
Returns
true if unequal, false if equal

Definition at line 706 of file Rational.h.

◆ operator!=() [3/13]

bool Util::operator!= ( Rational const &  a,
int  b 
)
inline

Inequality operator for a Rational and an integer.

Parameters
aRational number
binteger number
Returns
true if unequal, false if equal

Definition at line 716 of file Rational.h.

◆ operator!=() [4/13]

bool Util::operator!= ( int  b,
Rational const &  a 
)
inline

Inequality operator for an integer and a Rational.

Parameters
binteger number
aRational number
Returns
true if unequal, false if equal

Definition at line 726 of file Rational.h.

◆ MpiThrow()

void Util::MpiThrow ( Exception e)

Function to throw exception in MPI code.

If MPI is not initialized, this function writes the message and calls MPI Abort. If MPI is not initialized, it simply throws the Exception.

Parameters
eException to be thrown.

Definition at line 90 of file Exception.cpp.

References Util::Log::close(), Util::Log::file(), and Util::Exception::message().

◆ initStatic()

void Util::initStatic ( )

◆ checkRequiredIstream()

void Util::checkRequiredIstream ( std::istream &  in)

Check status of a std::istream just before reading required variable.

Throw Exception with appropriate error message if not good.

Parameters
ininput stream from which to read.

Definition at line 124 of file ioUtil.cpp.

References UTIL_THROW.

◆ baseOffset()

template<typename D , typename B >
ptrdiff_t Util::baseOffset ( D &  object)

Template for calculating offsets of base class subobjects.

Types: D - derived class B - base class

Definition at line 40 of file Offset.h.

◆ send< bool >() [1/2]

template<>
void Util::send< bool > ( MPI::Comm &  comm,
bool &  data,
int  dest,
int  tag 
)

Explicit specialization of send for bool data.

Definition at line 19 of file MpiSendRecv.cpp.

◆ recv< bool >() [1/2]

template<>
void Util::recv< bool > ( MPI::Comm &  comm,
bool &  data,
int  source,
int  tag 
)

Explicit specialization of recv for bool data.

Definition at line 26 of file MpiSendRecv.cpp.

◆ bcast< bool >() [1/2]

template<>
void Util::bcast< bool > ( MPI::Intracomm &  comm,
bool &  data,
int  root 
)

Explicit specialization of bcast for bool data.

Definition at line 34 of file MpiSendRecv.cpp.

Referenced by Util::Parameter::load(), Util::ParamComposite::loadOptional(), Util::Begin::readParam(), and Util::Parameter::readParam().

◆ send< std::string >() [1/2]

template<>
void Util::send< std::string > ( MPI::Comm &  comm,
std::string &  data,
int  dest,
int  tag 
)

Explicit specialization of send for std::string data.

Definition at line 48 of file MpiSendRecv.cpp.

◆ recv< std::string >() [1/2]

template<>
void Util::recv< std::string > ( MPI::Comm &  comm,
std::string &  data,
int  source,
int  tag 
)

Explicit specialization of recv for std::string data.

Definition at line 64 of file MpiSendRecv.cpp.

◆ bcast< std::string >() [1/2]

template<>
void Util::bcast< std::string > ( MPI::Intracomm &  comm,
std::string &  data,
int  root 
)

Explicit specialization of bcast for std::string data.

Definition at line 80 of file MpiSendRecv.cpp.

Referenced by Util::Factory< Data >::loadObject(), and Util::Factory< Data >::readObject().

◆ send() [1/4]

template<typename T >
void Util::send ( MPI::Comm &  comm,
T &  data,
int  dest,
int  tag 
)

Send a single T value.

Throws an Exception if no associated MPI data type is available, i.e., if MpiTraits<T>::hasType is false.

Parameters
commMPI communicator
datavalue
destMPI rank of receiving processor in comm
taguser-defined integer identifier for message

Definition at line 97 of file MpiSendRecv.h.

References UTIL_THROW.

◆ recv() [1/4]

template<typename T >
void Util::recv ( MPI::Comm &  comm,
T &  data,
int  source,
int  tag 
)

Receive a single T value.

Throws an Exception if no associated MPI data type is available, i.e., if MpiTraits<T>::hasType is false.

Parameters
commMPI communicator
datavalue
sourceMPI rank of sending processor in comm
taguser-defined integer identifier for message

Definition at line 116 of file MpiSendRecv.h.

References UTIL_THROW.

◆ bcast() [1/4]

template<typename T >
void Util::bcast ( MPI::Intracomm &  comm,
T &  data,
int  root 
)

Broadcast a single T value.

Throws an Exception if no associated MPI data type is available, i.e., if MpiTraits<T>::hasType is false.

Parameters
commMPI communicator
datavalue
rootMPI rank of root (sending) processor in comm

Definition at line 134 of file MpiSendRecv.h.

References UTIL_THROW.

◆ send() [2/4]

template<typename T >
void Util::send ( MPI::Comm &  comm,
T *  array,
int  count,
int  dest,
int  tag 
)

Send a C-array of T values.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar send<T>.

Parameters
commMPI communicator
arrayaddress of first element in array
countnumber of elements in array
destMPI rank of destination (receiving) processor in comm
taguser-defined integer identifier for this message

Definition at line 156 of file MpiSendRecv.h.

◆ recv() [2/4]

template<typename T >
void Util::recv ( MPI::Comm &  comm,
T *  array,
int  count,
int  source,
int  tag 
)

Receive a C-array of T objects.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar recv<T>.

Parameters
commMPI communicator
arrayaddress of first element in array
countnumber of elements in array
sourceMPI rank of source (sending) processor in comm
taguser-defined integer identifier for this message

Definition at line 182 of file MpiSendRecv.h.

◆ bcast() [2/4]

template<typename T >
void Util::bcast ( MPI::Intracomm &  comm,
T *  array,
int  count,
int  root 
)

Broadcast a C-array of T objects.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar bcast<T>.

Parameters
commMPI communicator
arrayaddress of first element in array
countnumber of elements in array
rootMPI rank of root (sending) processor in comm

Definition at line 207 of file MpiSendRecv.h.

◆ send() [3/4]

template<typename T >
void Util::send ( MPI::Comm &  comm,
DArray< T > &  array,
int  count,
int  dest,
int  tag 
)

Send a DArray<T> container.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar send<T> method.

Parameters
commMPI communicator
arrayDArray object
countlogical number of elements in array
destMPI rank of destination (receiving) processor in comm
taguser-defined integer identifier for this message

Definition at line 235 of file MpiSendRecv.h.

References Util::Array< Data >::capacity(), Util::DArray< Data >::isAllocated(), and UTIL_THROW.

◆ recv() [3/4]

template<typename T >
void Util::recv ( MPI::Comm &  comm,
DArray< T > &  array,
int  count,
int  source,
int  tag 
)

Receive a DArray<T> container.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar recv<T> method.

Parameters
commMPI communicator
arrayDArray object
countlogical number of elements in array
sourceMPI rank of source (sending) processor in comm
taguser-defined integer identifier for this message

Definition at line 269 of file MpiSendRecv.h.

References Util::Array< Data >::capacity(), Util::DArray< Data >::isAllocated(), and UTIL_THROW.

◆ bcast() [3/4]

template<typename T >
void Util::bcast ( MPI::Intracomm &  comm,
DArray< T > &  array,
int  count,
int  root 
)

Broadcast a DArray<T> container.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar bcast<T>.

Parameters
commMPI communicator
arrayaddress of first element in array
countnumber of elements in array
rootMPI rank of root (sending) processor in comm

Definition at line 302 of file MpiSendRecv.h.

References Util::Array< Data >::capacity(), Util::DArray< Data >::isAllocated(), and UTIL_THROW.

◆ send() [4/4]

template<typename T >
void Util::send ( MPI::Comm &  comm,
DMatrix< T > &  matrix,
int  m,
int  n,
int  dest,
int  tag 
)

Send a DMatrix<T> container.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar send<T>.

Parameters
commMPI communicator
matrixDMatrix object to send
mlogical number of rows in matrix
nlogical number of columns in matrix
destMPI rank of destination (receiving) processor in comm
taguser-defined integer identifier for this message

Definition at line 339 of file MpiSendRecv.h.

References Util::Matrix< Data >::capacity1(), Util::Matrix< Data >::capacity2(), Util::DMatrix< Data >::isAllocated(), and UTIL_THROW.

◆ recv() [4/4]

template<typename T >
void Util::recv ( MPI::Comm &  comm,
DMatrix< T > &  matrix,
int  m,
int  n,
int  source,
int  tag 
)

Receive a DMatrix<T> container.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar recv<T>.

Parameters
commMPI communicator
matrixDMatrix object to receive
mlogical number of rows in matrix
nlogical number of columns in matrix
sourceMPI rank of source (sending) processor in comm
taguser-defined integer identifier for this message

Definition at line 383 of file MpiSendRecv.h.

References Util::Matrix< Data >::capacity1(), Util::Matrix< Data >::capacity2(), Util::DMatrix< Data >::isAllocated(), and UTIL_THROW.

◆ bcast() [4/4]

template<typename T >
void Util::bcast ( MPI::Intracomm &  comm,
DMatrix< T > &  matrix,
int  m,
int  n,
int  root 
)

Broadcast a DMatrix<T> container.

Throws an exception if their exists neither an associated MPI data type nor an explicit specialization of the scalar bcast<T>.

Parameters
commMPI communicator
matrixDMatrix object
mlogical number of rows in matrix
nlogical number of columns in matrix
rootMPI rank of root (sending) processor in comm

Definition at line 427 of file MpiSendRecv.h.

References Util::Matrix< Data >::capacity1(), Util::Matrix< Data >::capacity2(), Util::DMatrix< Data >::isAllocated(), and UTIL_THROW.

◆ send< bool >() [2/2]

template<>
void Util::send< bool > ( MPI::Comm &  comm,
bool &  data,
int  dest,
int  tag 
)

Explicit specialization of send for bool data.

Definition at line 19 of file MpiSendRecv.cpp.

◆ recv< bool >() [2/2]

template<>
void Util::recv< bool > ( MPI::Comm &  comm,
bool &  data,
int  source,
int  tag 
)

Explicit specialization of recv for bool data.

Definition at line 26 of file MpiSendRecv.cpp.

◆ bcast< bool >() [2/2]

template<>
void Util::bcast< bool > ( MPI::Intracomm &  comm,
bool &  data,
int  root 
)

Explicit specialization of bcast for bool data.

Definition at line 34 of file MpiSendRecv.cpp.

Referenced by Util::Parameter::load(), Util::ParamComposite::loadOptional(), Util::Begin::readParam(), and Util::Parameter::readParam().

◆ send< std::string >() [2/2]

template<>
void Util::send< std::string > ( MPI::Comm &  comm,
std::string &  data,
int  dest,
int  tag 
)

Explicit specialization of send for std::string data.

Definition at line 48 of file MpiSendRecv.cpp.

◆ recv< std::string >() [2/2]

template<>
void Util::recv< std::string > ( MPI::Comm &  comm,
std::string &  data,
int  source,
int  tag 
)

Explicit specialization of recv for std::string data.

Definition at line 64 of file MpiSendRecv.cpp.

◆ bcast< std::string >() [2/2]

template<>
void Util::bcast< std::string > ( MPI::Intracomm &  comm,
std::string &  data,
int  root 
)

Explicit specialization of bcast for std::string data.

Definition at line 80 of file MpiSendRecv.cpp.

Referenced by Util::Factory< Data >::loadObject(), and Util::Factory< Data >::readObject().

◆ operator>>() [7/10]

std::istream & Util::operator>> ( std::istream &  in,
Label  label 
)

Extractor for Label.

Parameters
ininput stream
labelLabel to be read from file

Definition at line 126 of file Label.cpp.

◆ operator<<() [8/11]

std::ostream & Util::operator<< ( std::ostream &  out,
Label  label 
)

Inserter for Label.

Parameters
outoutput stream
labelLabel to be written to file

Definition at line 169 of file Label.cpp.

◆ isNull() [1/3]

template<typename T >
bool Util::isNull ( FlexPtr< T >  p)
inline

Return true iff the enclosed built-in pointer is null.

Definition at line 143 of file FlexPtr.h.

References Util::FlexPtr< T >::get().

◆ isNull() [2/3]

template<typename T >
bool Util::isNull ( T *  ptr)
inline

Return true iff a built-in pointer is null.

Definition at line 18 of file isNull.h.

◆ isNull() [3/3]

template<typename T >
bool Util::isNull ( ScopedPtr< T >  p)
inline

Return true iff the enclosed built-in pointer is null.

Definition at line 90 of file ScopedPtr.h.

References Util::ScopedPtr< T >::get().

◆ operator==() [5/13]

bool Util::operator== ( const IntVector v1,
const IntVector v2 
)

Equality for IntVectors.

Definition at line 24 of file IntVector.cpp.

◆ operator==() [6/13]

bool Util::operator== ( const IntVector v1,
const int *  v2 
)

Equality of IntVector and C array.

Definition at line 35 of file IntVector.cpp.

◆ operator==() [7/13]

bool Util::operator== ( const int *  v1,
const IntVector v2 
)

Equality of C array and IntVector.

Definition at line 45 of file IntVector.cpp.

◆ operator!=() [5/13]

bool Util::operator!= ( const IntVector v1,
const IntVector v2 
)

Inequality of two IntVectors.

Definition at line 50 of file IntVector.cpp.

◆ operator!=() [6/13]

bool Util::operator!= ( const IntVector v1,
const int *  v2 
)

Inequality of IntVector and C array.

Definition at line 54 of file IntVector.cpp.

◆ operator!=() [7/13]

bool Util::operator!= ( const int *  v1,
const IntVector v2 
)

Inequality of C array and IntVector.

Definition at line 58 of file IntVector.cpp.

◆ operator>>() [8/10]

std::istream & Util::operator>> ( std::istream &  in,
IntVector vector 
)

istream extractor for a IntVector.

Input elements of a vector from stream, without line breaks.

Parameters
ininput stream
vectorIntVector to be read from stream
Returns
modified input stream

Definition at line 64 of file IntVector.cpp.

◆ operator<<() [9/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const IntVector vector 
)

ostream inserter for a IntVector.

Output elements of a vector to stream, without line breaks.

Parameters
outoutput stream
vectorIntVector to be written to stream
Returns
modified output stream

Definition at line 75 of file IntVector.cpp.

◆ operator==() [8/13]

bool Util::operator== ( const Tensor t1,
const Tensor t2 
)

Equality for Tensors.

Definition at line 43 of file Tensor.cpp.

◆ operator==() [9/13]

bool Util::operator== ( const Tensor t1,
const double  a2[][Dimension] 
)

Equality of Tensor and 2D C array.

Definition at line 56 of file Tensor.cpp.

◆ operator==() [10/13]

bool Util::operator== ( const double  a1[][Dimension],
const Tensor t2 
)

Equality of C array and Tensor.

Definition at line 71 of file Tensor.cpp.

◆ operator!=() [8/13]

bool Util::operator!= ( const Tensor t1,
const Tensor t2 
)

Negation of t1 == t2 (tensors t1 and t2)

Inequality of two Tensors.

Definition at line 79 of file Tensor.cpp.

◆ operator!=() [9/13]

bool Util::operator!= ( const Tensor t1,
const double  a2[][Dimension] 
)

Negation of t1 == a2 (tensor t1, 2D array a2)

Inequality of Tensor and C array.

Definition at line 83 of file Tensor.cpp.

◆ operator!=() [10/13]

bool Util::operator!= ( const double  a1[][Dimension],
const Tensor t2 
)

Negation of t1 == a2 (tensor t2, 2D array a1)

Inequality of C array and Tensor.

Definition at line 87 of file Tensor.cpp.

◆ operator>>() [9/10]

std::istream & Util::operator>> ( std::istream &  in,
Tensor tensor 
)

istream extractor for a Tensor.

Input elements of a tensor from stream, without line breaks.

Parameters
ininput stream
tensorTensor to be read from stream
Returns
modified input stream

Definition at line 93 of file Tensor.cpp.

◆ operator<<() [10/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Tensor tensor 
)

ostream inserter for a Tensor.

Output elements of a tensor to stream, without line breaks.

Parameters
outoutput stream
tensorTensor to be written to stream
Returns
modified output stream

Definition at line 104 of file Tensor.cpp.

◆ operator==() [11/13]

bool Util::operator== ( const Vector v1,
const Vector v2 
)

Equality for Vectors.

Definition at line 26 of file Vector.cpp.

◆ operator==() [12/13]

bool Util::operator== ( const Vector v1,
const double *  v2 
)

Equality of Vector and C array.

Definition at line 36 of file Vector.cpp.

◆ operator==() [13/13]

bool Util::operator== ( const double *  v1,
const Vector v2 
)

Equality of C array and Vector.

Definition at line 48 of file Vector.cpp.

◆ operator!=() [11/13]

bool Util::operator!= ( const Vector v1,
const Vector v2 
)

Inequality of two Vectors.

Definition at line 53 of file Vector.cpp.

◆ operator!=() [12/13]

bool Util::operator!= ( const Vector v1,
const double *  v2 
)

Inequality of Vector and C array.

Definition at line 56 of file Vector.cpp.

◆ operator!=() [13/13]

bool Util::operator!= ( const double *  v1,
const Vector v2 
)

Inequality of C array and Vector.

Definition at line 59 of file Vector.cpp.

◆ operator>>() [10/10]

std::istream & Util::operator>> ( std::istream &  in,
Vector vector 
)

istream extractor for a Vector.

Input elements of a vector from stream, without line breaks.

Parameters
ininput stream
vectorVector to be read from stream
Returns
modified input stream

Definition at line 65 of file Vector.cpp.

◆ operator<<() [11/11]

std::ostream & Util::operator<< ( std::ostream &  out,
const Vector vector 
)

ostream inserter for a Vector.

Output elements of a vector to stream, without line breaks.

Parameters
outoutput stream
vectorVector to be written to stream
Returns
modified output stream

Definition at line 76 of file Vector.cpp.