MADNESS 0.10.1
Classes | Namespaces | Macros | Functions | Variables
mra.h File Reference

Main include file for MADNESS and defines Function interface. More...

#include <madness/world/MADworld.h>
#include <madness/misc/misc.h>
#include <madness/tensor/tensor.h>
#include <madness/mra/key.h>
#include <madness/mra/twoscale.h>
#include <madness/mra/legendre.h>
#include <madness/mra/indexit.h>
#include <madness/world/parallel_archive.h>
#include <madness/world/worlddc.h>
#include <madness/mra/funcdefaults.h>
#include <madness/mra/function_factory.h>
#include <madness/mra/lbdeux.h>
#include <madness/mra/funcimpl.h>
#include <madness/mra/funcplot.h>
#include <madness/mra/derivative.h>
#include <madness/mra/operator.h>
#include <madness/mra/functypedefs.h>
#include <madness/mra/vmra.h>
Include dependency graph for mra.h:

Go to the source code of this file.

Classes

struct  madness::detail::absop< NDIM >
 
struct  madness::detail::abssqop< NDIM >
 
struct  madness::archive::ArchiveLoadImpl< ParallelInputArchive< archiveT >, Function< T, NDIM > >
 
struct  madness::archive::ArchiveStoreImpl< ParallelOutputArchive< archiveT >, Function< T, NDIM > >
 
struct  madness::Function< T, NDIM >::autorefine_square_op
 
class  madness::Function< T, NDIM >
 A multiresolution adaptive numerical function. More...
 
struct  madness::detail::imagop< NDIM >
 
struct  madness::is_madness_function< typename >
 
struct  madness::is_madness_function< madness::Function< T, NDIM > >
 
struct  madness::detail::realop< NDIM >
 
struct  madness::Function< T, NDIM >::SimpleUnaryOpWrapper
 

Namespaces

namespace  madness
 Namespace for all elements and tools of MADNESS.
 
namespace  madness::archive
 Namespace for I/O tools.
 
namespace  madness::detail
 

Macros

#define FUNCTION_INSTANTIATE_1
 
#define FUNCTION_INSTANTIATE_2
 
#define FUNCTION_INSTANTIATE_3
 
#define FUNCTION_INSTANTIATE_4
 
#define FUNCTION_INSTANTIATE_5
 
#define FUNCTION_INSTANTIATE_6
 

Functions

template<std::size_t NDIM>
Function< double, NDIMmadness::abs (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the absolute value of the input.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::abs (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs of f - global comm only if not reconstructed.
 
template<typename T , std::size_t NDIM>
std::enable_if<!TensorTypeData< T >::iscomplex, Function< T, NDIM > >::type madness::abs_square (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs_square of f - global comm only if not reconstructed.
 
template<typename T , std::size_t NDIM>
std::enable_if< TensorTypeData< T >::iscomplex, Function< typenameTensor< T >::scalar_type, NDIM > >::type madness::abs_square (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs_square of f - global comm only if not reconstructed.
 
template<std::size_t NDIM>
Function< double, NDIMmadness::abssq (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the square of the absolute value of the input.
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::add (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator+ but with optional fence and no automatic compression.
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIMmadness::apply (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator in non-standard form.
 
template<typename opT , typename T , std::size_t LDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, T), LDIM+LDIM > madness::apply (const opT &op, const std::vector< Function< T, LDIM > > &f1, const std::vector< Function< T, LDIM > > &f2, bool fence=true)
 Apply operator on a hartree product of two low-dimensional functions.
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIMmadness::apply_1d_realspace_push (const opT &op, const Function< R, NDIM > &f, int axis, bool fence=true)
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIMmadness::apply_only (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator ONLY in non-standard form - required other steps missing !!
 
template<typename L , typename R , typename opT , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::binary_op (const Function< L, NDIM > &left, const Function< R, NDIM > &right, const opT &op, bool fence=true)
 Generate new function = op(left,right) where op acts on the function values.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::conj (const Function< T, NDIM > &f, bool fence=true)
 Return the complex conjugate of the input function with the same distribution and optional fence.
 
template<typename T , typename Q , std::size_t NDIM>
Function< Q, NDIMmadness::convert (const Function< T, NDIM > &f, bool fence=true)
 Type conversion implies a deep copy. No communication except for optional fence.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::copy (const Function< T, NDIM > &f, bool fence=true)
 Create a new copy of the function with the same distribution and optional fence.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::copy (const Function< T, NDIM > &f, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool fence=true)
 Create a new copy of the function with different distribution and optional fence.
 
std::shared_ptr< FunctionFunctorInterface< double, 3 > > madness::func (new opT(g))
 
template<typename L , typename R , std::size_t NDIM>
void madness::gaxpy (TENSOR_RESULT_TYPE(L, R) alpha, Function< L, NDIM > &left, TENSOR_RESULT_TYPE(L, R) beta, const Function< R, NDIM > &right, bool fence=true)
 adds beta*right only left: alpha*left + beta*right optional fence and no automatic compression
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::gaxpy_oop (TENSOR_RESULT_TYPE(L, R) alpha, const Function< L, NDIM > &left, TENSOR_RESULT_TYPE(L, R) beta, const Function< R, NDIM > &right, bool fence=true)
 Returns new function alpha*left + beta*right optional fence and no automatic compression.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::gaxpy_oop_reconstructed (const double alpha, const Function< T, NDIM > &left, const double beta, const Function< T, NDIM > &right, const bool fence=true)
 Returns new function alpha*left + beta*right optional fence, having both addends reconstructed.
 
std::string madness::get_mra_data_dir ()
 
template<typename T , std::size_t KDIM, std::size_t LDIM>
Function< T, KDIM+LDIM > madness::hartree_product (const Function< T, KDIM > &left2, const Function< T, LDIM > &right2)
 Performs a Hartree product on the two given low-dimensional functions.
 
template<typename T , std::size_t KDIM, std::size_t LDIM, typename opT >
Function< T, KDIM+LDIM > madness::hartree_product (const Function< T, KDIM > &left2, const Function< T, LDIM > &right2, const opT &op)
 Performs a Hartree product on the two given low-dimensional functions.
 
template<typename T , std::size_t KDIM, std::size_t LDIM>
Function< T, KDIM+LDIM > madness::hartree_product (const std::vector< Function< T, KDIM > > &left, const std::vector< Function< T, LDIM > > &right)
 Performs a Hartree/outer product on the two given low-dimensional function vectors.
 
template<std::size_t NDIM>
Function< double, NDIMmadness::imag (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the imaginary part of the input.
 
template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-2 > madness::inner (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::tuple< int > v1, const std::tuple< int > v2)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-4 > madness::inner (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::tuple< int, int > v1, const std::tuple< int, int > v2)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-6 > madness::inner (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::tuple< int, int, int > v1, const std::tuple< int, int, int > v2)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
return f madness::inner (g)
 
return f madness::inner_adaptive (func)
 
template<std::size_t NDIM, typename T , std::size_t LDIM, typename R , std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
Function< TENSOR_RESULT_TYPE(T, R), NDIMmadness::innerXX (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2, int task=0)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<std::size_t NDIM, typename T , std::size_t LDIM, typename R , std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::innerXX (const Function< T, LDIM > &f, const std::vector< Function< R, KDIM > > &vg, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2, int task=0)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<class T , std::size_t NDIM>
void madness::load (Function< T, NDIM > &f, const std::string name)
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::map_and_mirror (const Function< T, NDIM > &f, const std::vector< long > &map, const std::vector< long > &mirror, bool fence=true)
 This is replaced with mirror(map(f)), optional fence.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::mapdim (const Function< T, NDIM > &f, const std::vector< long > &map, bool fence=true)
 Generate a new function by reordering dimensions ... optional fence.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::mirror (const Function< T, NDIM > &f, const std::vector< long > &mirrormap, bool fence=true)
 Generate a new function by mirroring within the dimensions .. optional fence.
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::mul (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator* but with optional fence and no automatic reconstruction.
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMmadness::mul (const Function< T, NDIM > &f, const Q alpha, bool fence=true)
 Returns new function equal to f(x)*alpha with optional fence.
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMmadness::mul (const Q alpha, const Function< T, NDIM > &f, bool fence=true)
 Returns new function equal to alpha*f(x) with optional fence.
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::mul_sparse (const Function< L, NDIM > &left, const Function< R, NDIM > &right, double tol, bool fence=true)
 Sparse multiplication — left and right must be reconstructed and if tol!=0 have tree of norms already created.
 
template<typename T , typename opT , std::size_t NDIM>
Function< T, NDIMmadness::multiop_values (const opT &op, const std::vector< Function< T, NDIM > > &vf)
 
template<typename T , std::size_t NDIM, std::size_t LDIM>
Function< T, NDIMmadness::multiply (const Function< T, NDIM > f, const Function< T, LDIM > g, const int particle, const bool fence=true)
 multiply a high-dimensional function with a low-dimensional function
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::operator* (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Multiplies two functions with the new result being of type TensorResultType<L,R>
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMmadness::operator* (const Function< T, NDIM > &f, const Q alpha)
 Returns new function equal to f(x)*alpha.
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMmadness::operator* (const Q alpha, const Function< T, NDIM > &f)
 Returns new function equal to alpha*f(x)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::operator+ (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Adds two functions with the new result being of type TensorResultType<L,R>
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >, Function< TENSOR_RESULT_TYPE(T, R), NDIM > >::type madness::operator+ (const Function< T, NDIM > &f, R r)
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >, Function< TENSOR_RESULT_TYPE(T, R), NDIM > >::type madness::operator+ (R r, const Function< T, NDIM > &f)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::operator- (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Subtracts two functions with the new result being of type TensorResultType<L,R>
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >, Function< TENSOR_RESULT_TYPE(T, R), NDIM > >::type madness::operator- (const Function< T, NDIM > &f, R r)
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >, Function< TENSOR_RESULT_TYPE(T, R), NDIM > >::type madness::operator- (R r, const Function< T, NDIM > &f)
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::project (const Function< T, NDIM > &other, int k=FunctionDefaults< NDIM >::get_k(), double thresh=FunctionDefaults< NDIM >::get_thresh(), bool fence=true)
 
template<std::size_t NDIM>
Function< double, NDIMmadness::real (const Function< double, NDIM > &z, bool fence=true)
 Returns a new function that is the real part of the input.
 
template<std::size_t NDIM>
Function< double, NDIMmadness::real (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the real part of the input.
 
template<class T , std::size_t NDIM>
void madness::save (const Function< T, NDIM > &f, const std::string name)
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::square (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the square of f - global comm only if not reconstructed.
 
void madness::startup (World &world, int argc, char **argv, bool doprint=false, bool make_stdcout_nice_to_reals=true)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmadness::sub (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator- but with optional fence and no automatic compression.
 
template<typename T , std::size_t NDIM>
std::enable_if_t< NDIM%2==0, Function< T, NDIM > > madness::swap_particles (const Function< T, NDIM > &f)
 swap particles 1 and 2
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmadness::symmetrize (const Function< T, NDIM > &f, const std::string symmetry, bool fence=true)
 symmetrize a function
 
template<typename T , typename R , std::size_t NDIM>
 madness::TENSOR_RESULT_TYPE (T, R) inner(const Function< T
 Computes the scalar/inner product between two functions.
 
template<typename T , typename opT , std::size_t NDIM>
 madness::TENSOR_RESULT_TYPE (T, typename opT::value_type) inner(const Function< T
 Computes the scalar/inner product between an MRA function and an external functor.
 
template<typename T , typename opT , std::size_t NDIM>
 madness::TENSOR_RESULT_TYPE (T, typename opT::value_type) inner(const opT &g
 Computes the scalar/inner product between an MRA function and an external functor.
 
template<typename Q , typename opT , std::size_t NDIM>
Function< typename opT::resultT, NDIMmadness::unary_op (const Function< Q, NDIM > &func, const opT &op, bool fence=true)
 Out of place application of unary operation to function values with optional fence.
 
template<typename Q , typename opT , std::size_t NDIM>
Function< typename opT::resultT, NDIMmadness::unary_op_coeffs (const Function< Q, NDIM > &func, const opT &op, bool fence=true)
 Out of place application of unary operation to scaling function coefficients with optional fence.
 
template<typename L , typename R , std::size_t D>
std::vector< Function< TENSOR_RESULT_TYPE(L, R), D > > madness::vmulXX (const Function< L, D > &left, const std::vector< Function< R, D > > &vright, double tol, bool fence=true)
 Use the vmra/mul(...) interface instead.
 

Variables

NDIMmadness::f
 
NDIM const Function< R, NDIM > & madness::g
 
static const bool VERIFY_TREE = false
 

Detailed Description

Main include file for MADNESS and defines Function interface.

Macro Definition Documentation

◆ FUNCTION_INSTANTIATE_1

#define FUNCTION_INSTANTIATE_1

◆ FUNCTION_INSTANTIATE_2

#define FUNCTION_INSTANTIATE_2

◆ FUNCTION_INSTANTIATE_3

#define FUNCTION_INSTANTIATE_3

◆ FUNCTION_INSTANTIATE_4

#define FUNCTION_INSTANTIATE_4

◆ FUNCTION_INSTANTIATE_5

#define FUNCTION_INSTANTIATE_5

◆ FUNCTION_INSTANTIATE_6

#define FUNCTION_INSTANTIATE_6

Variable Documentation

◆ VERIFY_TREE

const bool VERIFY_TREE = false
static