MADNESS  version 0.9
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables

Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces. More...

Namespaces

 archive
 
 cblas
 
 constants
 
 detail
 
 Hash_private
 
 tr1
 

Classes

struct  abs_op
 
struct  abs_square_op
 
class  AbstractVectorSpace
 A generic vector space which provides common operations needed by linear algebra routines (norm, inner product, etc.) More...
 
struct  allocator
 
class  AmArg
 World active message that extends an RMI message. More...
 
struct  apply_kernel_functor
 
class  Atom
 
struct  AtomCore
 
class  AtomicBasis
 Represents multiple shells of contracted gaussians on a single center. More...
 
class  AtomicBasisFunction
 Used to represent one basis function from a shell on a specific center. More...
 
class  AtomicBasisFunctor
 
class  AtomicBasisSet
 Contracted Gaussian basis. More...
 
struct  AtomicData
 
class  AtomicInt
 An integer with atomic set, get, read+inc, read+dec, dec+test operations. More...
 
class  Barrier
 
class  BaseTensor
 The base class for tensors defines generic capabilities. More...
 
class  BindNullaryConstMemFun
 Simple binder for const member functions with no arguments. More...
 
class  BindNullaryConstMemFun< T, void >
 Specialization of BindNullaryConstMemFun for void return. More...
 
class  BindNullaryMemFun
 Simple binder for member functions with no arguments. More...
 
class  BindNullaryMemFun< T, void >
 Specialization of BindNullaryMemFun for void return. More...
 
class  BinSorter
 A parallel bin sort across MPI processes. More...
 
class  BoundaryConditions
 This class is used to specify boundary conditions for all operatorsExterior boundary conditions (i.e., on the simulation domain) are associated with operators (not functions). The types of boundary conditions available are in the enum BCType. More...
 
class  BSHFunctionInterface
 a function like f(x) = exp(-mu x)/x More...
 
struct  CalculationParameters
 
class  CallbackInterface
 This class used for callbacks (e.g., for dependency tracking) More...
 
class  CIS
 The CIS class holds all machinery to compute excited state properties. More...
 
class  CoeffTracker
 a class to track where relevant (parent) coeffs are More...
 
class  ComplexExp
 
class  CompositeFactory
 Factory for facile setup of a CompositeFunctorInterface and its FuncImpl. More...
 
class  CompositeFunctorInterface
 CompositeFunctorInterface implements a wrapper of holding several functions and functors. More...
 
class  ConcurrentHashMap
 
struct  conditional_conj_struct
 For real types return value, for complex return conjugate. More...
 
struct  conditional_conj_struct< Q, true >
 For real types return value, for complex return conjugate. More...
 
class  ConditionVariable
 Scalable and fair condition variable (spins on local value) More...
 
struct  conj_op
 
class  ContractedGaussianShell
 Represents a single shell of contracted, Cartesian, Gaussian primitives. More...
 
class  Convolution1D
 Provides the common functionality/interface of all 1D convolutions. More...
 
struct  ConvolutionData1D
 !!! Note that if Rnormf is zero then ***ALL*** of the tensors are empty More...
 
class  ConvolutionND
 Array of 1D convolutions (one / dimension) More...
 
struct  CoreOrbital
 
class  CoreOrbitalDerivativeFunctor
 
class  CoreOrbitalFunctor
 
struct  CorePotential
 Represents a core potential. More...
 
class  CorePotentialDerivativeFunctor
 
class  CorePotentialManager
 
struct  default_allocator
 
class  DeferredDeleter
 Deferred deleter for smart pointers. More...
 
class  DependencyInterface
 Provides interface for tracking dependencies. More...
 
class  Derivative
 Implements derivatives operators with variety of boundary conditions on simulation domain. More...
 
singleton  DerivativeBase
 Tri-diagonal operator traversing tree primarily for derivative operator. More...
 
class  DFT
 
class  DFTCoulombOp
 
class  DFTCoulombPeriodicOp
 
class  DFTNuclearChargeDensityOp
 
class  DFTNuclearPotentialOp
 
struct  diffuse_functions
 Functor that adds diffuse 1s functions on given coordinates with given signs (phases) More...
 
class  DipoleFunctor
 A MADNESS functor to compute either x, y, or z. More...
 
struct  disable_if
 disable_if from Boost for conditionally instantiating templates based on type More...
 
struct  disable_if_c
 disable_if from Boost for conditionally instantiating templates based on type More...
 
struct  disable_if_c< true, returnT >
 disable_if from Boost for conditionally instantiating templates based on type More...
 
class  Displacements
 Holds displacements for applying operators to avoid replicating for all operators. More...
 
class  DistributedMatrix
 Manages data associated with a row/column/block distributed array. More...
 
class  DistributedMatrixDistribution
 
class  DomainMaskInterface
 The interface for masking functions defined by signed distance functions. More...
 
class  DomainMaskSDFFunctor
 Framework for combining a signed distance function (sdf) with a domain mask to produce MADNESS functions. More...
 
struct  DQStats
 
class  DQueue
 A thread safe, fast but simple doubled-ended queue. More...
 
class  EigSolver
 
class  EigSolverOp
 
struct  ElectronicStructureParams
 
class  ElectronPair
 enhanced POD for the pair functions More...
 
class  ElectronRepulsionInterface
 a function like f(x)=1/x More...
 
class  ElementaryInterface
 ElementaryInterface (formerly FunctorInterfaceWrapper) interfaces a c-function. More...
 
struct  enable_if
 enable_if from Boost for conditionally instantiating templates based on type More...
 
struct  enable_if_c
 enable_if_c from Boost for conditionally instantiating templates based on type More...
 
struct  enable_if_c< false, returnT >
 enable_if_c from Boost for conditionally instantiating templates based on type More...
 
struct  error_leaf_op
 returns true if the node is well represented compared to its parent More...
 
struct  exoperators
 
class  FGFactory
 Factory to set up an ElectronRepulsion Function. More...
 
class  FGInterface
 a function like f(x) = (1 - exp(-mu x))/x More...
 
class  Function
 A multiresolution adaptive numerical function. More...
 
struct  function_real2complex_op
 
class  FunctionCommonData
 FunctionCommonData holds all Function data common for given k. More...
 
class  FunctionDefaults
 FunctionDefaults holds default paramaters as static class members. More...
 
singleton  FunctionFactory
 FunctionFactory implements the named-parameter idiom for Function. More...
 
singleton  FunctionFunctorInterface
 Abstract base class interface required for functors used as input to Functions. More...
 
singleton  FunctionImpl
 FunctionImpl holds all Function state to facilitate shallow copy semantics. More...
 
class  FunctionInterface
 FunctionInterface implements a wrapper around any class with the operator()() More...
 
singleton  FunctionNode
 FunctionNode holds the coefficients, etc., at each node of the 2^NDIM-tree. More...
 
class  FunctionSpace
 A vector space using MADNESS Functions. More...
 
class  FunctorInterface
 FunctorInterface interfaces a class or struct with an operator()() More...
 
class  Future
 A future is a possibly yet unevaluated value. More...
 
class  Future< detail::ReferenceWrapper< T > >
 Future for holding ReferenceWrapper objects. More...
 
class  Future< Future< T > >
 A future of a future is forbidden (by private constructor) More...
 
class  Future< std::vector< Future< T > > >
 Specialization of Future for vector of Futures. More...
 
class  Future< void >
 Specialization of Future<void> for internal convenience ... does nothing useful! More...
 
class  Future< Void >
 Specialization of Future<Void> for internal convenience ... does nothing useful! More...
 
class  FutureImpl
 Implements the functionality of Futures. More...
 
class  FutureImpl< void >
 Specialization of FutureImpl<void> for internal convenience ... does nothing useful! More...
 
class  FutureImpl< Void >
 Specialization of FutureImpl<Void> for internal convenience ... does nothing useful! More...
 
class  GaussianConvolution1D
 1D convolution with (derivative) Gaussian; coeff and expnt given in simulation coordinates [0,1] More...
 
struct  GaussianConvolution1DCache
 
class  GaussianDomainMask
 Use a Gaussian for the surface function and the corresponding erf for the domain mask. More...
 
class  GaussianGenericFunctor
 
class  GenericConvolution1D
 Generic 1D convolution using brute force (i.e., slow) adaptive quadrature for rnlp. More...
 
singleton  GenTensor
 
struct  get_derivatives
 
class  GFit
 
class  Group
 A collection of processes. More...
 
class  GTHPseudopotential
 
struct  hartree_convolute_leaf_op
 
struct  hartree_leaf_op
 returns true if the result of a hartree_product is a leaf node (compute norm & error) More...
 
class  HartreeFock
 
class  HartreeFockCoulombOp
 
class  HartreeFockExchangeOp
 
class  HartreeFockNuclearPotentialOp
 
struct  has_result_type
 
struct  Hash
 Hash functor. More...
 
class  HighDimIndexIterator
 
class  IEigSolverObserver
 
struct  if_
 
struct  if_c
 enable_if_same (from Boost?) for conditionally instantiating templates if two types are equal More...
 
struct  if_c< false, T1, T2 >
 
struct  imag_op
 
class  IndexIterator
 
struct  insert_op
 
struct  is_derived_from
 True if A is derived from B and is not B. More...
 
struct  is_derived_from< A, A >
 True if A is derived from B and is not B. More...
 
struct  is_future
 Boost-type-trait-like testing of if a type is a future. More...
 
struct  is_future< Future< T > >
 Boost-type-trait-like testing of if a type is a future. More...
 
class  is_reference_wrapper
 Type trait for reference wrapper. More...
 
class  is_reference_wrapper< detail::ReferenceWrapper< T > >
 
class  is_reference_wrapper< detail::ReferenceWrapper< T > const >
 
class  is_reference_wrapper< detail::ReferenceWrapper< T > const volatile >
 
class  is_reference_wrapper< detail::ReferenceWrapper< T > volatile >
 
struct  is_serializable
 This defines stuff that is serialiable by default rules ... basically anything contiguous. More...
 
struct  IsSupported
 
struct  IsSupported< TypeData, ReturnType, true >
 
struct  kain_solver_helper_struct
 The structure needed if the kain solver shall be used. More...
 
class  Key
 Key is the index for a node of the 2^NDIM-tree. More...
 
class  KeyChildIterator
 Iterates in lexical order thru all children of a key. More...
 
class  KPoint
 
struct  lazy_disable_if
 lazy_disable_if from Boost for conditionally instantiating templates based on type More...
 
struct  lazy_disable_if_c
 lazy_disable_if_c from Boost for conditionally instantiating templates based on type More...
 
struct  lazy_disable_if_c< true, returnT >
 lazy_disable_if_c from Boost for conditionally instantiating templates based on type More...
 
struct  lazy_enable_if
 lazy_enable_if from Boost for conditionally instantiating templates based on type More...
 
struct  lazy_enable_if_c
 lazy_enable_if_c from Boost for conditionally instantiating templates based on type More...
 
struct  lazy_enable_if_c< false, returnT >
 lazy_enable_if_c from Boost for conditionally instantiating templates based on type More...
 
struct  LBCost
 
struct  lbcost
 
class  LBDeuxPmap
 
class  LBNodeDeux
 
struct  leaf_op
 returns true if the function has a leaf node at key (works only locally) More...
 
class  LevelPmap
 A pmap that locates children on odd levels with their even level parents. More...
 
class  LLRVDomainMask
 Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask characteristic functions. More...
 
class  LoadBalanceDeux
 
singleton  LoadBalImpl
 
class  LocalizeBoys
 
class  LowDimIndexIterator
 
class  MadnessException
 Most exceptions thrown in MADNESS should be derived from these. More...
 
struct  make_fxc
 
struct  MatrixInnerTask
 
class  MolecularCorePotentialFunctor
 
class  MolecularDerivativeFunctor
 
class  MolecularEnergy
 
class  MolecularGuessDensityFunctor
 
class  MolecularPotentialFunctor
 
class  Molecule
 
class  MomentFunctor
 A MADNESS functor to compute the cartesian moment x^i * y^j * z^k (i, j, k integer and >= 0) More...
 
class  MP2
 a class for computing the first order wave function and MP2 pair energies More...
 
struct  mul_leaf_op
 
class  Mutex
 Mutex using pthread mutex operations. More...
 
class  MutexFair
 A scalable and fair mutex (not recursive) More...
 
class  MutexReaderWriter
 
class  MutexWaiter
 
class  MyPmap
 Procmap implemented using Tree of TreeCoords. More...
 
class  Nemo
 The Nemo class. More...
 
class  NonlinearSolverND
 A simple Krylov-subspace nonlinear equation solver. More...
 
class  NonstandardIndexIterator
 
struct  noop
 
struct  op_leaf_op
 
class  Operator
 A generic operator: takes in one T and produces another T. More...
 
struct  OptimizationTargetInterface
 The interface to be provided by functions to be optimized. More...
 
struct  OptimizerInterface
 The interface to be provided by optimizers. More...
 
struct  perturbed_vxc
 
class  PoolTaskInterface
 Lowest level task interface. More...
 
class  PoolTaskNull
 A no-op task used for various purposes. More...
 
class  PotentialManager
 
class  ProcessKey
 Key object that included the process information. More...
 
struct  ProfileStat
 Simple container for parallel profile statistic. More...
 
class  Projector
 simple projector class for 1- and 2-particle projectors More...
 
class  ProjRLMFunctor
 
class  ProjRLMStore
 
class  PthreadConditionVariable
 Simple wrapper for Pthread condition variable with its own mutex. More...
 
struct  qmsg
 
class  QuasiNewton
 Optimization via quasi-Newton (BFGS or SR1 update) More...
 
class  Random
 A random number generator (portable, vectorized, and thread-safe) More...
 
struct  RandomState
 
class  Range
 Range vaguely a la Intel TBB encapsulates random-access STL-like start and end iterators with chunksize. More...
 
struct  real_op
 
class  RecursiveMutex
 Recursive mutex using pthread mutex operations. More...
 
class  Reference
 Used to provide rvalue references to support move semantics. More...
 
class  RemoteReference
 Simple structure used to manage references/pointers to remote instances. More...
 
struct  remove_fcvr
 
struct  remove_future
 Boost-type-trait-like mapping of Future<T> to T. More...
 
struct  remove_future< Future< T > >
 Boost-type-trait-like mapping of Future<T> to T. More...
 
struct  ReturnWrapper
 Wrapper so that can return something even if returning void. More...
 
struct  ReturnWrapper< void >
 Wrapper so that can return something even if returning void. More...
 
class  RMI
 
struct  RMIStats
 
class  SCF
 
class  ScopedArray
 Scoped array. More...
 
class  ScopedMutex
 Mutex that is applied/released at start/end of a scope. More...
 
class  ScopedPtr
 Scoped pointer. More...
 
class  SDFBox
 A box (3 dimensions) More...
 
class  SDFCircle
 A circle (2 dimensions) More...
 
class  SDFCone
 A cone (3 dimensions) More...
 
class  SDFCube
 A cube (3 dimensions) More...
 
class  SDFCylinder
 A cylinder (3 dimensions) More...
 
class  SDFEllipsoid
 An ellipsoid (3 dimensions) More...
 
class  SDFParaboloid
 A paraboloid (3 dimensions) More...
 
class  SDFPlane
 A plane surface (3 dimensions) More...
 
class  SDFRectangle
 A rectangle (2 dimensions) More...
 
class  SDFSphere
 A spherical surface (3 dimensions) More...
 
class  SeparatedConvolution
 Convolutions in separated form (including Gaussian) More...
 
struct  SeparatedConvolutionData
 SeparatedConvolutionData keeps data for all terms, all dimensions. More...
 
struct  SeparatedConvolutionInternal
 
struct  ShallowNode
 shallow-copy, pared-down version of FunctionNode, for special purpose only More...
 
class  SignedDFInterface
 The interface for a signed distance function (sdf). More...
 
class  SimpleCache
 Simplified interface around hash_map to cache stuff for 1D. More...
 
class  SimplePmap
 A simple process map. More...
 
class  SlaterF12Interface
 a function like f(x) = (1 - exp(-mu x))/(2 gamma) More...
 
class  SlaterFunctionInterface
 a function like f(x)=exp(-mu x) More...
 
class  Slice
 A slice defines a sub-range or patch of a dimension. More...
 
singleton  SliceGenTensor
 
class  Solver
 The main class of the periodic DFT solver

\[ z = frac{x}{1 - y^2} \]

. More...

 
struct  SolverInterface
 The interface to be provided by solvers ... NOT USED ANYWHERE? More...
 
struct  SolverTargetInterface
 The interface to be provided by targets for non-linear equation solver. More...
 
class  SpectralPropagator
 Spectral propagtor in time. Refer to documentation of file spectralprop.h for math detail. More...
 
class  SpectralPropagatorGaussLobatto
 
class  Spinlock
 Spinlock using pthread spinlock operations. More...
 
class  Split
 Dummy class a la Intel TBB used to distinguish splitting constructor. More...
 
class  SRConf
 
class  Stack
 A simple, fixed-size, stack. More...
 
class  SteepestDescent
 Unconstrained minimization via steepest descent. More...
 
class  StrongOrthogonalityProjector
 a SO projector class More...
 
class  Subspace
 The SubspaceK class is a container class holding previous orbitals and residuals. More...
 
class  SubspaceK
 The SubspaceK class is a container class holding previous orbitals and residuals. More...
 
class  SystolicMatrixAlgorithm
 Base class for parallel algorithms that employ a systolic loop to generate all row pairs in parallel. More...
 
class  TaggedKey
 Key object that uses a tag to differentiate keys. More...
 
class  TaskAttributes
 Contains attributes of a task. More...
 
struct  TaskFn
 Wrap a callable object and its arguments into a task function. More...
 
struct  TaskFunction
 
class  TaskInterface
 All world tasks must be derived from this public interface. More...
 
struct  TaskMemfun
 
class  TaskThreadEnv
 Used to pass info about thread environment into users task. More...
 
class  TDA
 The TDA class: computes TDA and CIS calculations. More...
 
class  TDA_DFT
 
struct  TDA_TIMER
 Strucutre for TIMER. More...
 
struct  TensorArgs
 TensorArgs holds the arguments for creating a LowRankTensor. More...
 
class  TensorException
 Tensor is intended to throw only TensorExceptions. More...
 
class  TensorIterator
 
struct  TensorResultType
 TensorResultType<L,R>::type is the type of (L op R) where op is nominally multiplication. More...
 
class  TensorTrain
 
class  TensorTypeData
 Traits class to specify support of numeric types. More...
 
class  TensorTypeFromId
 This provides the reverse mapping from integer id to type name. More...
 
class  Thread
 Simplified thread wrapper to hide pthread complexity. More...
 
class  ThreadBase
 Simplified thread wrapper to hide pthread complexity. More...
 
class  ThreadPool
 A singleton pool of threads for dynamic execution of tasks. More...
 
class  ThreadPoolThread
 ThreadPool thread object. More...
 
class  Timer
 
struct  trajectory
 
struct  true_op
 
class  TwoElectronFactory
 factory for generating TwoElectronInterfaces More...
 
class  TwoElectronInterface
 base class to compute the wavelet coefficients for an isotropic 2e-operator More...
 
class  uniqueidT
 
struct  unperturbed_vxc
 
class  UnwrapReference
 ReferenceWrapper type trait accessor More...
 
class  UnwrapReference< detail::ReferenceWrapper< T > >
 
class  UnwrapReference< detail::ReferenceWrapper< T > const >
 
class  UnwrapReference< detail::ReferenceWrapper< T > const volatile >
 
class  UnwrapReference< detail::ReferenceWrapper< T > volatile >
 
class  vecfunc
 
class  Vector
 A simple, fixed dimension Coordinate. More...
 
class  VectorOfFunctionsSpace
 A vector space using MADNESS Vectors of MADNESS Functions. More...
 
class  VectorSpace
 A vector space using MADNESS Vectors. More...
 
class  VextCosFunctor
 A generic functor to compute external potential for TDDFT. More...
 
class  VLocalFunctor
 
struct  Void
 A type you can return when you want to return void ... use "return None". More...
 
class  World
 A parallel world with full functionality wrapping an MPI communicator. More...
 
struct  WorldAbsMaxOp
 
struct  WorldAbsMinOp
 
class  WorldAmInterface
 Implements AM interface. More...
 
struct  WorldBitAndOp
 
struct  WorldBitOrOp
 
struct  WorldBitXorOp
 
class  WorldContainer
 Makes a distributed container with specified attributes. More...
 
class  WorldContainerImpl
 Internal implementation of distributed container to facilitate shallow copy. More...
 
class  WorldContainerIterator
 Iterator for distributed container wraps the local iterator. More...
 
class  WorldDCDefaultPmap
 Default process map is "random" using madness::hash(key) More...
 
class  WorldDCPmapInterface
 Interface to be provided by any process map. More...
 
class  WorldDCRedistributeInterface
 
class  WorldGopInterface
 Provides collectives that interoperate with the AM and task interfaces. More...
 
struct  WorldLogicAndOp
 
struct  WorldLogicOrOp
 
struct  WorldMaxOp
 
class  WorldMemInfo
 Used to output memory statistics and control tracing, etc. More...
 
struct  WorldMinOp
 
class  WorldMpiInterface
 This class wraps/extends the MPI interface for World. More...
 
struct  WorldMultOp
 
class  WorldObject
 Implements most parts of a globally addressable object (via unique ID) More...
 
class  WorldProfile
 Singleton-like class for holding profiling data and functionality. More...
 
struct  WorldProfileEntry
 Used to store profiler info. More...
 
class  WorldProfileObj
 
struct  WorldSumOp
 
class  WorldTaskQueue
 Multi-threaded queue to manage and run tasks. More...
 
class  WSTAtomicBasisFunctor
 
struct  xc_functional
 Class to compute the energy functional. More...
 
struct  xc_kernel
 Class to compute terms of the kernel. More...
 
struct  xc_lda_potential
 Compute the spin-restricted LDA potential using unaryop (only for the initial guess) More...
 
struct  xc_potential
 Class to compute terms of the potential. More...
 
class  XCfunctional
 Simplified interface to XC functionals. More...
 
class  XCFunctionalLDA
 
struct  xfunction
 The Root structure is needed by the TDA class. More...
 
class  XNonlinearSolver
 Generalized version of NonlinearSolver not limited to a single madness function. More...
 

Typedefs

typedef Vector< double, 3 > coordT
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 3 > > 
functorT
 
typedef Function< double, 3 > functionT
 
typedef FunctionFactory
< double, 3 > 
factoryT
 
typedef vector< functionTvecfuncT
 
typedef Tensor< double > tensorT
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 3 > > > 
pmapT
 
typedef std::pair< vecfuncT,
vecfuncT
pairvecfuncT
 
typedef std::vector< pairvecfuncTsubspaceT
 
typedef DistributedMatrix< double > distmatT
 
typedef SeparatedConvolution
< double, 3 > 
operatorT
 
typedef std::shared_ptr
< operatorT
poperatorT
 
typedef Function< std::complex
< double >, 3 > 
complex_functionT
 
typedef std::vector
< complex_functionT
cvecfuncT
 
typedef Convolution1D
< double_complex
complex_operatorT
 
typedef std::vector< xfunctionxfunctionsT
 
typedef XNonlinearSolver
< xfunction, double, allocator
solverT
 
typedef NonlinearSolverND< 3 > NonlinearSolver
 
typedef Vector< double, 3 > coord_3d
 
typedef Vector< double, 6 > coord_6d
 
typedef Tensor< double > real_tensor
 
typedef Tensor< double_complexcomplex_tensor
 
typedef Tensor< double > tensor_real
 
typedef Tensor< double_complextensor_complex
 
typedef Vector< double, 1 > coord_1d
 
typedef Vector< double, 2 > coord_2d
 
typedef Vector< double, 4 > coord_4d
 
typedef Vector< double, 5 > coord_5d
 
typedef std::vector< double > vector_real
 
typedef std::vector
< std::complex< double > > 
vector_complex
 
typedef std::vector< Vector
< double, 1 > > 
vector_coord_1d
 
typedef std::vector< Vector
< double, 2 > > 
vector_coord_2d
 
typedef std::vector< Vector
< double, 3 > > 
vector_coord_3d
 
typedef std::vector< Vector
< double, 4 > > 
vector_coord_4d
 
typedef std::vector< Vector
< double, 5 > > 
vector_coord_5d
 
typedef std::vector< Vector
< double, 6 > > 
vector_coord_6d
 
typedef Function< double, 1 > real_function_1d
 
typedef Function< double, 2 > real_function_2d
 
typedef Function< double, 3 > real_function_3d
 
typedef Function< double, 4 > real_function_4d
 
typedef Function< double, 5 > real_function_5d
 
typedef Function< double, 6 > real_function_6d
 
typedef Function
< double_complex, 1 > 
complex_function_1d
 
typedef Function
< double_complex, 2 > 
complex_function_2d
 
typedef Function
< double_complex, 3 > 
complex_function_3d
 
typedef Function
< double_complex, 4 > 
complex_function_4d
 
typedef Function
< double_complex, 5 > 
complex_function_5d
 
typedef Function
< double_complex, 6 > 
complex_function_6d
 
typedef std::vector
< real_function_1d
vector_real_function_1d
 
typedef std::vector
< real_function_2d
vector_real_function_2d
 
typedef std::vector
< real_function_3d
vector_real_function_3d
 
typedef std::vector
< real_function_4d
vector_real_function_4d
 
typedef std::vector
< real_function_5d
vector_real_function_5d
 
typedef std::vector
< real_function_6d
vector_real_function_6d
 
typedef std::vector
< complex_function_1d
vector_complex_function_1d
 
typedef std::vector
< complex_function_2d
vector_complex_function_2d
 
typedef std::vector
< complex_function_3d
vector_complex_function_3d
 
typedef std::vector
< complex_function_4d
vector_complex_function_4d
 
typedef std::vector
< complex_function_5d
vector_complex_function_5d
 
typedef std::vector
< complex_function_6d
vector_complex_function_6d
 
typedef FunctionFactory
< double, 1 > 
real_factory_1d
 
typedef FunctionFactory
< double, 2 > 
real_factory_2d
 
typedef FunctionFactory
< double, 3 > 
real_factory_3d
 
typedef FunctionFactory
< double, 4 > 
real_factory_4d
 
typedef FunctionFactory
< double, 5 > 
real_factory_5d
 
typedef FunctionFactory
< double, 6 > 
real_factory_6d
 
typedef FunctionFactory
< double_complex, 1 > 
complex_factory_1d
 
typedef FunctionFactory
< double_complex, 2 > 
complex_factory_2d
 
typedef FunctionFactory
< double_complex, 3 > 
complex_factory_3d
 
typedef FunctionFactory
< double_complex, 4 > 
complex_factory_4d
 
typedef FunctionFactory
< double_complex, 5 > 
complex_factory_5d
 
typedef FunctionFactory
< double_complex, 6 > 
complex_factory_6d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 1 > > 
real_functor_1d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 2 > > 
real_functor_2d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 3 > > 
real_functor_3d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 4 > > 
real_functor_4d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 5 > > 
real_functor_5d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double, 6 > > 
real_functor_6d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double_complex, 1 > > 
complex_functor_1d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double_complex, 2 > > 
complex_functor_2d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double_complex, 3 > > 
complex_functor_3d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double_complex, 4 > > 
complex_functor_4d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double_complex, 5 > > 
complex_functor_5d
 
typedef std::shared_ptr
< FunctionFunctorInterface
< double_complex, 6 > > 
complex_functor_6d
 
typedef SeparatedConvolution
< double, 1 > 
real_convolution_1d
 
typedef SeparatedConvolution
< double, 2 > 
real_convolution_2d
 
typedef SeparatedConvolution
< double, 3 > 
real_convolution_3d
 
typedef SeparatedConvolution
< double, 4 > 
real_convolution_4d
 
typedef SeparatedConvolution
< double, 5 > 
real_convolution_5d
 
typedef SeparatedConvolution
< double, 6 > 
real_convolution_6d
 
typedef SeparatedConvolution
< double_complex, 1 > 
complex_convolution_1d
 
typedef SeparatedConvolution
< double_complex, 2 > 
complex_convolution_2d
 
typedef SeparatedConvolution
< double_complex, 3 > 
complex_convolution_3d
 
typedef SeparatedConvolution
< double_complex, 4 > 
complex_convolution_4d
 
typedef SeparatedConvolution
< double_complex, 5 > 
complex_convolution_5d
 
typedef SeparatedConvolution
< double_complex, 6 > 
complex_convolution_6d
 
typedef std::shared_ptr
< real_convolution_1d
real_convolution_1d_ptr
 
typedef std::shared_ptr
< real_convolution_2d
real_convolution_2d_ptr
 
typedef std::shared_ptr
< real_convolution_3d
real_convolution_3d_ptr
 
typedef std::shared_ptr
< real_convolution_4d
real_convolution_4d_ptr
 
typedef std::shared_ptr
< real_convolution_5d
real_convolution_5d_ptr
 
typedef std::shared_ptr
< real_convolution_6d
real_convolution_6d_ptr
 
typedef std::shared_ptr
< complex_convolution_1d
complex_convolution_1d_ptr
 
typedef std::shared_ptr
< complex_convolution_2d
complex_convolution_2d_ptr
 
typedef std::shared_ptr
< complex_convolution_3d
complex_convolution_3d_ptr
 
typedef std::shared_ptr
< complex_convolution_4d
complex_convolution_4d_ptr
 
typedef std::shared_ptr
< complex_convolution_5d
complex_convolution_5d_ptr
 
typedef std::shared_ptr
< complex_convolution_6d
complex_convolution_6d_ptr
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 1 > > > 
pmap_1d
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 2 > > > 
pmap_2d
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 3 > > > 
pmap_3d
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 4 > > > 
pmap_4d
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 5 > > > 
pmap_5d
 
typedef std::shared_ptr
< WorldDCPmapInterface< Key< 6 > > > 
pmap_6d
 
typedef FunctionImpl< double, 1 > real_funcimpl_1d
 
typedef FunctionImpl< double, 2 > real_funcimpl_2d
 
typedef FunctionImpl< double, 3 > real_funcimpl_3d
 
typedef FunctionImpl< double, 4 > real_funcimpl_4d
 
typedef FunctionImpl< double, 5 > real_funcimpl_5d
 
typedef FunctionImpl< double, 6 > real_funcimpl_6d
 
typedef FunctionImpl
< double_complex, 1 > 
complex_funcimpl_1d
 
typedef FunctionImpl
< double_complex, 2 > 
complex_funcimpl_2d
 
typedef FunctionImpl
< double_complex, 3 > 
complex_funcimpl_3d
 
typedef FunctionImpl
< double_complex, 4 > 
complex_funcimpl_4d
 
typedef FunctionImpl
< double_complex, 5 > 
complex_funcimpl_5d
 
typedef FunctionImpl
< double_complex, 6 > 
complex_funcimpl_6d
 
typedef Derivative< double, 1 > real_derivative_1d
 
typedef Derivative< double, 2 > real_derivative_2d
 
typedef Derivative< double, 3 > real_derivative_3d
 
typedef Derivative< double, 4 > real_derivative_4d
 
typedef Derivative< double, 5 > real_derivative_5d
 
typedef Derivative< double, 6 > real_derivative_6d
 
typedef Derivative
< double_complex, 1 > 
complex_derivative_1d
 
typedef Derivative
< double_complex, 2 > 
complex_derivative_2d
 
typedef Derivative
< double_complex, 3 > 
complex_derivative_3d
 
typedef Derivative
< double_complex, 4 > 
complex_derivative_4d
 
typedef Derivative
< double_complex, 5 > 
complex_derivative_5d
 
typedef Derivative
< double_complex, 6 > 
complex_derivative_6d
 
typedef FunctionDefaults< 1 > function_defaults_1d
 
typedef FunctionDefaults< 2 > function_defaults_2d
 
typedef FunctionDefaults< 3 > function_defaults_3d
 
typedef FunctionDefaults< 4 > function_defaults_4d
 
typedef FunctionDefaults< 5 > function_defaults_5d
 
typedef FunctionDefaults< 6 > function_defaults_6d
 
typedef int64_t Translation
 
typedef int Level
 
typedef std::pair< uniqueidT,
std::size_t > 
DistributedID
 Distributed ID which is used to identify objects. More...
 
typedef void(* am_handlerT )(const AmArg &)
 Type of AM handler functions. More...
 
typedef std::size_t hashT
 The hash value type. More...
 
typedef PthreadConditionVariable CONDITION_VARIABLE_TYPE
 
typedef Mutex SPINLOCK_TYPE
 
typedef Mutex SCALABLE_MUTEX_TYPE
 
typedef void(* rmi_handlerT )(void *buf, size_t nbyte)
 

Enumerations

enum  BCType {
  BC_ZERO, BC_PERIODIC, BC_FREE, BC_DIRICHLET,
  BC_ZERONEUMANN, BC_NEUMANN
}
 
enum  TensorType { TT_NONE, TT_FULL, TT_2D }
 low rank representations of tensors (see gentensor.h) More...
 

Functions

const AtomicDataget_atomic_data (unsigned int atomic_number)
 
unsigned int symbol_to_atomic_number (const std::string &symbol)
 
double smoothing_parameter (double Z, double eprec)
 Returns radius for smoothing nuclear potential with energy precision eprec. More...
 
double smoothed_potential (double r)
 Smoothed 1/r potential. More...
 
double dsmoothed_potential (double r)
 Derivative of the regularized 1/r potential. More...
 
double smoothed_density (double r)
 Charge density corresponding to smoothed 1/r potential. More...
 
std::shared_ptr
< NuclearCorrelationFactor > 
create_nuclear_correlation_factor (World &world, const SCF &calc)
 create and return a new nuclear correlation factor More...
 
void drot (long n, double *restrict a, double *restrict b, double s, double c, long inc)
 Simple (?) version of BLAS-1 DROT(N, DX, INCX, DY, INCY, DC, DS) More...
 
template<typename T , std::size_t NDIM>
void matrix_inner (DistributedMatrix< T > &A, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< T, NDIM > > &g, bool sym=false)
 
DistributedMatrix< double > distributed_localize_PM (World &world, const vecfuncT &mo, const vecfuncT &ao, const std::vector< int > &set, const std::vector< int > &at_to_bf, const std::vector< int > &at_nbf, const double thresh=1e-9, const double thetamax=0.5, const bool randomize=true, const bool doprint=false)
 
double get_charge_from_file (const std::string filename, unsigned int atype)
 
int x_rks_s__ (const double *r__, double *f, double *dfdra)
 
int x_uks_s__ (double *ra, double *rb, double *f, double *dfdra, double *dfdrb)
 
int c_rks_vwn5__ (const double *r__, double *f, double *dfdra)
 
int c_uks_vwn5__ (double *ra, double *rb, double *f, double *dfdra, double *dfdrb)
 
std::ostream & operator<< (std::ostream &s, const ContractedGaussianShell &c)
 
std::ostream & operator<< (std::ostream &s, const AtomicBasis &c)
 
std::ostream & operator<< (std::ostream &s, const AtomicBasisFunction &a)
 
std::ostream & operator<< (std::ostream &s, const Atom &atom)
 
void load_balance (const real_function_6d &f, const bool leaf)
 do some load-balancing More...
 
void START_TIMER (World &world)
 
void END_TIMER (World &world, const char *msg)
 
Tensor< double > Q3 (const tensorT &s)
 Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors. More...
 
template<typename T , std::size_t NDIM>
inner (const vecfunc< T, NDIM > &a, const vecfunc< T, NDIM > &b)
 the non-linear solver requires an inner product More...
 
template<typename T , std::size_t NDIM>
DistributedMatrix< T > matrix_inner (const DistributedMatrixDistribution &d, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< T, NDIM > > &g, bool sym=false)
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
transform (World &world, const std::vector< Function< T, NDIM > > &v, const DistributedMatrix< R > &c, bool fence=true)
 
tensorT Q2 (const tensorT &s)
 
void drot3 (long n, double *restrict a, double *restrict b, double s, double c, long inc)
 
complex_functionT APPLY (const complex_operatorT *q1d, const complex_functionT &psi)
 
double mask1 (double x)
 
double abs (double x)
 
double real (double x)
 
double imag (double x)
 
template<typename Q >
Tensor< std::complex< Q > > tensor_real2complex (const Tensor< Q > &r)
 
template<typename Q >
Tensor< Q > tensor_xreal (const Tensor< std::complex< Q > > &c)
 
template<typename Q >
Tensor< Q > tensor_ximag (const Tensor< std::complex< Q > > &c)
 
template<typename Q >
Tensor< Q > tensor_abs (const Tensor< std::complex< Q > > &c)
 
template<typename Q , int NDIM>
Function< typename
TensorTypeData< Q >
::scalar_type, NDIM
abs_square (const Function< Q, NDIM > &func)
 
template<typename Q , int NDIM>
Function< typename
TensorTypeData< Q >
::scalar_type, NDIM
real (const Function< Q, NDIM > &func)
 
template<typename Q , int NDIM>
Function< typename
TensorTypeData< Q >
::scalar_type, NDIM
imag (const Function< Q, NDIM > &func)
 
template<typename Q , int NDIM>
Function< typename
TensorTypeData< Q >
::scalar_type, NDIM
abs (const Function< Q, NDIM > &func)
 
template<typename Q , int NDIM>
Function< std::complex< Q >, NDIMfunction_real2complex (const Function< Q, NDIM > &r)
 
template<typename Q , int NDIM>
SeparatedConvolution< Q, NDIMPeriodicCoulombOp (World &world, long k, double lo, double eps, Tensor< double > L)
 
template<typename Q , int NDIM>
SeparatedConvolution< Q, NDIM > * PeriodicCoulombOpPtr (World &world, long k, double lo, double eps, Tensor< double > L)
 
template<typename Q , int NDIM>
SeparatedConvolution< Q, NDIMPeriodicBSHOp (World &world, double mu, long k, double lo, double eps, Tensor< double > L)
 
template<typename Q , int NDIM>
SeparatedConvolution< Q, NDIM > * PeriodicBSHOpPtr (World &world, double mu, long k, double lo, double eps, Tensor< double > L)
 
template<typename T >
stheta_fd (const T &x)
 
template<typename T >
DistributedMatrix< T > column_distributed_matrix (World &world, int64_t n, int64_t m, int64_t coltile=0)
 Generates an (n,m) matrix distributed by columns (row dimension is not distributed) More...
 
template<typename T >
DistributedMatrix< T > row_distributed_matrix (World &world, int64_t n, int64_t m, int64_t rowtile=0)
 Generates an (n,m) matrix distributed by rows (column dimension is not distributed) More...
 
template<typename T >
DistributedMatrix< T > interleave_rows (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b)
 Generates a distributed matrix with rows of a and b interleaved. More...
 
template<typename T >
DistributedMatrix< T > concatenate_rows (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b)
 Generates a distributed matrix with rows of a and b concatenated. More...
 
template<typename T >
DistributedMatrix< T > concatenate_rows (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b, const DistributedMatrix< T > &c, const DistributedMatrix< T > &d)
 Generates a column-distributed matrix with rows of a, b, c, and d contatenated in order. More...
 
template<typename T >
DistributedMatrix< T > concatenate_columns (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b)
 Generates a row-distributed matrix with rows of a and b contatenated. More...
 
template<typename T >
DistributedMatrix< T > idMatrix (const DistributedMatrix< T > &A)
 make identity matrix with same propaties of A More...
 
template<typename C >
void check_linear_dependence (const Tensor< C > &Q, Tensor< C > &c, const double rcondtol, const double cabsmax)
 check for subspace linear dependency More...
 
double distance (double a, double b)
 Default function for computing the distance between two doubles. More...
 
template<typename T >
double distance (std::complex< T > &a, std::complex< T > &b)
 Default function for computing the distance between two complex numbers. More...
 
unsigned long checksum_file (const char *filename)
 Simple checksum for ASCII characters in file. More...
 
void gprofexit (int id, int nproc)
 Rename gmon.out for each process by ordering process termination. More...
 
void print_meminfo (int id, const std::string &tag)
 
std::istream & position_stream (std::istream &f, const std::string &tag)
 
std::string lowercase (const std::string &s)
 
template<>
double RandomValue< double > ()
 Random double. More...
 
template<>
float RandomValue< float > ()
 Random float. More...
 
template<>
double_complex RandomValue< double_complex > ()
 Random double_complex. More...
 
template<>
float_complex RandomValue< float_complex > ()
 Random float_complex. More...
 
template<>
int RandomValue< int > ()
 Random int. More...
 
template<>
long RandomValue< long > ()
 Random long. More...
 
template<>
void RandomVector< double > (int n, double *t)
 
template<>
void RandomVector< float > (int n, float *t)
 
template<>
void RandomVector< double_complex > (int n, double_complex *t)
 
template<>
void RandomVector< float_complex > (int n, float_complex *t)
 
template<class T >
RandomValue ()
 Random value that wraps the default Fibonacci generator. More...
 
template<class T >
void RandomVector (int n, T *t)
 
template<typename funcT >
funcT::returnT do_adq (double lo, double hi, const funcT &func, int n, const double *x, const double *w)
 
template<typename funcT >
funcT::returnT adq1 (double lo, double hi, const funcT &func, double thresh, int n, const double *x, const double *w, int level)
 
template<typename funcT >
funcT::returnT adq (double lo, double hi, const funcT &func, double thresh)
 
void aligned_add (long n, double *restrict a, const double *restrict b)
 
void aligned_sub (long n, double *restrict a, const double *restrict b)
 
void aligned_add (long n, double_complex *restrict a, const double_complex *restrict b)
 
void aligned_sub (long n, double_complex *restrict a, const double_complex *restrict b)
 
template<typename T >
void fast_transpose (long n, long m, const T *a, T *restrict b)
 a(n,m) –> b(m,n) ... optimized for smallish matrices More...
 
template<typename T >
T * shrink (long n, long m, long r, const T *a, T *restrict b)
 a(i,j) –> b(i,j) for i=0..n-1 and j=0..r-1 noting dimensions are a(n,m) and b(n,r). More...
 
template<typename T , std::size_t NDIM>
Derivative< T, NDIMfree_space_derivative (World &world, int axis, int k=FunctionDefaults< NDIM >::get_k())
 Convenience function returning derivative operator with free-space boundary conditions. More...
 
template<typename T , std::size_t NDIM>
Derivative< T, NDIMperiodic_derivative (World &world, int axis, int k=FunctionDefaults< NDIM >::get_k())
 Conveinence function returning derivative operator with periodic boundary conditions. More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMapply (const Derivative< T, NDIM > &D, const Function< T, NDIM > &f, bool fence=true)
 Applies derivative operator to function (for syntactic equivalence to integral operator apply) More...
 
template<typename T , std::size_t NDIM>
std::vector< std::shared_ptr
< Derivative< T, NDIM > > > 
gradient_operator (World &world, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 Convenience function returning vector of derivative operators implementing grad ( $ \nabla $) More...
 
template<typename T , std::size_t NDIM>
std::ostream & operator<< (std::ostream &s, const FunctionNode< T, NDIM > &node)
 
template<typename T , std::size_t NDIM>
std::ostream & operator<< (std::ostream &s, const CoeffTracker< T, NDIM > &ct)
 
template<typename T , std::size_t NDIM>
void plotdx (const Function< T, NDIM > &f, const char *filename, const Tensor< double > &cell=FunctionDefaults< NDIM >::get_cell(), const std::vector< long > &npt=std::vector< long >(NDIM, 201L), bool binary=true)
 Writes an OpenDX format file with a cube/slice of points on a uniform grid. More...
 
template<std::size_t NDIM>
void plotvtk_begin (World &world, const char *filename, const Vector< double, NDIM > &plotlo, const Vector< double, NDIM > &plothi, const Vector< long, NDIM > &npt, bool binary=false)
 
template<typename T , std::size_t NDIM>
void plotvtk_data (const T &function, const char *fieldname, World &world, const char *filename, const Vector< double, NDIM > &plotlo, const Vector< double, NDIM > &plothi, const Vector< long, NDIM > &npt, bool binary=false)
 
template<typename T , std::size_t NDIM>
void plotvtk_data (const Function< T, NDIM > &function, const char *fieldname, World &world, const char *filename, const Vector< double, NDIM > &plotlo, const Vector< double, NDIM > &plothi, const Vector< long, NDIM > &npt, bool binary=false, bool plot_refine=false)
 VTK data writer for real-valued (not complex) madness::functions. More...
 
template<typename T , std::size_t NDIM>
void plotvtk_data (const Function< std::complex< T >, NDIM > &function, const char *fieldname, World &world, const char *filename, const Vector< double, NDIM > &plotlo, const Vector< double, NDIM > &plothi, const Vector< long, NDIM > &npt, bool binary=false, bool plot_refine=false)
 VTK data writer for complex-valued madness::functions. More...
 
template<std::size_t NDIM>
void plotvtk_end (World &world, const char *filename, bool binary=false)
 
template<typename T , std::size_t NDIM>
void plot_line (const char *filename, int npt, const Vector< double, NDIM > &lo, const Vector< double, NDIM > &hi, const Function< T, NDIM > &f)
 Generates ASCII file tabulating f(r) at npoints along line r=lo,...,hi. More...
 
template<typename T , typename U , std::size_t NDIM>
void plot_line (const char *filename, int npt, const Vector< double, NDIM > &lo, const Vector< double, NDIM > &hi, const Function< T, NDIM > &f, const Function< U, NDIM > &g)
 Generates ASCII file tabulating f(r) and g(r) at npoints along line r=lo,...,hi. More...
 
template<typename T , typename U , typename V , std::size_t NDIM>
void plot_line (const char *filename, int npt, const Vector< double, NDIM > &lo, const Vector< double, NDIM > &hi, const Function< T, NDIM > &f, const Function< U, NDIM > &g, const Function< V, NDIM > &a)
 Generates ASCII file tabulating f(r), g(r), and a(r) at npoints along line r=lo,...,hi. More...
 
template<typename T , typename U , typename V , typename W , std::size_t NDIM>
void plot_line (const char *filename, int npt, const Vector< double, NDIM > &lo, const Vector< double, NDIM > &hi, const Function< T, NDIM > &f, const Function< U, NDIM > &g, const Function< V, NDIM > &a, const Function< W, NDIM > &b)
 Generates ASCII file tabulating f(r), g(r), a(r), b(r) at npoints along line r=lo,...,hi. More...
 
template<size_t NDIM>
void plot_plane (World &world, const Function< double, NDIM > &function, const std::string name)
 
template<size_t NDIM>
void plot_along (World &world, trajectory< NDIM > traj, const Function< double, NDIM > &function, std::string filename)
 
template<size_t NDIM>
void plot_along (World &world, trajectory< NDIM > traj, double(*ff)(const Vector< double, NDIM > &), std::string filename)
 
template<typename T , std::size_t NDIM>
Tensor< T > fcube (const Key< NDIM > &, T(*f)(const Vector< double, NDIM > &), const Tensor< double > &)
 
template<std::size_t NDIM>
std::ostream & operator<< (std::ostream &s, const Key< NDIM > &key)
 
template<size_t NDIM>
Key< NDIMdisplacement (const Key< NDIM > &source, const Key< NDIM > &target)
 given a source and a target, return the displacement in translation More...
 
template<std::size_t NDIM, typename opT >
void foreach_child (const Key< NDIM > &parent, opT &op)
 Applies op(key) to each child key of parent. More...
 
template<std::size_t NDIM, typename objT >
void foreach_child (const Key< NDIM > &parent, objT *obj, void(objT::*memfun)(const Key< NDIM > &))
 Applies member function of obj to each child key of parent. More...
 
void initialize_legendre_stuff ()
 Call this single threaded to initialize static data (used read only by multiple threads) More...
 
void legendre_polynomials (double x, long order, double *p)
 Evaluate the Legendre polynomials up to the given order at x in [-1,1]. More...
 
void legendre_scaling_functions (double x, long k, double *p)
 Evaluate the first k Legendre scaling functions. More...
 
void load_quadrature (World &world, const char *dir)
 Collective routine to pre-load and cache the quadrature points and weights. More...
 
bool gauss_legendre_numeric (int n, double xlo, double xhi, double *x, double *w)
 Compute the Gauss-Legendre quadrature points and weights. More...
 
bool gauss_legendre (int n, double xlo, double xhi, double *x, double *w)
 
bool gauss_legendre_test (bool print)
 
void startup (World &world, int argc, char **argv)
 
template<typename T , typename opT , int NDIM>
Function< T, NDIMmultiop_values (const opT &op, const std::vector< Function< T, NDIM > > &vf)
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q,
T), NDIM
mul (const Q alpha, const Function< T, NDIM > &f, bool fence=true)
 Returns new function equal to alpha*f(x) with optional fence. More...
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q,
T), NDIM
mul (const Function< T, NDIM > &f, const Q alpha, bool fence=true)
 Returns new function equal to f(x)*alpha with optional fence. More...
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q,
T), NDIM
operator* (const Function< T, NDIM > &f, const Q alpha)
 Returns new function equal to f(x)*alpha. More...
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q,
T), NDIM
operator* (const Q alpha, const Function< T, NDIM > &f)
 Returns new function equal to alpha*f(x) More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
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. More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
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. More...
 
template<typename L , typename R , typename opT , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
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. More...
 
template<typename Q , typename opT , std::size_t NDIM>
Function< typename
opT::resultT, NDIM
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. More...
 
template<typename Q , typename opT , std::size_t NDIM>
Function< typename
opT::resultT, NDIM
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. More...
 
template<typename L , typename R , std::size_t D>
std::vector< Function
< TENSOR_RESULT_TYPE(L, R), D > > 
vmulXX (const Function< L, D > &left, const std::vector< Function< R, D > > &vright, double tol, bool fence=true)
 Use the vmra/mul(...) interface instead. More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
operator* (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Multiplies two functions with the new result being of type TensorResultType<L,R> More...
 
template<typename T , std::size_t KDIM, std::size_t LDIM>
Function< T, KDIM+LDIM > hartree_product (const Function< T, KDIM > &left2, const Function< T, LDIM > &right2)
 Performs a Hartree product on the two given low-dimensional functions. More...
 
template<typename T , std::size_t KDIM, std::size_t LDIM, typename opT >
Function< T, KDIM+LDIM > 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. More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
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. More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
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. More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMgaxpy_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. More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
operator+ (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Adds two functions with the new result being of type TensorResultType<L,R> More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
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. More...
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L,
R), NDIM
operator- (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Subtracts two functions with the new result being of type TensorResultType<L,R> More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMsquare (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the square of f - global comm only if not reconstructed. More...
 
template<typename T , int NDIM>
Function< T, NDIMabs (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs of f - global comm only if not reconstructed. More...
 
template<typename T , int NDIM>
Function< T, NDIMabs_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. More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMcopy (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. More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMcopy (const Function< T, NDIM > &f, bool fence=true)
 Create a new copy of the function with the same distribution and optional fence. More...
 
template<typename T , typename Q , std::size_t NDIM>
Function< Q, NDIMconvert (const Function< T, NDIM > &f, bool fence=true)
 Type conversion implies a deep copy. No communication except for optional fence. More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMconj (const Function< T, NDIM > &f, bool fence=true)
 Return the complex conjugate of the input function with the same distribution and optional fence. More...
 
template<typename opT , typename T , std::size_t LDIM>
Function< TENSOR_RESULT_TYPE(typename
opT::opT, T), LDIM+LDIM > 
apply (const opT &op, const Function< T, LDIM > &f1, const Function< T, LDIM > &f2, bool fence=true)
 Apply operator on a hartree product of two low-dimensional functions. More...
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename
opT::opT, R), NDIM
apply_only (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator ONLY in non-standard form - required other steps missing !! More...
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename
opT::opT, R), NDIM
apply (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator in non-standard form. More...
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename
opT::opT, R), NDIM
apply_1d_realspace_push (const opT &op, const Function< R, NDIM > &f, int axis, bool fence=true)
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmapdim (const Function< T, NDIM > &f, const std::vector< long > &map, bool fence=true)
 Generate a new function by reordering dimensions ... optional fence. More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMsymmetrize (const Function< T, NDIM > &f, const std::string symmetry, bool fence=true)
 symmetrize a function More...
 
template<typename T , std::size_t NDIM, std::size_t LDIM>
Function< T, NDIMmultiply (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 More...
 
template<typename T , std::size_t NDIM>
Function< T, NDIMproject (const Function< T, NDIM > &other, int k=FunctionDefaults< NDIM >::get_k(), double thresh=FunctionDefaults< NDIM >::get_thresh(), bool fence=true)
 
template<typename T , typename R , std::size_t NDIM>
 TENSOR_RESULT_TYPE (T, R) inner(const Function<T
 Computes the scalar/inner product between two functions. More...
 
return f inner (g)
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >
, Function< TENSOR_RESULT_TYPE(T,
R), NDIM > >::type 
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 
operator+ (R r, const Function< T, NDIM > &f)
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >
, Function< TENSOR_RESULT_TYPE(T,
R), NDIM > >::type 
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 
operator- (R r, const Function< T, NDIM > &f)
 
template<std::size_t NDIM>
Function< double, NDIMreal (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the real part of the input. More...
 
template<std::size_t NDIM>
Function< double, NDIMimag (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the imaginary part of the input. More...
 
template<std::size_t NDIM>
Function< double, NDIMabssq (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the square of the absolute value of the input. More...
 
template<typename T , std::size_t NDIM>
Tensor< T > fcube (const Key< NDIM > &key, const FunctionFunctorInterface< T, NDIM > &f, const Tensor< double > &qx)
 
template<typename T , std::size_t NDIM>
void fcube (const Key< NDIM > &key, const FunctionFunctorInterface< T, NDIM > &f, const Tensor< double > &qx, Tensor< T > &fval)
 return the values of a Function on a grid More...
 
template<int D>
int power (int base=2)
 
template<>
int power< 0 > (int base)
 
template<>
int power< 1 > (int base)
 
template<>
int power< 2 > (int base)
 
template<>
int power< 3 > (int base)
 
template<>
int power< 4 > (int base)
 
template<>
int power< 5 > (int base)
 
template<>
int power< 6 > (int base)
 
template<>
int power< 7 > (int base)
 
template<>
int power< 8 > (int base)
 
template<>
int power< 9 > (int base)
 
template<>
int power< 10 > (int base)
 
template<>
int power< 12 > (int base)
 
template<int N, class T >
power (T const x)
 
void bandlimited_propagator_plot ()
 
Convolution1D< double_complex > * qm_1d_free_particle_propagator (int k, double bandlimit, double timestep, double width)
 
template<std::size_t NDIM>
SeparatedConvolution
< double_complex, NDIM
qm_free_particle_propagator (World &world, int k, double bandlimit, double timestep)
 
template<std::size_t NDIM>
SeparatedConvolution
< double_complex, NDIM > * 
qm_free_particle_propagatorPtr (World &world, int k, double bandlimit, double timestep)
 
bool two_scale_coefficients (int k, Tensor< double > *h0, Tensor< double > *h1, Tensor< double > *g0, Tensor< double > *g1)
 Return the two scale coefficients in the Legendre basis. More...
 
bool two_scale_hg (int k, Tensor< double > *hg)
 
bool test_two_scale_coefficients ()
 
bool autoc (int k, Tensor< double > *c)
 Return the autocorrelation coefficients for scaling functions of given order. More...
 
bool test_autoc ()
 
void load_coeffs (World &world, const char *dir)
 Collective routine to load and cache twoscale & autorrelation coefficients. More...
 
template<typename T , std::size_t NDIM>
void compress (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Compress a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void reconstruct (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Reconstruct a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void nonstandard (World &world, std::vector< Function< T, NDIM > > &v, bool fence=true)
 Generates non-standard form of a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void standard (World &world, std::vector< Function< T, NDIM > > &v, bool fence=true)
 Generates standard form of a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void truncate (World &world, std::vector< Function< T, NDIM > > &v, double tol=0.0, bool fence=true)
 Truncates a vector of functions. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > apply (World &world, const Derivative< T, NDIM > &D, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Applies a derivative operator to a vector of functions. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > zero_functions (World &world, int n)
 Generates a vector of zero functions. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
transform (World &world, const std::vector< Function< T, NDIM > > &v, const Tensor< R > &c, bool fence=true)
 Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]. More...
 
template<typename L , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(L, R),
NDIM > > 
transform (World &world, const std::vector< Function< L, NDIM > > &v, const Tensor< R > &c, double tol, bool fence)
 
template<typename T , typename Q , std::size_t NDIM>
void scale (World &world, std::vector< Function< T, NDIM > > &v, const std::vector< Q > &factors, bool fence=true)
 Scales inplace a vector of functions by distinct values. More...
 
template<typename T , typename Q , std::size_t NDIM>
void scale (World &world, std::vector< Function< T, NDIM > > &v, const Q factor, bool fence=true)
 Scales inplace a vector of functions by the same. More...
 
template<typename T , std::size_t NDIM>
std::vector< double > norm2s (World &world, const std::vector< Function< T, NDIM > > &v)
 Computes the 2-norms of a vector of functions. More...
 
template<typename T , std::size_t NDIM>
double norm2 (World &world, const std::vector< Function< T, NDIM > > &v)
 Computes the 2-norm of a vector of functions. More...
 
double conj (double x)
 
double conj (float x)
 
template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > matrix_inner (World &world, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< R, NDIM > > &g, bool sym=false)
 Computes the matrix inner product of two function vectors - q(i,j) = inner(f[i],g[j]) More...
 
template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > inner (World &world, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< R, NDIM > > &g)
 Computes the element-wise inner product of two function vectors - q(i) = inner(f[i],g[i]) More...
 
template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > inner (World &world, const Function< T, NDIM > &f, const std::vector< Function< R, NDIM > > &g)
 Computes the inner product of a function with a function vector - q(i) = inner(f,g[i]) More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
mul (World &world, const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &v, bool fence=true)
 Multiplies a function against a vector of functions — q[i] = a * v[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
mul_sparse (World &world, const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &v, double tol, bool fence=true)
 Multiplies a function against a vector of functions using sparsity of a and v[i] — q[i] = a * v[i]. More...
 
template<typename T , std::size_t NDIM>
void norm_tree (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Makes the norm tree for all functions in a vector. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
mul (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 Multiplies two vectors of functions q[i] = a[i] * b[i]. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > square (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Computes the square of a vector of functions — q[i] = v[i]**2. More...
 
template<typename T , std::size_t NDIM>
void set_thresh (World &world, std::vector< Function< T, NDIM > > &v, double thresh, bool fence=true)
 Sets the threshold in a vector of functions. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > conj (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Returns the complex conjugate of the vector of functions. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > copy (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Returns a deep copy of a vector of functions. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > copy (World &world, const Function< T, NDIM > &v, const unsigned int n, bool fence=true)
 Returns a vector of deep copies of of a function. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
add (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 Returns new vector of functions — q[i] = a[i] + b[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
add (World &world, const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 Returns new vector of functions — q[i] = a + b[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
add (World &world, const std::vector< Function< R, NDIM > > &b, const Function< T, NDIM > &a, bool fence=true)
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
sub (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 Returns new vector of functions — q[i] = a[i] - b[i]. More...
 
template<typename T , typename Q , typename R , std::size_t NDIM>
void gaxpy (World &world, Q alpha, std::vector< Function< T, NDIM > > &a, Q beta, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 Generalized A*X+Y for vectors of functions -— a[i] = alpha*a[i] + beta*b[i]. More...
 
template<typename opT , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(typename
opT::opT, R), NDIM > > 
apply (World &world, const std::vector< std::shared_ptr< opT > > &op, const std::vector< Function< R, NDIM > > f)
 Applies a vector of operators to a vector of functions — q[i] = apply(op[i],f[i]) More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
apply (World &world, const SeparatedConvolution< T, NDIM > &op, const std::vector< Function< R, NDIM > > f)
 Applies an operator to a vector of functions — q[i] = apply(op,f[i]) More...
 
template<typename T , std::size_t NDIM>
void normalize (World &world, std::vector< Function< T, NDIM > > &v, bool fence=true)
 Normalizes a vector of functions — v[i] = v[i].scale(1.0/v[i].norm2()) More...
 
template<typename T , std::size_t NDIM>
double get_size (World &world, const std::vector< Function< T, NDIM > > &v)
 
template<typename T , std::size_t NDIM>
void compress (World &world, const std::vector< Function< T, NDIM > > &v, unsigned int blk=1, bool fence=true)
 Compress a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void reconstruct (World &world, const std::vector< Function< T, NDIM > > &v, unsigned int blk=1, bool fence=true)
 Reconstruct a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void nonstandard (World &world, std::vector< Function< T, NDIM > > &v, unsigned int blk=1, bool fence=true)
 Generates non-standard form of a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void standard (World &world, std::vector< Function< T, NDIM > > &v, unsigned int blk=1, bool fence=true)
 Generates standard form of a vector of functions. More...
 
template<typename T , std::size_t NDIM>
void truncate (World &world, std::vector< Function< T, NDIM > > &v, double tol=0.0, unsigned int blk=1, bool fence=true)
 Truncates a vector of functions. More...
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > apply (World &world, const Derivative< T, NDIM > &D, const std::vector< Function< T, NDIM > > &v, const unsigned int blk=1, const bool fence=true)
 Applies a derivative operator to a vector of functions. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
transform (World &world, const std::vector< Function< T, NDIM > > &v, const Tensor< R > &c, unsigned int blki=1, unsigned int blkj=1, const bool fence=true)
 Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]. More...
 
template<typename L , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(L, R),
NDIM > > 
transform (World &world, const std::vector< Function< L, NDIM > > &v, const Tensor< R > &c, const double tol, const unsigned int blki=1, const bool fence)
 
template<typename T , typename Q , std::size_t NDIM>
void scale (World &world, std::vector< Function< T, NDIM > > &v, const std::vector< Q > &factors, const unsigned int blk=1, const bool fence=true)
 Scales inplace a vector of functions by distinct values. More...
 
template<typename T , typename Q , std::size_t NDIM>
void scale (World &world, std::vector< Function< T, NDIM > > &v, const Q factor, const unsigned int blk=1, const bool fence=true)
 Scales inplace a vector of functions by the same. More...
 
template<typename T , std::size_t NDIM>
std::vector< double > norm2s (World &world, const std::vector< Function< T, NDIM > > &v, const unsigned int blk=1, const bool fence=true)
 Computes the 2-norms of a vector of functions. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
mul (World &world, const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &v, const unsigned int blk=1, const bool fence=true)
 Multiplies a function against a vector of functions — q[i] = a * v[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
mul_sparse (World &world, const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &v, const double tol, const bool fence=true, const unsigned int blk=1)
 Multiplies a function against a vector of functions using sparsity of a and v[i] — q[i] = a * v[i]. More...
 
template<typename T , std::size_t NDIM>
void norm_tree (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true, unsigned int blk=1)
 Makes the norm tree for all functions in a vector. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
mul (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true, unsigned int blk=1)
 Multiplies two vectors of functions q[i] = a[i] * b[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
add (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true, unsigned int blk=1)
 Returns new vector of functions — q[i] = a[i] + b[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
add (World &world, const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true, unsigned int blk=1)
 Returns new vector of functions — q[i] = a + b[i]. More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
add (World &world, const std::vector< Function< R, NDIM > > &b, const Function< T, NDIM > &a, bool fence=true, unsigned int blk=1)
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
sub (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true, unsigned int blk=1)
 Returns new vector of functions — q[i] = a[i] - b[i]. More...
 
template<typename T , typename Q , typename R , std::size_t NDIM>
void gaxpy (World &world, Q alpha, std::vector< Function< T, NDIM > > &a, Q beta, const std::vector< Function< R, NDIM > > &b, unsigned int blk=1, bool fence=true)
 Generalized A*X+Y for vectors of functions -— a[i] = alpha*a[i] + beta*b[i]. More...
 
template<typename opT , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(typename
opT::opT, R), NDIM > > 
apply (World &world, const std::vector< std::shared_ptr< opT > > &op, const std::vector< Function< R, NDIM > > f, const unsigned int blk=1)
 Applies a vector of operators to a vector of functions — q[i] = apply(op[i],f[i]) More...
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function
< TENSOR_RESULT_TYPE(T, R),
NDIM > > 
apply (World &world, const SeparatedConvolution< T, NDIM > &op, const std::vector< Function< R, NDIM > > f, const unsigned int blk=1)
 Applies an operator to a vector of functions — q[i] = apply(op,f[i]) More...
 
template<typename T >
DistributedMatrix< T > copy (const DistributedMatrix< T > &A)
 Deep copy of content. More...
 
template<typename T >
void sygvp (World &world, const Tensor< T > &a, const Tensor< T > &B, int itype, Tensor< T > &V, Tensor< typename Tensor< T >::scalar_type > &e)
 
template<typename T >
void gesvp (World &world, const Tensor< T > &a, const Tensor< T > &b, Tensor< T > &x)
 
template<typename T >
bool has_zero_rank (const GenTensor< T > &g)
 true if GenTensor has zero rank or no data More...
 
template<class T >
GenTensor< T > reduce (std::list< GenTensor< T > > &addends, double eps, bool are_optimal=false)
 
template<class T >
GenTensor< T > outer (const GenTensor< T > &left, const GenTensor< T > &right)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...) More...
 
template<class T >
GenTensor< T > outer_low_rank (const Tensor< T > &left, const Tensor< T > &right)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...) More...
 
template<typename T >
void change_tensor_type (GenTensor< T > &t, const TensorArgs &targs)
 change representation to targ.tt More...
 
template<class T , class Q >
GenTensor< TENSOR_RESULT_TYPE(T,
Q)> 
general_transform (const GenTensor< T > &t, const Tensor< Q > c[])
 Transform all dimensions of the tensor t by distinct matrices c. More...
 
template<class T >
GenTensor< T > general_transform (const GenTensor< T > &t, const Tensor< T > c[])
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, GenTensor< T > >::type 
operator* (const Q &x, const GenTensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<typename T , typename real_type , typename scalar_type >
void GMRES (const AbstractVectorSpace< T, real_type, scalar_type > &space, const Operator< T > &op, const T &b, T &x, int &maxiters, real_type &resid_thresh, real_type &update_thresh, const bool outp=false)
 A GMRES solver routine for linear systems, $ \mathbf{A} \vec{x} = \vec{b} $. More...
 
template<typename T >
void svd (const Tensor< T > &a, Tensor< T > &U, Tensor< typename Tensor< T >::scalar_type > &s, Tensor< T > &VT)
 Compute the singluar value decomposition of an n-by-m matrix using *gesvd. More...
 
template<typename T >
void svd_result (Tensor< T > &a, Tensor< T > &U, Tensor< typename Tensor< T >::scalar_type > &s, Tensor< T > &VT, Tensor< T > &work)
 same as svd, but it optimizes away the tensor construction: a = U * diag(s) * VT More...
 
template<typename T >
void gesv (const Tensor< T > &a, const Tensor< T > &b, Tensor< T > &x)
 Solve Ax = b for general A using the LAPACK *gesv routines. More...
 
template<typename T >
void gelss (const Tensor< T > &a, const Tensor< T > &b, double rcond, Tensor< T > &x, Tensor< typename Tensor< T >::scalar_type > &s, long &rank, Tensor< typename Tensor< T >::scalar_type > &sumsq)
 Solve Ax = b for general A using the LAPACK *gelss routines. More...
 
template<typename T >
void syev (const Tensor< T > &A, Tensor< T > &V, Tensor< typename Tensor< T >::scalar_type > &e)
 Real-symmetric or complex-Hermitian eigenproblem. More...
 
template<typename T >
void sygv (const Tensor< T > &A, const Tensor< T > &B, int itype, Tensor< T > &V, Tensor< typename Tensor< T >::scalar_type > &e)
 Generalized real-symmetric or complex-Hermitian eigenproblem. More...
 
template<typename T >
void cholesky (Tensor< T > &A)
 Compute the Cholesky factorization. More...
 
template<typename T >
void geqp3 (Tensor< T > &A, Tensor< T > &tau, Tensor< integer > &jpvt)
 Compute the QR factorization. More...
 
template<typename T >
void geqp3_result (Tensor< T > &A, Tensor< T > &tau, Tensor< integer > &jpvt, Tensor< T > &work)
 
template<typename T >
void qr (Tensor< T > &A, Tensor< T > &R)
 compute the QR decomposition of the matrix A More...
 
template<typename T >
void lq (Tensor< T > &A, Tensor< T > &R)
 compute the LQ decomposition of the matrix A = L Q More...
 
template<typename T >
void lq_result (Tensor< T > &A, Tensor< T > &R, Tensor< T > &tau, Tensor< T > &work, bool do_qr)
 compute the LQ decomposition of the matrix A = L Q More...
 
template<typename T >
void orgqr (Tensor< T > &A, const Tensor< T > &tau)
 reconstruct the orthogonal matrix Q (e.g. from QR factorization) More...
 
STATIC Tensor< float > my_conj_transpose (Tensor< float > a)
 
STATIC Tensor< double > my_conj_transpose (Tensor< double > a)
 
STATIC Tensor< float_complexmy_conj_transpose (Tensor< float_complex > a)
 
STATIC Tensor< double_complexmy_conj_transpose (Tensor< double_complex > a)
 
template<typename T >
double test_svd (int n, int m)
 Example and test code for interface to LAPACK SVD interfae. More...
 
template<typename T >
double test_gesv (int n, int nrhs)
 
template<typename T >
double test_syev (int n)
 
template<typename T >
double test_gelss (int n, int nrhs)
 
template<typename T >
double test_sygv (int n)
 
template<typename T >
double test_cholesky (int n)
 
template<typename T >
double test_qr ()
 
void init_tensor_lapack ()
 World/MRA initialization calls this before going multithreaded due to static data in dlamch. More...
 
bool test_tensor_lapack ()
 Test the Tensor-LAPACK interface ... currently always returns true! More...
 
template void svd_result (Tensor< float > &a, Tensor< float > &U, Tensor< Tensor< float >::scalar_type > &s, Tensor< float > &VT, Tensor< float > &work)
 
template void orgqr (Tensor< float > &A, const Tensor< float > &tau)
 
template void svd (const Tensor< double > &a, Tensor< double > &U, Tensor< Tensor< double >::scalar_type > &s, Tensor< double > &VT)
 
template void svd_result (Tensor< double > &a, Tensor< double > &U, Tensor< Tensor< double >::scalar_type > &s, Tensor< double > &VT, Tensor< double > &work)
 
template void gelss (const Tensor< double > &a, const Tensor< double > &b, double rcond, Tensor< double > &x, Tensor< Tensor< double >::scalar_type > &s, long &rank, Tensor< Tensor< double >::scalar_type > &sumsq)
 
template void syev (const Tensor< double > &A, Tensor< double > &V, Tensor< Tensor< double >::scalar_type > &e)
 
template void cholesky (Tensor< double > &A)
 
template void qr (Tensor< double > &A, Tensor< double > &R)
 
template void lq (Tensor< double > &A, Tensor< double > &L)
 
template void geqp3 (Tensor< double > &A, Tensor< double > &tau, Tensor< integer > &jpvt)
 
template void orgqr (Tensor< double > &A, const Tensor< double > &tau)
 
template void svd_result (Tensor< float_complex > &a, Tensor< float_complex > &U, Tensor< Tensor< float_complex >::scalar_type > &s, Tensor< float_complex > &VT, Tensor< float_complex > &work)
 
template void svd (const Tensor< double_complex > &a, Tensor< double_complex > &U, Tensor< Tensor< double_complex >::scalar_type > &s, Tensor< double_complex > &VT)
 
template void svd_result (Tensor< double_complex > &a, Tensor< double_complex > &U, Tensor< Tensor< double_complex >::scalar_type > &s, Tensor< double_complex > &VT, Tensor< double_complex > &work)
 
template void gelss (const Tensor< double_complex > &a, const Tensor< double_complex > &b, double rcond, Tensor< double_complex > &x, Tensor< Tensor< double_complex >::scalar_type > &s, long &rank, Tensor< Tensor< double_complex >::scalar_type > &sumsq)
 
template void syev (const Tensor< double_complex > &A, Tensor< double_complex > &V, Tensor< Tensor< double_complex >::scalar_type > &e)
 
template void gesv (const Tensor< double > &a, const Tensor< double > &b, Tensor< double > &x)
 
template void gesv (const Tensor< double_complex > &a, const Tensor< double_complex > &b, Tensor< double_complex > &x)
 
template void sygv (const Tensor< double > &A, const Tensor< double > &B, int itype, Tensor< double > &V, Tensor< Tensor< double >::scalar_type > &e)
 
template void sygv (const Tensor< double_complex > &A, const Tensor< double_complex > &B, int itype, Tensor< double_complex > &V, Tensor< Tensor< double_complex >::scalar_type > &e)
 
template void orgqr (Tensor< complex_real4 > &A, const Tensor< complex_real4 > &tau)
 
template void orgqr (Tensor< double_complex > &A, const Tensor< double_complex > &tau)
 
template<typename aT , typename bT , typename cT >
void mTxmq (long dimi, long dimj, long dimk, cT *restrict c, const aT *a, const bT *b)
 
template<typename aT , typename bT , typename cT >
void mTxmq_padding (long dimi, long dimj, long dimk, long ext_b, cT *c, const aT *a, const bT *b)
 
void bgq_mtxmq_padded (long dimi, long dimj, long dimk, long extb, __complex__ double *c_x, const __complex__ double *a_x, const __complex__ double *b_x)
 
void bgq_mtxmq_padded (long dimi, long dimj, long dimk, long extb, __complex__ double *c_x, const __complex__ double *a_x, const double *b_x)
 
void bgq_mtxmq_padded (long dimi, long dimj, long dimk, long extb, __complex__ double *c_x, const double *a_x, const __complex__ double *b_x)
 
void bgq_mtxmq_padded (long dimi, long dimj, long dimk, long extb, double *c_x, const double *a_x, const double *b_x)
 
std::ostream & operator<< (std::ostream &stream, const Slice &s)
 
template<typename T >
Tensor< T > KAIN (const Tensor< T > &Q, double rcond=1e-12)
 Solves non-linear equation using KAIN (returns coefficients to compute next vector) More...
 
template<typename T >
void ortho3 (Tensor< T > &x, Tensor< T > &y, Tensor< double > &weights, const double &thresh)
 sophisticated version of ortho2 More...
 
template<typename T >
void ortho5 (Tensor< T > &x1, Tensor< T > &y1, Tensor< double > &w1, const Tensor< T > &x2, const Tensor< T > &y2, const Tensor< double > &w2, const double &thresh)
 specialized version of ortho3 More...
 
template<typename Q >
conditional_conj (const Q &coeff)
 For real types return value, for complex return conjugate. More...
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Tensor< T > &t)
 Print (for human consumption) a tensor to the stream. More...
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, Tensor< T > >::type 
operator+ (Q x, const Tensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, Tensor< T > >::type 
operator* (const Q &x, const Tensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, Tensor< T > >::type 
operator- (Q x, const Tensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<class T >
Tensor< T > copy (const Tensor< T > &t)
 Returns a new contiguous tensor that is a deep copy of the input. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> transform_dir (const Tensor< T > &t, const Tensor< Q > &c, int axis)
 Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor. More...
 
template<class T >
Tensor< T > transpose (const Tensor< T > &t)
 Returns a new deep copy of the transpose of the input tensor. More...
 
template<class T >
Tensor< T > conj_transpose (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate transpose of the input tensor. More...
 
template<class T >
Tensor< T > outer (const Tensor< T > &left, const Tensor< T > &right)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...) More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> inner (const Tensor< T > &left, const Tensor< Q > &right, long k0=-1, long k1=0)
 Inner product ... result(i,j,...,p,q,...) = sum(z) left(i,j,...,z)*right(z,p,q,...) More...
 
template<class T , class Q >
void inner_result (const Tensor< T > &left, const Tensor< Q > &right, long k0, long k1, Tensor< TENSOR_RESULT_TYPE(T, Q) > &result)
 Accumulate inner product into user provided, contiguous, correctly sized result tensor. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> transform (const Tensor< T > &t, const Tensor< Q > &c)
 Transform all dimensions of the tensor t by the matrix c. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> general_transform (const Tensor< T > &t, const Tensor< Q > c[])
 Transform all dimensions of the tensor t by distinct matrices c. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T,
Q) > & 
fast_transform (const Tensor< T > &t, const Tensor< Q > &c, Tensor< TENSOR_RESULT_TYPE(T, Q) > &result, Tensor< TENSOR_RESULT_TYPE(T, Q) > &workspace)
 Restricted but heavily optimized form of transform() More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
abs (const Tensor< T > &t)
 Return a new tensor holding the absolute value of each element of t. More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
arg (const Tensor< T > &t)
 Return a new tensor holding the argument of each element of t (complex types only) More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
real (const Tensor< T > &t)
 Return a new tensor holding the real part of each element of t (complex types only) More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
imag (const Tensor< T > &t)
 Return a new tensor holding the imaginary part of each element of t (complex types only) More...
 
template<class T >
Tensor< T > conj (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate of the input tensor (complex types only) More...
 
 TYPEINFO (0, int, false, true, int, double)
 
 TYPEINFO (1, long, false, true, long, double)
 
 TYPEINFO (2, float, false, true, float, float)
 
 TYPEINFO (3, double, false, true, double, double)
 
 TYPEINFO (4, float_complex, true, true, float, float)
 
 TYPEINFO (5, double_complex, true, true, double, double)
 
 DPEC (int, int, int)
 
 SPEC (int, long, long)
 
 SPEC (int, float, float)
 
 SPEC (int, double, double)
 
 SPEC (int, float_complex, float_complex)
 
 SPEC (int, double_complex, double_complex)
 
 DPEC (long, long, long)
 
 SPEC (long, float, float)
 
 SPEC (long, double, double)
 
 SPEC (long, float_complex, float_complex)
 
 SPEC (long, double_complex, double_complex)
 
 DPEC (float, float, float)
 
 SPEC (float, double, double)
 
 SPEC (float, float_complex, float_complex)
 
 SPEC (float, double_complex, double_complex)
 
 DPEC (double, double, double)
 
 SPEC (double, float_complex, float_complex)
 
 SPEC (double, double_complex, double_complex)
 
 DPEC (float_complex, float_complex, float_complex)
 
 SPEC (float_complex, double_complex, double_complex)
 
 DPEC (double_complex, double_complex, double_complex)
 
template<typename T >
std::vector< T > vector_factory (const T &v0)
 Returns a std::vector<T> initialized from the arguments. More...
 
template<typename T >
std::vector< T > vector_factory (const T &v0, const T &v1)
 Returns a std::vector<T> initialized from the arguments. More...
 
template<typename T >
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2)
 Returns a std::vector<T> initialized from the arguments. More...
 
template<typename T >
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3)
 Returns a std::vector<T> initialized from the arguments. More...
 
template<typename T >
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4)
 Returns a std::vector<T> initialized from the arguments. More...
 
template<typename T >
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5)
 Returns a std::vector<T> initialized from the arguments. More...
 
template<typename T , std::size_t N>
std::ostream & operator<< (std::ostream &s, const std::array< T, N > &a)
 Output std::array to stream for human consumption. More...
 
template<typename T , std::size_t N>
madness::hashT hash_value (const std::array< T, N > &a)
 Hash std::array with madness::Hash. More...
 
template<typename T , std::size_t N>
void swap (Vector< T, N > &l, Vector< T, N > &r)
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator* (Vector< T, N > l, U r)
 Scale a coordinate. More...
 
template<typename T , typename U , std::size_t N>
Vector< T, Noperator* (T l, Vector< U, N > r)
 Scale a Vector. More...
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator* (Vector< T, N > l, const Vector< U, N > &r)
 Multiply two Vector objects. More...
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator+ (Vector< T, N > l, U r)
 Add a scalar to a Vector. More...
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator+ (Vector< T, N > l, const Vector< U, N > &r)
 Add two Vector opbjects. More...
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator- (Vector< T, N > l, U r)
 Subtract a scalar from a Vector. More...
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator- (Vector< T, N > l, const Vector< U, N > &r)
 Subtract two Vector. More...
 
template<typename T , std::size_t N>
norm (Vector< T, N > v)
 Compute norm of a Vector. More...
 
template<typename T >
Vector< T, 1 > vec (T x)
 Your friendly neighborhood factory function. More...
 
template<typename T >
Vector< T, 2 > vec (T x, T y)
 Your friendly neighborhood factory function. More...
 
template<typename T >
Vector< T, 3 > vec (T x, T y, T z)
 Your friendly neighborhood factory function. More...
 
template<typename T >
Vector< T, 4 > vec (T x, T y, T z, T xx)
 Your friendly neighborhood factory function. More...
 
template<typename T >
Vector< T, 5 > vec (T x, T y, T z, T xx, T yy)
 Your friendly neighborhood factory function. More...
 
template<typename T >
Vector< T, 6 > vec (T x, T y, T z, T xx, T yy, T zz)
 Your friendly neighborhood factory function. More...
 
template<typename T , std::size_t NDIM>
Vector< T, NDIMn12 (const Vector< T, NDIM > &r, const double eps=1.e-6)
 helper function unit vector in direction r More...
 
template<typename T >
std::array< T, 1 > array_factory (const T &v0)
 Returns a Vector<T,1> initialized from the arguments. More...
 
template<typename T >
std::array< T, 2 > array_factory (const T &v0, const T &v1)
 Returns a Vector<T,2> initialized from the arguments. More...
 
template<typename T >
std::array< T, 3 > array_factory (const T &v0, const T &v1, const T &v2)
 Returns a Vector<T,3> initialized from the arguments. More...
 
template<typename T >
std::array< T, 4 > array_factory (const T &v0, const T &v1, const T &v2, const T &v3)
 Returns a Vector<T,4> initialized from the arguments. More...
 
template<typename T >
std::array< T, 5 > array_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4)
 Returns a Vector<T,5> initialized from the arguments. More...
 
template<typename T >
std::array< T, 6 > array_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5)
 Returns a Vector<T,6> initialized from the arguments. More...
 
void xterm_debug_breakpoint ()
 
void xterm_debug (const char *path, const char *display)
 
template<typename ptrT , typename deleterT >
DeferredDeleter< ptrT, deleterT > make_deferred_deleter (World &w, deleterT d)
 Make a defered deleter object for use with std::shared_ptr. More...
 
template<typename ptrT >
DeferredDeleter< ptrT > make_deferred_deleter (World &w)
 Make a defered deleter object for use with std::shared_ptr. More...
 
bool operator== (const DistributedID &left, const DistributedID &right)
 Distributed ID equality comparison operator. More...
 
bool operator!= (const DistributedID &left, const DistributedID &right)
 Distributed ID inequality comparison operator. More...
 
template<typename T >
detail::MoveWrapper< T > move (T &t)
 Move wrapper factory function. More...
 
template<typename T >
const T & move (const T &t)
 Move wrapper factory function. More...
 
template<typename T >
T & unwrap_move (const detail::MoveWrapper< T > &t)
 Remove move wrapper from a movable object. More...
 
template<typename T >
disable_if< detail::is_movable
< T >, T & >::type 
unwrap_move (T &t)
 Passthrough function for a non-movable object. More...
 
void print_justified (const char *s, int column=0, bool underline=true)
 Print a string justified on the left to start at the given column with optional underlining. More...
 
void print_centered (const char *s, int column=40, bool underline=true)
 Print a string centered at the given column with optional underlining. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const std::complex< T > &c)
 Easy printing of complex numbers. More...
 
template<typename T , typename U >
std::ostream & operator<< (std::ostream &s, const std::pair< T, U > &p)
 Easy printing of pairs. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const std::list< T > &c)
 Easy printing of lists. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const std::vector< T > &c)
 Easy printing of vectors. More...
 
template<typename T , std::size_t N>
disable_if< std::is_same< T,
char >, std::ostream & >::type 
operator<< (std::ostream &s, const T(&v)[N])
 Easy printing of fixed dimension arrays. More...
 
template<class A >
void print (const A &a)
 Print a single item to std::cout terminating with new line. More...
 
template<class A , class B >
void print (const A &a, const B &b)
 Print two items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C >
void print (const A &a, const B &b, const C &c)
 Print three items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D >
void print (const A &a, const B &b, const C &c, const D &d)
 Print four items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E >
void print (const A &a, const B &b, const C &c, const D &d, const E &e)
 Print five items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f)
 Print six items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g)
 Print seven items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h)
 Print eight items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H , class I >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i)
 Print nine items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i, const J &j)
 Print ten items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i, const J &j, const K &k)
 Print eleven items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K , class L >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i, const J &j, const K &k, const L &l)
 Print twelve items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K , class L , class M >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i, const J &j, const K &k, const L &l, const M &m)
 Print thirteen items separated by spaces to std::cout terminating with new line. More...
 
template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K , class L , class M , class N >
void print (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i, const J &j, const K &k, const L &l, const M &m, const N &n)
 Print fourteen items separated by spaces to std::cout terminating with new line. More...
 
template<typename A , typename B , typename C , typename D >
void print_seq (World &world, const A &a, const B &b, const C &c, const D &d)
 Sequentially ordered printing of (serializable) data from every process ... collective no fence. More...
 
template<typename A , typename B , typename C >
void print_seq (World &world, const A &a, const B &b, const C &c)
 Sequentially ordered printing of (serializable) data from every process ... collective no fence. More...
 
template<typename A , typename B >
void print_seq (World &world, const A &a, const B &b)
 Sequentially ordered printing of (serializable) data from every process ... collective no fence. More...
 
template<typename A >
void print_seq (World &world, const A &a)
 Sequentially ordered printing of (serializable) data from every process ... collective no fence. More...
 
void redirectio (World &world)
 
template<class T >
detail::ReferenceWrapper< T > const ref (T &t)
 Reference wrapper factory function. More...
 
template<class T >
detail::ReferenceWrapper
< const T > const 
cref (const T &t)
 Constant reference wrapper factory function. More...
 
template<class T >
UnwrapReference< T >::type & unwrap_ref (T &t)
 Function for retreaving the referenced object. More...
 
template<class T >
T * get_pointer (const detail::ReferenceWrapper< T > &r)
 Function for retreaving a pointer to the referenced object. More...
 
template<typename ptrT >
void swap (ScopedPtr< ptrT > &a, ScopedPtr< ptrT > &b)
 Swap the content of two pointers. More...
 
template<typename ptrT >
ptrT * get_pointer (const ScopedPtr< ptrT > &p)
 Same as p.get() More...
 
template<typename ptrT >
void swap (ScopedArray< ptrT > &a, ScopedArray< ptrT > &b)
 Swap the content of two arrays. More...
 
template<typename ptrT >
ptrT * get_pointer (const ScopedArray< ptrT > &p)
 Same as p.get() More...
 
template<class T , typename resultT >
BindNullaryMemFun< T, resultT > bind_nullary_mem_fun (T *t, resultT(T::*op)())
 Factory function for BindNullaryMemFun. More...
 
template<class T , typename resultT >
BindNullaryConstMemFun< T,
resultT > 
bind_nullary_mem_fun (const T *t, resultT(T::*op)() const)
 Factory function for BindNullaryConstMemFun. More...
 
hashT hash_value (const uniqueidT &id)
 
bool initialized ()
 
void error (const char *msg)
 
Worldinitialize (int &argc, char **&argv)
 Initialize the MADNESS runtime. More...
 
Worldinitialize (int &argc, char **&argv, const MPI_Comm &comm)
 Initialize the MADNESS runtime. More...
 
Worldinitialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm)
 Initialize the MADNESS runtime. More...
 
void finalize ()
 Call this once at the very end of your main program instead of calling MPI_Finalize. More...
 
std::ostream & operator<< (std::ostream &out, const MadnessException &e)
 Print a MadnessException to the stream (for human consumption) More...
 
void exception_break (bool)
 This function is executed just before a madness exception is thrown. More...
 
double wall_time ()
 Returns the wall time in seconds relative to arbitrary origin. More...
 
double cpu_frequency ()
 Estimates frequency of the processor in Hz. More...
 
template<>
std::ostream & operator<< (std::ostream &out, const Future< void > &f)
 
template<>
std::ostream & operator<< (std::ostream &out, const Future< Void > &f)
 
void print_stats (World &world)
 Call this to print misc. stats ... collective. More...
 
AmArgalloc_am_arg (std::size_t nbyte)
 Allocates a new AmArg with nbytes of user data ... delete with free_am_arg. More...
 
AmArgcopy_am_arg (const AmArg &arg)
 
void free_am_arg (AmArg *arg)
 Frees an AmArg allocated with alloc_am_arg. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , typename J >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i, const J &j)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h, const I &i)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g, const H &h)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f, const G &g)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C , typename D , typename E >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d, const E &e)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C , typename D >
AmArgnew_am_arg (const A &a, const B &b, const C &c, const D &d)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B , typename C >
AmArgnew_am_arg (const A &a, const B &b, const C &c)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A , typename B >
AmArgnew_am_arg (const A &a, const B &b)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename A >
AmArgnew_am_arg (const A &a)
 Convenience template for serializing arguments into a new AmArg. More...
 
template<typename keyT , typename valueT , typename hashfunT >
void swap (WorldContainer< keyT, valueT, hashfunT > &dc0, WorldContainer< keyT, valueT, hashfunT > &dc1)
 Swaps the content of two WorldContainer objects. It should be called on all nodes. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Future< T > &f)
 Human readable printing of future to stream. More...
 
template<typename T >
std::vector< Future< T > > future_vector_factory (std::size_t n)
 Factory for vectors of futures (see section Gotchas on the mainpage) More...
 
template<class T >
enable_if_c
< std::is_fundamental< T >
::value &&((sizeof(T)%sizeof(uint32_t))==0),
hashT >::type 
hash_value (const T t)
 Hash a single fundamental object. More...
 
template<class T >
madness::enable_if_c
< std::is_fundamental< T >
::value &&((sizeof(T)%sizeof(uint32_t))!=0),
hashT >::type 
hash_value (const T t)
 Hash a single fundamental object. More...
 
template<typename T >
hashT hash_value (const T *t)
 Hash a pointer address. More...
 
template<typename T >
enable_if_c
<!(std::is_fundamental< T >
::value||std::is_pointer< T >
::value||std::is_array< T >
::value), hashT >::type 
hash_value (const T &t)
 Hash a class object. More...
 
template<typename T >
hashT hash_value (const std::basic_string< T > &t)
 Hash a string. More...
 
template<class T >
void hash_combine (hashT &seed, const T &v)
 Combine hash values. More...
 
template<class It >
void hash_range (hashT &seed, It first, It last)
 Combine the hash values of an iterator range. More...
 
template<class It >
hashT hash_range (It first, It last)
 Combine the hash values of an iterator range. More...
 
template<class T , std::size_t n>
hashT hash_range (const T(&t)[n])
 Combine the hash values of a C-style array. More...
 
template<class T , std::size_t n>
void hash_range (hashT &seed, const T(&t)[n])
 Combine the hash values of a C-style array. More...
 
template<class T >
enable_if< std::is_fundamental
< T > >::type 
hash_range (hashT &seed, const T *t, std::size_t n)
 Combine the hash values of a pointer range. More...
 
template<class T >
disable_if
< std::is_fundamental< T >
>::type 
hash_range (hashT &seed, const T *t, std::size_t n)
 Combine the hash values of a pointer range. More...
 
template<class T >
hashT hash_range (const T *t, std::size_t n)
 Combine the hash values of a pointer range. More...
 
WorldMemInfoworld_mem_info ()
 Returns pointer to internal structure. More...
 
bool try_two_locks (const Mutex &m1, const Mutex &m2)
 Attempt to acquire two locks without blocking holding either one. More...
 
void initialize_papi ()
 
void begin_papi_measurement ()
 
void end_papi_measurement ()
 
void reset_papi_measurement ()
 
const long long * get_papi_measurement ()
 
template<typename T , typename U >
void swap (RemoteReference< T > &l, RemoteReference< U > &r)
 Swap the two remote references. More...
 
void cpu_relax ()
 Do nothing and especially do not touch memory. More...
 

Variables

const double c_b2 = 0.333333333333333333333333333333333
 
const double c_b7 = 0.333333333333333333333333333333
 
const double c_b14 = 1.333333333333333333333333333333
 
const double acut1e_6 = 0.25
 
Random default_random_generator
 The default random number stream. More...
 
NDIMf
 
NDIM const Function< R, NDIM > & g
 
const char * tensor_type_names []
 
int hwthreads
 
double cpufrequency
 
int64_t memorysize
 
const int NUMEVENTS = 0
 

Detailed Description

Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.

We provide an abstract base class FunctionFunctorInterface, of which we derive (as of now) the following classes:

Each of these Interfaces can be used in a FunctionFactory to set up a Function

If you can recall the Intel hypercubes, their comm lib used GOP as the abbreviation.

Typedef Documentation

typedef void(* madness::am_handlerT)(const AmArg &)

Type of AM handler functions.

typedef Function<std::complex<double>,3> madness::complex_functionT
typedef Vector<double,1> madness::coord_1d
typedef Vector<double,2> madness::coord_2d
typedef Vector< double, 3 > madness::coord_3d
typedef Vector<double,4> madness::coord_4d
typedef Vector<double,5> madness::coord_5d
typedef Vector< double, 6 > madness::coord_6d
typedef Vector< double, 3 > madness::coordT
typedef std::vector<complex_functionT> madness::cvecfuncT
typedef std::pair<uniqueidT, std::size_t> madness::DistributedID

Distributed ID which is used to identify objects.

typedef FunctionFactory< double, 3 > madness::factoryT
typedef Function< double, 3 > madness::functionT
typedef std::size_t madness::hashT

The hash value type.

typedef int madness::Level
typedef Tensor<double> madness::real_tensor
typedef void(* madness::rmi_handlerT)(void *buf, size_t nbyte)
typedef std::vector<pairvecfuncT> madness::subspaceT
typedef Tensor<double> madness::tensor_real
typedef Tensor< double > madness::tensorT
typedef int64_t madness::Translation
typedef std::vector< Function< double, 3 > > madness::vecfuncT
typedef std::vector< std::complex<double> > madness::vector_complex
typedef std::vector< Vector<double,1> > madness::vector_coord_1d
typedef std::vector< Vector<double,2> > madness::vector_coord_2d
typedef std::vector< Vector<double,3> > madness::vector_coord_3d
typedef std::vector< Vector<double,4> > madness::vector_coord_4d
typedef std::vector< Vector<double,5> > madness::vector_coord_5d
typedef std::vector< Vector<double,6> > madness::vector_coord_6d
typedef std::vector<double> madness::vector_real
typedef std::vector<xfunction> madness::xfunctionsT

Enumeration Type Documentation

Enumerator
BC_ZERO 
BC_PERIODIC 
BC_FREE 
BC_DIRICHLET 
BC_ZERONEUMANN 
BC_NEUMANN 

low rank representations of tensors (see gentensor.h)

Enumerator
TT_NONE 
TT_FULL 
TT_2D 

Function Documentation

double madness::abs ( double  x)
template<typename Q , int NDIM>
Function<typename TensorTypeData<Q>::scalar_type,NDIM> madness::abs ( const Function< Q, NDIM > &  func)

References unary_op_coeffs().

template<typename T , int NDIM>
Function<T,NDIM> madness::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.

References madness::Function< T, NDIM >::abs(), copy(), and PROFILE_FUNC.

template<typename Q , int NDIM>
Function<typename TensorTypeData<Q>::scalar_type,NDIM> madness::abs_square ( const Function< Q, NDIM > &  func)

References unary_op().

template<typename T , int NDIM>
Function<T,NDIM> 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.

References madness::Function< T, NDIM >::abs_square(), copy(), and PROFILE_FUNC.

template<std::size_t NDIM>
Function<double,NDIM> madness::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.

References madness::Function< T, NDIM >::fence(), and unary_op().

Referenced by madness::Solver< T, NDIM >::compute_rho(), madness::Solver< T, NDIM >::compute_rho_slow(), and madness::SCF::make_density().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::add ( World &  world,
const std::vector< Function< T, NDIM > > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true 
)

Returns new vector of functions — q[i] = a[i] + b[i].

References a(), add(), b(), compress(), madness::WorldGopInterface::fence(), madness::World::gop, and PROFILE_BLOCK.

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::add ( World &  world,
const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true 
)
template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::add ( World &  world,
const std::vector< Function< R, NDIM > > &  b,
const Function< T, NDIM > &  a,
bool  fence = true 
)
inline

References add(), and b().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::add ( World &  world,
const std::vector< Function< T, NDIM > > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true,
unsigned int  blk = 1 
)

Returns new vector of functions — q[i] = a[i] + b[i].

References a(), add(), b(), compress(), madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::add ( World &  world,
const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true,
unsigned int  blk = 1 
)
template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::add ( World &  world,
const std::vector< Function< R, NDIM > > &  b,
const Function< T, NDIM > &  a,
bool  fence = true,
unsigned int  blk = 1 
)
inline

References add(), and b().

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R),NDIM> madness::add ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right,
bool  fence = true 
)
template<typename funcT >
funcT::returnT madness::adq ( double  lo,
double  hi,
const funcT &  func,
double  thresh 
)
template<typename funcT >
funcT::returnT madness::adq1 ( double  lo,
double  hi,
const funcT &  func,
double  thresh,
int  n,
const double *  x,
const double *  w,
int  level 
)
void madness::aligned_add ( long  n,
double *restrict  a,
const double *restrict  b 
)

Referenced by main().

void madness::aligned_add ( long  n,
double_complex *restrict  a,
const double_complex *restrict  b 
)
void madness::aligned_sub ( long  n,
double *restrict  a,
const double *restrict  b 
)

Referenced by main().

void madness::aligned_sub ( long  n,
double_complex *restrict  a,
const double_complex *restrict  b 
)
AmArg* madness::alloc_am_arg ( std::size_t  nbyte)
inline

Allocates a new AmArg with nbytes of user data ... delete with free_am_arg.

References arg().

Referenced by copy_am_arg(), and new_am_arg().

template<typename T , std::size_t NDIM>
std::vector< Function<T,NDIM> > madness::apply ( World &  world,
const Derivative< T, NDIM > &  D,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

Applies a derivative operator to a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, and reconstruct().

template<typename T , std::size_t NDIM>
std::vector< Function<T,NDIM> > madness::apply ( World &  world,
const Derivative< T, NDIM > &  D,
const std::vector< Function< T, NDIM > > &  v,
const unsigned int  blk = 1,
const bool  fence = true 
)

Applies a derivative operator to a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and reconstruct().

template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::apply ( const Derivative< T, NDIM > &  D,
const Function< T, NDIM > &  f,
bool  fence = true 
)

Applies derivative operator to function (for syntactic equivalence to integral operator apply)

Referenced by EFieldOperator::action(), SCF::apply_hf_exchange(), madness::SCF::apply_hf_exchange(), madness::Solver< T, NDIM >::apply_hf_exchange(), madness::Solver< T, NDIM >::apply_hf_exchange3(), madness::Solver< T, NDIM >::apply_hf_exchange4(), apply_potential(), madness::Solver< T, NDIM >::apply_potential(), calcScatField(), madness::HartreeFock< T, NDIM >::calculate_coulomb_energy(), madness::HartreeFock< T, NDIM >::calculate_exchange_energy(), madness::DFT< T, NDIM >::calculate_tot_coulomb_energy(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), chin_chen(), madness::SCF::compute_residual(), converge(), converge2s(), madness::DFTNuclearChargeDensityOp< T, NDIM >::DFTNuclearChargeDensityOp(), madness::SCF::do_plots(), doit(), madness::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), iterate(), madness::SCF::iterate_trotter(), SCF::kinetic_energy_matrix(), kinetic_energy_matrix(), madness::SCF::kinetic_energy_matrix(), kinetic_energy_matrix2(), kinetic_energy_matrix_slow(), main(), madness::SCF::make_coulomb_potential(), madness::Solver< T, NDIM >::make_kinetic_matrix(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), CoupledPurturbation::make_vpsi(), madness::EigSolver< T, NDIM >::multi_solve(), madness::HartreeFockExchangeOp< T, NDIM >::op_o(), madness::HartreeFockCoulombOp< T, NDIM >::op_r(), madness::SeparatedConvolution< T, NDIM >::operator()(), madness::DFTCoulombOp< T, NDIM >::prepare_op(), madness::DFTCoulombPeriodicOp< T, NDIM >::prepare_op(), madness::EigSolver< T, NDIM >::solve(), madness::SCF::solve(), madness::Solver< T, NDIM >::solve(), madness::Solver< T, NDIM >::Solver(), test(), test_nuclear_potential(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), testbsh(), testNavierStokes(), trotter(), SCF::twoint(), and madness::SCF::twoint().

template<typename opT , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> > madness::apply ( World &  world,
const std::vector< std::shared_ptr< opT > > &  op,
const std::vector< Function< R, NDIM > >  f 
)

Applies a vector of operators to a vector of functions — q[i] = apply(op[i],f[i])

References apply_only(), f, madness::WorldGopInterface::fence(), madness::World::gop, nonstandard(), op(), PROFILE_BLOCK, reconstruct(), and standard().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::apply ( World &  world,
const SeparatedConvolution< T, NDIM > &  op,
const std::vector< Function< R, NDIM > >  f 
)
template<typename opT , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> > madness::apply ( World &  world,
const std::vector< std::shared_ptr< opT > > &  op,
const std::vector< Function< R, NDIM > >  f,
const unsigned int  blk = 1 
)

Applies a vector of operators to a vector of functions — q[i] = apply(op[i],f[i])

References apply_only(), f, madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), nonstandard(), op(), PROFILE_BLOCK, reconstruct(), and standard().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::apply ( World &  world,
const SeparatedConvolution< T, NDIM > &  op,
const std::vector< Function< R, NDIM > >  f,
const unsigned int  blk = 1 
)

Applies an operator to a vector of functions — q[i] = apply(op,f[i])

References apply_only(), f, madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), nonstandard(), PROFILE_BLOCK, reconstruct(), and standard().

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 Function< T, LDIM > &  f1,
const Function< T, LDIM > &  f2,
bool  fence = true 
)

Apply operator on a hartree product of two low-dimensional functions.

Supposed to be something like result= G( f(1)*f(2)) the hartree product is never constructed explicitly, but its coeffs are constructed on the fly and processed immediately.

Parameters
[in]opthe operator
[in]f1function of particle 1
[in]f2function of particle 2
[in]fenceif we shall fence
Returns
a function of dimension NDIM=LDIM+LDIM

References madness::FunctionFactory< T, NDIM >::empty(), std::tr1::f1, std::tr1::f2, madness::Function< T, NDIM >::get_impl(), madness::Function< T, NDIM >::k(), madness::Function< T, NDIM >::nonstandard(), madness::Function< T, NDIM >::standard(), std::tr1::T(), madness::Function< T, NDIM >::TENSOR_RESULT_TYPE(), madness::Function< T, NDIM >::thresh(), and madness::Function< T, NDIM >::world().

template<typename opT , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> madness::apply ( const opT &  op,
const Function< R, NDIM > &  f,
bool  fence = true 
)
complex_functionT madness::APPLY ( const complex_operatorT q1d,
const complex_functionT psi 
)
template<typename opT , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> madness::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), NDIM> madness::apply_only ( const opT &  op,
const Function< R, NDIM > &  f,
bool  fence = true 
)
template<typename T >
std::array<T,1> madness::array_factory ( const T &  v0)
inline

Returns a Vector<T,1> initialized from the arguments.

template<typename T >
std::array<T,2> madness::array_factory ( const T &  v0,
const T &  v1 
)
inline

Returns a Vector<T,2> initialized from the arguments.

template<typename T >
std::array<T,3> madness::array_factory ( const T &  v0,
const T &  v1,
const T &  v2 
)
inline

Returns a Vector<T,3> initialized from the arguments.

template<typename T >
std::array<T,4> madness::array_factory ( const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3 
)
inline

Returns a Vector<T,4> initialized from the arguments.

template<typename T >
std::array<T,5> madness::array_factory ( const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4 
)
inline

Returns a Vector<T,5> initialized from the arguments.

template<typename T >
std::array<T,6> madness::array_factory ( const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const T &  v5 
)
inline

Returns a Vector<T,6> initialized from the arguments.

bool madness::autoc ( int  k,
Tensor< double > *  c 
)

Return the autocorrelation coefficients for scaling functions of given order.

Returned is a view of the cached data ... do not modify.

The autocorrelation functions are defined as

Phi_ij(z) = int(0,z+1) phi_i(x) phi_j(x-z) z<=0
Phi_ij(z) = int(z,1) phi_i(x) phi_j(x-z) z>=0

and are expanded in the double order Legendre scaling functions on either side of the origin

Phi_ij(z) = sum(p) [phi_p(z+1)*cminus_ijp + phi_p(z)*cplus_ijp]
cplus_ijp = int(-1,0) Phi_ij(z) phi_p(z+1)
cminus_ijp = int(0,1) Phi_ij(z) phi_p(z)

The expansion coefficients cminus and cplus have been precomputed with Maple to a precision of about 1e-30. Only cplus is stored and we use

cplus(i,j,p) = (-1)**(i+j+p) * cminus(i,j,p)
cplus(i,j,p) = (-1)**(i+j) * cplus(j,i,p)

The returned tensor concatenates cminus and cplus.

Return true on success, false on failure (which also prints error message to stdout).

Referenced by madness::Convolution1D< Q >::Convolution1D().

void madness::bandlimited_propagator_plot ( )

References plot().

void madness::begin_papi_measurement ( )
inline

Referenced by initialize().

void madness::bgq_mtxmq_padded ( long  dimi,
long  dimj,
long  dimk,
long  extb,
__complex__ double *  c_x,
const __complex__ double *  a_x,
const __complex__ double *  b_x 
)

References a(), b(), c, and k.

void madness::bgq_mtxmq_padded ( long  dimi,
long  dimj,
long  dimk,
long  extb,
__complex__ double *  c_x,
const __complex__ double *  a_x,
const double *  b_x 
)

References a(), b(), c, k, and xc.

void madness::bgq_mtxmq_padded ( long  dimi,
long  dimj,
long  dimk,
long  extb,
__complex__ double *  c_x,
const double *  a_x,
const __complex__ double *  b_x 
)

References a(), b(), c, and k.

void madness::bgq_mtxmq_padded ( long  dimi,
long  dimj,
long  dimk,
long  extb,
double *  c_x,
const double *  a_x,
const double *  b_x 
)

References a(), b(), c, and k.

template<typename L , typename R , typename opT , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R),NDIM> madness::binary_op ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right,
const opT &  op,
bool  fence = true 
)
template<class T , typename resultT >
BindNullaryMemFun<T,resultT> madness::bind_nullary_mem_fun ( T *  t,
resultT(T::*)()  op 
)
inline

Factory function for BindNullaryMemFun.

References op().

Referenced by madness::FutureImpl< bool >::get().

template<class T , typename resultT >
BindNullaryConstMemFun<T,resultT> madness::bind_nullary_mem_fun ( const T *  t,
resultT(T::*)() const  op 
)
inline

Factory function for BindNullaryConstMemFun.

References op().

int madness::c_rks_vwn5__ ( const double *  r__,
double *  f,
double *  dfdra 
)
int madness::c_uks_vwn5__ ( double *  ra,
double *  rb,
double *  f,
double *  dfdra,
double *  dfdrb 
)
template<typename T >
void madness::change_tensor_type ( GenTensor< T > &  t,
const TensorArgs &  targs 
)
template<typename C >
void madness::check_linear_dependence ( const Tensor< C > &  Q,
Tensor< C > &  c,
const double  rcondtol,
const double  cabsmax 
)

check for subspace linear dependency

if the subspace is linearly dependent the coefficients in c will be highly oscillating.

Parameters
[in]Qthe input matrix for KAIN
[in,out]cthe coefficients for constructing the new solution
[in]rcondtolrcond less than this will cause the subspace to be shrunk due to linear dependence
[in]cabsmaxmaximum element of c greater than this will cause the subspace to be shrunk due to linear dependence

References KAIN(), m, and print().

Referenced by madness::NonlinearSolverND< NDIM >::update(), and madness::XNonlinearSolver< T, C, Alloc >::update().

unsigned long madness::checksum_file ( const char *  filename)

Simple checksum for ASCII characters in file.

References c, and mpfr::sum().

Referenced by test_autoc().

template void madness::cholesky ( Tensor< double > &  A)
template<typename T >
DistributedMatrix< T > madness::column_distributed_matrix ( World &  world,
int64_t  n,
int64_t  m,
int64_t  coltile = 0 
)

Generates an (n,m) matrix distributed by columns (row dimension is not distributed)

Quietly forces an even column tile size for ease of use in the systolic matrix algorithms

Quietly forces an even column tile size for ease of use in the systolic matrix algorithms

Parameters
[in]WorldThe world
[in]nThe column (first) dimension
[in]mThe row (second) dimension
[in]coltileTile size for columns forced to be even (default is to use all processes) A new zero matrix with the requested dimensions and distribution

References m, mpfr::min(), and madness::World::size().

template<typename T , std::size_t NDIM>
void madness::compress ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)
template<typename T , std::size_t NDIM>
void madness::compress ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
unsigned int  blk = 1,
bool  fence = true 
)

Compress a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

template<typename T >
DistributedMatrix< T > madness::concatenate_columns ( const DistributedMatrix< T > &  a,
const DistributedMatrix< T > &  b 
)

Generates a row-distributed matrix with rows of a and b contatenated.

I.e., c[i,j] = a[i,j] if i<ma or b[i-ma,j] if i>=ma

The matrices a and b must have the same row size (i.e., the same number of columns) and be row distributed with the same row tilesze. The result is also row distributed with the same row tilesize as the input matrices.

Parameters
[in]aThe first matrix
[in]bThe second matrix
Returns
The result matrix

References c, madness::DistributedMatrix< T >::coldim(), madness::DistributedMatrix< T >::data(), madness::DistributedMatrix< T >::get_world(), madness::DistributedMatrix< T >::is_row_distributed(), madness::DistributedMatrix< T >::local_size(), madness::DistributedMatrix< T >::rowdim(), and madness::DistributedMatrix< T >::rowtile().

template<typename T >
DistributedMatrix< T > madness::concatenate_rows ( const DistributedMatrix< T > &  a,
const DistributedMatrix< T > &  b 
)

Generates a distributed matrix with rows of a and b concatenated.

Generates a column-distributed matrix with rows of a and b contatenated.

I.e., c[i,j] = a[i,j] if n<na or b[i,j] if j>=na

The matrices a and b must have the same column size (i.e., the same number of rows) and be column distributed with the same column tilesze. The result is also column distributed with the same column tilesize as the input matrices.

I.e., c[i,j] = a[i,j] if j<na or b[i,j-na] if j>=na

The matrices a and b must have the same column size (i.e., the same number of rows) and be column distributed with the same column tilesze. The result is also column distributed with the same column tilesize as the input matrices.

Parameters
[in]aThe first matrix
[in]bThe second matrix
Returns
The result matrix

References c, madness::DistributedMatrix< T >::coldim(), madness::DistributedMatrix< T >::coltile(), madness::DistributedMatrix< T >::data(), madness::DistributedMatrix< T >::get_world(), madness::DistributedMatrix< T >::is_column_distributed(), madness::DistributedMatrix< T >::local_size(), and madness::DistributedMatrix< T >::rowdim().

Referenced by distributed_localize_PM(), and plocalize_boys().

template<typename T >
DistributedMatrix< T > madness::concatenate_rows ( const DistributedMatrix< T > &  a,
const DistributedMatrix< T > &  b,
const DistributedMatrix< T > &  c,
const DistributedMatrix< T > &  d 
)

Generates a column-distributed matrix with rows of a, b, c, and d contatenated in order.

I.e., c[i,j] = a[i,j] if j in [0,na), b[i,j-na] if j in [na,na+nb), c[i,j-na-nb] if j in [na+nb,na+nb+nc), etc. The matrices must have the same column size (i.e., the same number of rows) and be column distributed with the same column tilesze. The result is also column distributed with the same column tilesize as the input matrices.

Parameters
[in]aThe first matrix
[in]bThe second matrix
[in]cThe third matrix
[in]dThe fourth matrix
Returns
The result matrix

References madness::DistributedMatrix< T >::coldim(), madness::DistributedMatrix< T >::coltile(), madness::DistributedMatrix< T >::data(), madness::DistributedMatrix< T >::get_world(), madness::DistributedMatrix< T >::is_column_distributed(), madness::DistributedMatrix< T >::local_size(), and madness::DistributedMatrix< T >::rowdim().

template<typename Q >
Q madness::conditional_conj ( const Q &  coeff)

For real types return value, for complex return conjugate.

References op().

double madness::conj ( double  x)
inline
double madness::conj ( float  x)
inline
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::conj ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

Returns the complex conjugate of the vector of functions.

References copy(), madness::WorldGopInterface::fence(), madness::World::gop, and PROFILE_BLOCK.

template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::conj ( const Function< T, NDIM > &  f,
bool  fence = true 
)
template<typename T , typename Q , std::size_t NDIM>
Function<Q,NDIM> madness::convert ( const Function< T, NDIM > &  f,
bool  fence = true 
)

Type conversion implies a deep copy. No communication except for optional fence.

Works in either basis but any loss of precision may result in different errors in applied in a different basis.

The new function is formed with the options from the default constructor.

There is no automatic type conversion since this is generally a rather dangerous thing and because there would be no way to make the fence optional.

References madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::get_impl(), PROFILE_FUNC, madness::Function< T, NDIM >::set_impl(), and madness::Function< T, NDIM >::verify().

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::copy ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

Returns a deep copy of a vector of functions.

References copy(), madness::WorldGopInterface::fence(), madness::World::gop, and PROFILE_BLOCK.

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::copy ( World &  world,
const Function< T, NDIM > &  v,
const unsigned int  n,
bool  fence = true 
)

Returns a vector of deep copies of of a function.

References copy(), madness::WorldGopInterface::fence(), madness::World::gop, and PROFILE_BLOCK.

template<typename T >
DistributedMatrix<T> madness::copy ( const DistributedMatrix< T > &  A)

Deep copy of content.

Parameters
[in]AThe matrix to be copied
Returns
A new matrix with identical dimensions, distribution and content (deep copy)
template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::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.

Works in either basis. Different distributions imply asynchronous communication and the optional fence is collective.

References madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::get_impl(), PROFILE_FUNC, madness::Function< T, NDIM >::set_impl(), madness::Function< T, NDIM >::verify(), and madness::Function< T, NDIM >::verify_tree().

Referenced by abs(), abs_square(), madness::FunctionNode< T, NDIM >::accumulate(), madness::SeparatedConvolution< T, NDIM >::apply(), madness::SeparatedConvolution< T, NDIM >::apply2(), madness::SeparatedConvolution< T, NDIM >::apply2_lowdim(), madness::Solver< T, NDIM >::apply_potential(), apply_U_mix(), apply_U_ncf(), apply_V(), madness::FunctionImpl< Q, NDIM >::binaryXXa(), calcEpshat(), calcScatField(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), madness::DFT< T, NDIM >::calculate_tot_xc_energy(), madness::FunctionImpl< T, NDIM >::coeffs_for_jun(), madness::FunctionImpl< T, NDIM >::compress_op(), compute_energy(), compute_R2f2_psi(), conj(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), madness::FunctionNode< T, NDIM >::convert(), madness::ConvolutionData1D< Q >::ConvolutionData1D(), copy(), madness::TensorTrain< T >::decompose(), DFTSolventSolver::depsilon_dr(), dft_xc_lda_ene(), dft_xc_lda_V(), madness::DFTNuclearPotentialOp< T, NDIM >::DFTNuclearPotentialOp(), SCF::diag_fock_matrix(), distributed_localize_PM(), madness::SCF::do_plots(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), madness::FunctionImpl< Q, NDIM >::gaxpy_ext_node(), madness::FunctionImpl< Q, NDIM >::gaxpy_ext_recursive(), gelss(), gesv(), madness::HartreeFock< T, NDIM >::get_coulomb_potential(), madness::SCF::get_fock_transformation(), madness::Convolution1D< Q >::get_rnlp(), GMRES(), madness::FunctionImpl< Q, NDIM >::inner_ext_recursive(), MolecularSystem::load(), madness::SCF::load_mos(), loadbal(), SCF::localize_boys(), main(), DFTSolventSolver::make_characteristic_func(), DFTSolventSolver::make_depsilon_drho(), DFTSolventSolver::make_epsilon(), madness::SCF::make_lda_potential(), madness::Solver< T, NDIM >::make_lda_potential(), DFTSolventSolver::make_normconst(), madness::Solver< T, NDIM >::make_nuclear_potential_impl(), make_potential(), DFTSolventSolver::make_ratioepsilon(), DFTSolventSolver::make_repsilon(), DFTSolventSolver::make_surface(), madness::TwoElectronInterface< double, 6 >::map_coeff(), map_tensor(), madness::Convolution1D< Q >::mod_nonstandard(), madness::FunctionImpl< Q, NDIM >::mul(), madness::FunctionImpl< T, NDIM >::multiply(), multiply_by_V(), madness::FunctionImpl< Q, NDIM >::mulXXa(), madness::FunctionImpl< Q, NDIM >::mulXXveca(), madness::XCFunctionalLDA< T, NDIM >::op_r(), madness::StrongOrthogonalityProjector< double, 3 >::operator()(), madness::FunctionImpl< T, NDIM >::do_truncate_NS_leafs::operator()(), madness::FunctionImpl< T, NDIM >::do_keep_sum_coeffs::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::FunctionImpl< T, NDIM >::do_mapdim::operator()(), madness::FunctionImpl< T, NDIM >::add_op::operator()(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::DistributedMatrix< double >::operator+(), madness::tr1::array::array< real_tensor, 118 >::operator=(), madness::FunctionNode< T, NDIM >::operator=(), madness::Vector< int, 3 >::operator=(), madness::FunctionImpl< T, NDIM >::project_refine_op(), propagate(), madness::SCF::propagate(), FrequencyHandler::read_file(), madness::FunctionImpl< T, NDIM >::reconstruct_op(), reconstruct_psi(), reduce(), madness::FunctionImpl< Q, NDIM >::refine_op(), madness::FunctionImpl< T, NDIM >::refine_to_common_level(), madness::FunctionDefaults< NDIM >::set_cell(), AtomicBasis::set_guess_info(), madness::AtomicBasis::set_guess_info(), madness::QuasiNewton::set_hessian(), solve(), madness::Solver< T, NDIM >::Solver(), square(), madness::archive::ArchiveStoreImpl< Archive, GenTensor< T > >::store(), madness::archive::ArchiveStoreImpl< Archive, Tensor< T > >::store(), madness::FunctionImpl< T, NDIM >::sum_down_spawn(), svd(), Test5(), Test7(), test_adaptive_tree(), test_cholesky(), test_compress(), test_qr(), test_recursive_application(), test_truncation(), test_U_el(), madness::FunctionImpl< T, NDIM >::tnorm(), transform_dir(), transpose(), trotter(), madness::TensorTrain< T >::truncate(), madness::FunctionImpl< T, NDIM >::truncate_reconstructed_op(), two_scale_coefficients(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), madness::Vector< int, 3 >::Vector(), and madness::FunctionImpl< Q, NDIM >::vtransform().

template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::copy ( const Function< T, NDIM > &  f,
bool  fence = true 
)

Create a new copy of the function with the same distribution and optional fence.

References copy(), madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::get_pmap(), and PROFILE_FUNC.

AmArg* madness::copy_am_arg ( const AmArg &  arg)
inline
double madness::cpu_frequency ( )

Estimates frequency of the processor in Hz.

First call may take about 0.1s to execute. Subsequent calls return value cached from the first call so does not respond to changing processor frequency.

If cycle_count() is returning wall_time() in nanoseconds this will return 1GHz.

If not available returns 0.

References wall_time().

Referenced by main(), startup(), and madness::World::World().

void madness::cpu_relax ( )
inline
std::shared_ptr<NuclearCorrelationFactor> madness::create_nuclear_correlation_factor ( World &  world,
const SCF calc 
)

create and return a new nuclear correlation factor

Parameters
[in]worldthe world
[in]calcthe calculation as read from the input file
Returns
a nuclear correlation factor

References a(), lowercase(), MADNESS_EXCEPTION, madness::SCF::molecule, madness::CalculationParameters::nuclear_corrfac, madness::SCF::param, madness::SCF::potentialmanager, print(), and madness::World::rank().

Referenced by madness::Nemo::Nemo().

template<class T >
detail::ReferenceWrapper<const T> const madness::cref ( const T &  t)
inline

Constant reference wrapper factory function.

Template Parameters
TThe reference type (without const)
Parameters
tThe object to be wrapped
Returns
Constant reference wrapper object
template<size_t NDIM>
Key<NDIM> madness::displacement ( const Key< NDIM > &  source,
const Key< NDIM > &  target 
)

given a source and a target, return the displacement in translation

Parameters
[in]sourcethe source key
[in]targetthe target key
Returns
disp such that target = source + disp

References madness::Key< NDIM >::level(), and madness::Key< NDIM >::translation().

double madness::distance ( double  a,
double  b 
)
inline

Default function for computing the distance between two doubles.

References distance(), and sqrt().

template<typename T >
double madness::distance ( std::complex< T > &  a,
std::complex< T > &  b 
)
inline

Default function for computing the distance between two complex numbers.

References distance().

distmatT madness::distributed_localize_PM ( World &  world,
const vecfuncT mo,
const vecfuncT ao,
const std::vector< int > &  set,
const std::vector< int > &  at_to_bf,
const std::vector< int > &  at_nbf,
const double  thresh = 1e-9,
const double  thetamax = 0.5,
const bool  randomize = true,
const bool  doprint = false 
)
template<typename funcT >
funcT::returnT madness::do_adq ( double  lo,
double  hi,
const funcT &  func,
int  n,
const double *  x,
const double *  w 
)

References func(), and mpfr::sum().

Referenced by adq1().

madness::DPEC ( int  ,
int  ,
int   
)
madness::DPEC ( long  ,
long  ,
long   
)
madness::DPEC ( float  ,
float  ,
float   
)
madness::DPEC ( double  ,
double  ,
double   
)
madness::DPEC ( float_complex  ,
float_complex  ,
float_complex   
)
madness::DPEC ( double_complex  ,
double_complex  ,
double_complex   
)
void madness::drot ( long  n,
double *restrict  a,
double *restrict  b,
double  s,
double  c,
long  inc 
)

Simple (?) version of BLAS-1 DROT(N, DX, INCX, DY, INCY, DC, DS)

Referenced by madness::LocalizeBoys< T >::kernel(), SCF::localize_boys(), SCF::localize_PM_task_kernel(), and main().

void madness::drot3 ( long  n,
double *restrict  a,
double *restrict  b,
double  s,
double  c,
long  inc 
)

Referenced by SCF::localize_boys().

double madness::dsmoothed_potential ( double  r)
void madness::end_papi_measurement ( )
inline

Referenced by print_stats().

static void madness::END_TIMER ( World &  world,
const char *  msg 
)
void madness::error ( const char *  msg)
void madness::exception_break ( bool  )

This function is executed just before a madness exception is thrown.

Implemented in world.cc

template<typename T >
void madness::fast_transpose ( long  n,
long  m,
const T *  a,
T *restrict  b 
)
inline

a(n,m) –> b(m,n) ... optimized for smallish matrices

References a(), a1, a2, m, restrict, and std::tr1::T().

Referenced by madness::Convolution1D< Q >::mod_nonstandard(), and madness::Convolution1D< Q >::nonstandard().

template<typename T , std::size_t NDIM>
Tensor< T > madness::fcube ( const Key< NDIM > &  key,
T(*)(const Vector< double, NDIM > &)  f,
const Tensor< double > &  qx 
)
template<typename T , std::size_t NDIM>
Tensor<T> madness::fcube ( const Key< NDIM > &  key,
const FunctionFunctorInterface< T, NDIM > &  f,
const Tensor< double > &  qx 
)

References fcube(), and NDIM.

template<typename T , std::size_t NDIM>
void madness::fcube ( const Key< NDIM > &  key,
const FunctionFunctorInterface< T, NDIM > &  f,
const Tensor< double > &  qx,
Tensor< T > &  fval 
)

return the values of a Function on a grid

Parameters
[in]keythe key indicating where the quadrature points are located
[in]fthe interface to the elementary function
[in]qxquadrature points on a level=0 box
[out]fvalvalues

References c, f, madness::FunctionDefaults< NDIM >::get_cell(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::Key< NDIM >::level(), m, MADNESS_EXCEPTION, NDIM, PROFILE_MEMBER_FUNC, madness::FunctionFunctorInterface< T, NDIM >::screened(), madness::FunctionFunctorInterface< T, NDIM >::supports_vectorized(), std::tr1::T(), madness::Key< NDIM >::translation(), and vec().

void madness::finalize ( )
template<std::size_t NDIM, typename opT >
void madness::foreach_child ( const Key< NDIM > &  parent,
opT &  op 
)
inline

Applies op(key) to each child key of parent.

References op().

template<std::size_t NDIM, typename objT >
void madness::foreach_child ( const Key< NDIM > &  parent,
objT *  obj,
void(objT::*)(const Key< NDIM > &)  memfun 
)
inline

Applies member function of obj to each child key of parent.

void madness::free_am_arg ( AmArg *  arg)
inline

Frees an AmArg allocated with alloc_am_arg.

References arg().

Referenced by madness::detail::PendingMsg::invokehandler().

template<typename T , std::size_t NDIM>
Derivative<T,NDIM> madness::free_space_derivative ( World &  world,
int  axis,
int  k = FunctionDefaults<NDIM>::get_k() 
)

Convenience function returning derivative operator with free-space boundary conditions.

References BC_FREE.

template<typename Q , int NDIM>
Function<std::complex<Q>,NDIM> madness::function_real2complex ( const Function< Q, NDIM > &  r)

References unary_op_coeffs().

bool madness::gauss_legendre ( int  n,
double  xlo,
double  xhi,
double *  x,
double *  w 
)

Return precomputed (most accurate) or if not available computed (not quite as accurate) points and weights for Gauss Legendre quadrature rule on the specified interval.

References gauss_legendre_numeric().

Referenced by madness::FunctionCommonData< T, NDIM >::_init_quadrature(), adq(), madness::Convolution1D< Q >::Convolution1D(), gauss_legendre_test(), and madness::SpectralPropagator::SpectralPropagator().

bool madness::gauss_legendre_numeric ( int  n,
double  xlo,
double  xhi,
double *  x,
double *  w 
)

Compute the Gauss-Legendre quadrature points and weights.

Return in x and w, which should be arrays of n elements, the points and weights for the n-point Gauss Legendre quadrature rule in [xlo,xhi].

!!!! This routine delivers accurate points, but some weights are accurate only to about 1e-13 for higher order rules. Need a more intelligent way to compute them. See internal comments for more info.

References mpfr::atan(), mpfr::cos(), delta, k, legendre_polynomials(), pi, and scale().

Referenced by gauss_legendre().

bool madness::gauss_legendre_test ( bool  print)

Check error in numerical integ(x+x^2+...+x^(2n-1),x=0..1) using n-pt rule.

References gauss_legendre().

Referenced by startup().

template<typename T , typename Q , typename R , std::size_t NDIM>
void madness::gaxpy ( World &  world,
alpha,
std::vector< Function< T, NDIM > > &  a,
beta,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true 
)
template<typename T , typename Q , typename R , std::size_t NDIM>
void madness::gaxpy ( World &  world,
alpha,
std::vector< Function< T, NDIM > > &  a,
beta,
const std::vector< Function< R, NDIM > > &  b,
unsigned int  blk = 1,
bool  fence = true 
)

Generalized A*X+Y for vectors of functions -— a[i] = alpha*a[i] + beta*b[i].

References a(), b(), compress(), madness::WorldGopInterface::fence(), gaxpy(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R),NDIM> madness::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.

References madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::gaxpy_oop(), and PROFILE_FUNC.

template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::gaxpy_oop_reconstructed ( const double  alpha,
const Function< T, NDIM > &  left,
const double  beta,
const Function< T, NDIM > &  right,
const bool  fence = true 
)
template void madness::gelss ( const Tensor< double > &  a,
const Tensor< double > &  b,
double  rcond,
Tensor< double > &  x,
Tensor< Tensor< double >::scalar_type > &  s,
long &  rank,
Tensor< Tensor< double >::scalar_type > &  sumsq 
)
template void madness::gelss ( const Tensor< double_complex > &  a,
const Tensor< double_complex > &  b,
double  rcond,
Tensor< double_complex > &  x,
Tensor< Tensor< double_complex >::scalar_type > &  s,
long &  rank,
Tensor< Tensor< double_complex >::scalar_type > &  sumsq 
)
template<class T , class Q >
GenTensor<TENSOR_RESULT_TYPE(T,Q)> madness::general_transform ( const GenTensor< T > &  t,
const Tensor< Q >  c[] 
)

Transform all dimensions of the tensor t by distinct matrices c.

Similar to transform but each dimension is transformed with a distinct matrix.

result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c[0](i',i) c[1](j',j) c[2](k',k) ...

The first dimension of the matrices c must match the corresponding dimension of t.

Referenced by madness::FunctionImpl< T, NDIM >::downsample(), madness::FunctionImpl< Q, NDIM >::fcube_for_mul(), madness::GenTensor< T >::general_transform(), madness::FunctionImpl< Q, NDIM >::NS_fcube_for_mul(), and madness::FunctionImpl< T, NDIM >::upsample().

template<class T >
GenTensor<T> madness::general_transform ( const GenTensor< T > &  t,
const Tensor< T >  c[] 
)
template<typename T >
void madness::geqp3 ( Tensor< T > &  A,
Tensor< T > &  tau,
Tensor< integer > &  jpvt 
)

Compute the QR factorization.

Q is returned in the lapack-specific format

References geqp3_result(), m, mpfr::min(), TENSOR_ASSERT, and transpose().

template void madness::geqp3 ( Tensor< double > &  A,
Tensor< double > &  tau,
Tensor< integer > &  jpvt 
)
template<typename T >
void madness::geqp3_result ( Tensor< T > &  A,
Tensor< T > &  tau,
Tensor< integer > &  jpvt,
Tensor< T > &  work 
)

References dgeqp3_(), m, and TENSOR_ASSERT.

Referenced by geqp3().

template void madness::gesv ( const Tensor< double > &  a,
const Tensor< double > &  b,
Tensor< double > &  x 
)
template void madness::gesv ( const Tensor< double_complex > &  a,
const Tensor< double_complex > &  b,
Tensor< double_complex > &  x 
)
template<typename T >
void madness::gesvp ( World &  world,
const Tensor< T > &  a,
const Tensor< T > &  b,
Tensor< T > &  x 
)

References gesv().

Referenced by madness::SCF::analyze_vectors().

const AtomicData & madness::get_atomic_data ( unsigned int  atomic_number)
double madness::get_charge_from_file ( const std::string  filename,
unsigned int  atype 
)
const long long* madness::get_papi_measurement ( )
inline

Referenced by print_stats().

template<typename ptrT >
ptrT * madness::get_pointer ( const ScopedPtr< ptrT > &  p)
inline

Same as p.get()

Template Parameters
ptrTThe pointer type
Parameters
pThe pointer

References madness::ScopedPtr< ptrT >::get().

template<typename ptrT >
ptrT * madness::get_pointer ( const ScopedArray< ptrT > &  p)
inline

Same as p.get()

Template Parameters
ptrTThe pointer type
Parameters
pThe pointer
Exceptions
nothing
template<class T >
T* madness::get_pointer ( const detail::ReferenceWrapper< T > &  r)
inline

Function for retreaving a pointer to the referenced object.

Template Parameters
Thereference type
Parameters
tThe ReferenceWrapper object
Returns
A reference to the original objects

References madness::detail::ReferenceWrapper< T >::get_pointer().

template<typename T , std::size_t NDIM>
double madness::get_size ( World &  world,
const std::vector< Function< T, NDIM > > &  v 
)

References std::tr1::T().

Referenced by madness::TDA::memwatch().

template<typename T , typename real_type , typename scalar_type >
void madness::GMRES ( const AbstractVectorSpace< T, real_type, scalar_type > &  space,
const Operator< T > &  op,
const T &  b,
T &  x,
int &  maxiters,
real_type &  resid_thresh,
real_type &  update_thresh,
const bool  outp = false 
)

A GMRES solver routine for linear systems, $ \mathbf{A} \vec{x} = \vec{b} $.

Requires the vector space, the operator, A, the inhomogeneity b, an initial guess x, the maximum number of iterations, the convergence threshold for the solution residual, the convergence threshold for the norm of the update vector, and a flag for producing output.

The vector space object provides a standard way to compute the needed linear algebra operations (norm, inner product, etc.).

The printed output, if desired, shows iteration number, the residual, the norm of the change in solution vectors from one iteration to the next, and the effective rank of the GMRES matrix at that iteration.

On output, x has the computed solution, resid_thresh has its residual, update_thresh has the latest updatenorm, and maxiters has the number of iterations needed.

Parameters
[in]spaceThe AbstractVectorSpace interface for the type
[in]opThe Operator $\mathbf{A}$
[in]bThe right-hand-side vector $\vec{b}$
[in,out]xInput: The initial guess for $\vec{x}$. Output: The computed solution for $\vec{x}$.
[in,out]maxitersInput: Maximum number of iterations to perform. Output: Actual iterations performed.
[in,out]resid_threshInput: Convergence threshold for the residual $||\mathbf{A} \vec{x} - \vec{b}||$. Output: The residual after the final iteration.
[in,out]update_threshInput: Convergence threshold for the update vector $|| \vec{x}_{iter} - \vec{x}_{iter-1}||$. Output: The value after the final iteration.
[in]outpTrue if output to stdout is desired, false otherwise, defaults to false if unspecified.

References madness::Operator< T >::applyOp(), copy(), madness::AbstractVectorSpace< T, real_type, scalar_type >::destroy(), madness::AbstractVectorSpace< T, real_type, scalar_type >::gaxpy(), gelss(), imag(), madness::AbstractVectorSpace< T, real_type, scalar_type >::inner(), madness::AbstractVectorSpace< T, real_type, scalar_type >::norm(), norm(), madness::World::rank(), real(), madness::AbstractVectorSpace< T, real_type, scalar_type >::scale(), sqrt(), std::tr1::T(), V(), and madness::AbstractVectorSpace< T, real_type, scalar_type >::world.

Referenced by calcScatField(), and main().

void madness::gprofexit ( int  id,
int  nproc 
)

Rename gmon.out for each process by ordering process termination.

Invoke with id and nproc as rank and size in MPI::COMM_WORLD

template<typename T , std::size_t NDIM>
std::vector< std::shared_ptr< Derivative<T,NDIM> > > madness::gradient_operator ( World &  world,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)

Convenience function returning vector of derivative operators implementing grad ( $ \nabla $)

This will only work for BC_ZERO, BC_PERIODIC, BC_FREE and BC_ZERONEUMANN since we are not passing in any boundary functions.

References BC_DIRICHLET, BC_NEUMANN, and NDIM.

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 
)
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 
)
template<typename T >
bool madness::has_zero_rank ( const GenTensor< T > &  g)
template<class T >
void madness::hash_combine ( hashT &  seed,
const T &  v 
)
inline

Combine hash values.

This function uses the standard hash function.

Template Parameters
TThe type to hash
Parameters
[in,out]seedThe initial hash seed value
[in]vThe value to be hashed

References madness::detail::combine_hash().

Referenced by madness::GaussianConvolution1DCache< Q >::get(), and madness::Key< OPDIM >::rehash().

template<class It >
void madness::hash_range ( hashT &  seed,
It  first,
It  last 
)
inline

Combine the hash values of an iterator range.

Template Parameters
Itthe iterator type
Parameters
[in,out]seedThe initial hash seed value
[in]firstThe first element of the iterator range to be hashed
[in]lastThe end of the iterator range to be hashed

References madness::detail::combine_hash().

Referenced by hash_range(), and hash_value().

template<class It >
hashT madness::hash_range ( It  first,
It  last 
)
inline

Combine the hash values of an iterator range.

Template Parameters
Itthe iterator type
Parameters
[in]firstThe first element of the iterator range to be hashed
[in]lastThe end of the iterator range to be hashed
Returns
The hashed iterator range

References hash_range().

template<class T , std::size_t n>
hashT madness::hash_range ( const T(&)  t[n])
inline

Combine the hash values of a C-style array.

Template Parameters
TThe type to be hashed
nThe size of the C-style array
Parameters
[in]tThe array to be hashed
Returns
The hashed array value

References hash_range().

template<class T , std::size_t n>
void madness::hash_range ( hashT &  seed,
const T(&)  t[n] 
)
inline

Combine the hash values of a C-style array.

Template Parameters
TThe type to be hashed
nThe size of the C-style array
Parameters
[in,out]seedThe initial hash seed value
[in]tThe array to be hashed
Note
This function uses std::hash

References hash_range().

template<class T >
enable_if<std::is_fundamental<T> >::type madness::hash_range ( hashT &  seed,
const T *  t,
std::size_t  n 
)
inline

Combine the hash values of a pointer range.

Template Parameters
TThe type to be hashed
Parameters
[in,out]seedThe initial hash seed value
[in]tA pointer to the beginning of the range to be hashed
[in]nThe number of elements to hashed
Note
May use heavily optimized hashword when n * sizeof(T) is multiple of sizeof(uint32_t) and presumably correctly aligned.

References hashlittle(), hashword(), and std::tr1::T().

template<class T >
disable_if<std::is_fundamental<T> >::type madness::hash_range ( hashT &  seed,
const T *  t,
std::size_t  n 
)
inline

Combine the hash values of a pointer range.

Template Parameters
TThe type to be hashed
Parameters
[in,out]seedThe initial hash seed value
[in]tA pointer to the beginning of the range to be hashed
[in]nThe number of elements to hashed

References hash_range().

template<class T >
hashT madness::hash_range ( const T *  t,
std::size_t  n 
)
inline

Combine the hash values of a pointer range.

Template Parameters
TThe type to be hashed
Parameters
tA pointer to the beginning of the range to be hashed
nThe number of elements to hashed
Returns
The hashed pointer range value

References hash_range().

template<typename T , std::size_t N>
madness::hashT madness::hash_value ( const std::array< T, N > &  a)
hashT madness::hash_value ( const uniqueidT &  id)
inline
template<class T >
enable_if_c<std::is_fundamental<T>::value && ((sizeof(T)%sizeof(uint32_t)) == 0), hashT>::type madness::hash_value ( const T  t)
inline

Hash a single fundamental object.

Template Parameters
TThe fundamental type
Parameters
tThe object to hash
Returns
The hashed value
Note
Use heavily optimized hashword when sizeof(T) is multiple of sizeof(uint32_t) and presumably correctly aligned.

References hashword(), and std::tr1::T().

template<class T >
madness::enable_if_c<std::is_fundamental<T>::value && ((sizeof(T)%sizeof(uint32_t)) != 0), hashT>::type madness::hash_value ( const T  t)
inline

Hash a single fundamental object.

Template Parameters
TThe fundamental type
Parameters
tThe object to hash
Returns
The hashed value

References hashlittle(), and std::tr1::T().

template<typename T >
hashT madness::hash_value ( const T *  t)
inline

Hash a pointer address.

Template Parameters
TThe pointer type
Parameters
tThe pointer to be hashed
Returns
The hashed value

References hash_value().

template<typename T >
enable_if_c<!(std::is_fundamental<T>::value || std::is_pointer<T>::value || std::is_array<T>::value), hashT>::type madness::hash_value ( const T &  t)
inline

Hash a class object.

Template Parameters
TThe class type
Parameters
tThe object to hash
Returns
t.hash()
template<typename T >
hashT madness::hash_value ( const std::basic_string< T > &  t)
inline

Hash a string.

Template Parameters
TThe character type
Parameters
tThe string to hash
Returns
The hashed value of the string

References hash_range().

template<typename T >
DistributedMatrix<T> madness::idMatrix ( const DistributedMatrix< T > &  A)
static double madness::imag ( double  x)
inline
template<typename Q , int NDIM>
Function<typename TensorTypeData<Q>::scalar_type,NDIM> madness::imag ( const Function< Q, NDIM > &  func)

References unary_op_coeffs().

template<std::size_t NDIM>
Function<double,NDIM> madness::imag ( const Function< double_complex, NDIM > &  z,
bool  fence = true 
)

Returns a new function that is the imaginary part of the input.

References madness::Function< T, NDIM >::fence(), and madness::Function< T, NDIM >::unary_op_coeffs().

World & madness::initialize ( int &  argc,
char **&  argv 
)

Initialize the MADNESS runtime.

Call this once at the very top of your main program to initialize the MADNESS runtime. Call this function instead of MPI_Init() or MPI_Init_thread() .

Parameters
argcApplication argument count
argvApplication argument values
Returns
A reference to the default world which is constructed with MPI_COMM_WORLD .

References SafeMPI::COMM_WORLD.

Referenced by initialize(), main(), test_G_R_vectors(), test_gaussian_num_coeffs(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), and testNavierStokes().

World & madness::initialize ( int &  argc,
char **&  argv,
const MPI_Comm comm 
)

Initialize the MADNESS runtime.

Call this once at the very top of your main program to initialize the MADNESS runtime. Call this function instead of MPI_Init() or MPI_Init_thread() .

Parameters
argcApplication argument count
argvApplication argument values
commThe MPI communicator that should be used to construct the default World object.
Returns
A reference to the default world which is constructed with comm .

References initialize().

World & madness::initialize ( int &  argc,
char **&  argv,
const SafeMPI::Intracomm comm 
)

Initialize the MADNESS runtime.

Call this once at the very top of your main program to initialize the MADNESS runtime. Call this function instead of MPI_Init() or MPI_Init_thread() .

Parameters
argcApplication argument count
argvApplication argument values
commThe communicator that should be used to construct the default World object.
Returns
A reference to the default world which is constructed with comm .

References madness::RMI::begin(), madness::ThreadPool::begin(), begin_papi_measurement(), SafeMPI::COMM_WORLD, madness::detail::WorldMpi::initialize(), initialize_papi(), MAD_BIND_DEFAULT, MADNESS_EXCEPTION, MADNESS_MPI_THREAD_LEVEL, madness::ThreadBase::set_affinity(), madness::ThreadBase::set_affinity_pattern(), madness::ThreadPool::size(), and wall_time().

void madness::initialize_legendre_stuff ( )

Call this single threaded to initialize static data (used read only by multiple threads)

References sqrt().

Referenced by startup().

void madness::initialize_papi ( )
inline

Referenced by initialize().

bool madness::initialized ( )
template<typename T , std::size_t NDIM>
T madness::inner ( const vecfunc< T, NDIM > &  a,
const vecfunc< T, NDIM > &  b 
)

the non-linear solver requires an inner product

References madness::vecfunc< T, NDIM >::world, and madness::vecfunc< T, NDIM >::x.

Referenced by madness::SCF::analyze_vectors(), madness::Solver< T, NDIM >::apply_hf_exchange3(), madness::Solver< T, NDIM >::apply_hf_exchange4(), SCF::apply_potential(), madness::SCF::apply_potential(), madness::Solver< T, NDIM >::apply_potential(), belkic(), madness::HartreeFock< T, NDIM >::calculate_coulomb_energy(), madness::HartreeFock< T, NDIM >::calculate_exchange_energy(), madness::HartreeFock< T, NDIM >::calculate_ke_sp(), madness::DFT< T, NDIM >::calculate_ke_sp(), madness::Solver< T, NDIM >::calculate_kinetic_energy(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), compareGroundState(), compute_energy(), compute_energy_with_U(), madness::MP2::compute_gQf(), compute_R2f2_psi(), converge(), converge2s(), madness::PotentialManager::core_projection(), madness::SCF::core_projection(), madness::PotentialManager::core_projector_derivative(), madness::SCF::core_projector_derivative(), madness::SCF::derivatives(), SCF::diag_fock_matrix(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), energy(), madness::TensorTrain< T >::fusedim(), general_transform(), madness::SCF::get_fock_transformation(), madness::Solver< T, NDIM >::gram_schmidt(), inner(), iterate(), iterate_ground(), iterate_xy(), madness::LocalizeBoys< T >::kernel(), kinetic_energy_matrix_slow(), main(), madness::TwoElectronInterface< double, 6 >::make_coeff(), madness::EigSolver< T, NDIM >::matrix_element(), SCF::matrix_exponential(), madness::SCF::matrix_exponential(), madness::Solver< T, NDIM >::matrix_exponential(), moments(), madness::EigSolver< T, NDIM >::multi_solve(), madness::FunctionImpl< Q, NDIM >::NScoeffs2values(), madness::Projector< double, 3 >::operator()(), madness::StrongOrthogonalityProjector< double, 3 >::operator()(), Molecule::orient(), madness::Molecule::orient(), ortho3(), ortho5(), orthogonalize(), print_info(), madness::EigSolver< T, NDIM >::print_matrix_elements(), print_stats(), projectPsi(), projectZdip(), propagate(), madness::SCF::propagate(), Q3(), madness::Solver< T, NDIM >::Q3(), madness::TensorTrain< T >::reconstruct(), reconstruct_psi(), madness::Convolution1D< Q >::rnlij(), madness::EigSolver< T, NDIM >::solve(), madness::SCF::solve(), madness::TDA_DFT::TDA_DFT(), Test7(), test_adaptive_tree(), test_cholesky(), test_gelss(), test_gesv(), test_modified(), test_qr(), test_recursive_application(), test_syev(), test_sygv(), test_two_scale_coefficients(), test_U_el(), test_wannier(), testIntegral(), transform(), transform_dir(), madness::TensorTrain< T >::truncate(), madness::TensorTrain< T >::two_mode_representation(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), and madness::FunctionImpl< Q, NDIM >::values2NScoeffs().

template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > madness::inner ( World &  world,
const std::vector< Function< T, NDIM > > &  f,
const std::vector< Function< R, NDIM > > &  g 
)

Computes the element-wise inner product of two function vectors - q(i) = inner(f[i],g[i])

References compress(), f, madness::WorldGopInterface::fence(), madness::WorldTaskQueue::fence(), g, madness::World::gop, m, PROFILE_BLOCK, madness::WorldGopInterface::sum(), and madness::World::taskq.

template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > madness::inner ( World &  world,
const Function< T, NDIM > &  f,
const std::vector< Function< R, NDIM > > &  g 
)
return f madness::inner ( )
template<typename T >
DistributedMatrix< T > madness::interleave_rows ( const DistributedMatrix< T > &  a,
const DistributedMatrix< T > &  b 
)

Generates a distributed matrix with rows of a and b interleaved.

I.e., the even rows of the result will be rows of a , and the odd rows those of b .

The matrices a and b must have the same dimensions and be identically distributed. The result will have a doubled column dimension and column tile size. The row dimension is unchanged.

I.e., the even rows of the result will be rows of a , and the odd rows those of b .

The matrices a and b must have the same dimensions and be identically distributed. The result will have a doubled column dimension and column tile size. The row dimension is unchanged.

Parameters
[in]aThe matrix providing even rows of the result
[in]bThe matrix providing odd rows of the result
Returns
The result matrix

References c, madness::DistributedMatrix< T >::coldim(), madness::DistributedMatrix< T >::coltile(), madness::DistributedMatrix< T >::data(), madness::DistributedMatrix< T >::get_world(), madness::DistributedMatrix< T >::rowdim(), and madness::DistributedMatrix< T >::rowtile().

void madness::legendre_polynomials ( double  x,
long  order,
double *  p 
)

Evaluate the Legendre polynomials up to the given order at x in [-1,1].

p should be an array of order+1 elements.

Referenced by gauss_legendre_numeric(), and legendre_scaling_functions().

void madness::legendre_scaling_functions ( double  x,
long  k,
double *  p 
)
void madness::load_balance ( const real_function_6d f,
const bool  leaf 
)

do some load-balancing

Parameters
[in]fthe function we want to distribute evenly
[in]leafif true: weigh leaf nodes only; if false: weigh internal nodes only

References madness::LoadBalanceDeux< NDIM >::add_tree(), madness::FunctionDefaults< NDIM >::redistribute(), and madness::Function< T, NDIM >::world().

Referenced by converge(), madness::MP2::increment(), propagate(), and madness::MP2::solve_residual_equations().

void madness::load_coeffs ( World &  world,
const char *  dir 
)

Collective routine to load and cache twoscale & autorrelation coefficients.

Only process rank 0 will access the files.

References madness::WorldGopInterface::broadcast(), madness::World::gop, and madness::World::rank().

Referenced by startup().

void madness::load_quadrature ( World &  world,
const char *  dir 
)

Collective routine to pre-load and cache the quadrature points and weights.

Only process rank 0 will access the file.

References madness::WorldGopInterface::broadcast(), madness::WorldGopInterface::fence(), madness::World::gop, and madness::World::rank().

Referenced by startup().

std::string madness::lowercase ( const std::string &  s)
template<typename T >
void madness::lq ( Tensor< T > &  A,
Tensor< T > &  R 
)

compute the LQ decomposition of the matrix A = L Q

LQ decomposition.

Parameters
[in,out]Aon entry the (n,m) matrix to be decomposed on exit the Q matrix
[out]Lthe (n,n) matrix L (square form)

References lq_result(), m, mpfr::min(), and TENSOR_ASSERT.

Referenced by test_qr(), and madness::TensorTrain< T >::truncate().

template void madness::lq ( Tensor< double > &  A,
Tensor< double > &  L 
)
template<typename T >
void madness::lq_result ( Tensor< T > &  A,
Tensor< T > &  R,
Tensor< T > &  tau,
Tensor< T > &  work,
bool  do_qr 
)

compute the LQ decomposition of the matrix A = L Q

Parameters
[in,out]Aon entry the (n,m) matrix to be decomposed on exit the Q matrix
[out]Lthe (n,n) matrix L (square form)

References dgeqrf_(), dorgqr_(), k, m, std::tr1::T(), and TENSOR_ASSERT.

Referenced by lq(), and qr().

template<typename ptrT , typename deleterT >
DeferredDeleter<ptrT,deleterT> madness::make_deferred_deleter ( World &  w,
deleterT  d 
)
inline

Make a defered deleter object for use with std::shared_ptr.

The following must be valid:

T* p = new T(/* arguments here */);
d(p);
Template Parameters
ptrTThe pointer type that the deleter function will delete
deleterTThe deleter function type. This may be a functor or a function pointer type.
Parameters
wThe world object that will be responsible for deleting the pointer at global sync points.
dThe deleter function pointer or functor
Note
A copy of the deleter is stored in the deferred deleter.
template<typename ptrT >
DeferredDeleter<ptrT> madness::make_deferred_deleter ( World &  w)
inline

Make a defered deleter object for use with std::shared_ptr.

The pointer passed to the defered deleter will be deleted with the delete operator.

Template Parameters
ptrTThe pointer type that the deleter function will delete pointer type.
Parameters
wThe world object that will be responsible for deleting the pointer at global sync points.
template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::mapdim ( const Function< T, NDIM > &  f,
const std::vector< long > &  map,
bool  fence = true 
)

Generate a new function by reordering dimensions ... optional fence.

You provide an array of dimension NDIM that maps old to new dimensions according to

newdim = mapdim[olddim]

Works in either scaling function or wavelet basis.

Would be easy to modify this to also change the procmap here if desired but presently it uses the same procmap as f.

References madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::mapdim(), and PROFILE_FUNC.

Referenced by madness::MP2::swap_particles().

double madness::mask1 ( double  x)
inline

Referenced by mask3().

template<typename T , std::size_t NDIM>
void madness::matrix_inner ( DistributedMatrix< T > &  A,
const std::vector< Function< T, NDIM > > &  f,
const std::vector< Function< T, NDIM > > &  g,
bool  sym = false 
)
template<typename T , std::size_t NDIM>
DistributedMatrix<T> madness::matrix_inner ( const DistributedMatrixDistribution &  d,
const std::vector< Function< T, NDIM > > &  f,
const std::vector< Function< T, NDIM > > &  g,
bool  sym = false 
)
template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > madness::matrix_inner ( World &  world,
const std::vector< Function< T, NDIM > > &  f,
const std::vector< Function< R, NDIM > > &  g,
bool  sym = false 
)

Computes the matrix inner product of two function vectors - q(i,j) = inner(f[i],g[j])

For complex types symmetric is interpreted as Hermitian.

The current parallel loop is non-optimal but functional.

References compress(), conj(), f, madness::WorldGopInterface::fence(), g, madness::World::gop, m, PROFILE_BLOCK, and madness::WorldGopInterface::sum().

template<typename T >
detail::MoveWrapper<T> madness::move ( T &  t)

Move wrapper factory function.

Construct a move wrapper for a movable object.

Template Parameters
TThe wrapped object type
Parameters
tThe obect to be wrapped
Returns
MoveWrapper for t.
template<typename T >
const T& madness::move ( const T &  t)

Move wrapper factory function.

Const objects are not movable so they are not placed in a move wrapper.

Template Parameters
TThe object type
Parameters
tThe obect
Returns
A const reference to t .
template<typename aT , typename bT , typename cT >
void madness::mTxmq ( long  dimi,
long  dimj,
long  dimk,
cT *restrict  c,
const aT *  a,
const bT *  b 
)

Matrix = Matrix transpose * matrix ... reference implementation Does C=AT*B whereas mTxm does C=C+AT*B. It also supposed to be fast which it achieves thru restrictions

  • All dimensions even
  • All pointers aligned
    c(i,j) = sum(k) a(k,i)*b(k,j) <------ does not accumulate into C

References a(), and k.

Referenced by fast_transform(), and main().

template<typename aT , typename bT , typename cT >
void madness::mTxmq_padding ( long  dimi,
long  dimj,
long  dimk,
long  ext_b,
cT *  c,
const aT *  a,
const bT *  b 
)

References a(), c, k, and malloc().

Referenced by fast_transform().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::mul ( World &  world,
const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  v,
bool  fence = true 
)

Multiplies a function against a vector of functions — q[i] = a * v[i].

References madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, reconstruct(), madness::Function< T, NDIM >::reconstruct(), and vmulXX().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::mul ( World &  world,
const std::vector< Function< T, NDIM > > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true 
)

Multiplies two vectors of functions q[i] = a[i] * b[i].

References a(), b(), madness::WorldGopInterface::fence(), madness::World::gop, mul(), PROFILE_BLOCK, and reconstruct().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::mul ( World &  world,
const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  v,
const unsigned int  blk = 1,
const bool  fence = true 
)

Multiplies a function against a vector of functions — q[i] = a * v[i].

References madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, reconstruct(), madness::Function< T, NDIM >::reconstruct(), and vmulXX().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::mul ( World &  world,
const std::vector< Function< T, NDIM > > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true,
unsigned int  blk = 1 
)

Multiplies two vectors of functions q[i] = a[i] * b[i].

References a(), b(), madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), mul(), PROFILE_BLOCK, and reconstruct().

template<typename Q , typename T , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(Q,T),NDIM> madness::mul ( const Q  alpha,
const Function< T, NDIM > &  f,
bool  fence = true 
)
template<typename Q , typename T , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(Q,T),NDIM> madness::mul ( const Function< T, NDIM > &  f,
const Q  alpha,
bool  fence = true 
)

Returns new function equal to f(x)*alpha with optional fence.

References madness::Function< T, NDIM >::fence(), mul(), and PROFILE_FUNC.

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R),NDIM> madness::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.

References madness::Function< T, NDIM >::fence(), and mul_sparse().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::mul_sparse ( World &  world,
const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  v,
double  tol,
bool  fence = true 
)

Multiplies a function against a vector of functions using sparsity of a and v[i] — q[i] = a * v[i].

References madness::WorldGopInterface::fence(), madness::World::gop, madness::Function< T, NDIM >::norm_tree(), PROFILE_BLOCK, reconstruct(), madness::Function< T, NDIM >::reconstruct(), and vmulXX().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::mul_sparse ( World &  world,
const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  v,
const double  tol,
const bool  fence = true,
const unsigned int  blk = 1 
)

Multiplies a function against a vector of functions using sparsity of a and v[i] — q[i] = a * v[i].

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), norm_tree(), madness::Function< T, NDIM >::norm_tree(), PROFILE_BLOCK, reconstruct(), madness::Function< T, NDIM >::reconstruct(), and vmulXX().

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R),NDIM> madness::mul_sparse ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right,
double  tol,
bool  fence = true 
)
template<typename T , typename opT , int NDIM>
Function<T,NDIM> madness::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,NDIM> madness::multiply ( const Function< T, NDIM f,
const Function< T, LDIM >  g,
const int  particle,
const bool  fence = true 
)
STATIC Tensor<float> madness::my_conj_transpose ( Tensor< float >  a)

References transpose().

Referenced by test_cholesky(), and test_sygv().

STATIC Tensor<double> madness::my_conj_transpose ( Tensor< double >  a)

References transpose().

STATIC Tensor<float_complex> madness::my_conj_transpose ( Tensor< float_complex a)

References conj_transpose().

STATIC Tensor<double_complex> madness::my_conj_transpose ( Tensor< double_complex a)

References conj_transpose().

template<typename T , std::size_t NDIM>
Vector<T,NDIM> madness::n12 ( const Vector< T, NDIM > &  r,
const double  eps = 1.e-6 
)

helper function unit vector in direction r

References norm(), and madness::Vector< T, N >::normf().

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , typename J >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i,
const J &  j 
)
inline
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), and madness::archive::bufar_size().

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), and madness::archive::bufar_size().

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), madness::archive::bufar_size(), and g.

template<typename A , typename B , typename C , typename D , typename E , typename F >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), madness::archive::bufar_size(), and f.

template<typename A , typename B , typename C , typename D , typename E >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), and madness::archive::bufar_size().

template<typename A , typename B , typename C , typename D >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c,
const D &  d 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), and madness::archive::bufar_size().

template<typename A , typename B , typename C >
AmArg* madness::new_am_arg ( const A &  a,
const B b,
const C c 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), madness::archive::bufar_size(), and c.

template<typename A , typename B >
AmArg* madness::new_am_arg ( const A &  a,
const B b 
)
inline

Convenience template for serializing arguments into a new AmArg.

References alloc_am_arg(), arg(), b(), and madness::archive::bufar_size().

template<typename A >
AmArg* madness::new_am_arg ( const A &  a)
inline

Convenience template for serializing arguments into a new AmArg.

References a(), alloc_am_arg(), arg(), and madness::archive::bufar_size().

template<typename T , std::size_t NDIM>
void madness::nonstandard ( World &  world,
std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)
template<typename T , std::size_t NDIM>
void madness::nonstandard ( World &  world,
std::vector< Function< T, NDIM > > &  v,
unsigned int  blk = 1,
bool  fence = true 
)

Generates non-standard form of a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), PROFILE_BLOCK, and reconstruct().

template<typename T , std::size_t N>
T madness::norm ( Vector< T, N v)
template<typename T , std::size_t NDIM>
double madness::norm2 ( World &  world,
const std::vector< Function< T, NDIM > > &  v 
)
template<typename T , std::size_t NDIM>
std::vector<double> madness::norm2s ( World &  world,
const std::vector< Function< T, NDIM > > &  v 
)
template<typename T , std::size_t NDIM>
std::vector<double> madness::norm2s ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
const unsigned int  blk = 1,
const bool  fence = true 
)
template<typename T , std::size_t NDIM>
void madness::norm_tree ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)
template<typename T , std::size_t NDIM>
void madness::norm_tree ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true,
unsigned int  blk = 1 
)

Makes the norm tree for all functions in a vector.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), norm_tree(), and PROFILE_BLOCK.

template<typename T , std::size_t NDIM>
void madness::normalize ( World &  world,
std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)
bool madness::operator!= ( const DistributedID &  left,
const DistributedID &  right 
)
inline

Distributed ID inequality comparison operator.

Parameters
leftThe first key to compare
rightThe second key to compare
Returns
true when first or second of left and right are not equal, otherwise false
template<typename T , std::size_t N, typename U >
Vector<T,N> madness::operator* ( Vector< T, N l,
r 
)

Scale a coordinate.

Multiply the scalar value l by each Vector element

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand scalar type
Parameters
lThe left-hand Vector
rThe right-hand scalar value to be multiplied by the Vector elements
Returns
A new coordinate, c, where c[i]==(l[i]*r)

References N.

template<typename T , typename U , std::size_t N>
Vector<T,N> madness::operator* ( l,
Vector< U, N r 
)

Scale a Vector.

Multiply the scalar value r by each Vector element

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand scalar type
Parameters
lThe left-hand coordinate
rThe right-hand scalar value to be multiplied by the Vector elements
Returns
A new coordinate, c, where c[i]==(l*r[i])

References N.

template<typename T , std::size_t N, typename U >
Vector<T,N> madness::operator* ( Vector< T, N l,
const Vector< U, N > &  r 
)

Multiply two Vector objects.

Do an element-wise multiplication of r and q and return the result in a new coordinate.

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand Vector element type
Parameters
lThe left-hand Vector
rThe right-hand Vector
Returns
A new Vector, c, where c[i]==(l[i]*r[i])

References N.

template<typename T , typename Q >
IsSupported< TensorTypeData<Q>, GenTensor<T> >::type madness::operator* ( const Q &  x,
const GenTensor< T > &  t 
)

The class defines tensor op scalar ... here define scalar op tensor.

template<typename Q , typename T , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(Q,T),NDIM> madness::operator* ( const Function< T, NDIM > &  f,
const Q  alpha 
)

Returns new function equal to f(x)*alpha.

Using operator notation forces a global fence after each operation

References mul().

template<typename Q , typename T , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(Q,T),NDIM> madness::operator* ( const Q  alpha,
const Function< T, NDIM > &  f 
)

Returns new function equal to alpha*f(x)

Using operator notation forces a global fence after each operation

References mul().

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R), NDIM> madness::operator* ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right 
)

Multiplies two functions with the new result being of type TensorResultType<L,R>

Using operator notation forces a global fence after each operation but also enables us to automatically reconstruct the input functions as required.

References madness::Function< T, NDIM >::is_compressed(), madness::Function< T, NDIM >::is_on_demand(), madness::Function< T, NDIM >::MADNESS_ASSERT(), mul(), and madness::Function< T, NDIM >::reconstruct().

template<typename T , std::size_t N, typename U >
Vector<T,N> madness::operator+ ( Vector< T, N l,
r 
)

Add a scalar to a Vector.

Add the scalar value r to each Vector element

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand scalar type
Parameters
lThe left-hand coordinate
rThe right-hand scalar value to be added to the Vector
Returns
A new Vector, c, where c[i]==(l[i]+r)

References N.

template<typename T , std::size_t N, typename U >
Vector<T,N> madness::operator+ ( Vector< T, N l,
const Vector< U, N > &  r 
)

Add two Vector opbjects.

Do an element-wise addition of l and r and return the result in a new Vector.

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand Vector element type
Parameters
lThe left-hand Vector
rThe right-hand Vector
Returns
A new Vector, c, where c[i]==(l[i]+r[i])

References N.

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R), NDIM> madness::operator+ ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right 
)

Adds two functions with the new result being of type TensorResultType<L,R>

Using operator notation forces a global fence after each operation

References add(), madness::Function< T, NDIM >::compress(), gaxpy_oop_reconstructed(), madness::Function< T, NDIM >::is_compressed(), NDIM, madness::Function< T, NDIM >::reconstruct(), and madness::Function< T, NDIM >::verify_tree().

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 N, typename U >
Vector<T,N> madness::operator- ( Vector< T, N l,
r 
)

Subtract a scalar from a Vector.

Subtract the scalar value r from the Vector elements l[i]

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand scalar type
Parameters
lThe left-hand Vector
rThe right-hand scalar value to be added to the Vector
Returns
A new Vector, c, where c[i]==(l[i]-r)

References N.

template<typename T , std::size_t N, typename U >
Vector<T,N> madness::operator- ( Vector< T, N l,
const Vector< U, N > &  r 
)

Subtract two Vector.

Do an element-wise subtraction of l and r and return the result in a new coordinate.

Template Parameters
TThe left-hand Vector element type
NThe Vector size
UThe right-hand Vector element type
Parameters
lThe left-hand Vector
rThe right-hand Vector
Returns
A new coordinate, c, where c[i]==(l[i]-r[i])

References N.

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R), NDIM> madness::operator- ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right 
)

Subtracts two functions with the new result being of type TensorResultType<L,R>

Using operator notation forces a global fence after each operation

References madness::Function< T, NDIM >::compress(), gaxpy_oop_reconstructed(), madness::Function< T, NDIM >::is_compressed(), NDIM, PROFILE_FUNC, madness::Function< T, NDIM >::reconstruct(), and sub().

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 
)
std::ostream& madness::operator<< ( std::ostream &  s,
const ContractedGaussianShell c 
)
template<typename T , std::size_t N>
std::ostream& madness::operator<< ( std::ostream &  s,
const std::array< T, N > &  a 
)

Output std::array to stream for human consumption.

References a(), and N.

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

Easy printing of complex numbers.

References c.

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

Easy printing of pairs.

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

Easy printing of lists.

References c.

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

Easy printing of vectors.

References c.

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

Easy printing of fixed dimension arrays.

STL I/O already does char.

References N.

std::ostream & madness::operator<< ( std::ostream &  stream,
const Slice &  s 
)
std::ostream & madness::operator<< ( std::ostream &  out,
const MadnessException &  e 
)
template<>
std::ostream & madness::operator<< ( std::ostream &  out,
const Future< void > &  f 
)
template<>
std::ostream & madness::operator<< ( std::ostream &  out,
const Future< Void > &  f 
)
template<std::size_t NDIM>
std::ostream& madness::operator<< ( std::ostream &  s,
const Key< NDIM > &  key 
)
template<typename T , std::size_t NDIM>
std::ostream& madness::operator<< ( std::ostream &  s,
const FunctionNode< T, NDIM > &  node 
)

References norm().

template<typename T , std::size_t NDIM>
std::ostream& madness::operator<< ( std::ostream &  s,
const CoeffTracker< T, NDIM > &  ct 
)
bool madness::operator== ( const DistributedID &  left,
const DistributedID &  right 
)
inline

Distributed ID equality comparison operator.

Parameters
leftThe first key to compare
rightThe second key to compare
Returns
true when first and second of left and right are equal, otherwise false
template<typename T >
void madness::orgqr ( Tensor< T > &  A,
const Tensor< T > &  tau 
)

reconstruct the orthogonal matrix Q (e.g. from QR factorization)

orgqr generates an M-by-N complex matrix Q with orthonormal columns

Parameters
[in,out]AOn entry, the i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by DGEQRF in the first k columns of its array argument A. On exit, the M-by-N matrix Q.
[in]tauTAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by DGEQRF.

which is defined as the first N columns of a product of K elementary reflectors of order M Q = H(1) H(2) . . . H(k) as returned by ZGEQRF.

References dorgqr_(), k, m, std::tr1::T(), TENSOR_ASSERT, and transpose().

template void madness::orgqr ( Tensor< float > &  A,
const Tensor< float > &  tau 
)
template void madness::orgqr ( Tensor< double > &  A,
const Tensor< double > &  tau 
)
template void madness::orgqr ( Tensor< complex_real4 > &  A,
const Tensor< complex_real4 > &  tau 
)
template void madness::orgqr ( Tensor< double_complex > &  A,
const Tensor< double_complex > &  tau 
)
template<typename T >
void madness::ortho3 ( Tensor< T > &  x,
Tensor< T > &  y,
Tensor< double > &  weights,
const double &  thresh 
)

sophisticated version of ortho2

after calling this we will have an optimally rank-reduced representation with the left and right subspaces being bi-orthogonal and normalized; outline of the algorithm:

  • canonical orthogonalization of the subspaces (screen for small eigenvalues)
  • SVD of the modified overlap (incorporates the roots of eigenvalues) operation count is O(kr^2 + r^3)
Parameters
in/out]x normalized left subspace
in/out]y normalize right subspace
in/out]weights weights
[in]threshtruncation threshold

References e1(), inner(), madness::SRConf< T >::max_sigma(), sqrt(), svd(), syev(), wall_time(), and madness::SRConf< T >::weights().

Referenced by madness::SRConf< T >::orthonormalize().

template<typename T >
void madness::ortho5 ( Tensor< T > &  x1,
Tensor< T > &  y1,
Tensor< double > &  w1,
const Tensor< T > &  x2,
const Tensor< T > &  y2,
const Tensor< double > &  w2,
const double &  thresh 
)

specialized version of ortho3

does the same as ortho3, but takes two bi-orthonormal configs as input and saves on the inner product. Result will be written onto the first config

Parameters
in/out]x1 left subspace, will hold the result on exit
in/out]y1 right subspace, will hold the result on exit
[in]x2left subspace, will be accumulated onto x1
[in]y2right subspace, will be accumulated onto y1

References madness::SRConf< T >::copy, e1(), inner(), inner_result(), max, outer(), sqrt(), svd(), syev(), transpose(), and wall_time().

template<typename T , std::size_t NDIM>
Derivative<T,NDIM> madness::periodic_derivative ( World &  world,
int  axis,
int  k = FunctionDefaults<NDIM>::get_k() 
)

Conveinence function returning derivative operator with periodic boundary conditions.

References BC_PERIODIC.

template<typename Q , int NDIM>
SeparatedConvolution<Q, NDIM> madness::PeriodicBSHOp ( World &  world,
double  mu,
long  k,
double  lo,
double  eps,
Tensor< double >  L 
)

References c, and NDIM.

template<typename Q , int NDIM>
SeparatedConvolution<Q, NDIM>* madness::PeriodicBSHOpPtr ( World &  world,
double  mu,
long  k,
double  lo,
double  eps,
Tensor< double >  L 
)

References c, and NDIM.

template<typename Q , int NDIM>
SeparatedConvolution<Q, NDIM> madness::PeriodicCoulombOp ( World &  world,
long  k,
double  lo,
double  eps,
Tensor< double >  L 
)

References c, NDIM, and WST_PI.

template<typename Q , int NDIM>
SeparatedConvolution<Q, NDIM>* madness::PeriodicCoulombOpPtr ( World &  world,
long  k,
double  lo,
double  eps,
Tensor< double >  L 
)

References c, NDIM, and WST_PI.

template<size_t NDIM>
void madness::plot_along ( World &  world,
trajectory< NDIM traj,
const Function< double, NDIM > &  function,
std::string  filename 
)
template<size_t NDIM>
void madness::plot_along ( World &  world,
trajectory< NDIM traj,
double(*)(const Vector< double, NDIM > &)  ff,
std::string  filename 
)
template<typename T , std::size_t NDIM>
void madness::plot_line ( const char *  filename,
int  npt,
const Vector< double, NDIM > &  lo,
const Vector< double, NDIM > &  hi,
const Function< T, NDIM > &  f 
)
template<typename T , typename U , std::size_t NDIM>
void madness::plot_line ( const char *  filename,
int  npt,
const Vector< double, NDIM > &  lo,
const Vector< double, NDIM > &  hi,
const Function< T, NDIM > &  f,
const Function< U, NDIM > &  g 
)
template<typename T , typename U , typename V , std::size_t NDIM>
void madness::plot_line ( const char *  filename,
int  npt,
const Vector< double, NDIM > &  lo,
const Vector< double, NDIM > &  hi,
const Function< T, NDIM > &  f,
const Function< U, NDIM > &  g,
const Function< V, NDIM > &  a 
)

Generates ASCII file tabulating f(r), g(r), and a(r) at npoints along line r=lo,...,hi.

The ordinate is distance from lo

References madness::Function< T, NDIM >::eval(), madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_EXCEPTION, NDIM, madness::World::rank(), madness::Function< T, NDIM >::reconstruct(), sqrt(), mpfr::sum(), and madness::Function< T, NDIM >::world().

template<typename T , typename U , typename V , typename W , std::size_t NDIM>
void madness::plot_line ( const char *  filename,
int  npt,
const Vector< double, NDIM > &  lo,
const Vector< double, NDIM > &  hi,
const Function< T, NDIM > &  f,
const Function< U, NDIM > &  g,
const Function< V, NDIM > &  a,
const Function< W, NDIM > &  b 
)

Generates ASCII file tabulating f(r), g(r), a(r), b(r) at npoints along line r=lo,...,hi.

The ordinate is distance from lo

References madness::Function< T, NDIM >::eval(), madness::WorldGopInterface::fence(), madness::World::gop, NDIM, madness::World::rank(), madness::Function< T, NDIM >::reconstruct(), sqrt(), mpfr::sum(), and madness::Function< T, NDIM >::world().

template<size_t NDIM>
void madness::plot_plane ( World &  world,
const Function< double, NDIM > &  function,
const std::string  name 
)

plot a 2-d slice of a given function and the according MRA structure FIXME: doesn't work for more than 1 rank the plotting parameters are taken from the input file "input" and its data group "plot", e.g. plotting the xy plane around (0,0,0.7): plot plane x1 x2 zoom 2.0 npoints 100 origin 0.0 0.0 0.7 end

Parameters
[in]worldthe world
[in]functionthe function to plot
[in]namethe output name

References f, madness::FunctionDefaults< NDIM >::get_cell_width(), MADNESS_EXCEPTION, position_stream(), madness::World::rank(), scale(), and madness::World::size().

Referenced by madness::TDA_DFT::convolution_with_kernel(), main(), madness::CIS::solve(), madness::TDA::solve_sequential(), and madness::TDA_DFT::TDA_DFT().

template<typename T , std::size_t NDIM>
void madness::plotdx ( const Function< T, NDIM > &  f,
const char *  filename,
const Tensor< double > &  cell = FunctionDefaults<NDIM>::get_cell(),
const std::vector< long > &  npt = std::vector<long>(NDIM,201L),
bool  binary = true 
)

Writes an OpenDX format file with a cube/slice of points on a uniform grid.

Collective operation but only process 0 writes the file. By convention OpenDX files end in ".dx" but this choice is up to the user. The binary format is more compact and vastly faster to both write and load but is not as portable.

Now follow some brief tips about how to look at files inside OpenDX.

To view a 1D function file-selector–>import–>plot–>image.

To view a 2D function as a colored plane file-selector–>import–>autocolor–>image.

To view a 2D function as a 3D surface file-selector–>import–>rubbersheet–>image.

To view a 3D function as an isosurface file-selector–>import–>isosurface–>image.

To select the real/imaginary/absolute value of a complex number insert a compute element after the import.

References c, f, madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, madness::World::rank(), and std::tr1::T().

Referenced by madness::SCF::do_plots(), doplot(), madness::Solver< T, NDIM >::initial_guess(), main(), ScreenSolventPotential::ScreenReactionPotential(), and madness::Solver< T, NDIM >::solve().

template<std::size_t NDIM>
void madness::plotvtk_begin ( World &  world,
const char *  filename,
const Vector< double, NDIM > &  plotlo,
const Vector< double, NDIM > &  plothi,
const Vector< long, NDIM > &  npt,
bool  binary = false 
)

Writes the header information of a VTK file for plotting in an external post-processing package (such as Paraview)

Parameters
worldWorld communicator
filenameString containing the filename to export to
plotloVector of double values indicating the minimum coordinate to plot to in each dimension
plothiVector of double values indicating the maximum coordinate to plot to in each dimension
nptVector of long integers indicating the number of points to plot in each dimension
binary(optional) Boolean indicating whether to print in binary The VTK routines are also designed for SERIAL data, parallel coming...

This header is templated by the dimension of the data.

To plot with the plotvtk_* routines: plotvtk_begin(...) plotvtk_data(...) plotvtk_data(...) ... plotvtk_end(...)

NOTE: Paraview expects the structured mesh points in a particular order, which is why the LowDimIndexIterator is used...

References madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, and madness::World::rank().

Referenced by calcScatField(), main(), and testNavierStokes().

template<typename T , std::size_t NDIM>
void madness::plotvtk_data ( const T &  function,
const char *  fieldname,
World &  world,
const char *  filename,
const Vector< double, NDIM > &  plotlo,
const Vector< double, NDIM > &  plothi,
const Vector< long, NDIM > &  npt,
bool  binary = false 
)

Generic VTK data writer. Specific type instances of this function are defined for both real and complex valued functions.

Parameters
functionFunction (real or complex) that we wish to export the data of
fieldnameA string containing the name we wish to refer to this field as in the exported data
worldWorld communicator
filenameString containing the filename to export to
plotloVector of double values indicating the minimum coordinate to plot to in each dimension
plothiVector of double values indicating the maximum coordinate to plot to in each dimension
nptVector of long integers indicating the number of points to plot in each dimension
binary(optional) Boolean indicating whether to print in binary This templated function won't do anything except print a warning message. Specialized versions of this function should be used.

References MADNESS_EXCEPTION.

Referenced by calcScatField(), main(), testNavierStokes(), and vtk_output().

template<typename T , std::size_t NDIM>
void madness::plotvtk_data ( const Function< T, NDIM > &  function,
const char *  fieldname,
World &  world,
const char *  filename,
const Vector< double, NDIM > &  plotlo,
const Vector< double, NDIM > &  plothi,
const Vector< long, NDIM > &  npt,
bool  binary = false,
bool  plot_refine = false 
)

VTK data writer for real-valued (not complex) madness::functions.

Set plot_refine=true to get a plot of the refinement levels of the given function.

References madness::WorldGopInterface::barrier(), madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, and madness::World::rank().

template<typename T , std::size_t NDIM>
void madness::plotvtk_data ( const Function< std::complex< T >, NDIM > &  function,
const char *  fieldname,
World &  world,
const char *  filename,
const Vector< double, NDIM > &  plotlo,
const Vector< double, NDIM > &  plothi,
const Vector< long, NDIM > &  npt,
bool  binary = false,
bool  plot_refine = false 
)

VTK data writer for complex-valued madness::functions.

The complex-value is written as two reals (a vector from VTK's perspective. The first (X) component is the real part and the second (Y) component is the imaginary part. Set plot_refine=true to get a plot of the refinement levels of the given function.

References madness::WorldGopInterface::barrier(), madness::WorldGopInterface::fence(), madness::World::gop, imag(), MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, madness::World::rank(), and real().

template<std::size_t NDIM>
void madness::plotvtk_end ( World &  world,
const char *  filename,
bool  binary = false 
)

Writes the footer information of a VTK file for plotting in an external post-processing package (such as Paraview)

Parameters
worldWorld communicator
filenameName of VTK file
binary(Optional) Boolean indicating whether to print in binary

References madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, and madness::World::rank().

std::istream & madness::position_stream ( std::istream &  f,
const std::string &  tag 
)
template<int D>
int madness::power ( int  base = 2)
inline
template<int N, class T >
T madness::power ( T const  x)
template<>
int madness::power< 0 > ( int  base)
inline
template<>
int madness::power< 1 > ( int  base)
inline
template<>
int madness::power< 10 > ( int  base)
inline

References power< 2 >(), and power< 5 >().

template<>
int madness::power< 12 > ( int  base)
inline

References power< 3 >(), and power< 4 >().

template<>
int madness::power< 2 > ( int  base)
inline
template<>
int madness::power< 3 > ( int  base)
inline
template<>
int madness::power< 4 > ( int  base)
inline

References power< 2 >().

Referenced by power< 12 >(), power< 7 >(), and power< 8 >().

template<>
int madness::power< 5 > ( int  base)
inline

References power< 2 >(), and power< 3 >().

Referenced by power< 10 >().

template<>
int madness::power< 6 > ( int  base)
inline

References power< 2 >(), and power< 3 >().

template<>
int madness::power< 7 > ( int  base)
inline

References power< 3 >(), and power< 4 >().

template<>
int madness::power< 8 > ( int  base)
inline

References power< 2 >(), and power< 4 >().

template<>
int madness::power< 9 > ( int  base)
inline

References power< 3 >().

template<class A >
void madness::print ( const A &  a)

Print a single item to std::cout terminating with new line.

References ENDL.

Referenced by madness::detail::RemoteCounterBase::add_ref(), madness::CIS::Analyze(), apply_only(), apply_U_mix(), apply_U_ncf(), madness::MP2::asymmetry(), madness::Solver< T, NDIM >::build_fock_matrix(), check_linear_dependence(), madness::Function< double, 6 >::check_symmetry(), madness::CIS::CIS(), madness::FunctionImpl< T, NDIM >::coeffs_for_jun(), madness::FunctionImpl< T, NDIM >::compress_op(), madness::FunctionImpl< T, NDIM >::compress_spawn(), compute_energy(), compute_energy_with_U(), compute_R2f2_psi(), madness::SCF::compute_residual(), converge(), converge2s(), madness::LocalizeBoys< T >::converged(), madness::PotentialManager::core_projection(), madness::SCF::core_projection(), create_nuclear_correlation_factor(), madness::Solver< T, NDIM >::csqrt(), DBF::DBF(), madness::TensorTrain< T >::decompose(), madness::SCF::derivatives(), madness::SCF::dipole(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), madness::SCF::do_step_restriction(), doit(), doplot(), energy(), DFTSolventSolver::ESP(), gen_ce(), generate_G_vectors(), generate_R_vectors(), SCFParameters::gprint(), madness::CalculationParameters::gprint(), madness::SCF::group_orbital_sets(), hartree_product(), Molecule::identify_point_group(), madness::Molecule::identify_point_group(), madness::MP2::increment(), madness::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), initial_loadbal(), iterate(), iterate_excite(), iterate_ground(), iterate_xy(), KAIN(), madness::LocalizeBoys< T >::kernel(), DFTSolventSolver::Laplace_ESP(), load_balance(), madness::LoadBalanceDeux< NDIM >::load_balance(), load_function(), madness::ElectronPair::load_pair(), loadbal(), SCF::localize_boys(), SCF::localize_PM_task_kernel(), madness::LocalizeBoys< T >::LocalizeBoys(), main(), madness::SCF::make_bsh_operators(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), madness::Solver< T, NDIM >::make_nuclear_potential(), madness::TDA::memwatch(), MolecularNuclearChargeDensityFunctor::MolecularNuclearChargeDensityFunctor(), moments(), madness::MP2::MP2(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::operator()(), madness::TwoElectronInterface< double, 6 >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local< R >::operator()(), madness::Key< OPDIM >::operator==(), madness::SteepestDescent::optimize(), madness::QuasiNewton::optimize(), Molecule::orient(), madness::Molecule::orient(), madness::SCF::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), madness::LBDeuxPmap< NDIM >::owner(), PBF::PBF(), preloadbal(), madness::LBDeuxPmap< NDIM >::print(), madness::MyPmap< D >::print(), madness::Timer::print(), SCFParameters::print(), madness::CalculationParameters::print(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::MP2::print_info(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), madness::CIS::print_roots(), print_seq(), madness::Function< double, 6 >::print_size(), madness::FunctionImpl< T, NDIM >::print_stats(), madness::LoadBalanceDeux< NDIM >::print_tree(), propagate(), Molecule::read_core_file(), madness::Molecule::read_core_file(), madness::FunctionImpl< Q, NDIM >::read_grid(), madness::FunctionImpl< Q, NDIM >::read_grid2(), reconstruct_psi(), madness::detail::RemoteCounterBase::release(), save_function(), SBF::SBF(), ScreenSolventPotential::ScreenReactionPotential(), madness::FunctionNode< T, NDIM >::set_coeff(), madness::Function< double, 6 >::set_functor(), set_protocol(), madness::SCF::set_protocol(), madness::TDA::setup(), CoupledPurturbation::solve(), SVPEColloidSolver::solve(), solve(), madness::SCF::solve(), madness::Solver< T, NDIM >::solve(), madness::CIS::solve_internal_par(), SVPEColloidSolver::solve_Laplace(), madness::MP2::solve_residual_equations(), madness::TDA::solve_sequential(), madness::CIS::sort_roots(), sqrt(), startup(), madness::SpectralPropagator::step(), madness::SpectralPropagatorGaussLobatto::step(), madness::Solver< T, NDIM >::step_restriction(), madness::archive::BufferOutputArchive::store(), symmetrize(), madness::IndexIterator::test(), test_adaptive_tree(), test_compress(), test_G_R_vectors(), test_gaussian_num_coeffs(), test_modified(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_recursive_application(), test_truncation(), test_U_el(), testbsh(), testNavierStokes(), trotter(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), madness::SCF::update_subspace(), madness::Nemo::value(), madness::MP2::value(), madness::FunctionImpl< T, NDIM >::verify_tree(), and madness::FutureImpl< bool >::~FutureImpl().

template<class A , class B >
void madness::print ( const A &  a,
const B b 
)

Print two items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C >
void madness::print ( const A &  a,
const B b,
const C c 
)

Print three items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d 
)

Print four items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e 
)

Print five items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f 
)

Print six items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g 
)

Print seven items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h 
)

Print eight items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H , class I >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i 
)

Print nine items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i,
const J &  j 
)

Print ten items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i,
const J &  j,
const K &  k 
)

Print eleven items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K , class L >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i,
const J &  j,
const K &  k,
const L l 
)

Print twelve items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K , class L , class M >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i,
const J &  j,
const K &  k,
const L l,
const M &  m 
)

Print thirteen items separated by spaces to std::cout terminating with new line.

References ENDL.

template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J , class K , class L , class M , class N >
void madness::print ( const A &  a,
const B b,
const C c,
const D &  d,
const E &  e,
const F &  f,
const G g,
const H &  h,
const I i,
const J &  j,
const K &  k,
const L l,
const M &  m,
const N n 
)

Print fourteen items separated by spaces to std::cout terminating with new line.

References ENDL.

void madness::print_centered ( const char *  s,
int  column,
bool  underline 
)

Print a string centered at the given column with optional underlining.

References print_justified().

void madness::print_justified ( const char *  s,
int  column,
bool  underline 
)

Print a string justified on the left to start at the given column with optional underlining.

References ENDL.

Referenced by print_centered().

void madness::print_meminfo ( int  id,
const std::string &  tag 
)
template<typename A , typename B , typename C , typename D >
void madness::print_seq ( World &  world,
const A &  a,
const B b,
const C c,
const D &  d 
)

Sequentially ordered printing of (serializable) data from every process ... collective no fence.

References B, C, cc, print(), madness::World::rank(), and madness::World::size().

template<typename A , typename B , typename C >
void madness::print_seq ( World &  world,
const A &  a,
const B b,
const C c 
)

Sequentially ordered printing of (serializable) data from every process ... collective no fence.

References B, C, c, cc, print(), madness::World::rank(), and madness::World::size().

template<typename A , typename B >
void madness::print_seq ( World &  world,
const A &  a,
const B b 
)

Sequentially ordered printing of (serializable) data from every process ... collective no fence.

References b(), B, print(), madness::World::rank(), and madness::World::size().

template<typename A >
void madness::print_seq ( World &  world,
const A &  a 
)

Sequentially ordered printing of (serializable) data from every process ... collective no fence.

References a(), print(), madness::World::rank(), and madness::World::size().

void madness::print_stats ( World &  world)
template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::project ( const Function< T, NDIM > &  other,
int  k = FunctionDefaults<NDIM>::get_k(),
double  thresh = FunctionDefaults<NDIM>::get_thresh(),
bool  fence = true 
)
tensorT madness::Q2 ( const tensorT s)
tensorT madness::Q3 ( const Tensor< double > &  s)

Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors.

Referenced by MolecularSystem::load().

Convolution1D< double_complex > * madness::qm_1d_free_particle_propagator ( int  k,
double  bandlimit,
double  timestep,
double  width 
)
template<std::size_t NDIM>
SeparatedConvolution< double_complex, NDIM > madness::qm_free_particle_propagator ( World &  world,
int  k,
double  bandlimit,
double  timestep 
)
template<std::size_t NDIM>
SeparatedConvolution< double_complex, NDIM > * madness::qm_free_particle_propagatorPtr ( World &  world,
int  k,
double  bandlimit,
double  timestep 
)
template<typename T >
void madness::qr ( Tensor< T > &  A,
Tensor< T > &  R 
)

compute the QR decomposition of the matrix A

QR decomposition.

Parameters
[in,out]Aon entry the (n,m) matrix to be decomposed on exit the Q matrix
[out]Rthe (n,n) matrix R (square form)

References lq_result(), m, mpfr::min(), TENSOR_ASSERT, and transpose().

Referenced by test_qr().

template void madness::qr ( Tensor< double > &  A,
Tensor< double > &  R 
)
template<class T >
T madness::RandomValue ( )

Random value that wraps the default Fibonacci generator.

template<>
double madness::RandomValue< double > ( )

Random double_complex.

References RandomValue< double >().

template<>
float madness::RandomValue< float > ( )

Random float_complex.

References RandomValue< float >().

template<>
int madness::RandomValue< int > ( )
template<>
long madness::RandomValue< long > ( )

Random long.

References RandomValue< double >().

Referenced by test_qr().

template<class T >
void madness::RandomVector ( int  n,
T *  t 
)
template<>
void madness::RandomVector< double > ( int  n,
double *  t 
)
template<>
void madness::RandomVector< double_complex > ( int  n,
double_complex t 
)
template<>
void madness::RandomVector< float > ( int  n,
float *  t 
)
template<>
void madness::RandomVector< float_complex > ( int  n,
float_complex t 
)
static double madness::real ( double  x)
inline
template<typename Q , int NDIM>
Function<typename TensorTypeData<Q>::scalar_type,NDIM> madness::real ( const Function< Q, NDIM > &  func)

References unary_op_coeffs().

template<std::size_t NDIM>
Function<double,NDIM> madness::real ( const Function< double_complex, NDIM > &  z,
bool  fence = true 
)

Returns a new function that is the real part of the input.

References madness::Function< T, NDIM >::fence(), and madness::Function< T, NDIM >::unary_op_coeffs().

template<typename T , std::size_t NDIM>
void madness::reconstruct ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)
template<typename T , std::size_t NDIM>
void madness::reconstruct ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
unsigned int  blk = 1,
bool  fence = true 
)

Reconstruct a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

void madness::redirectio ( World &  world)
template<class T >
GenTensor<T> madness::reduce ( std::list< GenTensor< T > > &  addends,
double  eps,
bool  are_optimal = false 
)
template<class T >
detail::ReferenceWrapper<T> const madness::ref ( T &  t)
inline

Reference wrapper factory function.

Template Parameters
TThe reference type (may be const or non-const)
Parameters
tThe object to be wrapped
Returns
A reference wrapper object

Referenced by madness::FunctionImpl< T, NDIM >::eval(), madness::FunctionImpl< T, NDIM >::evaldepthpt(), madness::FunctionImpl< T, NDIM >::evalR(), madness::FunctionImpl< T, NDIM >::sock_it_to_me(), and madness::FunctionImpl< T, NDIM >::sock_it_to_me_too().

void madness::reset_papi_measurement ( )
inline
template<typename T >
DistributedMatrix< T > madness::row_distributed_matrix ( World &  world,
int64_t  n,
int64_t  m,
int64_t  rowtile = 0 
)

Generates an (n,m) matrix distributed by rows (column dimension is not distributed)

Parameters
[in]WorldThe world
[in]nThe column (first) dimension
[in]mThe row (second) dimension
[in]rowtileTile size for row (default is to use all processes) A new zero matrix with the requested dimensions and distribution

References m, mpfr::min(), and madness::World::size().

template<typename T , typename Q , std::size_t NDIM>
void madness::scale ( World &  world,
std::vector< Function< T, NDIM > > &  v,
const std::vector< Q > &  factors,
bool  fence = true 
)

Scales inplace a vector of functions by distinct values.

References madness::WorldGopInterface::fence(), madness::World::gop, and PROFILE_BLOCK.

Referenced by apply(), apply_U_mix(), madness::FunctionImpl< Q, NDIM >::coeffs2values(), madness::SCF::compute_residual(), madness::TDA_DFT::convolution_with_kernel(), DFTSolventSolver::dfree_drho(), madness::FunctionImpl< Q, NDIM >::do_binary_op(), madness::FunctionImpl< Q, NDIM >::do_mul(), draw_plane(), madness::FunctionImpl< Q, NDIM >::err_box(), gauss_legendre_numeric(), DFTSolventSolver::Laplace_ESP(), main(), SVPEColloidSolver::make_electric_field(), DFTSolventSolver::make_electric_field(), DFTSolventSolver::make_surfcharge(), SCF::matrix_exponential(), madness::SCF::matrix_exponential(), madness::Solver< T, NDIM >::matrix_exponential(), moments(), madness::FunctionImpl< Q, NDIM >::mul(), madness::EigSolver< T, NDIM >::multi_solve(), normalize(), madness::FunctionImpl< Q, NDIM >::NS_fcube_for_mul(), madness::FunctionImpl< Q, NDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), root::operator*(), madness::FunctionImpl< T, NDIM >::phi_for_mul(), plot_plane(), madness::FunctionImpl< T, NDIM >::print_plane_local(), q_c(), MolecularEntity::read_file(), Molecule::read_file(), madness::Molecule::read_file(), scale(), ScreenSolventPotential::ScreenSolventPotential(), SVPEColloidSolver::solve(), madness::Solver< T, NDIM >::solve(), SVPEColloidSolver::solve_Laplace(), testNavierStokes(), madness::FunctionImpl< Q, NDIM >::values2coeffs(), and madness::FunctionImpl< Q, NDIM >::values2NScoeffs().

template<typename T , typename Q , std::size_t NDIM>
void madness::scale ( World &  world,
std::vector< Function< T, NDIM > > &  v,
const Q  factor,
bool  fence = true 
)

Scales inplace a vector of functions by the same.

References madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, and scale().

template<typename T , typename Q , std::size_t NDIM>
void madness::scale ( World &  world,
std::vector< Function< T, NDIM > > &  v,
const std::vector< Q > &  factors,
const unsigned int  blk = 1,
const bool  fence = true 
)

Scales inplace a vector of functions by distinct values.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

template<typename T , typename Q , std::size_t NDIM>
void madness::scale ( World &  world,
std::vector< Function< T, NDIM > > &  v,
const Q  factor,
const unsigned int  blk = 1,
const bool  fence = true 
)

Scales inplace a vector of functions by the same.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

template<typename T , std::size_t NDIM>
void madness::set_thresh ( World &  world,
std::vector< Function< T, NDIM > > &  v,
double  thresh,
bool  fence = true 
)

Sets the threshold in a vector of functions.

References madness::WorldGopInterface::fence(), and madness::World::gop.

Referenced by madness::SCF::compute_residual(), and main().

template<typename T >
T* madness::shrink ( long  n,
long  m,
long  r,
const T *  a,
T *restrict  b 
)
inline

a(i,j) –> b(i,j) for i=0..n-1 and j=0..r-1 noting dimensions are a(n,m) and b(n,r).

returns b

References b(), m, and std::tr1::T().

double madness::smoothed_density ( double  r)

Charge density corresponding to smoothed 1/r potential.

Invoke as rho(r/c)/c^3 where c is the radius of the smoothed volume.

Referenced by madness::Molecule::mol_nuclear_charge_density(), MolecularEntity::nuclear_charge_density(), Molecule::nuclear_charge_density(), and madness::Molecule::nuclear_charge_density().

double madness::smoothed_potential ( double  r)
double madness::smoothing_parameter ( double  Z,
double  eprec 
)
madness::SPEC ( int  ,
long  ,
long   
)
madness::SPEC ( int  ,
float  ,
float   
)
madness::SPEC ( int  ,
double  ,
double   
)
madness::SPEC ( int  ,
float_complex  ,
float_complex   
)
madness::SPEC ( int  ,
double_complex  ,
double_complex   
)
madness::SPEC ( long  ,
float  ,
float   
)
madness::SPEC ( long  ,
double  ,
double   
)
madness::SPEC ( long  ,
float_complex  ,
float_complex   
)
madness::SPEC ( long  ,
double_complex  ,
double_complex   
)
madness::SPEC ( float  ,
double  ,
double   
)
madness::SPEC ( float  ,
float_complex  ,
float_complex   
)
madness::SPEC ( float  ,
double_complex  ,
double_complex   
)
madness::SPEC ( double  ,
float_complex  ,
float_complex   
)
madness::SPEC ( double  ,
double_complex  ,
double_complex   
)
madness::SPEC ( float_complex  ,
double_complex  ,
double_complex   
)
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::square ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

Computes the square of a vector of functions — q[i] = v[i]**2.

template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::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.

References copy(), PROFILE_FUNC, and madness::Function< T, NDIM >::square().

Referenced by madness::EigSolver< T, NDIM >::compute_rho(), main(), and madness::SCF::make_density().

template<typename T , std::size_t NDIM>
void madness::standard ( World &  world,
std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

Generates standard form of a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, and PROFILE_BLOCK.

Referenced by apply(), and madness::FunctionImpl< T, NDIM >::make_redundant().

template<typename T , std::size_t NDIM>
void madness::standard ( World &  world,
std::vector< Function< T, NDIM > > &  v,
unsigned int  blk = 1,
bool  fence = true 
)

Generates standard form of a vector of functions.

References madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

static void madness::START_TIMER ( World &  world)
void madness::startup ( World &  world,
int  argc,
char **  argv 
)
template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::sub ( World &  world,
const std::vector< Function< T, NDIM > > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true 
)

Returns new vector of functions — q[i] = a[i] - b[i].

References a(), b(), compress(), madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, and sub().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > madness::sub ( World &  world,
const std::vector< Function< T, NDIM > > &  a,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true,
unsigned int  blk = 1 
)

Returns new vector of functions — q[i] = a[i] - b[i].

References a(), b(), compress(), madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), PROFILE_BLOCK, and sub().

template<typename L , typename R , std::size_t NDIM>
Function<TENSOR_RESULT_TYPE(L,R),NDIM> madness::sub ( const Function< L, NDIM > &  left,
const Function< R, NDIM > &  right,
bool  fence = true 
)
template void madness::svd ( const Tensor< double > &  a,
Tensor< double > &  U,
Tensor< Tensor< double >::scalar_type > &  s,
Tensor< double > &  VT 
)
template void madness::svd ( const Tensor< double_complex > &  a,
Tensor< double_complex > &  U,
Tensor< Tensor< double_complex >::scalar_type > &  s,
Tensor< double_complex > &  VT 
)
template void madness::svd_result ( Tensor< float > &  a,
Tensor< float > &  U,
Tensor< Tensor< float >::scalar_type > &  s,
Tensor< float > &  VT,
Tensor< float > &  work 
)
template void madness::svd_result ( Tensor< double > &  a,
Tensor< double > &  U,
Tensor< Tensor< double >::scalar_type > &  s,
Tensor< double > &  VT,
Tensor< double > &  work 
)
template void madness::svd_result ( Tensor< float_complex > &  a,
Tensor< float_complex > &  U,
Tensor< Tensor< float_complex >::scalar_type > &  s,
Tensor< float_complex > &  VT,
Tensor< float_complex > &  work 
)
template void madness::svd_result ( Tensor< double_complex > &  a,
Tensor< double_complex > &  U,
Tensor< Tensor< double_complex >::scalar_type > &  s,
Tensor< double_complex > &  VT,
Tensor< double_complex > &  work 
)
template<typename ptrT >
void madness::swap ( ScopedPtr< ptrT > &  a,
ScopedPtr< ptrT > &  b 
)
inline

Swap the content of two pointers.

Template Parameters
ptrTThe pointer type
Parameters
aThe scoped pointer to swap with b
bThe scoped poitner to swap with a
Exceptions
nothing

References madness::ScopedPtr< ptrT >::swap().

template<typename ptrT >
void madness::swap ( ScopedArray< ptrT > &  a,
ScopedArray< ptrT > &  b 
)
inline

Swap the content of two arrays.

Template Parameters
ptrTThe pointer type
Parameters
aThe scoped array to swap with b
bThe scoped array to swap with a
Exceptions
nothing
template<typename T , std::size_t N>
void madness::swap ( Vector< T, N > &  l,
Vector< T, N > &  r 
)
template<typename T , typename U >
void madness::swap ( RemoteReference< T > &  l,
RemoteReference< U > &  r 
)

Swap the two remote references.

Parameters
lThe left reference to be swapped with r
rThe right reference to be swapped with l
Note
T* must be implicitly convertible to U* and vis versa.
template void madness::syev ( const Tensor< double > &  A,
Tensor< double > &  V,
Tensor< Tensor< double >::scalar_type > &  e 
)
template void madness::syev ( const Tensor< double_complex > &  A,
Tensor< double_complex > &  V,
Tensor< Tensor< double_complex >::scalar_type > &  e 
)
template void madness::sygv ( const Tensor< double > &  A,
const Tensor< double > &  B,
int  itype,
Tensor< double > &  V,
Tensor< Tensor< double >::scalar_type > &  e 
)
template void madness::sygv ( const Tensor< double_complex > &  A,
const Tensor< double_complex > &  B,
int  itype,
Tensor< double_complex > &  V,
Tensor< Tensor< double_complex >::scalar_type > &  e 
)
template<typename T >
void madness::sygvp ( World &  world,
const Tensor< T > &  a,
const Tensor< T > &  B,
int  itype,
Tensor< T > &  V,
Tensor< typename Tensor< T >::scalar_type > &  e 
)
unsigned int madness::symbol_to_atomic_number ( const std::string &  symbol)
template<typename T , std::size_t NDIM>
Function<T,NDIM> madness::symmetrize ( const Function< T, NDIM > &  f,
const std::string  symmetry,
bool  fence = true 
)

symmetrize a function

Parameters
[in]symmetry;possible are: (anti-) symmetric particle permutation ("sy_particle", "antisy_particle") symmetric mirror plane ("xy", "xz", "yz")
Returns
a new function symmetrized according to the input parameter

References madness::Function< T, NDIM >::get_impl(), madness::Function< T, NDIM >::MADNESS_ASSERT(), MADNESS_EXCEPTION, madness::Function< T, NDIM >::mapdim(), NDIM, print(), and madness::Function< T, NDIM >::world().

Referenced by test_adaptive_tree().

template<typename Q >
Tensor<Q> madness::tensor_abs ( const Tensor< std::complex< Q > > &  c)

References abs(), BINARY_OPTIMIZED_ITERATOR, and c.

template<typename Q >
Tensor< std::complex<Q> > madness::tensor_real2complex ( const Tensor< Q > &  r)

References BINARY_OPTIMIZED_ITERATOR, and c.

template<typename T , typename R , std::size_t NDIM>
madness::TENSOR_RESULT_TYPE ( ,
R   
) const

Computes the scalar/inner product between two functions.

In Maple this would be int(conjugate(f(x))*g(x),x=-infinity..infinity)

Referenced by madness::SeparatedConvolution< T, NDIM >::apply(), madness::SeparatedConvolution< T, NDIM >::apply2(), madness::SeparatedConvolution< T, NDIM >::apply2_lowdim(), fast_transform(), general_transform(), inner_result(), and transform().

template<typename Q >
Tensor<Q> madness::tensor_ximag ( const Tensor< std::complex< Q > > &  c)

References BINARY_OPTIMIZED_ITERATOR, c, and imag().

template<typename Q >
Tensor<Q> madness::tensor_xreal ( const Tensor< std::complex< Q > > &  c)

References BINARY_OPTIMIZED_ITERATOR, c, and real().

bool madness::test_autoc ( )

References checksum_file().

template<typename T >
double madness::test_cholesky ( int  n)
template<typename T >
double madness::test_gelss ( int  n,
int  nrhs 
)

References a(), b(), gelss(), and inner().

template<typename T >
double madness::test_gesv ( int  n,
int  nrhs 
)

References a(), b(), gesv(), and inner().

template<typename T >
double madness::test_qr ( )
template<typename T >
double madness::test_svd ( int  n,
int  m 
)

Example and test code for interface to LAPACK SVD interfae.

References a(), b(), k, m, svd(), and std::tr1::T().

template<typename T >
double madness::test_syev ( int  n)

References a(), inner(), max, syev(), transpose(), and V().

template<typename T >
double madness::test_sygv ( int  n)
bool madness::test_two_scale_coefficients ( )

Test the two scale coefficients for orthogonality

References inner(), and two_scale_hg().

Referenced by startup().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > madness::transform ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
const DistributedMatrix< R > &  c,
bool  fence = true 
)

References madness::DistributedMatrix< T >::coldim(), compress(), madness::DistributedMatrix< T >::copy_to_replicated(), madness::WorldGopInterface::fence(), madness::World::gop, m, PROFILE_BLOCK, R, madness::DistributedMatrix< T >::rowdim(), std::tr1::T(), TENSOR_RESULT_TYPE(), and transpose().

Referenced by madness::GTHPseudopotential< double >::apply_potential(), madness::FunctionImpl< Q, NDIM >::coeffs2values(), madness::SCF::compute_residual(), SCF::diag_fock_matrix(), madness::SCF::diag_fock_matrix(), madness::FunctionImpl< Q, NDIM >::do_binary_op(), madness::FunctionImpl< Q, NDIM >::do_mul(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), madness::FunctionImpl< T, NDIM >::filter(), madness::Convolution1D< Q >::get_rnlp(), madness::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::XCfunctional::initialize(), MolecularSystem::load(), main(), madness::Convolution1D< Q >::mod_nonstandard(), madness::FunctionImpl< Q, NDIM >::mul(), madness::Convolution1D< Q >::nonstandard(), madness::FunctionImpl< Q, NDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), madness::SCF::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), madness::FunctionImpl< T, NDIM >::parent_to_child(), SCF::rotate_subspace(), madness::SCF::rotate_subspace(), madness::SCF::solve(), Test7(), transform3d(), madness::FunctionImpl< T, NDIM >::unfilter(), madness::FunctionImpl< Q, NDIM >::values2coeffs(), and madness::FunctionImpl< Q, NDIM >::values2NScoeffs().

template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > madness::transform ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
const Tensor< R > &  c,
bool  fence = true 
)

Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i].

Uses sparsity in the transformation matrix — set small elements to zero to take advantage of this.

References c, compress(), m, PROFILE_BLOCK, R, std::tr1::T(), and TENSOR_RESULT_TYPE().

template<typename L , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(L,R),NDIM> > madness::transform ( World &  world,
const std::vector< Function< L, NDIM > > &  v,
const Tensor< R > &  c,
double  tol,
bool  fence 
)
template<typename T , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > madness::transform ( World &  world,
const std::vector< Function< T, NDIM > > &  v,
const Tensor< R > &  c,
unsigned int  blki = 1,
unsigned int  blkj = 1,
const bool  fence = true 
)

Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i].

Uses sparsity in the transformation matrix — set small elements to zero to take advantage of this.

References c, compress(), gaxpy(), m, mpfr::min(), PROFILE_BLOCK, R, std::tr1::T(), and TENSOR_RESULT_TYPE().

template<typename L , typename R , std::size_t NDIM>
std::vector< Function<TENSOR_RESULT_TYPE(L,R),NDIM> > madness::transform ( World &  world,
const std::vector< Function< L, NDIM > > &  v,
const Tensor< R > &  c,
const double  tol,
const unsigned int  blki = 1,
const bool  fence 
)
template<typename T , std::size_t NDIM>
void madness::truncate ( World &  world,
std::vector< Function< T, NDIM > > &  v,
double  tol = 0.0,
bool  fence = true 
)
template<typename T , std::size_t NDIM>
void madness::truncate ( World &  world,
std::vector< Function< T, NDIM > > &  v,
double  tol = 0.0,
unsigned int  blk = 1,
bool  fence = true 
)

Truncates a vector of functions.

References compress(), madness::WorldGopInterface::fence(), madness::World::gop, mpfr::min(), and PROFILE_BLOCK.

bool madness::try_two_locks ( const Mutex &  m1,
const Mutex &  m2 
)
inline

Attempt to acquire two locks without blocking holding either one.

The code will first attempt to acquire mutex m1 and if successful will then attempt to acquire mutex m2.

References madness::Mutex::try_lock(), and madness::Mutex::unlock().

bool madness::two_scale_coefficients ( int  k,
Tensor< double > *  h0,
Tensor< double > *  h1,
Tensor< double > *  g0,
Tensor< double > *  g1 
)

Return the two scale coefficients in the Legendre basis.

Returns true on success, false on failure (and prints error message)

References copy().

Referenced by two_scale_hg().

bool madness::two_scale_hg ( int  k,
Tensor< double > *  hg 
)
madness::TYPEINFO ( ,
int  ,
false  ,
true  ,
int  ,
double   
)
madness::TYPEINFO ( ,
long  ,
false  ,
true  ,
long  ,
double   
)
madness::TYPEINFO ( ,
float  ,
false  ,
true  ,
float  ,
float   
)
madness::TYPEINFO ( ,
double  ,
false  ,
true  ,
double  ,
double   
)
madness::TYPEINFO ( ,
float_complex  ,
true  ,
true  ,
float  ,
float   
)
madness::TYPEINFO ( ,
double_complex  ,
true  ,
true  ,
double  ,
double   
)
template<typename Q , typename opT , std::size_t NDIM>
Function<typename opT::resultT, NDIM> madness::unary_op ( const Function< Q, NDIM > &  func,
const opT &  op,
bool  fence = true 
)
template<typename Q , typename opT , std::size_t NDIM>
Function<typename opT::resultT, NDIM> madness::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.

References madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::is_compressed(), madness::Function< T, NDIM >::reconstruct(), and madness::Function< T, NDIM >::unary_op_coeffs().

Referenced by abs(), function_real2complex(), imag(), real(), and real().

template<typename T >
T& madness::unwrap_move ( const detail::MoveWrapper< T > &  t)

Remove move wrapper from a movable object.

Template Parameters
TThe wrapped object type
Parameters
tThe object move warpper
Returns
A reference to the wrapped object

References madness::detail::MoveWrapper< T >::get().

Referenced by madness::FutureImpl< bool >::set().

template<typename T >
disable_if<detail::is_movable<T>, T&>::type madness::unwrap_move ( T &  t)

Passthrough function for a non-movable object.

Template Parameters
TThe object type
Parameters
tThe objecmove warpper
Returns
A reference to the object
template<class T >
UnwrapReference<T>::type& madness::unwrap_ref ( T &  t)
inline

Function for retreaving the referenced object.

Template Parameters
Thereference type
Parameters
tThe reference being unwrapped
Returns
A reference to the original objects
template<typename T >
Vector<T,1> madness::vec ( x)
template<typename T >
Vector<T,2> madness::vec ( x,
y 
)

Your friendly neighborhood factory function.

template<typename T >
Vector<T,3> madness::vec ( x,
y,
z 
)

Your friendly neighborhood factory function.

template<typename T >
Vector<T,4> madness::vec ( x,
y,
z,
xx 
)

Your friendly neighborhood factory function.

template<typename T >
Vector<T,5> madness::vec ( x,
y,
z,
xx,
yy 
)

Your friendly neighborhood factory function.

template<typename T >
Vector<T,6> madness::vec ( x,
y,
z,
xx,
yy,
zz 
)

Your friendly neighborhood factory function.

template<typename T >
std::vector<T> madness::vector_factory ( const T &  v0)
inline

Returns a std::vector<T> initialized from the arguments.

Referenced by main(), SCFParameters::read_file(), and madness::CalculationParameters::read_file().

template<typename T >
std::vector<T> madness::vector_factory ( const T &  v0,
const T &  v1 
)
inline

Returns a std::vector<T> initialized from the arguments.

template<typename T >
std::vector<T> madness::vector_factory ( const T &  v0,
const T &  v1,
const T &  v2 
)
inline

Returns a std::vector<T> initialized from the arguments.

template<typename T >
std::vector<T> madness::vector_factory ( const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3 
)
inline

Returns a std::vector<T> initialized from the arguments.

template<typename T >
std::vector<T> madness::vector_factory ( const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4 
)
inline

Returns a std::vector<T> initialized from the arguments.

template<typename T >
std::vector<T> madness::vector_factory ( const T &  v0,
const T &  v1,
const T &  v2,
const T &  v3,
const T &  v4,
const T &  v5 
)
inline

Returns a std::vector<T> initialized from the arguments.

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.

This so that we don't have to have friend functions in a different header.

If using sparsity (tol != 0) you must have created the tree of norms already for both left and right.

References madness::Function< T, NDIM >::fence(), L, and madness::Function< T, NDIM >::TENSOR_RESULT_TYPE().

Referenced by mul(), and mul_sparse().

double madness::wall_time ( )
WorldMemInfo * madness::world_mem_info ( )

Returns pointer to internal structure.

Referenced by main(), and print_stats().

int madness::x_rks_s__ ( const double *  r__,
double *  f,
double *  dfdra 
)
int madness::x_uks_s__ ( double *  ra,
double *  rb,
double *  f,
double *  dfdra,
double *  dfdrb 
)
void madness::xterm_debug ( const char *  path,
const char *  display 
)

Referenced by madness::World::args(), and startup().

void madness::xterm_debug_breakpoint ( )
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::zero_functions ( World &  world,
int  n 
)

Generates a vector of zero functions.

References PROFILE_BLOCK.

Variable Documentation

const double madness::acut1e_6 = 0.25
const double madness::c_b14 = 1.333333333333333333333333333333

Referenced by c_uks_vwn5__().

const double madness::c_b2 = 0.333333333333333333333333333333333
const double madness::c_b7 = 0.333333333333333333333333333333

Referenced by c_rks_vwn5__(), and c_uks_vwn5__().

double madness::cpufrequency
Random madness::default_random_generator

The default random number stream.

Referenced by test().

NDIM& madness::f

Referenced by madness::LoadBalanceDeux< NDIM >::add_tree(), apply(), apply_1d_realspace_push(), SCF::apply_hf_exchange(), madness::SCF::apply_hf_exchange(), madness::Solver< T, NDIM >::apply_hf_exchange(), madness::MP2::asymmetry(), madness::archive::bufar_size(), cfrac(), madness::CIS::CIS(), compare1F1(), CubicInterpolationTable< complexd >::CubicInterpolationTable(), madness::VectorOfFunctionsSpace< T, VDIM, FDIM >::destroy(), mu::Parser::Diff(), testing::internal::DownCast_(), draw_plane(), CubicInterpolationTable< complexd >::err(), madness::XCfunctional::exc(), XCfunctional::exc(), fcube(), madness::FunctionImpl< T, NDIM >::fcube(), madness::DistributedMatrix< double >::fill(), madness::Function< double, 6 >::gaxpy_ext(), madness::FunctionImpl< Q, NDIM >::gaxpy_ext(), madness::FunctionImpl< Q, NDIM >::gaxpy_ext_recursive(), inner(), madness::Function< double, 6 >::inner_ext(), madness::Function< double, 6 >::inner_ext_local(), line_plot(), load(), madness::LoadBalanceDeux< NDIM >::load_balance(), loadParameters(), loadParameters2(), main(), map_tensor(), madness::FunctionImpl< T, NDIM >::mapdim(), matrix_inner(), matrix_inner(), madness::MP2::MP2(), multiply(), new_am_arg(), op(), xc_lda_potential::operator()(), madness::xc_lda_potential::operator()(), madness::GenericConvolution1D< Q, opT >::Shmoo::operator()(), madness::FunctionImpl< T, NDIM >::parent_to_child_NS(), madness::XCfunctional::plot(), XCfunctional::plot(), plot(), plot_plane(), plotdx(), plotvtk(), madness::DQueue< madness::PoolTaskInterface * >::pop_front(), position_stream(), print_cube(), printBasis(), projectPsi(), madness::DQueue< madness::PoolTaskInterface * >::push_front(), InputParameters::read(), MolecularEntity::read_file(), Molecule::read_file(), madness::Molecule::read_file(), SCFParameters::read_file(), madness::ElectronicStructureParams::read_file(), madness::CalculationParameters::read_file(), save(), scaled_plotvtk_begin(), madness::DQueue< madness::PoolTaskInterface * >::scan(), madness::detail::DistCache< keyT >::set_cache_value(), madness::SCF::set_protocol(), madness::TDA::setup(), madness::ConditionVariable::signal(), madness::Random::test(), test(), Test5(), Test6(), Test6a(), madness::Solver< T, NDIM >::test_periodicity(), testNavierStokes(), mpfr::to_string(), madness::Function< double, 6 >::unaryop(), madness::MutexFair::unlock(), updatex(), madness::XCfunctional::vxc(), and XCfunctional::vxc().

NDIM const Function<R,NDIM>& madness::g
int madness::hwthreads
int64_t madness::memorysize
const int madness::NUMEVENTS = 0

Referenced by print_stats().

const char* madness::tensor_type_names[]

Referenced by Test1(), Test3(), Test5(), Test6(), and Test7().