MADNESS 0.10.1
MADNESS libraries
Collaboration diagram for MADNESS libraries:

Topics

 Containers
 Parallel programming environment
 Chemistry

Files

file  constants.h
 Defines common mathematical and physical constants.
file  madness_config.h
 Macros and tools pertaining to the configuration of MADNESS.
file  madness_exception.cc
 Implementation of madness::MadnessException.
file  madness_exception.h
 Defines madness::MadnessException for exception handling.
file  mem_func_wrapper.h
 Defines tools for encapsulating a pointer to a member function.
file  print.cc
 Implementation of functions defined in print.h.
file  print.h
 Defines simple templates for printing to std::cout "a la Python".
file  print_seq.h
 Implements print_seq.

Enumerations

enum class  madness::io_redirect::Mode { madness::io_redirect::Mode::File , madness::io_redirect::Mode::Discard }
 File writes <directory>/<filename>.<NNNNN>; Discard silences cout via /dev/null. More...

Functions

 madness::io_redirect::io_redirect (const long task_number, std::string filename, bool debug=false)
 a file in the current directory
 madness::io_redirect::io_redirect (Mode mode, const long task_number, std::string directory, std::string filename, bool debug=false)
 madness::io_redirect_cout::io_redirect_cout ()
 madness::io_redirect::~io_redirect ()
 madness::io_redirect_cout::~io_redirect_cout ()
template<typename T>
std::ostream & madness::operators::operator<< (std::ostream &s, const std::complex< T > &c)
 Easy printing of complex numbers.
template<typename T>
std::ostream & madness::operators::operator<< (std::ostream &s, const std::list< T > &c)
 Easy printing of lists.
template<typename T, typename U>
std::ostream & madness::operators::operator<< (std::ostream &s, const std::pair< T, U > &p)
 Easy printing of pairs.
template<typename T>
std::ostream & madness::operators::operator<< (std::ostream &s, const std::vector< T > &c)
 Easy printing of vectors.
template<typename T, std::size_t N>
std::enable_if<!std::is_same< T, char >::value, std::ostream & >::type madness::operators::operator<< (std::ostream &s, const T(&v)[N])
 Easy printing of fixed dimension arrays.

Variables

bool madness::io_redirect::debug = false
Mode madness::io_redirect::mode = Mode::File
std::ofstream madness::io_redirect::ofile
std::streambuf * madness::io_redirect::stream_buffer_cout
std::streambuf * madness::io_redirect_cout::stream_buffer_cout
static std::streambuf * madness::io_redirect::stream_buffer_cout_default = nullptr
 default stream buffer for cout, used to restore cout

Detailed Description

MADNESS is built from several libraries, such as the parallel runtime and the multiresolution analysis tools. The files and submodules listed here detail the API and implementation of these libraries.

Todo
Add additional details to this section, if needed.

The MADNESS framework provides several container classes for convenience. They are described herein.

Enumeration Type Documentation

◆ Mode

enum class madness::io_redirect::Mode
strong

File writes <directory>/<filename>.<NNNNN>; Discard silences cout via /dev/null.

Enumerator
File 
Discard 

Function Documentation

◆ io_redirect() [1/2]

madness::io_redirect::io_redirect ( const long task_number,
std::string filename,
bool debug = false )
inline

a file in the current directory

References io_redirect(), debug, and madness::filename.

◆ io_redirect() [2/2]

madness::io_redirect::io_redirect ( Mode mode,
const long task_number,
std::string directory,
std::string filename,
bool debug = false )
inline
Parameters
directorycreated if needed; empty means the current directory

References bufsize, debug, File, madness::filename, mode, ofile, stream_buffer_cout, and stream_buffer_cout_default.

Referenced by io_redirect().

◆ io_redirect_cout()

madness::io_redirect_cout::io_redirect_cout ( )
inline

◆ ~io_redirect()

madness::io_redirect::~io_redirect ( )
inline

References debug, File, mode, ofile, and stream_buffer_cout.

◆ ~io_redirect_cout()

madness::io_redirect_cout::~io_redirect_cout ( )
inline

References stream_buffer_cout.

◆ operator<<() [1/5]

template<typename T>
std::ostream & madness::operators::operator<< ( std::ostream & s,
const std::complex< T > & c )

Easy printing of complex numbers.

Template Parameters
TThe "real" type of the complex number.
Parameters
[in,out]sThe output stream.
[in]cThe complex number.
Returns
The output stream (for chaining).

References c.

◆ operator<<() [2/5]

template<typename T>
std::ostream & madness::operators::operator<< ( std::ostream & s,
const std::list< T > & c )

Easy printing of lists.

Template Parameters
TType stored in the list.
Parameters
[in,out]sThe output stream.
[in]cThe list.
Returns
The output stream (for chaining).

References c.

◆ operator<<() [3/5]

template<typename T, typename U>
std::ostream & madness::operators::operator<< ( std::ostream & s,
const std::pair< T, U > & p )

Easy printing of pairs.

Template Parameters
TType 1 of the pair.
UType 2 of the pair.
Parameters
[in,out]sThe output stream.
[in]pThe pair.
Returns
The output stream (for chaining).

References p().

◆ operator<<() [4/5]

template<typename T>
std::ostream & madness::operators::operator<< ( std::ostream & s,
const std::vector< T > & c )

Easy printing of vectors.

Template Parameters
TType stored in the vector.
Parameters
[in,out]sThe output stream.
[in]cThe vector.
Returns
The output stream (for chaining).

References c.

◆ operator<<() [5/5]

template<typename T, std::size_t N>
std::enable_if<!std::is_same< T, char >::value, std::ostream & >::type madness::operators::operator<< ( std::ostream & s,
const T(&) v[N] )

Easy printing of fixed dimension arrays.

STL I/O already does char (thus the enable_if business).

Template Parameters
TType of data in the array.
NSize of the array.
Parameters
[in,out]sThe output stream.
[in]vThe array.
Returns
The output stream (for chaining).

References N, and v.

Variable Documentation

◆ debug

bool madness::io_redirect::debug = false

◆ mode

Mode madness::io_redirect::mode = Mode::File

Referenced by io_redirect(), and ~io_redirect().

◆ ofile

std::ofstream madness::io_redirect::ofile

Referenced by io_redirect(), and ~io_redirect().

◆ stream_buffer_cout [1/2]

std::streambuf* madness::io_redirect::stream_buffer_cout

Referenced by io_redirect(), and ~io_redirect().

◆ stream_buffer_cout [2/2]

std::streambuf* madness::io_redirect_cout::stream_buffer_cout

◆ stream_buffer_cout_default

std::streambuf * madness::io_redirect::stream_buffer_cout_default = nullptr
static

default stream buffer for cout, used to restore cout

Referenced by io_redirect(), and madness::io_redirect_cout::io_redirect_cout().