PSCF v1.1
|
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... | |
Utility classes for scientific computation.
typedef unsigned char Util::Byte |
|
inline |
Product for float Data.
Definition at line 22 of file product.h.
Referenced by Util::AutoCorr< Data, Product >::autoCorrelation(), Util::AutoCorr< Data, Product >::corrTime(), Util::AutoCorrArray< Data, Product >::corrTime(), Util::AutoCorr< Data, Product >::output(), Util::AutoCorrArray< Data, Product >::sample(), Util::AutoCorr< Data, Product >::sample(), Util::AutoCorrStage< Data, Product >::sample(), and Pscf::Fd1d::FieldIo::writeVertexQ().
|
inline |
Dot product for Vector Data.
Definition at line 34 of file product.h.
References Util::Vector::dot().
|
inline |
|
inline |
|
inline |
Set an int variable to zero.
value | value to be zeroed. |
Definition at line 25 of file setToZero.h.
Referenced by Util::AutoCorr< Data, Product >::AutoCorr(), Util::AutoCorrArray< Data, Product >::AutoCorrArray(), Util::AutoCorrStage< Data, Product >::autoCorrelation(), Util::AutoCorrStage< Data, Product >::AutoCorrStage(), Util::AutoCorr< Data, Product >::clear(), Util::AutoCorrArray< Data, Product >::clear(), Util::AutoCorrStage< Data, Product >::clear(), Util::MeanSqDispArray< Data >::clear(), Util::AutoCorr< Data, Product >::corrTime(), Util::AutoCorrArray< Data, Product >::corrTime(), Util::AutoCorrStage< Data, Product >::corrTime(), Pscf::dot(), Util::Polynomial< T >::operator*=(), Util::Polynomial< T >::operator=(), Util::AutoCorrStage< Data, Product >::output(), Util::AutoCorrStage< Data, Product >::sample(), and Pscf::Vec< D, T >::setToZero().
|
inline |
Set a float variable to zero.
value | value to be zeroed. |
Definition at line 33 of file setToZero.h.
|
inline |
Set a double variable to zero.
value | value to be zeroed. |
Definition at line 41 of file setToZero.h.
|
inline |
Set a Vector variable to zero.
value | value to be zeroed. |
Definition at line 49 of file setToZero.h.
References Util::Vector::zero().
|
inline |
Set a Vector variable to zero.
value | value to be zeroed. |
Definition at line 57 of file setToZero.h.
References Util::Tensor::zero().
|
inline |
Set a complex<float> variable to zero.
value | value to be zeroed. |
Definition at line 65 of file setToZero.h.
|
inline |
Set a complex<double> variable to zero.
value | value to be zeroed. |
Definition at line 73 of file setToZero.h.
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().
std::istream & Util::operator>> | ( | std::istream & | in, |
Pair< Data > & | pair | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
const Pair< Data > & | pair | ||
) |
std::istream & Util::operator>> | ( | std::istream & | in, |
Bool & | object | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
const Bool & | object | ||
) |
std::istream & Util::operator>> | ( | std::istream & | in, |
Dbl & | object | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
const Dbl & | object | ||
) |
std::istream & Util::operator>> | ( | std::istream & | in, |
Int & | object | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
const Int & | object | ||
) |
std::istream & Util::operator>> | ( | std::istream & | in, |
Lng & | object | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
const Lng & | object | ||
) |
std::istream & Util::operator>> | ( | std::istream & | in, |
Str & | object | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
const Str & | object | ||
) |
void Util::write | ( | std::ostream & | out, |
double | data | ||
) |
void Util::write | ( | std::ostream & | out, |
std::complex< double > | data | ||
) |
void Util::write | ( | std::ostream & | out, |
int | data | ||
) |
void Util::write | ( | std::ostream & | out, |
long | data | ||
) |
void Util::write | ( | std::ostream & | out, |
bool | data | ||
) |
void Util::write | ( | std::ostream & | out, |
double | data | ||
) |
void Util::write | ( | std::ostream & | out, |
std::complex< double > | data | ||
) |
void Util::write | ( | std::ostream & | out, |
int | data | ||
) |
void Util::write | ( | std::ostream & | out, |
long | data | ||
) |
void Util::write | ( | std::ostream & | out, |
bool | data | ||
) |
void Util::write | ( | std::ostream & | out, |
std::string | data | ||
) |
Explicit specialization of write for std::string data.
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.
a | 1st polynomial |
b | 2nd polynomial |
Definition at line 675 of file Polynomial.h.
bool Util::operator!= | ( | Polynomial< T > const & | a, |
Polynomial< T > const & | b | ||
) |
Inequality operator for polynomials.
a | 1st polynomial |
b | 2nd polynomial |
Definition at line 694 of file Polynomial.h.
|
inline |
Unary negation of polynomial.
a | input polynomial |
Definition at line 705 of file Polynomial.h.
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.
out | output stream |
rational | Rational to be written to stream |
Definition at line 16 of file Rational.cpp.
Compute sum of two rationals.
a | 1st argument |
b | 2st argument |
Definition at line 490 of file Rational.h.
Compute sum of rational and integer.
a | Rational argument |
b | integer argument |
Definition at line 505 of file Rational.h.
Compute sum of integer and integer.
b | integer argument |
a | Rational argument |
Definition at line 519 of file Rational.h.
Compute difference of rationals.
a | 1st argument |
b | 2st argument |
Definition at line 530 of file Rational.h.
Compute difference of rational and integer.
a | Rational argument |
b | integer argument |
Definition at line 545 of file Rational.h.
Compute difference of integer and rational.
b | integer argument |
a | Rational argument |
Definition at line 559 of file Rational.h.
Compute product of rational and integer.
a | Rational argument |
b | integer argument |
Definition at line 588 of file Rational.h.
Compute product of integer and rational.
b | integer argument |
a | Rational argument |
Definition at line 599 of file Rational.h.
Compute quotient Rational divided by integer.
a | Rational argument (numerator) |
b | integer argument (denominator) |
Definition at line 628 of file Rational.h.
Compute quotient integer divided by Rational.
b | integer argument (numerator) |
a | Rational argument (denominator) |
Definition at line 644 of file Rational.h.
Unary negation of Rational.
a | Rational number |
Definition at line 661 of file Rational.h.
Equality operators.
Equality operator for two Rational numbers.
Definition at line 674 of file Rational.h.
|
inline |
Equality operator for a Rational and an integer.
a | Rational number |
b | integer number |
Definition at line 684 of file Rational.h.
|
inline |
Equality operator for an integer and a Rational.
b | integer number |
a | Rational number |
Definition at line 694 of file Rational.h.
Inequality operators.
Inequality operator for two Rational numbers.
Definition at line 706 of file Rational.h.
|
inline |
Inequality operator for a Rational and an integer.
a | Rational number |
b | integer number |
Definition at line 716 of file Rational.h.
|
inline |
Inequality operator for an integer and a Rational.
b | integer number |
a | Rational number |
Definition at line 726 of file Rational.h.
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.
e | Exception to be thrown. |
Definition at line 90 of file Exception.cpp.
References Util::Log::close(), Util::Log::file(), and Util::Exception::message().
void Util::initStatic | ( | ) |
Guarantee initialization of all static class members in Util namespace.
Definition at line 26 of file initStatic.cpp.
References Util::Format::initStatic(), Util::Constants::initStatic(), Util::Log::initStatic(), Util::Memory::initStatic(), Util::ParamComponent::initStatic(), Util::IntVector::initStatic(), Util::Tensor::initStatic(), and Util::Vector::initStatic().
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.
in | input stream from which to read. |
Definition at line 124 of file ioUtil.cpp.
References UTIL_THROW.
ptrdiff_t Util::baseOffset | ( | D & | object | ) |
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.
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.
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().
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.
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.
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().
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.
comm | MPI communicator |
data | value |
dest | MPI rank of receiving processor in comm |
tag | user-defined integer identifier for message |
Definition at line 97 of file MpiSendRecv.h.
References UTIL_THROW.
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.
comm | MPI communicator |
data | value |
source | MPI rank of sending processor in comm |
tag | user-defined integer identifier for message |
Definition at line 116 of file MpiSendRecv.h.
References UTIL_THROW.
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.
comm | MPI communicator |
data | value |
root | MPI rank of root (sending) processor in comm |
Definition at line 134 of file MpiSendRecv.h.
References UTIL_THROW.
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>.
comm | MPI communicator |
array | address of first element in array |
count | number of elements in array |
dest | MPI rank of destination (receiving) processor in comm |
tag | user-defined integer identifier for this message |
Definition at line 156 of file MpiSendRecv.h.
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>.
comm | MPI communicator |
array | address of first element in array |
count | number of elements in array |
source | MPI rank of source (sending) processor in comm |
tag | user-defined integer identifier for this message |
Definition at line 182 of file MpiSendRecv.h.
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>.
comm | MPI communicator |
array | address of first element in array |
count | number of elements in array |
root | MPI rank of root (sending) processor in comm |
Definition at line 207 of file MpiSendRecv.h.
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.
comm | MPI communicator |
array | DArray object |
count | logical number of elements in array |
dest | MPI rank of destination (receiving) processor in comm |
tag | user-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.
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.
comm | MPI communicator |
array | DArray object |
count | logical number of elements in array |
source | MPI rank of source (sending) processor in comm |
tag | user-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.
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>.
comm | MPI communicator |
array | address of first element in array |
count | number of elements in array |
root | MPI 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.
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>.
comm | MPI communicator |
matrix | DMatrix object to send |
m | logical number of rows in matrix |
n | logical number of columns in matrix |
dest | MPI rank of destination (receiving) processor in comm |
tag | user-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.
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>.
comm | MPI communicator |
matrix | DMatrix object to receive |
m | logical number of rows in matrix |
n | logical number of columns in matrix |
source | MPI rank of source (sending) processor in comm |
tag | user-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.
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>.
comm | MPI communicator |
matrix | DMatrix object |
m | logical number of rows in matrix |
n | logical number of columns in matrix |
root | MPI 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.
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.
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.
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().
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.
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.
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().
std::istream & Util::operator>> | ( | std::istream & | in, |
Label | label | ||
) |
std::ostream & Util::operator<< | ( | std::ostream & | out, |
Label | label | ||
) |
|
inline |
Return true iff the enclosed built-in pointer is null.
Definition at line 143 of file FlexPtr.h.
References Util::FlexPtr< T >::get().
|
inline |
|
inline |
Return true iff the enclosed built-in pointer is null.
Definition at line 90 of file ScopedPtr.h.
References Util::ScopedPtr< T >::get().
Equality for IntVectors.
Definition at line 24 of file IntVector.cpp.
bool Util::operator== | ( | const IntVector & | v1, |
const int * | v2 | ||
) |
Equality of IntVector and C array.
Definition at line 35 of file IntVector.cpp.
bool Util::operator== | ( | const int * | v1, |
const IntVector & | v2 | ||
) |
Equality of C array and IntVector.
Definition at line 45 of file IntVector.cpp.
Inequality of two IntVectors.
Definition at line 50 of file IntVector.cpp.
bool Util::operator!= | ( | const IntVector & | v1, |
const int * | v2 | ||
) |
Inequality of IntVector and C array.
Definition at line 54 of file IntVector.cpp.
bool Util::operator!= | ( | const int * | v1, |
const IntVector & | v2 | ||
) |
Inequality of C array and IntVector.
Definition at line 58 of file IntVector.cpp.
std::istream & Util::operator>> | ( | std::istream & | in, |
IntVector & | vector | ||
) |
istream extractor for a IntVector.
Input elements of a vector from stream, without line breaks.
in | input stream |
vector | IntVector to be read from stream |
Definition at line 64 of file IntVector.cpp.
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.
out | output stream |
vector | IntVector to be written to stream |
Definition at line 75 of file IntVector.cpp.
Equality for Tensors.
Definition at line 43 of file Tensor.cpp.
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.
bool Util::operator== | ( | const double | a1[][Dimension], |
const Tensor & | t2 | ||
) |
Equality of C array and Tensor.
Definition at line 71 of file Tensor.cpp.
Negation of t1 == t2 (tensors t1 and t2)
Inequality of two Tensors.
Definition at line 79 of file Tensor.cpp.
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.
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.
std::istream & Util::operator>> | ( | std::istream & | in, |
Tensor & | tensor | ||
) |
istream extractor for a Tensor.
Input elements of a tensor from stream, without line breaks.
in | input stream |
tensor | Tensor to be read from stream |
Definition at line 93 of file Tensor.cpp.
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.
out | output stream |
tensor | Tensor to be written to stream |
Definition at line 104 of file Tensor.cpp.
Equality for Vectors.
Definition at line 26 of file Vector.cpp.
bool Util::operator== | ( | const Vector & | v1, |
const double * | v2 | ||
) |
Equality of Vector and C array.
Definition at line 36 of file Vector.cpp.
bool Util::operator== | ( | const double * | v1, |
const Vector & | v2 | ||
) |
Equality of C array and Vector.
Definition at line 48 of file Vector.cpp.
Inequality of two Vectors.
Definition at line 53 of file Vector.cpp.
bool Util::operator!= | ( | const Vector & | v1, |
const double * | v2 | ||
) |
Inequality of Vector and C array.
Definition at line 56 of file Vector.cpp.
bool Util::operator!= | ( | const double * | v1, |
const Vector & | v2 | ||
) |
Inequality of C array and Vector.
Definition at line 59 of file Vector.cpp.
std::istream & Util::operator>> | ( | std::istream & | in, |
Vector & | vector | ||
) |
istream extractor for a Vector.
Input elements of a vector from stream, without line breaks.
in | input stream |
vector | Vector to be read from stream |
Definition at line 65 of file Vector.cpp.
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.
out | output stream |
vector | Vector to be written to stream |
Definition at line 76 of file Vector.cpp.