MADNESS 0.10.1
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables

Namespace for all elements and tools of MADNESS. More...

Namespaces

namespace  archive
 Namespace for I/O tools.
 
namespace  cblas
 
namespace  constants
 Namespace storing mathematical and physical constants.
 
namespace  detail
 
namespace  guessfactory
 
namespace  Hash_private
 
namespace  info
 Runtime details on the configuration and version of MADNESS.
 
namespace  is_istreammable_ns
 
namespace  is_ostreammable_ns
 
namespace  lapacke
 
namespace  meta
 
namespace  operators
 
namespace  profiling
 
namespace  tr1
 
namespace  units
 

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...
 
class  AC
 
struct  accumulate_op
 inserts/accumulates coefficients into impl's tree More...
 
struct  ACParameters
 Contains all the parameters for the asymptotic correction. More...
 
struct  add_future
 maps type T to Future<T>. More...
 
struct  add_future< Future< T > >
 maps Future<T> to Future<T>. More...
 
class  AdhocNuclearCorrelationFactor
 this ncf has no information about itself, only U2 and U1 assigned More...
 
class  AmArg
 World active message that extends an RMI message. More...
 
struct  apply_kernel_helper
 
struct  asymptotic_density
 
struct  asymptotic_slater
 
struct  asymptotic_slater_kernel
 
class  Atom
 
struct  atom_information
 Needed information about atom to compute asymptotic correction. More...
 
struct  AtomCore
 
class  atomic_attraction
 
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  AtomicBasisSet
 Contracted Gaussian basis. More...
 
struct  AtomicData
 
class  AtomicInt
 An integer with atomic set, get, read+increment, read+decrement, and decrement+test operations. More...
 
class  BandlimitedPropagator
 Class to evaluate the filtered Schrodinger free-particle propagator in real space. More...
 
class  Barrier
 
class  BaseTensor
 The base class for tensors defines generic capabilities. More...
 
class  BasisFunctions
 
class  Batch
 a batch consists of a 2D-input batch and a 1D-output batch: K-batch <- (I-batch, J-batch) More...
 
class  Batch_1D
 
struct  BinaryOpStructure
 computes the corrected exchange correlation potential using the hartree potential More...
 
class  BinSorter
 A parallel bin sort across MPI processes. More...
 
class  BoundaryConditions
 This class is used to specify boundary conditions for all operators. More...
 
class  BSHApply
 apply the BSH operator on a vector of functions with corresponding potentials More...
 
class  BSHFunctionInterface
 a function like f(x) = exp(-mu x)/x More...
 
struct  CalculationParameters
 
class  CallbackInterface
 The class used for callbacks (e.g., dependency tracking). More...
 
struct  cartesian_grid
 
class  CC2
 
struct  CC_vecfunction
 A helper structure which holds a map of functions. More...
 
class  CCConvolutionOperator
 
class  CCFunction
 structure for a CC Function 3D which holds an index and a type More...
 
struct  CCIntermediatePotentials
 little helper structure which manages the stored singles potentials More...
 
struct  CCMessenger
 
class  CCPair
 
class  CCPairFunction
 a 6D function, either in full or low rank form, possibly including an 2-particle function More...
 
struct  CCParameters
 
struct  CCTimer
 Timer Structure. More...
 
struct  charactertable
 
struct  CISData
 POD for CIS excitation. More...
 
class  Cloud
 cloud class More...
 
class  CoeffTracker
 a class to track where relevant (parent) coeffs are More...
 
struct  commandlineparser
 very simple command line parser More...
 
class  Complex_CIS_Parameters
 
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  CorePotentialManager
 
class  Coulomb
 
class  CubicInterpolationTable
 An class for 1-D data interpolation based on cubic polynomials. More...
 
struct  default_allocator
 
class  DeferredDeleter
 
struct  dens_inv
 
struct  density_mask_operator
 
class  DependencyInterface
 Provides an interface for tracking dependencies. More...
 
class  Derivative
 Implements derivatives operators with variety of boundary conditions on simulation domain. More...
 
class  DerivativeBase
 Tri-diagonal operator traversing tree primarily for derivative operator. More...
 
class  DerivativeOperator
 
struct  DFParameters
 
class  DFT
 
class  DFTCoulombOp
 
class  DFTCoulombPeriodicOp
 
class  dftgrid
 
class  DFTNuclearChargeDensityOp
 
class  DFTNuclearPotentialOp
 
class  Diamagnetic_potential_factor
 to be put in a separate file More...
 
class  DipoleFunctor
 A MADNESS functor to compute either x, y, or z. 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
 
struct  divide_add_interpolate
 Class to compute terms of the potential. More...
 
class  DNuclear
 derivative of the (regularized) nuclear potential wrt nuclear displacements More...
 
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  ElectronCuspyBox_op
 
struct  ElectronicStructureParams
 
class  ElectronPair
 enhanced POD for the pair functions More...
 
struct  ElectronPairIterator
 
class  ElectronRepulsionInterface
 a function like f(x)=1/x More...
 
class  ElementaryInterface
 ElementaryInterface (formerly FunctorInterfaceWrapper) interfaces a c-function. More...
 
struct  error_leaf_op
 
class  Exchange
 
class  F12Parameters
 
class  F12Potentials
 Class that provides all necessary F12 Potentials and Integrals. More...
 
class  Fock
 Computes matrix representation of the Fock operator. 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  FunctionCommonFunctionality
 collect common functionality does not need to be member function of funcimpl More...
 
class  FunctionDefaults
 FunctionDefaults holds default paramaters as static class members. More...
 
class  FunctionFactory
 FunctionFactory implements the named-parameter idiom for Function. More...
 
class  FunctionFunctorInterface
 Abstract base class interface required for functors used as input to Functions. More...
 
class  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...
 
class  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< Future< T > >
 A future of a future is forbidden (by deleted constructor). More...
 
class  Future< std::vector< Future< T > > >
 Specialization of Future for a vector of Futures. More...
 
class  Future< void >
 Specialization of Future<void> for internal convenience. This does nothing useful! More...
 
struct  future_to_ref
 
struct  future_to_ref< const Future< T > & >
 
struct  future_to_ref< Future< T > & >
 
struct  future_to_ref< Future< T > * >
 
struct  future_to_ref< Future< T > >
 
class  FutureImpl
 Implements the functionality of futures. More...
 
class  FutureImpl< void >
 Specialization of FutureImpl<void> for internal convenience. This 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  GaussSlater
 A nuclear correlation factor class. More...
 
class  GeneralTwoElectronInterface
 a function like f(x)=1/x More...
 
class  GenericConvolution1D
 Generic 1D convolution using brute force (i.e., slow) adaptive quadrature for rnlp. More...
 
class  GenTensor
 
class  GFit
 
class  Gnuplot
 
class  GradientalGaussSlater
 A nuclear correlation factor class. More...
 
class  gridbase
 
class  Group
 A collection of processes. More...
 
class  GTHPseudopotential
 
struct  harmonic_potential_boxed
 functor for the diamagnetic term in a box More...
 
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  Hash
 Hash functor. More...
 
class  HighDimIndexIterator
 
class  IEigSolverObserver
 
struct  imag_op
 
class  IndexIterator
 
struct  Info
 POD holding some basic functions and some intermediates for the CC2 calculation. More...
 
struct  InitParameters
 
struct  insert_op
 insert/replaces the coefficients into the function More...
 
class  int_factor_functor
 Functor for the correction factor, which is multiplied with the exchange correlation potential. More...
 
struct  is_any_function_pointer
 is true type if T is a pointer to free or member function More...
 
struct  is_any_function_pointer< T, std::enable_if_t< std::is_member_function_pointer< T >::value||is_function_pointer_v< T > > >
 
struct  is_archive
 Checks if T is an archive type. More...
 
struct  is_archive< archive::BinaryFstreamInputArchive >
 
struct  is_archive< archive::BinaryFstreamOutputArchive >
 
struct  is_archive< archive::BufferInputArchive >
 
struct  is_archive< archive::BufferOutputArchive >
 
struct  is_archive< archive::ContainerRecordInputArchive >
 
struct  is_archive< archive::ContainerRecordOutputArchive >
 
struct  is_archive< archive::MPIInputArchive >
 
struct  is_archive< archive::MPIOutputArchive >
 
struct  is_archive< archive::MPIRawInputArchive >
 
struct  is_archive< archive::MPIRawOutputArchive >
 
struct  is_archive< archive::ParallelInputArchive< localarchiveT > >
 
struct  is_archive< archive::ParallelOutputArchive< localarchiveT > >
 
struct  is_archive< archive::TextFstreamInputArchive >
 
struct  is_archive< archive::TextFstreamOutputArchive >
 
struct  is_archive< archive::VectorInputArchive >
 
struct  is_archive< archive::VectorOutputArchive >
 
struct  is_cereal_archive
 
struct  is_default_serializable
 is std::true_type if T can be serialized to Archive without specialized serialize() method More...
 
struct  is_default_serializable_helper
 
struct  is_default_serializable_helper< Archive, archive::archive_array< T >, std::enable_if_t< is_default_serializable_helper< Archive, T >::value > >
 
struct  is_default_serializable_helper< archive::BinaryFstreamInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::BinaryFstreamOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::BufferInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::BufferOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::ContainerRecordInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::ContainerRecordOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::MPIInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::MPIOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::MPIRawInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::MPIRawOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::ParallelInputArchive< localarchiveT >, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::ParallelOutputArchive< localarchiveT >, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::TextFstreamInputArchive, T, std::enable_if_t< is_iostreammable_v< T >||is_any_function_pointer_v< T > > >
 
struct  is_default_serializable_helper< archive::TextFstreamOutputArchive, T, std::enable_if_t< is_iostreammable_v< T >||std::is_function_v< T >||is_any_function_pointer_v< T > > >
 
struct  is_default_serializable_helper< archive::VectorInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_default_serializable_helper< archive::VectorOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  is_function_pointer
 is true type if T is a pointer to a free function More...
 
struct  is_function_pointer< T, std::enable_if_t< std::is_function< typename std::remove_pointer< T >::type >::value > >
 
struct  is_future
 test if a type is a future. More...
 
struct  is_future< Future< T > >
 
struct  is_input_archive
 Checks if T is an input archive type. More...
 
struct  is_input_archive< archive::BinaryFstreamInputArchive >
 
struct  is_input_archive< archive::BufferInputArchive >
 
struct  is_input_archive< archive::ContainerRecordInputArchive >
 
struct  is_input_archive< archive::MPIInputArchive >
 
struct  is_input_archive< archive::MPIRawInputArchive >
 
struct  is_input_archive< archive::ParallelInputArchive< localarchiveT > >
 
struct  is_input_archive< archive::TextFstreamInputArchive >
 
struct  is_input_archive< archive::VectorInputArchive >
 
struct  is_istreammable
 
struct  is_madness_function
 
struct  is_madness_function< madness::Function< T, NDIM > >
 
struct  is_madness_function_vector
 
struct  is_madness_function_vector< std::vector< typename madness::Function< T, NDIM > > >
 
struct  is_ostreammable
 
struct  is_output_archive
 Checks if T is an output archive type. More...
 
struct  is_output_archive< archive::BinaryFstreamOutputArchive >
 
struct  is_output_archive< archive::BufferOutputArchive >
 
struct  is_output_archive< archive::ContainerRecordOutputArchive >
 
struct  is_output_archive< archive::MPIOutputArchive >
 
struct  is_output_archive< archive::MPIRawOutputArchive >
 
struct  is_output_archive< archive::ParallelOutputArchive< localarchiveT > >
 
struct  is_output_archive< archive::TextFstreamOutputArchive >
 
struct  is_output_archive< archive::VectorOutputArchive >
 
struct  is_scalar_result_ptr
 
struct  is_scalar_result_ptr< std::shared_ptr< madness::ScalarResult< T > > >
 
struct  is_scalar_result_ptr_vector
 
struct  is_scalar_result_ptr_vector< std::vector< std::shared_ptr< typename madness::ScalarResult< T > > > >
 
struct  is_serializable
 
struct  is_text_archive
 This trait types tests if Archive is a text archive. More...
 
struct  is_text_archive< archive::TextFstreamInputArchive >
 
struct  is_text_archive< archive::TextFstreamOutputArchive >
 
struct  is_trivially_copyable
 trait for trivial (=bitwise) copyability of T, defaults to std::is_trivially_copyable<T> but can be specialized as needed More...
 
struct  is_trivially_serializable
 
struct  is_vector
 
struct  is_vector< std::vector< Q > >
 
struct  IsSupported
 
struct  IsSupported< TypeData, ReturnType, true >
 
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  Kinetic
 
class  KPoint
 
class  Laplacian
 the Laplacian operator: \sum_i \nabla^2_i More...
 
struct  lbcost
 
struct  LBCost
 
class  LBDeuxPmap
 
class  LBNodeDeux
 
class  Leaf_op
 
struct  leaf_op
 
class  Leaf_op_other
 
class  LevelPmap
 A pmap that locates children on odd levels with their even level parents. More...
 
class  LinAlgException
 Linear algebra Exception. More...
 
class  LinearSlater
 A nuclear correlation factor class. More...
 
class  LLRVDomainMask
 Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask characteristic functions. More...
 
class  LoadBalanceDeux
 
class  LoadBalImpl
 
class  Localizer
 
class  LocalPotentialOperator
 
class  LowDimIndexIterator
 
class  LowRankFunction
 LowRankFunction represents a hi-dimensional (NDIM) function as a sum of products of low-dimensional (LDIM) functions. More...
 
class  LowRankFunctionFactory
 
struct  LowRankFunctionParameters
 
class  lr_pot_functor
 Functor for the 1/r potential to induce the correct asymptotic behaviour of the exchange correlation potential. More...
 
struct  LRFunctorBase
 the low-rank functor is what the LowRankFunction will represent More...
 
struct  LRFunctorF12
 
struct  LRFunctorPure
 
class  Lz
 the z component of the angular momentum More...
 
class  MacroTask
 
class  MacroTaskBase
 base class More...
 
class  MacroTaskConstantPart
 
class  MacroTaskIntermediate
 
class  MacroTaskIteratePair
 
class  MacroTaskMp2ConstantPart
 
class  MacroTaskMp2UpdatePair
 
class  MacroTaskOperationBase
 
class  MacroTaskPartitioner
 partition one (two) vectors into 1D (2D) batches. More...
 
class  MacroTaskQ
 
class  MadnessException
 Base class for exceptions thrown in MADNESS. More...
 
struct  MatrixInnerTask
 
struct  max_of_x_1_smooth
 
struct  merging_operator
 
class  molecular_grid
 given a molecule, return a suitable grid More...
 
class  MolecularCorePotentialFunctor
 
class  MolecularEnergy
 
class  MolecularOptimizationParameters
 
struct  MolecularOptimizationTargetInterface
 
class  MolecularOptimizer
 Molecular optimizer derived from the QuasiNewton optimizer. More...
 
class  MolecularOrbitals
 
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...
 
class  MP3
 
struct  mul_leaf_op
 
struct  munging_operator
 
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...
 
struct  MyTimer
 Timer structure. More...
 
class  Nemo
 The Nemo class. More...
 
class  Nemo_complex_Parameters
 
class  NemoBase
 
class  NonlinearSolverND
 A simple Krylov-subspace nonlinear equation solver. More...
 
class  NonstandardIndexIterator
 
struct  noop
 
class  Nuclear
 
class  NuclearCorrelationFactor
 ABC for the nuclear correlation factors. More...
 
struct  NuclearCuspyBox_op
 
class  OEP
 
class  OEP_Parameters
 
struct  op_leaf_op
 
class  Operator
 A generic operator: takes in one T and produces another T. More...
 
struct  OperatorInfo
 
struct  OptimizationTargetInterface
 The interface to be provided by functions to be optimized. More...
 
struct  OptimizerInterface
 The interface to be provided by optimizers. More...
 
struct  OrbitalIterator
 iterates the third index for pair coupling More...
 
class  OuterProjector
 an outer product of two projectors More...
 
struct  PairEnergies
 POD structure for energies. More...
 
struct  Pairs
 
struct  PairVectorMap
 
class  ParametrizedExchange
 
struct  particle
 
class  PCM
 interface class to the PCMSolver library More...
 
struct  permutation
 permutations in physisists notation: <ij | kl> = (ik | jl), loop over ik<jl More...
 
class  pg_operator
 This class implements the symmetry operations (not the point groups) More...
 
struct  PlotParameters
 
class  PNO
 
struct  PNOPairs
 POD for PNO code. More...
 
class  PNOParameters
 
class  poly4erfc
 
class  Polynomial
 A nuclear correlation factor class. More...
 
class  PoolTaskInterface
 Lowest level task interface. More...
 
class  PoolTaskNull
 A no-operation task used for various purposes. More...
 
class  PotentialManager
 
struct  printleveler
 
class  ProcessKey
 Key object that includes the process information. More...
 
struct  ProfileStat
 Simple container for parallel profile statistic. More...
 
class  Projector
 simple projector class More...
 
class  projector_irrep
 
class  ProjectorBase
 
class  ProjRLMFunctor
 
class  ProjRLMStore
 
class  PseudoNuclearCorrelationFactor
 
class  PthreadConditionVariable
 Simple wrapper for Pthread condition variable with its own mutex. More...
 
class  QCCalculationParametersBase
 class for holding the parameters for calculation More...
 
struct  QCParameter
 structure holding the value for a given parameter More...
 
class  QCPropertyInterface
 class implementing properties of QC models More...
 
struct  qmsg
 
class  QProjector
 orthogonality projector More...
 
class  QuasiNewton
 Optimization via quasi-Newton (BFGS or SR1 update) More...
 
struct  R_times_arg_div_R
 compute the expression (\sum_i R_i)^(-1) \sum_i R_i arg(r,B,v_i) More...
 
class  Random
 A random number generator (portable, vectorized, and thread-safe) More...
 
class  randomgrid
 grid with random points around the origin, with a Gaussian distribution More...
 
class  RandomizedMatrixDecomposition
 
struct  RandomState
 
class  Range
 Range, vaguely a la Intel TBB, to encapsulate a random-access, STL-like start and end iterator with chunksize. More...
 
struct  real_op
 
struct  Recordlist
 
class  RecursiveMutex
 Recursive mutex using pthread mutex operations. More...
 
class  RemoteReference
 Simple structure used to manage references/pointers to remote instances. More...
 
struct  remove_fcvr
 
struct  remove_future
 maps Future<T> to T. More...
 
struct  remove_future< const Future< T > & >
 
struct  remove_future< const Future< T > >
 
struct  remove_future< Future< T > & >
 
struct  remove_future< Future< T > && >
 
struct  remove_future< Future< T > >
 This metafunction maps Future<T> to T. More...
 
struct  response_function_allocator
 
struct  response_matrix_allocator
 
struct  response_space
 
struct  ResponseParameters
 
struct  RMDFactory
 simple factory pattern for the RandomizedMatrixDecomposition More...
 
class  RMI
 This class implements the communications server thread and provides the only send interface. More...
 
struct  RMISendReq
 This for RMI server thread to manage lifetime of WorldAM messages that it is sending. More...
 
struct  RMIStats
 
class  ScalarResult
 helper class for returning the result of a task, which is not a madness Function, but a simple scalar More...
 
class  SCF
 
class  scf_data
 
class  SCFOperatorBase
 
class  SCFProtocol
 struct for running a protocol of subsequently tightening precision More...
 
class  ScopedMutex
 Mutex that is applied/released at start/end of a scope. 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  Slater
 A nuclear correlation factor class. More...
 
struct  slater_kernel
 
struct  slater_kernel_apply
 
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...
 
class  SliceGenTensor
 
class  SliceLowRankTensor
 implements a temporary(!) slice of a LowRankTensor More...
 
class  SliceTensor
 Indexing a non-constant tensor with slices returns a SliceTensor. More...
 
class  smooth
 
class  Solver
 The main class of the periodic DFT solver. More...
 
struct  SolverTargetInterface
 The interface to be provided by targets for non-linear equation solver. More...
 
struct  Specialbox_op
 
class  SpectralPropagator
 Spectral propagtor in time. Refer to documentation of file spectralprop.h for math detail. More...
 
class  SpectralPropagatorGaussLobatto
 
struct  spherical_box
 an 2-dimensional smooth mask that is 1 inside the radius and 0 outside More...
 
class  Spinlock
 Spinlock using pthread spinlock operations. More...
 
class  SRConf
 
class  Stack
 Dynamically sized Stack with small stack size optimization. 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  SVDTensor
 
class  SystolicFixOrbitalOrders
 
class  SystolicMatrixAlgorithm
 Base class for parallel algorithms that employ a systolic loop to generate all row pairs in parallel. More...
 
class  SystolicPMOrbitalLocalize
 
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 information about the thread environment to a user's task. More...
 
class  TDHF
 
struct  TDHF_allocator
 
class  Tensor
 A tensor is a multidimension array. 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...
 
struct  test_output
 small class for pretty printing of test output More...
 
class  Thread
 Simplified thread wrapper to hide pthread complexity. More...
 
class  ThreadBase
 Simplified thread wrapper to hide pthread complexity. More...
 
class  ThreadBinder
 
class  ThreadPool
 A singleton pool of threads for dynamic execution of tasks. More...
 
class  ThreadPoolThread
 ThreadPool thread object. More...
 
struct  timer
 
class  Timer
 
struct  trajectory
 
struct  true_op
 
class  TwoBodyFunctionComponentBase
 
class  TwoBodyFunctionPureComponent
 a two-body, explicitly 6-dimensional function More...
 
class  TwoBodyFunctionSeparatedComponent
 
class  TwoElectronFactory
 factory for generating TwoElectronInterfaces More...
 
class  TwoElectronInterface
 base class to compute the wavelet coefficients for an isotropic 2e-operator More...
 
class  twoscale_cache_class
 
struct  unaryexp
 
struct  UnaryOpStructure
 computes the corrected exchange correlation potential using the multipole approximation More...
 
class  uniqueidT
 Class for unique global IDs. More...
 
struct  valarray_allocator
 
class  Vector
 A simple, fixed dimension vector. More...
 
struct  vector_function_allocator
 
class  VectorOfFunctionsSpace
 A vector space using MADNESS Vectors of MADNESS Functions. More...
 
class  VectorSpace
 A vector space using MADNESS Vectors. More...
 
class  VLocalFunctor
 
class  World
 A parallel world class. 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  WorldDCLocalPmap
 Local process map will always return the current process as owner. 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...
 
struct  WorldObjectBase
 Base class for WorldObject, useful for introspection. 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...
 
struct  write_test_input
 will write a test input and remove it from disk upon destruction More...
 
class  WSTAtomicBasisFunctor
 
struct  X_space
 
struct  X_vector
 
struct  xc_functional
 Class to compute the energy functional. More...
 
struct  xc_kernel_apply
 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
 
class  XCOperator
 operator class for the handling of DFT exchange-correlation functionals More...
 
class  XNonlinearSolver
 Generalized version of NonlinearSolver not limited to a single madness function. More...
 
class  Zcis
 
class  Znemo
 

Typedefs

typedef void(* am_handlerT) (const AmArg &)
 Type of AM handler functions.
 
typedef SeparatedConvolution< double_complex, 1 > complex_convolution_1d
 
typedef std::shared_ptr< complex_convolution_1dcomplex_convolution_1d_ptr
 
typedef SeparatedConvolution< double_complex, 2 > complex_convolution_2d
 
typedef std::shared_ptr< complex_convolution_2dcomplex_convolution_2d_ptr
 
typedef SeparatedConvolution< double_complex, 3 > complex_convolution_3d
 
typedef std::shared_ptr< complex_convolution_3dcomplex_convolution_3d_ptr
 
typedef SeparatedConvolution< double_complex, 4 > complex_convolution_4d
 
typedef std::shared_ptr< complex_convolution_4dcomplex_convolution_4d_ptr
 
typedef SeparatedConvolution< double_complex, 5 > complex_convolution_5d
 
typedef std::shared_ptr< complex_convolution_5dcomplex_convolution_5d_ptr
 
typedef SeparatedConvolution< double_complex, 6 > complex_convolution_6d
 
typedef std::shared_ptr< complex_convolution_6dcomplex_convolution_6d_ptr
 
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 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 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 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 Function< std::complex< double >, 3 > complex_functionT
 
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 Convolution1D< double_complexcomplex_operatorT
 
typedef Tensor< double_complexcomplex_tensor
 
typedef PthreadConditionVariable CONDITION_VARIABLE_TYPE
 
typedef Vector< double, 1 > coord_1d
 
typedef Vector< double, 2 > coord_2d
 
typedef Vector< double, 3 > coord_3d
 
typedef Vector< double, 4 > coord_4d
 
typedef Vector< double, 5 > coord_5d
 
typedef Vector< double, 6 > coord_6d
 
typedef Vector< double, 3 > coordT
 
typedef std::vector< complex_functionTcvecfuncT
 
template<typename T >
using decay_tuple = decltype(decay_types(std::declval< T >()))
 
typedef DistributedMatrix< double > distmatT
 
typedef std::pair< uniqueidT, std::size_t > DistributedID
 Distributed ID which is used to identify objects.
 
typedef FunctionFactory< double, 3 > factoryT
 
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 Function< double, 3 > functionT
 
typedef std::shared_ptr< FunctionFunctorInterface< double, 3 > > functorT
 
template<typename T >
using future_to_ref_t = typename future_to_ref< T >::type
 
template<typename T , typename Archive >
using has_freestanding_default_serialize_t = decltype(default_serialize(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive , typename = std::enable_if_t<std::is_pointer_v<T>>>
using has_freestanding_default_serialize_with_size_t = decltype(default_serialize(std::declval< Archive & >(), std::declval< const T & >(), 1u))
 
template<typename T , typename Archive >
using has_freestanding_serialize_t = decltype(serialize(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive , typename = std::enable_if_t<std::is_pointer_v<T>>>
using has_freestanding_serialize_with_size_t = decltype(serialize(std::declval< Archive & >(), std::declval< T & >(), 1u))
 
template<typename T , typename Archive , typename = std::enable_if_t<!std::is_pointer_v<T>>>
using has_freestanding_serialize_with_version_t = decltype(serialize(std::declval< Archive & >(), std::declval< T & >(), 0u))
 
template<typename T , typename Archive >
using has_member_serialize_t = decltype(std::declval< T & >().serialize(std::declval< Archive & >()))
 
template<typename T , typename Archive >
using has_member_serialize_with_version_t = decltype(std::declval< T & >().serialize(std::declval< Archive & >(), 0u))
 
template<typename T , typename Archive >
using has_nonmember_load_t = decltype(madness::archive::ArchiveLoadImpl< Archive, T >::load(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using has_nonmember_serialize_t = decltype(madness::archive::ArchiveSerializeImpl< Archive, T >::serialize(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using has_nonmember_store_t = decltype(madness::archive::ArchiveStoreImpl< Archive, T >::store(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using has_nonmember_wrap_load_t = decltype(madness::archive::ArchiveImpl< Archive, T >::wrap_load(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using has_nonmember_wrap_store_t = decltype(madness::archive::ArchiveImpl< Archive, T >::wrap_store(std::declval< Archive & >(), std::declval< T & >()))
 
typedef std::size_t hashT
 The hash value type.
 
template<typename T , std::size_t NDIM>
using intermediateT = Pairs< Function< T, NDIM > >
 f12 and g12 intermediates of the form <f1|op|f2> (with op=f12 or op=g12) will be saved using the pair structure
 
template<typename T >
using is_archive_defined_t = typename is_archive< std::remove_reference_t< std::remove_cv_t< T > > >::type
 
template<typename T >
using is_input_archive_defined_t = typename is_input_archive< std::remove_reference_t< std::remove_cv_t< T > > >::type
 
template<typename T >
using is_output_archive_defined_t = typename is_output_archive< std::remove_reference_t< std::remove_cv_t< T > > >::type
 
using json = nlohmann::json
 
typedef int Level
 
typedef NonlinearSolverND< 3 > NonlinearSolver
 
typedef XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > > NonlinearVectorSolver_3d
 
typedef XNonlinearSolver< std::vector< Function< double, 6 > >, double, vector_function_allocator< double, 6 > > NonlinearVectorSolver_6d
 
typedef SeparatedConvolution< double, 3 > operatorT
 
typedef std::pair< vecfuncT, vecfuncTpairvecfuncT
 
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 std::shared_ptr< WorldDCPmapInterface< Key< 3 > > > pmapT
 
typedef std::shared_ptr< operatorTpoperatorT
 
typedef SeparatedConvolution< double, 1 > real_convolution_1d
 
typedef std::shared_ptr< real_convolution_1dreal_convolution_1d_ptr
 
typedef SeparatedConvolution< double, 2 > real_convolution_2d
 
typedef std::shared_ptr< real_convolution_2dreal_convolution_2d_ptr
 
typedef SeparatedConvolution< double, 3 > real_convolution_3d
 
typedef std::shared_ptr< real_convolution_3dreal_convolution_3d_ptr
 
typedef SeparatedConvolution< double, 4 > real_convolution_4d
 
typedef std::shared_ptr< real_convolution_4dreal_convolution_4d_ptr
 
typedef SeparatedConvolution< double, 5 > real_convolution_5d
 
typedef std::shared_ptr< real_convolution_5dreal_convolution_5d_ptr
 
typedef SeparatedConvolution< double, 6 > real_convolution_6d
 
typedef std::shared_ptr< real_convolution_6dreal_convolution_6d_ptr
 
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 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 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 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 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 Tensor< double > real_tensor
 
typedef std::ptrdiff_t rel_fn_ptr_t
 
template<typename T >
using remove_fcvr_t = typename remove_fcvr< T >::type
 
template<typename T >
using remove_future_t = typename remove_future< T >::type
 C++11 version of REMFUTURE.
 
typedef std::vector< vector_real_function_3dresponse_matrix
 
typedef void(* rmi_handlerT) (void *buf, size_t nbyte)
 This is the generic low-level interface for a message handler.
 
typedef Mutex SCALABLE_MUTEX_TYPE
 
typedef Mutex SPINLOCK_TYPE
 
typedef tbb::split Split
 Dummy class, a la Intel TBB, used to distinguish splitting constructor.
 
typedef std::vector< pairvecfuncTsubspaceT
 
typedef Tensor< double_complextensor_complex
 
typedef Tensor< double > tensor_real
 
typedef Tensor< double > tensorT
 
typedef int64_t Translation
 
typedef vector< functionTvecfuncT
 
typedef std::vector< std::complex< double > > vector_complex
 
typedef std::vector< complex_function_1dvector_complex_function_1d
 
typedef std::vector< complex_function_2dvector_complex_function_2d
 
typedef std::vector< complex_function_3dvector_complex_function_3d
 
typedef std::vector< complex_function_4dvector_complex_function_4d
 
typedef std::vector< complex_function_5dvector_complex_function_5d
 
typedef std::vector< complex_function_6dvector_complex_function_6d
 
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 std::vector< double > vector_real
 
typedef std::vector< real_function_1dvector_real_function_1d
 
typedef std::vector< real_function_2dvector_real_function_2d
 
typedef std::vector< real_function_3dvector_real_function_3d
 
typedef std::vector< real_function_4dvector_real_function_4d
 
typedef std::vector< real_function_5dvector_real_function_5d
 
typedef std::vector< real_function_6dvector_real_function_6d
 

Enumerations

enum  BCType {
  BC_ZERO , BC_PERIODIC , BC_FREE , BC_DIRICHLET ,
  BC_ZERONEUMANN , BC_NEUMANN
}
 
enum  CalcType {
  CT_UNDEFINED , CT_MP2 , CT_MP3 , CT_CC2 ,
  CT_LRCCS , CT_LRCC2 , CT_CISPD , CT_ADC2 ,
  CT_TDHF , CT_TEST
}
 Calculation Types used by CC2. More...
 
enum  CCState { CCSTATE_UNDEFINED , GROUND_STATE , EXCITED_STATE }
 Type of Pairs used by CC_Pair2 class. More...
 
enum  EnergyType { PROJECTED_ENERGYTYPE , HYLLERAAS_ENERGYTYPE , UNKNOWN_ENERGYTYPE }
 
enum  FuncType {
  UNDEFINED , HOLE , PARTICLE , MIXED ,
  RESPONSE
}
 
enum  GuessType {
  PARTIAL_WAVE_GUESSTYPE , FROM_FILE_GUESSTYPE , PREDEFINED_GUESSTYPE , SCF_GUESSTYPE ,
  EXOP_GUESSTYPE , EMPTY_GUESSTYPE , PSI4_GUESSTYPE , UNKNOWN_GUESSTYPE
}
 
enum  OpType {
  OT_UNDEFINED , OT_ONE , OT_G12 , OT_SLATER ,
  OT_GAUSS , OT_F12 , OT_FG12 , OT_F212 ,
  OT_F2G12 , OT_BSH , OT_SIZE
}
 operator types More...
 
enum  PairType {
  MP2_PAIRTYPE , CISPD_PAIRTYPE , ALL_PAIRTYPE , NONE_PAIRTYPE ,
  UNKNOWN_PAIRTYPE
}
 
enum  PotentialType {
  POT_UNDEFINED , POT_F3D_ , POT_s3a_ , POT_s3b_ ,
  POT_s3c_ , POT_s5a_ , POT_s5b_ , POT_s5c_ ,
  POT_s2b_ , POT_s2c_ , POT_s4a_ , POT_s4b_ ,
  POT_s4c_ , POT_s6_ , POT_ccs_ , POT_cis_ ,
  POT_singles_
}
 CC2 Singles Potentials. More...
 
enum  TensorType { TT_FULL , TT_2D , TT_TENSORTRAIN }
 low rank representations of tensors (see gentensor.h) More...
 
enum  ThreadTag { ThreadTag_NonMADNESS = 0b0000 , ThreadTag_MADNESS = 0b0001 , ThreadTag_Main = 0b0010 }
 bitfield describing thread type More...
 
enum  TreeState {
  reconstructed , compressed , nonstandard , nonstandard_with_leaves ,
  nonstandard_after_apply , redundant , redundant_after_merge , on_demand ,
  unknown
}
 
enum class  WaitPolicy { Busy = 1 , Yield , Sleep }
 wait policies supported by ConditionVariable/DQueue/ThreadPool More...
 

Functions

static const Slice _ (0,-1, 1)
 
static const Slice _reverse (-1, 0,-1)
 Entire tensor.
 
template<std::size_t NDIM>
Function< double, NDIMabs (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the absolute value of the input.
 
template<typename Q , int NDIM>
Function< typename TensorTypeData< Q >::scalar_type, NDIMabs (const Function< Q, NDIM > &func)
 
template<typename T , std::size_t 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.
 
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.
 
double abs (double x)
 
template<typename Q , int NDIM>
Function< typename TensorTypeData< Q >::scalar_type, NDIMabs_square (const Function< Q, NDIM > &func)
 
template<typename T , std::size_t NDIM>
std::enable_if<!TensorTypeData< T >::iscomplex, Function< T, NDIM > >::type abs_square (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs_square of f - global comm only if not reconstructed.
 
template<typename T , std::size_t NDIM>
std::enable_if< TensorTypeData< T >::iscomplex, Function< typenameTensor< T >::scalar_type, NDIM > >::type abs_square (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs_square of f - global comm only if not reconstructed.
 
template<std::size_t NDIM>
Function< double, 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.
 
template<typename T , std::size_t NDIM>
std::vector< Function< typename Tensor< T >::scalar_type, NDIM > > abssq (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Computes the square of a vector of functions — q[i] = abs(v[i])**2.
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMadd (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator+ but with optional fence and no automatic compression.
 
template<typename T , 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].
 
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].
 
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 > > 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 > > 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].
 
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].
 
template<typename funcT >
funcT::returnT adq (double lo, double hi, const funcT &func, double thresh)
 
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)
 
void aligned_add (long n, double *MADNESS_RESTRICT a, const double *MADNESS_RESTRICT b)
 
void aligned_add (long n, double_complex *MADNESS_RESTRICT a, const double_complex *MADNESS_RESTRICT b)
 
template<typename T , typename Q >
static void aligned_add (long n, T *MADNESS_RESTRICT a, const Q *MADNESS_RESTRICT b)
 
template<>
void aligned_axpy (long n, double *MADNESS_RESTRICT a, const double *MADNESS_RESTRICT b, double s)
 
template<>
void aligned_axpy (long n, double_complex *MADNESS_RESTRICT a, const double_complex *MADNESS_RESTRICT b, double s)
 
template<>
void aligned_axpy (long n, double_complex *MADNESS_RESTRICT a, const double_complex *MADNESS_RESTRICT b, double_complex s)
 
template<typename T , typename Q >
static void aligned_axpy (long n, T *MADNESS_RESTRICT a, const T *MADNESS_RESTRICT b, Q s)
 
void aligned_sub (long n, double *MADNESS_RESTRICT a, const double *MADNESS_RESTRICT b)
 
void aligned_sub (long n, double_complex *MADNESS_RESTRICT a, const double_complex *MADNESS_RESTRICT b)
 
template<typename T , typename Q >
static void aligned_sub (long n, T *MADNESS_RESTRICT a, const Q *MADNESS_RESTRICT b)
 
template<typename T >
static void aligned_zero (long n, T *a)
 
AmArgalloc_am_arg (std::size_t nbyte)
 Allocates a new AmArg with nbytes of user data ... delete with free_am_arg.
 
static double analytical_slater_functor (double rho)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > append (const std::vector< Function< T, NDIM > > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 combine two vectors
 
complex_functionT APPLY (const complex_operatorT *q1d, const complex_functionT &psi)
 
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)
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIMapply (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator in non-standard form.
 
template<typename opT , typename T , std::size_t LDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, T), LDIM+LDIM > apply (const opT &op, const std::vector< Function< T, LDIM > > &f1, const std::vector< Function< T, LDIM > > &f2, bool fence=true)
 Apply operator on a hartree product of two low-dimensional functions.
 
template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIMapply (const ProjectorBase &projector, const CCPairFunction< T, NDIM > &argument)
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > apply (const ProjectorBase &projector, const std::vector< CCPairFunction< T, NDIM > > &argument)
 apply the projector on the argument function, potentially yielding a vector of CCPairfunctions as result
 
template<typename T , typename R , std::size_t NDIM, std::size_t KDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > apply (const SeparatedConvolution< T, KDIM > &op, const std::vector< Function< R, NDIM > > f)
 Applies an operator to a vector of functions — q[i] = apply(op,f[i])
 
template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIMapply (const SeparatedConvolution< T, NDIM > &G, const CCPairFunction< T, NDIM > &argument)
 apply the operator on a CCPairfunction, both with the same dimension
 
template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIMapply (const SeparatedConvolution< T, NDIM > &G, const std::vector< CCPairFunction< T, NDIM > > &argument)
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > apply (const SeparatedConvolution< T, NDIM > &op, const std::vector< CCPairFunction< T, NDIM > > &argument)
 
template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIMapply (const SeparatedConvolution< T, NDIM/2 > &op, const CCPairFunction< T, NDIM > &arg)
 apply the operator to the argument
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > apply (const SeparatedConvolution< T, NDIM/2 > &op, const std::vector< CCPairFunction< T, NDIM > > &argument)
 apply the operator to the argument
 
template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> apply (const TensorTrain< T > &op, const TensorTrain< Q > &t, const double thresh)
 apply an operator in TT format on a tensor in TT format
 
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.
 
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.
 
template<typename T , typename R , std::size_t NDIM, std::size_t KDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > apply (World &world, const SeparatedConvolution< T, KDIM > &op, const std::vector< Function< R, NDIM > > f)
 Applies an operator to a vector of functions — q[i] = apply(op,f[i])
 
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])
 
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])
 
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])
 
response_space apply (World &world, real_derivative_3d &op, response_space &f)
 
response_space apply (World &world, std::vector< std::shared_ptr< real_convolution_3d > > &op, response_space &f)
 
response_space apply (World &world, std::vector< std::vector< std::shared_ptr< real_convolution_3d > > > &op, response_space &f)
 
template<typename opT , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIMapply_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), NDIMapply_only (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator ONLY in non-standard form - required other steps missing !!
 
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)
 
CalcType assign_calctype (const std::string name)
 Assigns enum to string.
 
std::string assign_name (const CalcType &inp)
 Assigns strings to enums for formated output.
 
std::string assign_name (const CCState &input)
 Assigns strings to enums for formated output.
 
std::string assign_name (const FuncType &inp)
 Assigns strings to enums for formated output.
 
std::string assign_name (const PotentialType &inp)
 Assigns strings to enums for formated output.
 
std::string atomic_number_to_symbol (const unsigned int atomic_number)
 return the lower-case element symbol corresponding to the atomic number
 
bool autoc (int k, Tensor< double > *c)
 Return the autocorrelation coefficients for scaling functions of given order.
 
void bandlimited_propagator_plot ()
 
void begin_papi_measurement ()
 
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)
 
template<typename L , typename R , typename opT , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMbinary_op (const Function< L, NDIM > &left, const Function< R, NDIM > &right, const opT &op, bool fence=true)
 Generate new function = op(left,right) where op acts on the function values.
 
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIMBSHOperator (World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 Factory function generating separated kernel for convolution with BSH kernel in general NDIM.
 
static SeparatedConvolution< double, 3 > BSHOperator3D (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
 
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * BSHOperatorPtr (World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 Factory function generating separated kernel for convolution with BSH kernel in general NDIM.
 
static SeparatedConvolution< double, 3 > * BSHOperatorPtr3D (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
 
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)
 
template<typename T , std::size_t NDIM>
std::shared_ptr< CCConvolutionOperator< T, NDIM > > CCConvolutionOperatorPtr (World &world, const OpType type, typename CCConvolutionOperator< T, NDIM >::Parameters param)
 
template<typename T >
void change_tensor_type (GenTensor< T > &t, const TensorArgs &targs)
 change representation to targ.tt
 
template<typename T , std::size_t NDIM>
const std::vector< Function< T, NDIM > > & change_tree_state (const std::vector< Function< T, NDIM > > &v, const TreeState finalstate, const bool fence=true)
 change tree state of the functions
 
template<typename T >
static std::enable_if< std::is_floating_point< T >::value, void >::type check_for_inf (const std::string &str, T &arg)
 
template<typename T >
static std::enable_if<!std::is_floating_point< T >::value, void >::type check_for_inf (const std::string &str, T &arg)
 
bool check_if_pseudo_atom (const std::string &symbol)
 
template<typename C >
void check_linear_dependence (const Tensor< C > &Q, Tensor< C > &c, const double rcondtol, const double cabsmax, bool do_print=true)
 check for subspace linear dependency
 
unsigned long checksum_file (const char *filename)
 Simple checksum for ASCII characters in file.
 
template<>
void cholesky (char uplo, integer n, complex_real4 *A, integer lda)
 
template<>
void cholesky (char uplo, integer n, complex_real8 *A, integer lda)
 
template<>
void cholesky (char uplo, integer n, real4 *A, integer lda)
 
template<>
void cholesky (char uplo, integer n, real8 *A, integer lda)
 
template<typename T >
void cholesky (char uplo, integer n, T *A, integer lda)
 Compute the Cholesky Factorization via LAPACK.
 
template void cholesky (Tensor< double > &A)
 
template void cholesky (Tensor< double_complex > &A)
 
template<typename T >
void cholesky (Tensor< T > &A)
 Compute the Cholesky factorization.
 
template<typename T >
DistributedMatrix< Tcolumn_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)
 
static DistributedMatrixDistribution column_distributed_matrix_distribution (World &world, int64_t n, int64_t m, int64_t coltile)
 Generates distribution for an (n,m) matrix distributed by columns (row dimension is not distributed)
 
template<typename T , std::size_t NDIM>
const std::vector< Function< T, NDIM > > & compress (const std::vector< Function< T, NDIM > > &v)
 compress a vector of functions
 
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.
 
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.
 
template<typename T >
DistributedMatrix< Tconcatenate_columns (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b)
 Generates a row-distributed matrix with rows of a and b contatenated.
 
template<typename T >
DistributedMatrix< Tconcatenate_rows (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b)
 Generates a column-distributed matrix with rows of a and b contatenated.
 
template<typename T >
DistributedMatrix< Tconcatenate_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.
 
template<typename Q >
Q conditional_conj (const Q &coeff)
 For real types return value, for complex return conjugate.
 
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.
 
template<class T >
Tensor< Tconj (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate of the input tensor (complex types only)
 
double conj (double x)
 
double conj (float x)
 
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.
 
template<class T >
Tensor< Tconj_transpose (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate transpose of the input tensor.
 
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.
 
template<class Q , class T >
GenTensor< Qconvert (const GenTensor< T > &other)
 type conversion implies a deep copy
 
template<class Q , class T >
Tensor< Qconvert (const Tensor< T > &t)
 Returns a new contiguous tensor of type Q that is a deep copy of the input.
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< R, NDIM > > convert (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Returns a deep copy of a vector of functions.
 
template<typename T >
DistributedMatrix< Tcopy (const DistributedMatrix< T > &A)
 Deep copy of content.
 
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.
 
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.
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > copy (const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Returns a deep copy of a vector of functions.
 
template<class T >
Tensor< Tcopy (const Tensor< T > &t)
 Returns a new contiguous tensor that is a deep copy of the input.
 
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 n deep copies of a function.
 
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.
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > copy (World &world, const std::vector< Function< T, NDIM > > &v, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool fence=true)
 Returns a deep copy of a vector of functions.
 
template<typename T >
static void copy_2d_patch (T *MADNESS_RESTRICT out, long ldout, const T *MADNESS_RESTRICT in, long ldin, long n, long m)
 
AmArgcopy_am_arg (const AmArg &arg)
 
static SeparatedConvolution< double, 3 > CoulombOperator (World &world, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with 1/r in 3D.
 
static SeparatedConvolution< double, 3 > * CoulombOperatorPtr (World &world, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with 1/r in 3D.
 
double cpu_frequency ()
 Estimate the processor frequency, in Hz.
 
void cpu_relax ()
 Do nothing and especially do not touch memory.
 
static double cpu_time ()
 Returns the cpu time in seconds relative to an arbitrary origin.
 
std::shared_ptr< NuclearCorrelationFactorcreate_nuclear_correlation_factor (World &world, const Molecule &molecule, const std::shared_ptr< PotentialManager > pm, const std::pair< std::string, double > &ncf)
 
std::shared_ptr< NuclearCorrelationFactorcreate_nuclear_correlation_factor (World &world, const Molecule &molecule, const std::shared_ptr< PotentialManager > potentialmanager, const std::string inputline)
 create and return a new nuclear correlation factor
 
auto create_response_matrix (const size_t &num_states, const size_t &num_orbitals) -> response_matrix
 Create a response matrix object.
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > cross (const std::vector< Function< T, NDIM > > &f, const std::vector< Function< R, NDIM > > &g, bool do_refine=false, bool fence=true)
 shorthand cross operator
 
template<typename T , std::size_t N>
std::enable_if< N==3, Vector< T, N > >::type cross (const Vector< T, N > &l, const Vector< T, N > &r)
 compute the cross product two Vectors of dimension 3
 
std::uint64_t cstr_to_memory_size (const char *str)
 Unit-aware conversion of a C string to a size_t.
 
std::vector< std::string > cubefile_header (std::string filename="input", const bool &no_orient=false)
 
static uint64_t cycle_count ()
 On some machines we have access to a cycle count.
 
double d2smoothed_potential (double r)
 second radial derivative of the regularized 1/r potential
 
template<typename ... Ts>
constexpr auto decay_types (std::tuple< Ts... > const &) -> std::tuple< std::remove_cv_t< std::remove_reference_t< Ts > >... >
 
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
 
double distance (const Fred &a, const Fred &b)
 
double distance (double a, double b)
 Default function for computing the distance between two doubles.
 
static double distance (double x1, double y1, double z1, double x2, double y2, double z2)
 
double distance (madness::Function< std::complex< double >, 1ul > &a, madness::Function< std::complex< double >, 1ul > &b)
 
template<typename T >
double distance (std::complex< T > &a, std::complex< T > &b)
 Default function for computing the distance between two complex numbers.
 
static double distance_sq (double x1, double y1, double z1, double x2, double y2, double z2)
 
DistributedMatrix< double > distributed_localize_PM (World &world, const std::vector< Function< double, 3 > > &mo, const std::vector< Function< double, 3 > > &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)
 
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, const double thetamax, const bool randomize, const bool doprint)
 
template<typename T , std::size_t NDIM>
Function< T, NDIMdiv (const std::vector< Function< T, NDIM > > &v, bool do_refine=false, bool fence=true)
 shorthand div operator
 
template<typename funcT >
funcT::returnT do_adq (double lo, double hi, const funcT &func, int n, const double *x, const double *w)
 
void do_response_density_vtk_plots (World &world, int npt_plot, double L, const Molecule &molecule, const real_function_3d &ground_density, const vector_real_function_3d &response_density)
 
void do_response_orbital_vtk_plots (World &world, int npt_plot, double L, const Molecule &molecule, const vector_real_function_3d &ground_orbs, const response_matrix &responseMatrix)
 
void do_vtk_plots (World &world, int npt_plot, double L, int lowest_orbital, int highest_orbital, const Molecule &molecule, std::vector< real_function_3d > densities, const std::string &name)
 
void do_vtk_plots (World &world, int npt_plot, double L, Molecule molecule, real_function_3d &rho_0, std::vector< real_function_3d > &rho_omega, std::vector< real_function_3d > &ground_orbitals, X_space &Chi)
 
template<typename T , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(T, R), NDIMdot (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 Multiplies and sums two vectors of functions r = \sum_i a[i] * b[i].
 
 DPEC (double, double, double)
 
 DPEC (double_complex, double_complex, double_complex)
 
 DPEC (float, float, float)
 
 DPEC (float_complex, float_complex, float_complex)
 
 DPEC (int, int, int)
 
 DPEC (long, long, long)
 
void drot (long n, double *MADNESS_RESTRICT a, double *MADNESS_RESTRICT b, double s, double c, long inc)
 Simple (?) version of BLAS-1 DROT(N, DX, INCX, DY, INCY, DC, DS)
 
double dsmoothed_potential (double r)
 Derivative of the regularized 1/r potential.
 
static void dxprintvalue (FILE *f, const double t)
 
static void dxprintvalue (FILE *f, const double_complex &t)
 
void end_papi_measurement ()
 
static void END_TIMER (World &world, const char *msg)
 
static bool enforce_bc (bool is_periodic, Level n, Translation &l)
 
void error (const char *msg)
 
template<typename T >
static void error (const char *msg, const T &data)
 Prints an error message, along with some data, and aborts the program.
 
double estimate_area (double x)
 
void exception_break (bool message)
 This function is executed just before a MadnessException is thrown.
 
template<typename T >
int exchange_anchor_test (World &world, Exchange< T, 3 > &K, const double thresh)
 anchor test for the exchange operator – partially hardwired
 
static SeparatedConvolution< double, 3 > F2GOperator (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in 3D.
 
static SeparatedConvolution< double, 3 > * F2GOperatorPtr (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in 3D.
 
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()
 
template<typename T >
void fast_transpose (long n, long m, const T *a, T *MADNESS_RESTRICT b)
 a(n,m) --> b(m,n) ... optimized for smallish matrices
 
template<typename T , std::size_t NDIM>
Tensor< Tfcube (const Key< NDIM > &, T(*f)(const Vector< double, NDIM > &), const Tensor< double > &)
 
template<typename T , std::size_t NDIM>
Tensor< Tfcube (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)
 forward declaration
 
static SeparatedConvolution< double, 3 > FGOperator (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D.
 
static SeparatedConvolution< double, 3 > * FGOperatorPtr (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D.
 
void finalize ()
 Call this once at the very end of your main program instead of MPI_Finalize().
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > flatten (const std::vector< std::vector< Function< T, NDIM > > > &vv)
 
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.
 
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.
 
void free_am_arg (AmArg *arg)
 Frees an AmArg allocated with alloc_am_arg.
 
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.
 
void from_json (const nlohmann::json &, ResponseParameters &p)
 
std::shared_ptr< FunctionFunctorInterface< double, 3 > > func (new opT(g))
 
template<typename Q , int NDIM>
Function< std::complex< Q >, NDIMfunction_real2complex (const Function< Q, NDIM > &r)
 
static double functor_r2 (const coord_3d &r)
 
static double functor_x (const coord_3d &r)
 
static double functor_y (const coord_3d &r)
 
template<typename T >
std::vector< Future< T > > future_vector_factory (std::size_t n)
 Factory for a vectors of futures.
 
bool gauss_legendre (int n, double xlo, double xhi, double *x, double *w)
 
bool gauss_legendre_numeric (int n, double xlo, double xhi, double *x, double *w)
 Compute the Gauss-Legendre quadrature points and weights.
 
bool gauss_legendre_test (bool print)
 
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIMGaussOperator (World &world, double mu, double lo=0.0, double eps=0.0, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r*r)
 
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * GaussOperatorPtr (World &world, double mu, double lo=0.0, double eps=0.0, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r*r) in 3D.
 
template<typename T >
void gaxpy (const double a, ScalarResult< T > &left, const double b, const T &right, const bool fence=true)
 the result type of a macrotask must implement gaxpy
 
template<typename T , typename Q , typename R , std::size_t NDIM>
void gaxpy (Q alpha, std::vector< Function< T, NDIM > > &a, Q beta, const std::vector< Function< R, NDIM > > &b, const bool fence)
 Generalized A*X+Y for vectors of functions -— a[i] = alpha*a[i] + beta*b[i].
 
template<typename L , typename R , std::size_t NDIM>
void gaxpy (TENSOR_RESULT_TYPE(L, R) alpha, Function< L, NDIM > &left, TENSOR_RESULT_TYPE(L, R) beta, const Function< R, NDIM > &right, bool fence=true)
 adds beta*right only left: alpha*left + beta*right optional fence and no automatic compression
 
template<typename 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].
 
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].
 
template<typename T , typename Q , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(Q, TENSOR_RESULT_TYPE(T, R)), NDIM > > gaxpy_oop (Q alpha, const std::vector< Function< T, NDIM > > &a, Q beta, const Function< R, NDIM > &b, bool fence=true)
 out-of-place gaxpy for a vectors and a function: result[i] = alpha * a[i] + beta * b
 
template<typename T , typename Q , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(Q, TENSOR_RESULT_TYPE(T, R)), NDIM > > gaxpy_oop (Q alpha, const std::vector< Function< T, NDIM > > &a, Q beta, const std::vector< Function< R, NDIM > > &b, bool fence=true)
 out-of-place gaxpy for two vectors: result[i] = alpha * a[i] + beta * b[i]
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMgaxpy_oop (TENSOR_RESULT_TYPE(L, R) alpha, const Function< L, NDIM > &left, TENSOR_RESULT_TYPE(L, R) beta, const Function< R, NDIM > &right, bool fence=true)
 Returns new function alpha*left + beta*right optional fence and no automatic compression.
 
template<typename T , std::size_t NDIM>
Function< T, 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.
 
template void geev (const Tensor< double > &A, Tensor< double > &V, Tensor< double_complex > &e)
 
template<typename T >
void geev (const Tensor< T > &A, Tensor< T > &VR, Tensor< std::complex< T > > &e)
 Real non-symmetric or complex non-Hermitian eigenproblem.
 
template<typename T >
void geevp (World &world, const Tensor< T > &A, Tensor< T > &VR, Tensor< std::complex< T > > &e)
 
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 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<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.
 
template<typename R , typename Q >
GenTensor< TENSOR_RESULT_TYPE(R, Q)> general_transform (const GenTensor< R > &t, const Tensor< Q > c[])
 
template<typename R , typename Q >
SVDTensor< TENSOR_RESULT_TYPE(R, Q)> general_transform (const SVDTensor< R > &t, const Tensor< Q > c[])
 
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.
 
template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> general_transform (const TensorTrain< T > &t, const Tensor< Q > c[])
 Transform all dimensions of the tensor t by distinct matrices c.
 
template void geqp3 (Tensor< double > &A, Tensor< double > &tau, Tensor< integer > &jpvt)
 
template void geqp3 (Tensor< double_complex > &A, Tensor< double_complex > &tau, Tensor< integer > &jpvt)
 
template<typename T >
void geqp3 (Tensor< T > &A, Tensor< T > &tau, Tensor< integer > &jpvt)
 Compute the QR factorization.
 
template<typename T >
void geqp3_result (Tensor< T > &A, Tensor< T > &tau, Tensor< integer > &jpvt, Tensor< T > &work)
 
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<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.
 
template<typename T >
void gesvp (World &world, const Tensor< T > &a, const Tensor< T > &b, Tensor< T > &x)
 
const AtomicDataget_atomic_data (unsigned int atomic_number)
 
double get_charge_from_file (const std::string filename, unsigned int atype)
 
template<typename T , std::size_t NDIM>
std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > get_impl (const std::vector< Function< T, NDIM > > &v)
 
template<typename tupleT , std::size_t I>
constexpr std::size_t get_index_of_first_vector_argument ()
 given a tuple return the index of the first argument that is a vector of Function<T,NDIM>
 
template<typename tupleT , std::size_t I>
constexpr std::size_t get_index_of_second_vector_argument ()
 given a tuple return the index of the second argument that is a vector of Function<T,NDIM>
 
std::string get_mra_data_dir ()
 
const long long * get_papi_measurement ()
 
template<typename T , std::size_t NDIM>
double get_size (const Function< T, NDIM > &f)
 
template<typename T , std::size_t NDIM>
double get_size (World &world, const std::vector< Function< T, NDIM > > &v)
 
template void ggev (const Tensor< double > &A, Tensor< double > &B, Tensor< double > &V, Tensor< double_complex > &e)
 
template<typename T >
void ggev (const Tensor< T > &A, Tensor< T > &B, Tensor< T > &VR, Tensor< std::complex< T > > &e)
 Generalized real-non-symmetric or complex-non-Hermitian eigenproblem.
 
template<typename T >
void ggevp (World &world, const Tensor< T > &A, Tensor< T > &B, Tensor< T > &VR, Tensor< std::complex< T > > &e)
 
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} $.
 
void gprofexit (int id, int nproc)
 Rename gmon.out for each process by ordering process termination.
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > grad (const Function< T, NDIM > &f, bool refine=false, bool fence=true)
 shorthand gradient operator
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > grad_ble_one (const Function< T, NDIM > &f, bool refine=false, bool fence=true)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > grad_ble_two (const Function< T, NDIM > &f, bool refine=false, bool fence=true)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > grad_bpsline_two (const Function< T, NDIM > &f, bool refine=false, bool fence=true)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > grad_bspline_one (const Function< T, NDIM > &f, bool refine=false, bool fence=true)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > grad_bspline_three (const Function< T, NDIM > &f, bool refine=false, bool fence=true)
 
static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > GradBSHOperator (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating operator for convolution with grad(bsh) in 3D.
 
static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > GradCoulombOperator (World &world, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating operator for convolution with grad(1/r) in 3D.
 
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 $)
 
static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > GradSlaterOperator (World &world, double gamma, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating operator for convolution with grad(e^{-\gamma*r}) in 3D.
 
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.
 
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.
 
template<typename T , std::size_t KDIM, std::size_t LDIM>
Function< T, KDIM+LDIM > hartree_product (const std::vector< Function< T, KDIM > > &left, const std::vector< Function< T, LDIM > > &right)
 Performs a Hartree/outer product on the two given low-dimensional function vectors.
 
template<class T >
void hash_combine (hashT &seed, const T &v)
 Combine hash values.
 
template<class T >
hashT hash_range (const T *t, std::size_t n)
 Combine the hash values of a pointer range.
 
template<class T , std::size_t n>
hashT hash_range (const T(&t)[n])
 Combine the hash values of a C-style array.
 
template<class T >
std::enable_if< std::is_fundamental< T >::value >::type hash_range (hashT &seed, const T *t, std::size_t n)
 Combine the hash values of a pointer range.
 
template<class T >
std::enable_if<!std::is_fundamental< T >::value >::type hash_range (hashT &seed, const T *t, std::size_t n)
 Combine the hash values of a pointer range.
 
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.
 
template<class It >
void hash_range (hashT &seed, It first, It last)
 
template<class It >
hashT hash_range (It first, It last)
 Combine the hash values of an iterator range.
 
template<typename T , std::size_t N>
madness::hashT hash_value (const std::array< T, N > &a)
 Hash std::array with madness hash.
 
template<typename T >
hashT hash_value (const std::basic_string< T > &t)
 Hash a std::basic_string.
 
template<typename T , typename R >
hashT hash_value (const std::pair< T, R > &t)
 Hash a std::pair.
 
template<typename T >
auto hash_value (const T &t)
 Hash a class object.
 
template<typename T >
hashT hash_value (const T *t)
 Hash a pointer address.
 
template<class T >
std::enable_if< std::is_fundamental< T >::value &&((sizeof(T)%sizeof(uint32_t))==0), hashT >::type hash_value (const T t)
 Hash a single fundamental object.
 
template<class T >
std::enable_if< std::is_fundamental< T >::value &&((sizeof(T)%sizeof(uint32_t))!=0), hashT >::type hash_value (const T t)
 Hash a single fundamental object.
 
hashT hash_value (const uniqueidT &id)
 Hash a uniqueidT.
 
template<>
void hereig (char jobz, char uplo, integer n, complex_real4 *A, integer lda, real4 *W)
 
template<>
void hereig (char jobz, char uplo, integer n, complex_real8 *A, integer lda, real8 *W)
 
template<>
void hereig (char jobz, char uplo, integer n, real4 *A, integer lda, real4 *W)
 
template<>
void hereig (char jobz, char uplo, integer n, real8 *A, integer lda, real8 *W)
 
template<typename T >
void hereig (char jobz, char uplo, integer n, T *A, integer lda, typename detail::real_type< T >::type *W)
 Solve the EVP via LAPACK.
 
template<>
void hereig_gen (integer itype, char jobz, char uplo, integer n, complex_real4 *A, integer lda, complex_real4 *B, integer ldb, real4 *W)
 
template<>
void hereig_gen (integer itype, char jobz, char uplo, integer n, complex_real8 *A, integer lda, complex_real8 *B, integer ldb, real8 *W)
 
template<>
void hereig_gen (integer itype, char jobz, char uplo, integer n, real4 *A, integer lda, real4 *B, integer ldb, real4 *W)
 
template<>
void hereig_gen (integer itype, char jobz, char uplo, integer n, real8 *A, integer lda, real8 *B, integer ldb, real8 *W)
 
template<typename T >
void hereig_gen (integer itype, char jobz, char uplo, integer n, T *A, integer lda, T *B, integer ldb, typename detail::real_type< T >::type *W)
 Solve the Generalized EVP via LAPACK.
 
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.
 
template<typename Q , int NDIM>
Function< typename TensorTypeData< Q >::scalar_type, NDIMimag (const Function< Q, NDIM > &func)
 
template<typename T , std::size_t NDIM>
std::vector< Function< typename Tensor< T >::scalar_type, NDIM > > imag (const std::vector< Function< T, NDIM > > &v, bool fence=true)
 return the imaginary parts of the vector's function (if complex)
 
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)
 
double imag (double x)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > impl2function (const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > vimpl)
 
void init_tensor_lapack ()
 World/MRA initialization calls this before going multithreaded due to static data in dlamch.
 
Worldinitialize (int &argc, char **&argv, bool quiet)
 
Worldinitialize (int &argc, char **&argv, const MPI_Comm &comm, int nthread, bool quiet)
 
Worldinitialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm, bool quiet)
 
Worldinitialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm, int nthread, bool quiet)
 
Worldinitialize (int &argc, char **&argv, int nthread, bool quiet)
 
void initialize_legendre_stuff ()
 Call this single threaded to initialize static data (used read only by multiple threads)
 
void initialize_papi ()
 
bool initialized ()
 Check if the MADNESS runtime has been initialized (and not subsequently finalized).
 
template<typename T , std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > inner (const CCPairFunction< T, NDIM > &c, const Function< T, CCPairFunction< T, NDIM >::LDIM > &f, const std::array< int, CCPairFunction< T, NDIM >::LDIM > &v1, const std::array< int, CCPairFunction< T, NDIM >::LDIM > &v2)
 
template<typename T , std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > inner (const CCPairFunction< T, NDIM > &c, const Function< T, CCPairFunction< T, NDIM >::LDIM > &f, const std::tuple< int, int, int > v1, const std::tuple< int, int, int > v2)
 
template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIMinner (const CCPairFunction< T, NDIM > &c1, const CCPairFunction< T, NDIM > &c2, const std::array< int, CCPairFunction< T, NDIM >::LDIM > &v1, const std::array< int, CCPairFunction< T, NDIM >::LDIM > &v2)
 
template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIMinner (const CCPairFunction< T, NDIM > &c1, const CCPairFunction< T, NDIM > &c2, const std::tuple< int, int, int > v1, const std::tuple< int, int, int > v2)
 
template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-2 > inner (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::tuple< int > v1, const std::tuple< int > v2)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-4 > inner (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::tuple< int, int > v1, const std::tuple< int, int > v2)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-6 > inner (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::tuple< int, int, int > v1, const std::tuple< int, int, int > v2)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<typename T , std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIMinner (const Function< T, NDIM > &f1, const LowRankFunction< T, NDIM > &f2, const particle< PDIM > p1, const particle< PDIM > p2)
 lrf(1,3) = inner(full(1,2), lrf(2,3))
 
template<typename T , std::size_t NDIM>
double inner (const LowRankFunction< T, NDIM > &a, const LowRankFunction< T, NDIM > &b)
 
template<typename T , std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIMinner (const LowRankFunction< T, NDIM > &f1, const Function< T, NDIM > &f2, const particle< PDIM > p1, const particle< PDIM > p2)
 lrf(1,3) = inner(lrf(1,2), full(2,3))
 
template<typename T , std::size_t NDIM, std::size_t PDIM>
Function< T, NDIMinner (const LowRankFunction< T, NDIM > &f1, const Function< T, PDIM > &f2, const particle< PDIM > p1, const particle< PDIM > p2=particle< PDIM >::particle1())
 f(1) = inner(lrf(1,2), f(2))
 
template<typename T , std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIMinner (const LowRankFunction< T, NDIM > &f1, const LowRankFunction< T, NDIM > &f2, const particle< PDIM > p1, const particle< PDIM > p2)
 lrf(1,3) = inner(lrf(1,2), lrf(2,3))
 
template<typename T , std::size_t NDIM, std::size_t PDIM>
std::vector< Function< T, NDIM-PDIM > > inner (const LowRankFunction< T, NDIM > &f1, const std::vector< Function< T, PDIM > > &vf, const particle< PDIM > p1, const particle< PDIM > p2=particle< PDIM >::particle1())
 f(1) = inner(lrf(1,2), f(2))
 
double inner (const std::valarray< double > &bra, const std::valarray< double > &ket)
 inner product for std::valarray
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > inner (const std::vector< CCPairFunction< T, NDIM > > &c1, const std::vector< CCPairFunction< T, NDIM > > &c2, const std::array< int, CCPairFunction< T, NDIM >::LDIM > &v1, const std::array< int, CCPairFunction< T, NDIM >::LDIM > &v2)
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > inner (const std::vector< CCPairFunction< T, NDIM > > &c1, const std::vector< CCPairFunction< T, NDIM > > &c2, const std::tuple< int, int, int > v1, const std::tuple< int, int, int > v2)
 
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,...)
 
template<typename T , std::size_t N>
T inner (const Vector< T, N > &l, const Vector< T, N > &r)
 compute the inner product two Vectors.
 
auto inner (const X_space &A, const X_space &B) -> Tensor< double >
 Computes the matrix elements between two response spaces.
 
return f inner (g)
 
double inner (response_space &a, response_space &b)
 
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])
 
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])
 
return f inner_adaptive (func)
 
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.
 
template<std::size_t NDIM, typename T , std::size_t LDIM, typename R , std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
Function< TENSOR_RESULT_TYPE(T, R), NDIMinnerXX (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2, int task=0)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<std::size_t NDIM, typename T , std::size_t LDIM, typename R , std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > innerXX (const Function< T, LDIM > &f, const std::vector< Function< R, KDIM > > &vg, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2, int task=0)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
 
template<typename T >
DistributedMatrix< Tinterleave_rows (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b)
 Generates a distributed matrix with rows of a and b interleaved.
 
template Tensor< double > inverse (const Tensor< double > &A)
 
template Tensor< double_complexinverse (const Tensor< double_complex > &A)
 
template<typename T >
Tensor< Tinverse (const Tensor< T > &a_in)
 invert general square matrix A
 
template<typename T , std::size_t NDIM>
bool is_collected (const std::vector< CCPairFunction< T, NDIM > > &other)
 
bool is_madness_thread ()
 
template<typename Q , typename R >
bool is_same_tensor_type (const GenTensor< R > &rhs, const GenTensor< Q > &lhs)
 
void jacobi (Tensor< double > &A, Tensor< double > &V, const std::vector< int > &set)
 
Exchange< double, 3 >::ExchangeImpl junkjunkjunk (World &world, const SCF *calc, const int ispin)
 
template<typename T >
Tensor< TKAIN (const Tensor< T > &Q, double rcond=1e-12)
 Solves non-linear equation using KAIN (returns coefficients to compute next vector)
 
void legendre_polynomials (double x, long order, double *p)
 Evaluate the Legendre polynomials up to the given order at x in [-1,1].
 
void legendre_scaling_functions (double x, long k, double *p)
 Evaluate the first k Legendre scaling functions.
 
template<class T , std::size_t NDIM>
void load (Function< T, NDIM > &f, const std::string name)
 
void load_balance (const real_function_6d &f, const bool leaf)
 do some load-balancing
 
void load_coeffs (World &world, const char *dir)
 Collective routine to load and cache twoscale & autorrelation coefficients.
 
template<typename T , size_t NDIM>
void load_function (World &world, std::vector< Function< T, NDIM > > &f, const std::string name)
 load a vector of functions
 
void load_quadrature (World &world, const char *dir)
 Collective routine to pre-load and cache the quadrature points and weights.
 
static xc_func_type * lookup_func (const std::string &name, bool polarized)
 
static std::string lookup_id (const int id)
 
static int lookup_name (const std::string &name)
 
std::string lowercase (const std::string &s)
 
template void lq (Tensor< double > &A, Tensor< double > &L)
 
template void lq (Tensor< double_complex > &A, Tensor< double_complex > &L)
 
template<typename T >
void lq (Tensor< T > &A, Tensor< T > &R)
 compute the LQ decomposition of the matrix A = L Q
 
template void lq_result (Tensor< double > &A, Tensor< double > &R, Tensor< double > &tau, Tensor< double > &work, bool do_qr)
 
template void lq_result (Tensor< double_complex > &A, Tensor< double_complex > &R, Tensor< double_complex > &tau, Tensor< double_complex > &work, bool do_qr)
 
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
 
int main (int argc, char **argv)
 
std::vector< atom_information< 3 > > make_atom_vec (const Molecule &molecule, double R1_, double R2_)
 
double make_exp (double x)
 
static xc_func_type * make_func (int id, bool polarized)
 
double make_log (double x)
 
template<typename T , std::size_t NDIM>
void make_nonstandard (World &world, std::vector< Function< T, NDIM > > &v, bool fence=true)
 Generates non-standard form of a vector of functions.
 
template<std::size_t NDIM>
static double make_radius (const Vector< double, NDIM > &x)
 
template<typename T , std::size_t NDIM>
void make_redundant (World &world, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 change tree_state of a vector of functions to redundant
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmap_and_mirror (const Function< T, NDIM > &f, const std::vector< long > &map, const std::vector< long > &mirror, bool fence=true)
 This is replaced with mirror(map(f)), optional fence.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmapdim (const Function< T, NDIM > &f, const std::vector< long > &map, bool fence=true)
 Generate a new function by reordering dimensions ... optional fence.
 
double mask1 (double x)
 
static double mask3 (const coordT &ruser)
 
static double mask_functor_box (const coord_3d &x)
 
static void mask_info (integer &info)
 
template<std::size_t NDIM>
static double mask_munging (const double x)
 
template<typename T , std::size_t NDIM>
DistributedMatrix< Tmatrix_dot (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)> matrix_dot (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])
 
template<typename T , std::size_t NDIM>
DistributedMatrix< Tmatrix_inner (const DistributedMatrixDistribution &d, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< T, NDIM > > &g, bool sym=false)
 
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)
 
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])
 
template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > matrix_inner_old (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])
 
template<typename T , typename R , std::size_t NDIM>
std::vector< std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > > matrix_mul_sparse (World &world, const std::vector< Function< R, NDIM > > &f, const std::vector< Function< R, NDIM > > &g, double tol, bool fence=true, bool symm=false)
 Outer product of a vector of functions with a vector of functions using sparsity.
 
template<typename T , std::size_t NDIM>
Function< T, NDIMmirror (const Function< T, NDIM > &f, const std::vector< long > &mirrormap, bool fence=true)
 Generate a new function by mirroring within the dimensions .. optional fence.
 
template<>
void mTxm (long dimi, long dimj, long dimk, double *MADNESS_RESTRICT c, const double *MADNESS_RESTRICT a, const double *MADNESS_RESTRICT b)
 Matrix transpose * matrix (hand unrolled version)
 
template<typename T , typename Q , typename S >
static void mTxm (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 
template<typename T >
void mTxm (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const T *a, const T *b)
 Matrix += Matrix transpose * matrix ... MKL interface version.
 
template<typename T , typename Q , typename S >
static void mTxm_reference (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 Matrix += Matrix transpose * matrix ... reference implementation (slow but correct)
 
template<typename aT , typename bT , typename cT >
void mTxmq (long dimi, long dimj, long dimk, cT *MADNESS_RESTRICT c, const aT *a, const bT *b, long ldb=-1)
 
template<typename T >
void mTxmq (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const T *a, const T *b, long ldb=-1)
 Matrix = Matrix transpose * matrix ... MKL interface version.
 
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)
 
template<typename aT , typename bT , typename cT >
void mTxmq_reference (long dimi, long dimj, long dimk, cT *MADNESS_RESTRICT c, const aT *a, const bT *b, long ldb=-1)
 Matrix = Matrix transpose * matrix ... slow reference implementation.
 
template<>
void mTxmT (long dimi, long dimj, long dimk, double *MADNESS_RESTRICT csave, const double *MADNESS_RESTRICT asave, const double *MADNESS_RESTRICT b)
 Matrix transpose * matrix transpose (hand tiled and unrolled)
 
template<typename T , typename Q , typename S >
static void mTxmT (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 
template<typename T >
void mTxmT (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const T *a, const T *b)
 Matrix += Matrix transpose * matrix transpose ... MKL interface version.
 
template<typename T , typename Q , typename S >
static void mTxmT_reference (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 Matrix += Matrix transpose * matrix transpose reference implementation (slow but correct)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmul (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator* but with optional fence and no automatic reconstruction.
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMmul (const Function< T, NDIM > &f, const Q alpha, bool fence=true)
 Returns new function equal to f(x)*alpha with optional fence.
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMmul (const Q alpha, const Function< T, NDIM > &f, bool fence=true)
 Returns new function equal to alpha*f(x) with optional fence.
 
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].
 
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].
 
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].
 
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].
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMmul_sparse (const Function< L, NDIM > &left, const Function< R, NDIM > &right, double tol, bool fence=true)
 Sparse multiplication — left and right must be reconstructed and if tol!=0 have tree of norms already created.
 
template<typename T , typename 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].
 
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].
 
template<typename T , typename opT , std::size_t NDIM>
std::vector< Function< T, NDIM > > multi_to_multi_op_values (const opT &op, const std::vector< Function< T, NDIM > > &vin, const bool fence=true)
 apply op on the input vector yielding an output vector of functions
 
template<typename T , typename opT , std::size_t NDIM>
Function< T, NDIMmultiop_values (const opT &op, const std::vector< Function< T, NDIM > > &vf)
 
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
 
template<typename T , std::size_t NDIM, std::size_t LDIM>
std::vector< Function< T, NDIM > > multiply (const Function< T, NDIM > f, const std::vector< Function< T, LDIM > > g, const std::tuple< int, int, int > v)
 
template<std::size_t NDIM>
static double munge (const double x)
 
template<>
void mxm (long dimi, long dimj, long dimk, double *MADNESS_RESTRICT c, const double *MADNESS_RESTRICT a, const double *MADNESS_RESTRICT b)
 Matrix * matrix (hand unrolled version)
 
template<typename T , typename Q , typename S >
static void mxm (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 
template<typename T >
void mxm (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const T *a, const T *b)
 Matrix += Matrix * matrix ... BLAS/MKL interface version.
 
template<typename T , typename Q , typename S >
static void mxm_reference (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 Matrix += Matrix * matrix reference implementation (slow but correct)
 
template<>
void mxmT (long dimi, long dimj, long dimk, double *MADNESS_RESTRICT c, const double *MADNESS_RESTRICT a, const double *MADNESS_RESTRICT b)
 Matrix * matrix transpose (hand unrolled version)
 
template<typename T , typename Q , typename S >
static void mxmT (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 
template<typename T >
void mxmT (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const T *a, const T *b)
 Matrix += Matrix * matrix transpose ... MKL interface version.
 
template<typename T , typename Q , typename S >
static void mxmT_reference (long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const Q *MADNESS_RESTRICT a, const S *MADNESS_RESTRICT b)
 Matrix += Matrix * matrix transpose ... reference implementation (slow but correct)
 
STATIC Tensor< double > my_conj_transpose (Tensor< double > a)
 
STATIC Tensor< double_complexmy_conj_transpose (Tensor< double_complex > a)
 
STATIC Tensor< float > my_conj_transpose (Tensor< float > a)
 
STATIC Tensor< float_complexmy_conj_transpose (Tensor< float_complex > a)
 
static void myusleep (unsigned int us)
 Sleep or spin for specified number of microseconds.
 
std::string name (const FuncType &type, const int ex=-1)
 
template<typename... argT>
AmArgnew_am_arg (const argT &... args)
 Convenience template for serializing arguments into a new AmArg.
 
template<typename T , std::size_t NDIM>
static XNonlinearSolver< std::vector< Function< T, NDIM > >, T, vector_function_allocator< T, NDIM > > nonlinear_vector_solver (World &world, const long nvec)
 
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.
 
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.
 
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.
 
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.
 
template<typename T , std::size_t NDIM>
Tensor< double > norm2s_T (World &world, const std::vector< Function< T, NDIM > > &v)
 Computes the 2-norms of a vector of functions.
 
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.
 
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.
 
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())
 
bool operator!= (const DistributedID &left, const DistributedID &right)
 Distributed ID inequality comparison operator.
 
bool operator!= (const QCCalculationParametersBase &p1, const QCCalculationParametersBase &p2)
 
bool operator!= (const ResponseParameters &p1, const ResponseParameters &p2)
 
bool operator!= (const uniqueidT &a, const uniqueidT &b)
 Inequality comparison operator.
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > operator* (const double fac, const std::vector< CCPairFunction< T, NDIM > > &arg)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMoperator* (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Multiplies two functions with the new result being of type TensorResultType<L,R>
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > operator* (const Function< T, NDIM > &a, const std::vector< Function< R, NDIM > > &v)
 multiply a vector of functions with a function: r[i] = v[i] * a
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMoperator* (const Function< T, NDIM > &f, const Q alpha)
 Returns new function equal to f(x)*alpha.
 
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.
 
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.
 
template<typename Q , typename T , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIMoperator* (const Q alpha, const Function< T, NDIM > &f)
 Returns new function equal to alpha*f(x)
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > operator* (const R fac, const std::vector< Function< T, NDIM > > &rhs)
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator* (const std::vector< Function< T, NDIM > > &rhs, const R fac)
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > operator* (const std::vector< Function< T, NDIM > > &v, const Function< R, NDIM > &a)
 multiply a vector of functions with a function: r[i] = a * v[i]
 
template<typename T , typename U , std::size_t N>
Vector< T, Noperator* (T l, Vector< U, N > r)
 Scale a Vector.
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator* (Vector< T, N > l, const Vector< U, N > &r)
 Multiply (element-wise) two Vectors.
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator* (Vector< T, N > l, U r)
 Scale a Vector.
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMoperator+ (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Adds two functions with the new result being of type TensorResultType<L,R>
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >, Function< TENSOR_RESULT_TYPE(T, R), NDIM > >::type operator+ (const Function< T, NDIM > &f, R r)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator+ (const Function< T, NDIM > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 result[i] = a + b[i]
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > operator+ (const std::vector< CCPairFunction< T, NDIM > > c1, const std::vector< CCPairFunction< T, NDIM > > &c2)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator+ (const std::vector< Function< T, NDIM > > &lhs, const Function< T, NDIM > &rhs)
 result[i] = a[i] + b
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator+ (const std::vector< Function< T, NDIM > > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 result[i] = a[i] + b[i]
 
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.
 
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 , std::size_t N, typename U >
Vector< T, Noperator+ (Vector< T, N > l, const Vector< U, N > &r)
 Add (element-wise) two Vectors.
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator+ (Vector< T, N > l, U r)
 Add a scalar to a Vector.
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > & operator+= (std::vector< CCPairFunction< T, NDIM > > &lhs, const CCPairFunction< T, NDIM > &rhs)
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > & operator+= (std::vector< CCPairFunction< T, NDIM > > &rhs, const std::vector< CCPairFunction< T, NDIM > > &lhs)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator+= (std::vector< Function< T, NDIM > > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMoperator- (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Subtracts two functions with the new result being of type TensorResultType<L,R>
 
template<typename T , typename R , std::size_t NDIM>
IsSupported< TensorTypeData< R >, Function< TENSOR_RESULT_TYPE(T, R), NDIM > >::type operator- (const Function< T, NDIM > &f, R r)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator- (const Function< T, NDIM > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 result[i] = a - b[i]
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > operator- (const std::vector< CCPairFunction< T, NDIM > > c1, const std::vector< CCPairFunction< T, NDIM > > &c2)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator- (const std::vector< Function< T, NDIM > > &lhs, const Function< T, NDIM > &rhs)
 result[i] = a[i] - b
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator- (const std::vector< Function< T, NDIM > > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 result[i] = a[i] - b[i]
 
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.
 
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 , std::size_t N, typename U >
Vector< T, Noperator- (Vector< T, N > l, const Vector< U, N > &r)
 Subtract (element-wise) two Vectors.
 
template<typename T , std::size_t N, typename U >
Vector< T, Noperator- (Vector< T, N > l, U r)
 Subtract a scalar from a Vector.
 
template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > & operator-= (std::vector< CCPairFunction< T, NDIM > > &rhs, const std::vector< CCPairFunction< T, NDIM > > &lhs)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator-= (std::vector< Function< T, NDIM > > &lhs, const std::vector< Function< T, NDIM > > &rhs)
 
bool operator< (const uniqueidT &a, const uniqueidT &b)
 Ordering operator.
 
std::ostream & operator<< (std::ostream &os, const DistributedID &did)
 Overload redirect to std::ostream to be discoverable via ADL.
 
std::ostream & operator<< (std::ostream &os, const EnergyType &en)
 
std::ostream & operator<< (std::ostream &os, const GuessType &en)
 
template<std::size_t N = 1>
std::ostream & operator<< (std::ostream &os, const OpType type)
 operator type to string
 
std::ostream & operator<< (std::ostream &os, const PairType &en)
 
template<std::size_t PDIM>
std::ostream & operator<< (std::ostream &os, const particle< PDIM > &p)
 
std::ostream & operator<< (std::ostream &os, const permutation &p)
 
template<typename Key , typename Tag >
std::ostream & operator<< (std::ostream &os, const ProcessKey< Key, Tag > &key)
 Overload redirect to std::ostream to be discoverable via ADL.
 
template<typename Key , typename Tag >
std::ostream & operator<< (std::ostream &os, const TaggedKey< Key, Tag > &key)
 Overload redirect to std::ostream to be discoverable via ADL.
 
template<std::size_t NDIM = 1>
std::ostream & operator<< (std::ostream &os, const TreeState treestate)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Future< T > &f)
 Human readable printing of a Future to a stream.
 
template<>
std::ostream & operator<< (std::ostream &out, const Future< void > &f)
 Stream output operator for a void future.
 
template<>
std::ostream & operator<< (std::ostream &out, const Future< void > &f)
 Stream output operator for a void future.
 
std::ostream & operator<< (std::ostream &out, const MadnessException &e)
 Enables easy printing of a MadnessException.
 
std::ostream & operator<< (std::ostream &s, const Atom &atom)
 
std::ostream & operator<< (std::ostream &s, const AtomicBasis &c)
 
std::ostream & operator<< (std::ostream &s, const AtomicBasisFunction &a)
 
template<std::size_t NDIM>
static std::ostream & operator<< (std::ostream &s, const BoundaryConditions< NDIM > &bc)
 
template<typename T , std::size_t NDIM>
std::ostream & operator<< (std::ostream &s, const CoeffTracker< T, NDIM > &ct)
 
std::ostream & operator<< (std::ostream &s, const ContractedGaussianShell &c)
 
template<typename T , std::size_t NDIM>
std::ostream & operator<< (std::ostream &s, const FunctionNode< T, NDIM > &node)
 
template<std::size_t NDIM>
std::ostream & operator<< (std::ostream &s, const Key< NDIM > &key)
 
template<typename T >
static std::ostream & operator<< (std::ostream &s, const SRConf< T > &sr)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Tensor< T > &t)
 Print (for human consumption) a tensor to the stream.
 
static std::ostream & operator<< (std::ostream &s, const TensorType &tt)
 
std::ostream & operator<< (std::ostream &stream, const Slice &s)
 
bool operator== (const DistributedID &left, const DistributedID &right)
 Distributed ID equality comparison operator.
 
bool operator== (const ResponseParameters &p1, const ResponseParameters &p2)
 
bool operator== (const uniqueidT &a, const uniqueidT &b)
 Equality comparison operator.
 
std::istream & operator>> (std::istream &is, EnergyType &en)
 
std::istream & operator>> (std::istream &is, GuessType &en)
 
std::istream & operator>> (std::istream &is, PairType &en)
 
template<typename Q , typename T >
std::istream & operator>> (std::istream &is, std::pair< T, Q > &p)
 
template<typename T , typename A = std::allocator<T>>
std::istream & operator>> (std::istream &is, std::vector< T, A > &v)
 
template void orgqr (Tensor< complex_real4 > &A, const Tensor< complex_real4 > &tau)
 
template void orgqr (Tensor< double > &A, const Tensor< double > &tau)
 
template void orgqr (Tensor< double_complex > &A, const Tensor< double_complex > &tau)
 
template void orgqr (Tensor< float > &A, const Tensor< float > &tau)
 
template<typename T >
void orgqr (Tensor< T > &A, const Tensor< T > &tau)
 reconstruct the orthogonal matrix Q (e.g. from QR factorization)
 
template<typename T >
void ortho3 (Tensor< T > &x, Tensor< T > &y, Tensor< typename Tensor< T >::scalar_type > &weights, const double &thresh)
 sophisticated version of ortho2
 
template<typename T >
void ortho5 (Tensor< T > &x1, Tensor< T > &y1, Tensor< typename Tensor< T >::scalar_type > &w1, const Tensor< T > &x2, const Tensor< T > &y2, const Tensor< typename Tensor< T >::scalar_type > &w2, const double &thresh)
 specialized version of ortho3
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize (const std::vector< Function< T, NDIM > > &vf_in)
 orthonormalize the vectors
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_canonical (const std::vector< Function< T, NDIM > > &v, const double lindep)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_canonical (const std::vector< Function< T, NDIM > > &v, const Tensor< T > &ovlp, double lindep)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_cd (const std::vector< Function< T, NDIM > > &v)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_cd (const std::vector< Function< T, NDIM > > &v, Tensor< T > &ovlp)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_rrcd (const std::vector< Function< T, NDIM > > &v, const double tol)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_rrcd (const std::vector< Function< T, NDIM > > &v, Tensor< T > &ovlp, const double tol, Tensor< integer > &piv, int &rank)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_rrcd (const std::vector< Function< T, NDIM > > &v, Tensor< T > ovlp, const double tol)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_symmetric (const std::vector< Function< T, NDIM > > &v)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_symmetric (const std::vector< Function< T, NDIM > > &v, const Tensor< T > &ovlp)
 symmetric orthonormalization (see e.g. Szabo/Ostlund)
 
template<class T >
GenTensor< Touter (const GenTensor< T > &left, const GenTensor< T > &right, const TensorArgs final_tensor_args)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)
 
template<class T , class Q >
GenTensor< TENSOR_RESULT_TYPE(T, Q)> outer (const GenTensor< T > &t1, const GenTensor< Q > &t2, const TensorArgs final_tensor_args=TensorArgs(-1.0, TT_2D))
 outer product of two Tensors, yielding a low rank tensor
 
template<typename projT , typename projQ >
std::enable_if< std::is_base_of< ProjectorBase, projT >::value, OuterProjector< projT, projQ > >::type outer (const projT &p0, const projQ &p1)
 
template<class T >
Tensor< Touter (const Tensor< T > &left, const Tensor< T > &right)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)
 
template<class T >
GenTensor< Touter (const Tensor< T > &left, const Tensor< T > &right, const TensorArgs final_tensor_args)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)
 
template<class T , class Q >
GenTensor< TENSOR_RESULT_TYPE(T, Q)> outer (const Tensor< T > &lhs2, const Tensor< Q > &rhs2, const TensorArgs final_tensor_args)
 outer product of two Tensors, yielding a low rank tensor
 
template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> outer (const TensorTrain< T > &t1, const TensorTrain< Q > &t2)
 computes the outer product of two tensors
 
template<class T >
void outer_result (const Tensor< T > &left, const Tensor< T > &right, Tensor< T > &result)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)
 
static int parity (int i)
 Return +1 if i is even, -1 if i is odd ... perverse no if-test form.
 
template<typename T , std::size_t NDIM, std::size_t LDIM>
std::vector< Function< T, NDIM > > partial_mul (const Function< T, NDIM > f, const std::vector< Function< T, LDIM > > g, const int particle)
 multiply a high-dimensional function with a low-dimensional function
 
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.
 
template<typename Q , int NDIM>
SeparatedConvolution< Q, NDIMPeriodicBSHOp (World &world, double mu, long k, double lo, double eps, Tensor< double > L)
 
static SeparatedConvolution< double_complex, 3 > PeriodicBSHOperator3D (World &world, Vector< double, 3 > args, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
 
static SeparatedConvolution< double_complex, 3 > * PeriodicBSHOperatorPtr3D (World &world, Vector< double, 3 > args, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
 
template<typename Q , int NDIM>
SeparatedConvolution< Q, NDIM > * PeriodicBSHOpPtr (World &world, double mu, long k, double lo, double eps, Tensor< double > L)
 
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)
 
static SeparatedConvolution< double_complex, 3 > PeriodicHFExchangeOperator (World &world, Vector< double, 3 > args, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with 1/r in 3D.
 
static pg_operator pg_c2 ()
 
static pg_operator pg_c2x ()
 
static pg_operator pg_c2y ()
 
static pg_operator pg_c2z ()
 
static pg_operator pg_c4 ()
 
static pg_operator pg_c4x ()
 
static pg_operator pg_c4y ()
 
static pg_operator pg_c4z ()
 
static pg_operator pg_identity ()
 
static pg_operator pg_inversion ()
 
static pg_operator pg_sigma_x ()
 
static pg_operator pg_sigma_xy ()
 
static pg_operator pg_sigma_xz ()
 
static pg_operator pg_sigma_y ()
 
static pg_operator pg_sigma_yz ()
 
static double phase (long i)
 
template<size_t NDIM>
void plot (const std::vector< Function< double, NDIM > > &vf, const std::string &name, const std::vector< std::string > &header)
 convenience to get plot_plane and plot_cubefile
 
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<size_t NDIM>
std::enable_if< NDIM==3, void >::type plot_cubefile (World &world, const Function< double, NDIM > &f, std::string filename, std::vector< std::string > molecular_info=std::vector< std::string >(), int npoints=100, double zoom=1.0)
 
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.
 
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.
 
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.
 
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.
 
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 std::vector< Function< T, NDIM > > &vf)
 The ordinate is distance from lo.
 
template<typename opT , std::size_t NDIM>
void plot_line (World &world, const char *filename, int npt, const Vector< double, NDIM > &lo, const Vector< double, NDIM > &hi, const opT &op)
 Generates ASCII file tabulating f(r) at npoints along line r=lo,...,hi.
 
static void plot_line_print_value (FILE *f, double v)
 
static void plot_line_print_value (FILE *f, double_complex v)
 
template<size_t NDIM>
void plot_plane (World &world, const Function< double, NDIM > &function, const std::string name)
 
template<size_t NDIM>
void plot_plane (World &world, const Function< double, NDIM > &function1, const Function< double, NDIM > &function2, const Function< double, NDIM > &function3, const std::string name)
 
template<size_t NDIM>
void plot_plane (World &world, const Function< double, NDIM > &function1, const Function< double, NDIM > &function2, const std::string name)
 
template<size_t NDIM, typename opT >
void plot_plane (World &world, const opT &op, const std::string name, const PlotParameters param)
 
template<size_t NDIM>
void plot_plane (World &world, const std::vector< Function< double, NDIM > > &vfunction, const std::string name, const PlotParameters param)
 plot a 2-d slice of a given function and the according MRA structure
 
template<size_t NDIM>
void plot_plane (World &world, const std::vector< Function< double, NDIM > > &vfunction, const std::string name, const std::string inputfile="input")
 
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.
 
template<typename T >
static void plotpovray (const Function< T, 3 > &function, const char *filename, const Tensor< double > &cell=FunctionDefaults< 3 >::get_cell(), const std::vector< long > &npt=std::vector< long >(3, 201L))
 Writes a Povray DF3 format file with a cube of points on a uniform grid.
 
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 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.
 
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.
 
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<std::size_t NDIM>
void plotvtk_end (World &world, const char *filename, bool binary=false)
 
static double PM_q (const tensorT &S, const double *MADNESS_RESTRICT Ci, const double *MADNESS_RESTRICT Cj, int lo, int nbf)
 
static double pop (std::vector< double > &v)
 
std::istream & position_stream (std::istream &f, const std::string &tag, bool rewind=true)
 
std::istream & position_stream_to_word (std::istream &f, const std::string &tag, const char comment, bool rewind, bool silent)
 position the input stream to tag, which must be a word (not part of a word)
 
template<int D>
int power (int base=2)
 
template<int N, class T >
T power (T const x)
 
template<>
int power< 0 > (int base)
 
template<>
int power< 1 > (int base)
 
template<>
int power< 10 > (int base)
 
template<>
int power< 12 > (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<typename T , typename... Ts>
void print (const T &t, const Ts &... ts)
 Print items to std::cout (items separated by spaces) and terminate with a new line.
 
void print_centered (const char *s, int column=40, bool underline=true)
 Print a string centered at the given column with optional underlining.
 
template<typename T , typename... Ts>
void print_error (const T &t, const Ts &... ts)
 Print items to std::cerr (items separated by spaces) and terminate with a new line.
 
void print_header1 (const std::string &s)
 big section heading
 
void print_header2 (const std::string &s)
 medium section heading
 
void print_header3 (const std::string &s)
 small section heading
 
std::ostream & print_helper (std::ostream &out)
 Helper function for print. Base case.
 
template<typename T , typename... Ts>
std::ostream & print_helper (std::ostream &out, const T &t, const Ts &... ts)
 Helper function for print. Prints the first item (t) and recursively passes on the other items.
 
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.
 
void print_meminfo_disable ()
 disables print_meminfo() profiling (i.e. calling it is a no-op)
 
void print_meminfo_enable ()
 
bool print_meminfo_enabled ()
 
bool print_meminfo_keep_ostream_open ()
 
void print_meminfo_keep_ostream_open (bool keep_open)
 
std::basic_ofstream< wchar_t > & print_meminfo_ostream (int rank, const std::string filename_prefix)
 
template<typename A >
void print_seq (World &world, const A &a)
 Sequentially ordered printing of (serializable) data from every process.
 
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.
 
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.
 
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.
 
template<typename T , std::size_t NDIM>
void print_size (World &world, const std::vector< Function< T, NDIM > > &v, const std::string &msg="vectorfunction")
 
void print_stats (World &world)
 Print miscellaneous stats on a World.
 
template<size_t NDIM>
std::enable_if< NDIM==3, void >::type print_tree_jsonfile (World &world, const Function< double, NDIM > &f, std::string filename)
 
void printf_msg_energy_time (const std::string msg, const double energy, const double time)
 
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)
 
tensorT Q2 (const tensorT &s)
 Given overlap matrix, return rotation with 2nd order error to orthonormalize the vectors.
 
tensorT Q3 (const tensorT &s)
 Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors.
 
Convolution1D< double_complex > * qm_1d_free_particle_propagator (int k, double bandlimit, double timestep, double width)
 
template<std::size_t NDIM>
SeparatedConvolution< double_complex, NDIMqm_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)
 
template void qr (Tensor< double > &A, Tensor< double > &R)
 
template void qr (Tensor< double_complex > &A, Tensor< double_complex > &R)
 
template void qr (Tensor< float > &A, Tensor< float > &R)
 
template void qr (Tensor< float_complex > &A, Tensor< float_complex > &R)
 
template<typename T >
void qr (Tensor< T > &A, Tensor< T > &R)
 compute the QR decomposition of the matrix A
 
bool quiet ()
 Check if the MADNESS runtime was initialized for quiet operation.
 
static double r2 (const coord_3d &x)
 
template<class T >
T RandomValue ()
 Random value that wraps the default Fibonacci generator.
 
template<>
double RandomValue< double > ()
 Random double.
 
template<>
double RandomValue< double > ()
 Random double.
 
template<>
double_complex RandomValue< double_complex > ()
 Random double_complex.
 
template<>
double_complex RandomValue< double_complex > ()
 Random double_complex.
 
template<>
float RandomValue< float > ()
 Random float.
 
template<>
float RandomValue< float > ()
 Random float.
 
template<>
float_complex RandomValue< float_complex > ()
 Random float_complex.
 
template<>
float_complex RandomValue< float_complex > ()
 Random float_complex.
 
template<>
int RandomValue< int > ()
 Random int.
 
template<>
int RandomValue< int > ()
 Random int.
 
template<>
long RandomValue< long > ()
 Random long.
 
template<>
long RandomValue< long > ()
 Random long.
 
template<class T >
void RandomVector (int n, T *t)
 
template<>
void RandomVector< double > (int n, double *t)
 
template<>
void RandomVector< double > (int n, double *t)
 
template<>
void RandomVector< double_complex > (int n, double_complex *t)
 
template<>
void RandomVector< double_complex > (int n, double_complex *t)
 
template<>
void RandomVector< float > (int n, float *t)
 
template<>
void RandomVector< float > (int n, float *t)
 
template<>
void RandomVector< float_complex > (int n, float_complex *t)
 
template<>
void RandomVector< float_complex > (int n, float_complex *t)
 
template<typename T >
long rank_revealing_decompose (Tensor< T > &A, Tensor< T > &U, const double thresh, Tensor< typename Tensor< T >::scalar_type > &s, Tensor< T > &scr)
 
static AtomCore read_atom (TiXmlElement *e, unsigned int atn, double eprec)
 
static bool read_data ()
 read_data loads the precomputed Gauss-Legendre data
 
static bool read_data (int k)
 
static bool read_orbital (TiXmlElement *e, AtomCore &ac)
 
static bool read_potential (TiXmlElement *elem, AtomCore &ac, double eprec)
 
static bool read_twoscale (int kmax)
 
static Tensor< double > readmat (int k, FILE *file)
 
template<std::size_t NDIM>
Function< double, NDIMreal (const Function< double, NDIM > &z, bool fence=true)
 Returns a new function that is the real part of the input.
 
template<std::size_t NDIM>
Function< double, NDIMreal (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the real part of the input.
 
template<typename Q , int NDIM>
Function< typename TensorTypeData< Q >::scalar_type, NDIMreal (const Function< Q, NDIM > &func)
 
template<typename T , std::size_t NDIM>
std::vector< Function< typename Tensor< T >::scalar_type, NDIM > > real (const std::vector< Function< T, NDIM > > &v, bool fence=true)
 return the real parts of the vector's function (if complex)
 
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)
 
double real (double x)
 
template<typename T , std::size_t NDIM>
const std::vector< Function< T, NDIM > > & reconstruct (const std::vector< Function< T, NDIM > > &v)
 reconstruct a vector of functions
 
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.
 
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.
 
void redirectio (const World &world, bool split=false)
 redirects standard output and error to rank-specific files
 
template<class T >
GenTensor< Treduce (std::list< GenTensor< T > > &addends, double eps, bool are_optimal=false)
 add all the GenTensors of a given list
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > reduce_rank (std::vector< Function< T, NDIM > > v, double thresh=0.0, bool fence=true)
 reduces the tensor rank of the coefficient tensor (if applicable)
 
template<typename T , std::size_t NDIM>
void refine (World &world, const std::vector< Function< T, NDIM > > &vf, bool fence=true)
 refine the functions according to the autorefine criteria
 
template<typename T , std::size_t NDIM>
void refine_to_common_level (World &world, std::vector< Function< T, NDIM > > &vf, bool fence=true)
 refine all functions to a common (finest) level
 
void reset_papi_measurement ()
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > rot (const std::vector< Function< T, NDIM > > &v, bool do_refine=false, bool fence=true)
 shorthand rot operator
 
template<typename T >
DistributedMatrix< Trow_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)
 
static DistributedMatrixDistribution row_distributed_matrix_distribution (World &world, int64_t n, int64_t m, int64_t rowtile)
 Generates an (n,m) matrix distribution distributed by rows (column dimension is not distributed)
 
template void rr_cholesky (Tensor< double > &A, typename Tensor< double >::scalar_type tol, Tensor< integer > &piv, int &rank)
 
template void rr_cholesky (Tensor< double_complex > &A, typename Tensor< double_complex >::scalar_type tol, Tensor< integer > &piv, int &rank)
 
template<typename T >
void rr_cholesky (Tensor< T > &A, typename Tensor< T >::scalar_type tol, Tensor< integer > &piv, int &rank)
 Compute the rank-revealing Cholesky factorization.
 
static double rsquared (const coordT &r)
 
template<class T , std::size_t NDIM>
void save (const Function< T, NDIM > &f, const std::string name)
 
template<typename T , size_t NDIM>
void save_function (const std::vector< Function< T, NDIM > > &f, const std::string name)
 save a vector of functions
 
template<typename T >
std::vector< std::shared_ptr< ScalarResult< T > > > scalar_result_shared_ptr_vector (World &world, std::size_t n)
 helper function to create a vector of ScalarResult, circumventing problems with the constructors
 
response_space scale (response_space a, double b)
 
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.
 
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.
 
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.
 
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.
 
response_space scale_2d (World &world, const response_space &a, const Tensor< double > &b)
 
template<typename Archive >
void serialize_am_args (Archive &&)
 Terminate argument serialization.
 
template<typename Archive , typename T , typename... argT>
void serialize_am_args (Archive &&archive, T &&t, argT &&... args)
 Argument serialization.
 
template<typename T , std::size_t NDIM>
void set_impl (std::vector< Function< T, NDIM > > &v, const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > vimpl)
 
void set_thread_tag (int tag)
 
void set_thread_tag (ThreadTag tag)
 
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.
 
template<std::size_t NDIM>
static void sim_to_user (const Vector< double, NDIM > &xsim, Vector< double, NDIM > &xuser)
 Convert simulation coords ([0,1]^ndim) to user coords (FunctionDefaults<NDIM>::get_cell())
 
template<typename T , std::size_t NDIM>
static Key< NDIMsimpt2key (const Vector< T, NDIM > &pt, Level n)
 
template<typename T , std::size_t NDIM>
double size_of (const intermediateT< T, NDIM > &im)
 Returns the size of an intermediate.
 
static double slater_functor (const coord_3d &x)
 
double slater_radius (int atomic_number)
 
static SeparatedConvolution< double, 3 > SlaterF12Operator (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 
static SeparatedConvolution< double, 3 > * SlaterF12OperatorPtr (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with (1 - exp(-mu*r))/(2 mu) in 3D.
 
static SeparatedConvolution< double, 3 > SlaterF12sqOperator (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 
static SeparatedConvolution< double, 3 > * SlaterF12sqOperatorPtr (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 
template<std::size_t NDIM = 3>
static SeparatedConvolution< double, NDIMSlaterOperator (World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 Factory function generating separated kernel for convolution with exp(-mu*r) in 3D.
 
static SeparatedConvolution< double, 3 > * SlaterOperatorPtr (World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * SlaterOperatorPtr_ND (World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 
double smoothed_density (double r)
 Charge density corresponding to smoothed 1/r potential.
 
double smoothed_potential (double r)
 Smoothed 1/r potential.
 
double smoothing_parameter (double Z, double eprec)
 Returns radius for smoothing nuclear potential with energy precision eprec.
 
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIMSmoothingOperator (World &world, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
 
static SeparatedConvolution< double, 3 > SmoothingOperator3D (World &world, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
 
 SPEC (double, double_complex, double_complex)
 
 SPEC (double, float_complex, float_complex)
 
 SPEC (float, double, double)
 
 SPEC (float, double_complex, double_complex)
 
 SPEC (float, float_complex, float_complex)
 
 SPEC (float_complex, double_complex, double_complex)
 
 SPEC (int, double, double)
 
 SPEC (int, double_complex, double_complex)
 
 SPEC (int, float, float)
 
 SPEC (int, float_complex, float_complex)
 
 SPEC (int, long, long)
 
 SPEC (long, double, double)
 
 SPEC (long, double_complex, double_complex)
 
 SPEC (long, float, float)
 
 SPEC (long, float_complex, float_complex)
 
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.
 
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.
 
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.
 
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.
 
static void START_TIMER (World &world)
 
void startup (World &world, int argc, char **argv, bool doprint=false, bool make_stdcout_nice_to_reals=true)
 
template<typename T >
T stheta_fd (const T &x)
 
template<typename T >
static std::string stringify (T arg)
 
template<typename L , typename R , std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIMsub (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator- but with optional fence and no automatic compression.
 
template<typename T , 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].
 
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].
 
template<typename T , std::size_t NDIM>
Function< T, NDIMsum (World &world, const std::vector< Function< T, NDIM > > &f, bool fence=true)
 Returns new function — q = sum_i f[i].
 
template<>
void svd (char jobu, char jobvt, integer m, integer n, complex_real4 *A, integer lda, real4 *S, complex_real4 *U, integer ldu, complex_real4 *VT, integer ldvt)
 
template<>
void svd (char jobu, char jobvt, integer m, integer n, complex_real8 *A, integer lda, real8 *S, complex_real8 *U, integer ldu, complex_real8 *VT, integer ldvt)
 
template<>
void svd (char jobu, char jobvt, integer m, integer n, real4 *A, integer lda, real4 *S, real4 *U, integer ldu, real4 *VT, integer ldvt)
 
template<>
void svd (char jobu, char jobvt, integer m, integer n, real8 *A, integer lda, real8 *S, real8 *U, integer ldu, real8 *VT, integer ldvt)
 
template<typename T >
void svd (char jobu, char jobvt, integer m, integer n, T *A, integer lda, typename detail::real_type< T >::type *S, T *U, integer ldu, T *VT, integer ldvt)
 Compute the SVD via LAPACK.
 
template void svd (const Tensor< double > &a, Tensor< double > &U, Tensor< Tensor< double >::scalar_type > &s, Tensor< double > &VT)
 
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 (const Tensor< float > &a, Tensor< float > &U, Tensor< Tensor< float >::scalar_type > &s, Tensor< float > &VT)
 
template void svd (const Tensor< float_complex > &a, Tensor< float_complex > &U, Tensor< Tensor< float_complex >::scalar_type > &s, Tensor< float_complex > &VT)
 
template<typename T >
std::tuple< Tensor< T >, Tensor< typename Tensor< T >::scalar_type >, Tensor< T > > svd (const Tensor< T > &A)
 SVD - MATLAB syntax.
 
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.
 
template void svd_result (Tensor< double > &a, Tensor< double > &U, Tensor< Tensor< double >::scalar_type > &s, Tensor< double > &VT, Tensor< double > &work)
 
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 svd_result (Tensor< float > &a, Tensor< float > &U, Tensor< Tensor< float >::scalar_type > &s, Tensor< float > &VT, Tensor< float > &work)
 
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<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
 
template<typename T , typename U >
void swap (RemoteReference< T > &l, RemoteReference< U > &r)
 Swap the two remote references.
 
template<typename T , std::size_t N>
void swap (Vector< T, N > &l, Vector< T, N > &r)
 Swap the contents of two Vectors.
 
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.
 
template<typename T , std::size_t NDIM>
std::enable_if_t< NDIM%2==0, Function< T, NDIM > > swap_particles (const Function< T, NDIM > &f)
 swap particles 1 and 2
 
template void syev (const Tensor< double > &A, Tensor< double > &V, Tensor< Tensor< double >::scalar_type > &e)
 
template void syev (const Tensor< double_complex > &A, Tensor< double_complex > &V, Tensor< Tensor< double_complex >::scalar_type > &e)
 
template<typename T >
std::tuple< Tensor< typename Tensor< T >::scalar_type >, Tensor< T > > syev (const Tensor< T > &A)
 Solves symmetric or Hermitian eigenvalue problem - MATLAB syntax.
 
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.
 
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<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.
 
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)
 
unsigned int symbol_to_atomic_number (const std::string &symbol)
 
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
 
template<typename Q >
Tensor< Qtensor_abs (const Tensor< std::complex< Q > > &c)
 
template<typename Q >
Tensor< std::complex< Q > > tensor_real2complex (const Tensor< Q > &r)
 
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.
 
template<typename T , typename opT , std::size_t NDIM>
 TENSOR_RESULT_TYPE (T, typename opT::value_type) inner(const Function< T
 Computes the scalar/inner product between an MRA function and an external functor.
 
template<typename T , typename opT , std::size_t NDIM>
 TENSOR_RESULT_TYPE (T, typename opT::value_type) inner(const opT &g
 Computes the scalar/inner product between an MRA function and an external functor.
 
template<typename Q >
Tensor< Qtensor_ximag (const Tensor< std::complex< Q > > &c)
 
template<typename Q >
Tensor< Qtensor_xreal (const Tensor< std::complex< Q > > &c)
 
static double test_1d_functor (const coord_1d &x)
 
bool test_autoc ()
 
template<typename T >
double test_cholesky (int n)
 
template<typename T >
int test_exchange (World &world)
 
template<typename T >
double test_gelss (int n, int nrhs)
 
template<typename T >
double test_gesv (int n, int nrhs)
 
template<typename T >
double test_inverse (int n)
 Example and test code for interface to LAPACK SVD interfae.
 
template<typename T >
double test_qr ()
 
bool test_rnlp ()
 
template<typename T >
double test_rr_cholesky (int n)
 
template<typename T >
double test_svd (int n, int m)
 Example and test code for interface to LAPACK SVD interfae.
 
template<typename T >
double test_syev (int n)
 
template<typename T >
double test_sygv (int n)
 
bool test_tensor_lapack ()
 Test the Tensor-LAPACK interface ... currently always returns true!
 
bool test_two_scale_coefficients ()
 
static double testf (int n, double x)
 
void threadpool_wait_policy (WaitPolicy policy, int sleep_duration_in_microseconds=0)
 
static void time_transform (World &world, int &mflopslo, int &mflopshi)
 
auto to_conjugate_response_matrix (const X_space &x) -> response_matrix
 
auto to_conjugate_X_space (const response_matrix &x) -> X_space
 response_matrix [x,y] -> Xspace X.x=y X.y=conjugate(x)
 
auto to_flattened_vector (const X_space &x) -> vector_real_function_3d
 Flattens all response functions into a single vector of functions.
 
void to_json (nlohmann::json &j)
 
auto to_response_matrix (const X_space &x) -> response_matrix
 
auto to_response_vector (const vector_real_function_3d &vec) -> vector_real_function_3d
 
auto to_X_space (const response_matrix &x) -> X_space
 
template<typename R , typename Q >
GenTensor< TENSOR_RESULT_TYPE(R, Q)> transform (const GenTensor< R > &t, const Tensor< Q > &c)
 
template<typename R , typename Q >
SVDTensor< TENSOR_RESULT_TYPE(R, Q)> transform (const SVDTensor< R > &t, const Tensor< Q > &c)
 
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.
 
template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> transform (const TensorTrain< T > &t, const Tensor< Q > &c)
 transform each dimension with the same operator matrix
 
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 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 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)
 
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].
 
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].
 
template<typename R , typename Q >
GenTensor< TENSOR_RESULT_TYPE(R, Q)> transform_dir (const GenTensor< R > &t, const Tensor< Q > &c, const int axis)
 
template<typename R , typename Q >
SVDTensor< TENSOR_RESULT_TYPE(R, Q)> transform_dir (const SVDTensor< R > &t, const Tensor< Q > &c, const int axis)
 
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.
 
template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> transform_dir (const TensorTrain< T > &t, const Tensor< Q > &c, const int axis)
 Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor.
 
template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > transform_reconstructed (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].
 
template<class T >
Tensor< Ttranspose (const Tensor< T > &t)
 Returns a new deep copy of the transpose of the input tensor.
 
response_space transpose (response_space &f)
 
auto transposeResponseMatrix (const response_matrix &x) -> response_matrix
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > truncate (std::vector< Function< T, NDIM > > v, double tol=0.0, bool fence=true)
 Truncates a vector of functions.
 
void truncate (World &world, response_space &v, double tol, bool fence)
 
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.
 
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.
 
bool try_two_locks (const Mutex &m1, const Mutex &m2)
 Attempt to acquire two locks without blocking holding either one.
 
template<typename T >
TensorTrain< Ttt_identity (const long ndim, const long k)
 compute the n-D identity operator with k elements per dimension
 
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.
 
bool two_scale_hg (int k, Tensor< double > *hg)
 
std::string type (const EnergyType &n)
 
std::string type (const GuessType &n)
 
std::string type (const PairType &n)
 
 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)
 
template<typename Q , typename opT , std::size_t NDIM>
Function< typename opT::resultT, NDIMunary_op (const Function< Q, NDIM > &func, const opT &op, bool fence=true)
 Out of place application of unary operation to function values with optional fence.
 
template<typename Q , typename opT , std::size_t NDIM>
Function< typename opT::resultT, NDIMunary_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.
 
std::string unique_fileid ()
 creates a unique filename, using PBS ID if available
 
template<std::size_t NDIM>
static double unitfunctor (const Vector< double, NDIM > &x)
 
template<typename T , std::size_t N>
Vector< T, Nunitvec (const Vector< T, N > &r, const double eps=1.e-6)
 Construct a unit-Vector that has the same direction as r.
 
template<std::size_t NDIM>
static void user_to_sim (const Vector< double, NDIM > &xuser, Vector< double, NDIM > &xsim)
 Convert user coords (cell[][]) to simulation coords ([0,1]^ndim)
 
template<typename T , typename... Ts>
Vector< T, sizeof...(Ts)+1 > vec (T t, Ts... ts)
 Factory function for creating a madness::Vector.
 
template<typename T >
std::vector< Tvector_factory (const T &v0)
 Returns a std::vector<T> initialized from the arguments.
 
template<typename T >
std::vector< Tvector_factory (const T &v0, const T &v1)
 Returns a std::vector<T> initialized from the arguments.
 
template<typename T >
std::vector< Tvector_factory (const T &v0, const T &v1, const T &v2)
 Returns a std::vector<T> initialized from the arguments.
 
template<typename T >
std::vector< Tvector_factory (const T &v0, const T &v1, const T &v2, const T &v3)
 Returns a std::vector<T> initialized from the arguments.
 
template<typename T >
std::vector< Tvector_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.
 
template<typename T >
std::vector< Tvector_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.
 
template<typename T >
std::vector< Tvector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6)
 Returns a std::vector<T> initialized from the arguments.
 
template<typename T >
std::vector< Tvector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6, const T &v7)
 Returns a std::vector<T> initialized from the arguments.
 
template<typename T , std::size_t NDIM>
static void verify_tree (World &world, const std::vector< Function< T, NDIM > > &v)
 
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.
 
double wall_time ()
 Returns the wall time in seconds relative to an arbitrary origin.
 
WorldMemInfoworld_mem_info ()
 Returns pointer to internal structure.
 
void write_molecules_to_file (const Molecule &molecule, const std::string &geo_file)
 
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)
 
static double xf (const coord_3d &x)
 
void xterm_debug (const char *path, const char *display)
 
void xterm_debug_breakpoint ()
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > zero_functions (World &world, int n)
 Generates a vector of zero functions.
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > zero_functions (World &world, int n, bool fence=true)
 Generates a vector of zero functions (reconstructed)
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > zero_functions_compressed (World &world, int n, bool fence=true)
 Generates a vector of zero functions (compressed)
 
print_meminfo

These functions are useful to instrument aggregate (not fine-grained, like WorldMemInfo) memory profiling.

Note
To make this functionality usable must set the ENABLE_MEM_PROFILE CMake cache variable to ON
template<typename String >
void print_meminfo (int rank, const String &tag, const std::string filename_prefix=std::string("MEMORY"), bool verbose=false)
 print aggregate memory stats to file filename_prefix.<rank> , tagged with tag
 

Variables

static const std::vector< Slice___ = vector_factory(_,_,_,_,_,_)
 Entire dimension.
 
static Tensor< double > _c
 
static Tensor< double > _cread
 
const double acut1e_6 = 0.25
 
static const AtomicData atomic_data [NUMBER_OF_ATOMS_IN_TABLE]
 
static const char * autocorr_filename = "autocorr"
 
ThreadBinder binder
 
const double c_b14 = 1.333333333333333333333333333333
 
const double c_b2 = 0.333333333333333333333333333333333
 
const double c_b7 = 0.333333333333333333333333333333
 
static class madness::twoscale_cache_class cache [kmax+1]
 
static double cutoff_radius = 5.0
 
static bool data_is_read = false
 
static const long default_jdim = 5551212
 
Random default_random_generator
 The default random number stream.
 
static const string dir = "coredata/"
 
static const Tag DYNAMIC_TAG_BASE = 1024
 
NDIMf
 
static const char * filename = "gaussleg"
 
NDIM const Function< R, NDIM > & g
 
template<typename T , typename Archive >
constexpr bool has_freestanding_default_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_freestanding_default_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_with_size_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_freestanding_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_freestanding_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_size_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_freestanding_serialize_with_version_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_version_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_member_serialize_v = madness::meta::is_detected_v<madness::has_member_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_member_serialize_with_version_v = madness::meta::is_detected_v<madness::has_member_serialize_with_version_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_load_and_store_v = has_nonmember_load_v<T, Archive> && has_nonmember_store_v<T, Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_load_v = madness::meta::is_detected_v<madness::has_nonmember_load_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_serialize_v = madness::meta::is_detected_v<madness::has_nonmember_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_store_v = madness::meta::is_detected_v<madness::has_nonmember_store_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_wrap_load_and_store_v = has_nonmember_wrap_load_v<T, Archive> && has_nonmember_wrap_store_v<T, Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_wrap_load_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_load_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool has_nonmember_wrap_store_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_store_t,T,Archive>
 
template<typename T >
constexpr bool is_always_serializable
 
template<typename T >
constexpr bool is_any_function_pointer_v = is_any_function_pointer<T>::value
 
template<typename T >
constexpr bool is_archive_v = meta::is_detected_v<is_archive_defined_t,T>
 
template<typename Archive , typename T >
constexpr bool is_default_serializable_v = is_default_serializable<Archive, T>::value
 
template<typename Archive , typename T >
constexpr bool is_default_serializable_v< Archive, const T > = is_default_serializable_v<Archive, T>
 
template<typename T >
constexpr bool is_function_pointer_v = is_function_pointer<T>::value
 
template<typename T >
constexpr bool is_input_archive_v = meta::is_detected_v<is_input_archive_defined_t, T>
 
template<typename T >
constexpr bool is_iostreammable_v = is_istreammable_v<T> && is_ostreammable_v<T>
 providing automatic support for serializing to/from std streams requires bidirectional streammability
 
template<typename T >
constexpr bool is_istreammable_v = is_istreammable<T>::value
 Shortcut for is_istreammable<T>::value.
 
template<typename T >
constexpr bool is_ostreammable_v = is_ostreammable<T>::value
 Shortcut for is_ostreammable<T>::value.
 
template<typename T >
constexpr bool is_output_archive_v = meta::is_detected_v<is_output_archive_defined_t, T>
 
template<typename Archive , typename T >
constexpr bool is_serializable_v
 
template<typename Archive , typename T >
constexpr bool is_serializable_v< Archive, const T > = is_serializable_v<Archive, T>
 
template<typename Archive >
constexpr const bool is_text_archive_v = is_text_archive<Archive>::value
 is_text_archive_v is a shorthand for is_text_archive<A>::value
 
template<typename T >
constexpr bool is_trivially_copyable_v = is_trivially_copyable<T>::value
 
template<typename T >
constexpr bool is_trivially_serializable_v = is_trivially_serializable<T>::value
 
template<typename Archive , typename T >
constexpr bool is_user_serializable_v
 
template<typename Archive , typename T >
constexpr bool is_user_serializable_v< Archive, const T > = is_user_serializable_v<Archive, T>
 
static int kcur = -1
 
static const int kmax = 60
 
static const int kmax_autoc = 30
 
static int kread = -1
 
static bool loaded = 0
 
static double mask_factor = 5.0
 
static const int max_npt = 64
 
static const int MAXK = 30
 The maximum wavelet order presently supported.
 
static const int MAXLEVEL = 8*sizeof(Translation)-2
 The maximum depth of refinement possible.
 
static double nn1 [100]
 
static const unsigned int NUMBER_OF_ATOMS_IN_TABLE = 110
 
const int NUMEVENTS = 0
 
static double phi_norms [100]
 
static Tensor< double > points [max_npt+1]
 
static bool print_timings = false
 
static std::string reduction_alg ="divide_conquer"
 
static std::atomic< bool > rmi_task_is_running = false
 
static std::vector< double > sss
 
const char * tensor_type_names []
 
static AtomicInt threadcounter
 
static std::vector< double > ttt
 
static const char * twoscale_filename = "coeffs"
 
static Tensor< double > weights [max_npt+1]
 

Detailed Description

Namespace for all elements and tools of MADNESS.

File holds all helper structures necessary for the CC_Operator and CC2 class.

this block needs to be known before nonlinsol.h is included (happens when nemo is included) better move this to nonlinsol.h

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

◆ am_handlerT

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

Type of AM handler functions.

◆ complex_convolution_1d

◆ complex_convolution_1d_ptr

◆ complex_convolution_2d

◆ complex_convolution_2d_ptr

◆ complex_convolution_3d

◆ complex_convolution_3d_ptr

◆ complex_convolution_4d

◆ complex_convolution_4d_ptr

◆ complex_convolution_5d

◆ complex_convolution_5d_ptr

◆ complex_convolution_6d

◆ complex_convolution_6d_ptr

◆ complex_derivative_1d

◆ complex_derivative_2d

◆ complex_derivative_3d

◆ complex_derivative_4d

◆ complex_derivative_5d

◆ complex_derivative_6d

◆ complex_factory_1d

◆ complex_factory_2d

◆ complex_factory_3d

◆ complex_factory_4d

◆ complex_factory_5d

◆ complex_factory_6d

◆ complex_funcimpl_1d

◆ complex_funcimpl_2d

◆ complex_funcimpl_3d

◆ complex_funcimpl_4d

◆ complex_funcimpl_5d

◆ complex_funcimpl_6d

◆ complex_function_1d

◆ complex_function_2d

◆ complex_function_3d

◆ complex_function_4d

◆ complex_function_5d

◆ complex_function_6d

◆ complex_functionT

typedef Function<std::complex<double>, 3> madness::complex_functionT

◆ complex_functor_1d

◆ complex_functor_2d

◆ complex_functor_3d

◆ complex_functor_4d

◆ complex_functor_5d

◆ complex_functor_6d

◆ complex_operatorT

◆ complex_tensor

◆ CONDITION_VARIABLE_TYPE

◆ coord_1d

typedef Vector<double,1> madness::coord_1d

◆ coord_2d

typedef Vector<double,2> madness::coord_2d

◆ coord_3d

typedef Vector< double, 3 > madness::coord_3d

◆ coord_4d

typedef Vector<double,4> madness::coord_4d

◆ coord_5d

typedef Vector<double,5> madness::coord_5d

◆ coord_6d

typedef Vector< double, 6 > madness::coord_6d

◆ coordT

typedef Vector< double, 3 > madness::coordT

◆ cvecfuncT

typedef std::vector<complex_functionT> madness::cvecfuncT

◆ decay_tuple

template<typename T >
using madness::decay_tuple = typedef decltype(decay_types(std::declval<T>()))

◆ distmatT

◆ DistributedID

typedef std::pair<uniqueidT, std::size_t> madness::DistributedID

Distributed ID which is used to identify objects.

◆ factoryT

typedef FunctionFactory< double, 3 > madness::factoryT

◆ function_defaults_1d

◆ function_defaults_2d

◆ function_defaults_3d

◆ function_defaults_4d

◆ function_defaults_5d

◆ function_defaults_6d

◆ functionT

typedef Function< double, 3 > madness::functionT

◆ functorT

typedef std::shared_ptr< FunctionFunctorInterface< double, 3 > > madness::functorT

◆ future_to_ref_t

template<typename T >
using madness::future_to_ref_t = typedef typename future_to_ref< T >::type

◆ has_freestanding_default_serialize_t

template<typename T , typename Archive >
using madness::has_freestanding_default_serialize_t = typedef decltype(default_serialize(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports freestanding default_serialize function

Note
use in combination with madness::meta::is_detected_v

◆ has_freestanding_default_serialize_with_size_t

template<typename T , typename Archive , typename = std::enable_if_t<std::is_pointer_v<T>>>
using madness::has_freestanding_default_serialize_with_size_t = typedef decltype(default_serialize(std::declval<Archive&>(), std::declval<const T&>(), 1u))

helps to detect that T=U* supports freestanding default_serialize function

Note
use in combination with madness::meta::is_detected_v

◆ has_freestanding_serialize_t

template<typename T , typename Archive >
using madness::has_freestanding_serialize_t = typedef decltype(serialize(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports freestanding serialize function

Note
use in combination with madness::meta::is_detected_v

◆ has_freestanding_serialize_with_size_t

template<typename T , typename Archive , typename = std::enable_if_t<std::is_pointer_v<T>>>
using madness::has_freestanding_serialize_with_size_t = typedef decltype(serialize(std::declval<Archive&>(), std::declval<T&>(), 1u))

helps to detect that T=U* supports freestanding serialize function

Note
use in combination with madness::meta::is_detected_v

◆ has_freestanding_serialize_with_version_t

template<typename T , typename Archive , typename = std::enable_if_t<!std::is_pointer_v<T>>>
using madness::has_freestanding_serialize_with_version_t = typedef decltype(serialize(std::declval<Archive&>(), std::declval<T&>(), 0u))

helps to detect that T supports freestanding serialize function that accepts version

Note
use in combination with madness::meta::is_detected_v

◆ has_member_serialize_t

template<typename T , typename Archive >
using madness::has_member_serialize_t = typedef decltype(std::declval<T&>().serialize(std::declval<Archive&>()))

helps to detect that T has a member serialization method that accepts single argument of type Archive

Note
use in combination with madness::meta::is_detected_v

◆ has_member_serialize_with_version_t

template<typename T , typename Archive >
using madness::has_member_serialize_with_version_t = typedef decltype(std::declval<T&>().serialize(std::declval<Archive&>(),0u))

helps to detect that T has a member serialization method that accepts one argument of type Archive and an unsigned version

Note
use in combination with madness::meta::is_detected_v

◆ has_nonmember_load_t

template<typename T , typename Archive >
using madness::has_nonmember_load_t = typedef decltype(madness::archive::ArchiveLoadImpl<Archive, T>::load(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports nonintrusive asymmetric serialization via load

Note
use in combination with madness::meta::is_detected_v

◆ has_nonmember_serialize_t

template<typename T , typename Archive >
using madness::has_nonmember_serialize_t = typedef decltype(madness::archive::ArchiveSerializeImpl<Archive, T>::serialize(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports nonintrusive symmetric serialization

Note
use in combination with madness::meta::is_detected_v

◆ has_nonmember_store_t

template<typename T , typename Archive >
using madness::has_nonmember_store_t = typedef decltype(madness::archive::ArchiveStoreImpl<Archive, T>::store(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports nonintrusive asymmetric serialization via store

Note
use in combination with madness::meta::is_detected_v

◆ has_nonmember_wrap_load_t

template<typename T , typename Archive >
using madness::has_nonmember_wrap_load_t = typedef decltype(madness::archive::ArchiveImpl<Archive, T>::wrap_load(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports nonintrusive asymmetric serialization via wrap_load

Note
use in combination with madness::meta::is_detected_v

◆ has_nonmember_wrap_store_t

template<typename T , typename Archive >
using madness::has_nonmember_wrap_store_t = typedef decltype(madness::archive::ArchiveImpl<Archive, T>::wrap_store(std::declval<Archive&>(), std::declval<T&>()))

helps to detect that T supports nonintrusive asymmetric serialization via wrap_store

Note
use in combination with madness::meta::is_detected_v

◆ hashT

typedef std::size_t madness::hashT

The hash value type.

◆ intermediateT

template<typename T , std::size_t NDIM>
using madness::intermediateT = typedef Pairs<Function<T,NDIM> >

f12 and g12 intermediates of the form <f1|op|f2> (with op=f12 or op=g12) will be saved using the pair structure

◆ is_archive_defined_t

template<typename T >
using madness::is_archive_defined_t = typedef typename is_archive<std::remove_reference_t<std::remove_cv_t<T> >>::type

◆ is_input_archive_defined_t

template<typename T >
using madness::is_input_archive_defined_t = typedef typename is_input_archive<std::remove_reference_t<std::remove_cv_t<T> >>::type

◆ is_output_archive_defined_t

template<typename T >
using madness::is_output_archive_defined_t = typedef typename is_output_archive<std::remove_reference_t<std::remove_cv_t<T> >>::type

◆ json

using madness::json = typedef nlohmann::json

◆ Level

typedef int madness::Level

◆ NonlinearSolver

◆ NonlinearVectorSolver_3d

typedef XNonlinearSolver<std::vector<Function<double,3> >,double,vector_function_allocator<double,3> > madness::NonlinearVectorSolver_3d

◆ NonlinearVectorSolver_6d

typedef XNonlinearSolver<std::vector<Function<double,6> >,double,vector_function_allocator<double,6> > madness::NonlinearVectorSolver_6d

◆ operatorT

◆ pairvecfuncT

◆ pmap_1d

typedef std::shared_ptr< WorldDCPmapInterface< Key<1> > > madness::pmap_1d

◆ pmap_2d

typedef std::shared_ptr< WorldDCPmapInterface< Key<2> > > madness::pmap_2d

◆ pmap_3d

typedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > madness::pmap_3d

◆ pmap_4d

typedef std::shared_ptr< WorldDCPmapInterface< Key<4> > > madness::pmap_4d

◆ pmap_5d

typedef std::shared_ptr< WorldDCPmapInterface< Key<5> > > madness::pmap_5d

◆ pmap_6d

typedef std::shared_ptr< WorldDCPmapInterface< Key<6> > > madness::pmap_6d

◆ pmapT

typedef std::shared_ptr<WorldDCPmapInterface<Key<3> > > madness::pmapT

◆ poperatorT

typedef std::shared_ptr<operatorT> madness::poperatorT

◆ real_convolution_1d

◆ real_convolution_1d_ptr

◆ real_convolution_2d

◆ real_convolution_2d_ptr

◆ real_convolution_3d

◆ real_convolution_3d_ptr

◆ real_convolution_4d

◆ real_convolution_4d_ptr

◆ real_convolution_5d

◆ real_convolution_5d_ptr

◆ real_convolution_6d

◆ real_convolution_6d_ptr

◆ real_derivative_1d

◆ real_derivative_2d

◆ real_derivative_3d

◆ real_derivative_4d

◆ real_derivative_5d

◆ real_derivative_6d

◆ real_factory_1d

◆ real_factory_2d

◆ real_factory_3d

◆ real_factory_4d

◆ real_factory_5d

◆ real_factory_6d

◆ real_funcimpl_1d

◆ real_funcimpl_2d

◆ real_funcimpl_3d

◆ real_funcimpl_4d

◆ real_funcimpl_5d

◆ real_funcimpl_6d

◆ real_function_1d

◆ real_function_2d

◆ real_function_3d

◆ real_function_4d

◆ real_function_5d

◆ real_function_6d

◆ real_functor_1d

typedef std::shared_ptr< FunctionFunctorInterface<double,1> > madness::real_functor_1d

◆ real_functor_2d

typedef std::shared_ptr< FunctionFunctorInterface<double,2> > madness::real_functor_2d

◆ real_functor_3d

typedef std::shared_ptr< FunctionFunctorInterface<double,3> > madness::real_functor_3d

◆ real_functor_4d

typedef std::shared_ptr< FunctionFunctorInterface<double,4> > madness::real_functor_4d

◆ real_functor_5d

typedef std::shared_ptr< FunctionFunctorInterface<double,5> > madness::real_functor_5d

◆ real_functor_6d

typedef std::shared_ptr< FunctionFunctorInterface<double,6> > madness::real_functor_6d

◆ real_tensor

typedef Tensor<double> madness::real_tensor

◆ rel_fn_ptr_t

typedef std::ptrdiff_t madness::rel_fn_ptr_t

◆ remove_fcvr_t

template<typename T >
using madness::remove_fcvr_t = typedef typename remove_fcvr<T>::type

◆ remove_future_t

template<typename T >
using madness::remove_future_t = typedef typename remove_future< T >::type

C++11 version of REMFUTURE.

◆ response_matrix

◆ rmi_handlerT

typedef void(* madness::rmi_handlerT) (void *buf, size_t nbyte)

This is the generic low-level interface for a message handler.

◆ SCALABLE_MUTEX_TYPE

◆ SPINLOCK_TYPE

◆ subspaceT

typedef std::vector<pairvecfuncT> madness::subspaceT

◆ tensor_complex

◆ tensor_real

typedef Tensor<double> madness::tensor_real

◆ tensorT

typedef Tensor< double > madness::tensorT

◆ Translation

typedef int64_t madness::Translation

◆ vecfuncT

typedef std::vector< real_function_3d > madness::vecfuncT

◆ vector_complex

typedef std::vector< std::complex<double> > madness::vector_complex

◆ vector_complex_function_1d

◆ vector_complex_function_2d

◆ vector_complex_function_3d

◆ vector_complex_function_4d

◆ vector_complex_function_5d

◆ vector_complex_function_6d

◆ vector_coord_1d

typedef std::vector< Vector<double,1> > madness::vector_coord_1d

◆ vector_coord_2d

typedef std::vector< Vector<double,2> > madness::vector_coord_2d

◆ vector_coord_3d

typedef std::vector< Vector<double,3> > madness::vector_coord_3d

◆ vector_coord_4d

typedef std::vector< Vector<double,4> > madness::vector_coord_4d

◆ vector_coord_5d

typedef std::vector< Vector<double,5> > madness::vector_coord_5d

◆ vector_coord_6d

typedef std::vector< Vector<double,6> > madness::vector_coord_6d

◆ vector_real

typedef std::vector<double> madness::vector_real

◆ vector_real_function_1d

◆ vector_real_function_2d

◆ vector_real_function_3d

◆ vector_real_function_4d

◆ vector_real_function_5d

◆ vector_real_function_6d

Enumeration Type Documentation

◆ BCType

Enumerator
BC_ZERO 
BC_PERIODIC 
BC_FREE 
BC_DIRICHLET 
BC_ZERONEUMANN 
BC_NEUMANN 

◆ CalcType

Calculation Types used by CC2.

Enumerator
CT_UNDEFINED 
CT_MP2 
CT_MP3 
CT_CC2 
CT_LRCCS 
CT_LRCC2 
CT_CISPD 
CT_ADC2 
CT_TDHF 
CT_TEST 

◆ CCState

Type of Pairs used by CC_Pair2 class.

Enumerator
CCSTATE_UNDEFINED 
GROUND_STATE 
EXCITED_STATE 

◆ EnergyType

Enumerator
PROJECTED_ENERGYTYPE 
HYLLERAAS_ENERGYTYPE 
UNKNOWN_ENERGYTYPE 

◆ FuncType

FuncTypes used by the CC_function_6d structure Types of Functions used by CC_function class

Enumerator
UNDEFINED 
HOLE 
PARTICLE 
MIXED 
RESPONSE 

◆ GuessType

Enumerator
PARTIAL_WAVE_GUESSTYPE 
FROM_FILE_GUESSTYPE 
PREDEFINED_GUESSTYPE 
SCF_GUESSTYPE 
EXOP_GUESSTYPE 
EMPTY_GUESSTYPE 
PSI4_GUESSTYPE 
UNKNOWN_GUESSTYPE 

◆ OpType

operator types

Enumerator
OT_UNDEFINED 
OT_ONE 
OT_G12 

indicates the identity

OT_SLATER 

1/r

OT_GAUSS 

exp(-r)

OT_F12 

exp(-r2)

OT_FG12 

1-exp(-r)

OT_F212 

(1-exp(-r))/r

OT_F2G12 

(1-exp(-r))^2

OT_BSH 

(1-exp(-r))^2/r = 1/r + exp(-2r)/r - 2 exp(-r)/r

OT_SIZE 

exp(-r)/r

for ending loops

◆ PairType

Enumerator
MP2_PAIRTYPE 
CISPD_PAIRTYPE 
ALL_PAIRTYPE 
NONE_PAIRTYPE 
UNKNOWN_PAIRTYPE 

◆ PotentialType

CC2 Singles Potentials.

Enumerator
POT_UNDEFINED 
POT_F3D_ 
POT_s3a_ 
POT_s3b_ 
POT_s3c_ 
POT_s5a_ 
POT_s5b_ 
POT_s5c_ 
POT_s2b_ 
POT_s2c_ 
POT_s4a_ 
POT_s4b_ 
POT_s4c_ 
POT_s6_ 
POT_ccs_ 
POT_cis_ 
POT_singles_ 

◆ TensorType

low rank representations of tensors (see gentensor.h)

Enumerator
TT_FULL 
TT_2D 
TT_TENSORTRAIN 

◆ ThreadTag

bitfield describing thread type

Enumerator
ThreadTag_NonMADNESS 
ThreadTag_MADNESS 
ThreadTag_Main 

◆ TreeState

Enumerator
reconstructed 

s coeffs at the leaves only

compressed 

d coeffs in internal nodes, s and d coeffs at the root

nonstandard 

s and d coeffs in internal nodes

nonstandard_with_leaves 

like nonstandard, with s coeffs at the leaves

nonstandard_after_apply 

s and d coeffs, state after operator application

redundant 

s coeffs everywhere

redundant_after_merge 

s coeffs everywhere, must be summed up to yield the result

on_demand 

no coeffs anywhere, but a functor providing if necessary

unknown 

◆ WaitPolicy

enum class madness::WaitPolicy
strong

wait policies supported by ConditionVariable/DQueue/ThreadPool

Enumerator
Busy 
Yield 
Sleep 

Function Documentation

◆ _()

static const Slice madness::_ ( ,
1,
 
)
static

Referenced by madness::FunctionCommonData< T, NDIM >::_init_twoscale(), madness::SCF::analyze_vectors(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::projector_irrep::apply_symmetry_operators(), madness::Znemo::canonicalize(), madness::MolecularOrbitals< T, NDIM >::compute_center(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::SVDTensor< T >::compute_svd(), madness::SVDTensor< T >::concatenate(), concatenate_columns(), concatenate_rows(), madness::TensorTrain< T >::decompose(), diag_and_transform(), DF::diagonalize(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), madness::RandomizedMatrixDecomposition< T >::do_compute_range(), madness::FunctionImpl< T, NDIM >::do_dot_localX(), madness::FunctionImpl< T, NDIM >::do_inner_localX(), madness::Coulomb< T, NDIM >::MacroTaskCoulomb::MacroTaskPartitionerCoulomb::do_partitioning(), madness::FunctionImpl< T, NDIM >::do_project_out(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), MiniDFT::doit(), doit(), doplot(), madness::SRConf< T >::emul(), madness::TensorTrain< T >::emul(), madness::GFit< T, NDIM >::f12_fit(), madness::GFit< T, NDIM >::f12sq_fit(), fixphases(), fixphases(), madness::TensorTrain< T >::gaxpy(), madness::TensorTrain< T >::gaxpy(), madness::SRConf< T >::get_configs(), madness::Znemo::hcore_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), madness::TDHF::make_cis_matrix(), madness::TwoElectronInterface< T, NDIM >::make_coeff(), madness::FunctionDefaults< NDIM >::make_default_cell(), madness::FunctionDefaults< NDIM >::make_default_cell_width(), madness::Zcis::make_guess(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::Nemo::make_incomplete_hessian_response_part(), madness::SRConf< T >::make_slices(), madness::SRConf< T >::make_slices(), madness::RandomizedMatrixDecomposition< T >::make_SVD_decaying_matrix(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::SRConf< T >::make_vector_with_weights(), madness::SRConf< T >::normalize(), madness::FunctionImpl< T, NDIM >::NS_fcube_for_mul(), madness::FunctionImpl< T, NDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_mirror::operator()(), madness::FunctionImpl< T, NDIM >::do_map_and_mirror::operator()(), BoysLocalization::operator()(), madness::GenTensor< T >::operator+(), madness::SliceLowRankTensor< T >::operator+=(), madness::GenTensor< T >::operator+=(), madness::SliceLowRankTensor< T >::operator-=(), madness::GenTensor< T >::operator-=(), orth(), ortho3(), ortho5(), orthonormalize_canonical(), madness::PNO::pno_compress(), madness::FunctionImpl< T, NDIM >::print_plane_local(), projector_external_dof(), madness::MolecularOptimizer::projector_external_dof(), rank_revealing_decompose(), madness::FunctionDefaults< NDIM >::recompute_cell_info(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), solve(), madness::Nemo::solve_cphf(), madness::TensorTrain< T >::splitdim(), test_asymmetric(), test_sliced_addition(), test_sliced_assignment(), test_syev(), test_sygv(), madness::FunctionImpl< T, NDIM >::tnorm(), madness::TensorTrain< T >::truncate(), madness::Localizer::undo_reordering(), madness::Localizer::undo_rotation(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), madness::SCF::update_subspace(), and madness::FunctionImpl< T, NDIM >::vtransform().

◆ _reverse()

static const Slice madness::_reverse ( 1,
,
1 
)
static

Entire tensor.

◆ abs() [1/4]

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

Returns a new function that is the absolute value of the input.

References abs(), and unary_op().

◆ abs() [2/4]

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

References abs(), func(), and unary_op_coeffs().

◆ abs() [3/4]

template<typename T , std::size_t 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(), abs(), copy(), f, and PROFILE_FUNC.

◆ abs() [4/4]

double madness::abs ( double  x)

◆ abs_square() [1/3]

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

◆ abs_square() [2/3]

template<typename T , std::size_t NDIM>
std::enable_if<!TensorTypeData< T >::iscomplex, Function< T, NDIM > >::type madness::abs_square ( const Function< T, NDIM > &  f,
bool  fence = true 
)

Create a new function that is the abs_square of f - global comm only if not reconstructed.

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

◆ abs_square() [3/3]

template<typename T , std::size_t NDIM>
std::enable_if< TensorTypeData< T >::iscomplex, Function< typenameTensor< T >::scalar_type, NDIM > >::type madness::abs_square ( const Function< T, NDIM > &  f,
bool  fence = true 
)

Create a new function that is the abs_square of f - global comm only if not reconstructed.

References f, and unary_op().

◆ abssq() [1/2]

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

◆ abssq() [2/2]

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

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

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

◆ add() [1/7]

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 
)

Same as operator+ but with optional fence and no automatic compression.

References gaxpy_oop(), L, R, and TENSOR_RESULT_TYPE.

Referenced by add(), add(), add(), add(), add(), add(), doit(), madness::TDHF::get_tda_potential(), and operator+().

◆ add() [2/7]

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 
)

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

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

◆ add() [3/7]

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 
)

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

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

◆ add() [4/7]

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 a, add(), and b.

◆ add() [5/7]

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 a, add(), and b.

◆ add() [6/7]

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, MADNESS_ASSERT, NDIM, PROFILE_BLOCK, R, T(), and TENSOR_RESULT_TYPE.

◆ add() [7/7]

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, MADNESS_ASSERT, NDIM, PROFILE_BLOCK, R, T(), and TENSOR_RESULT_TYPE.

◆ adq()

template<typename funcT >
funcT::returnT madness::adq ( double  lo,
double  hi,
const funcT &  func,
double  thresh 
)

◆ adq1()

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 
)

◆ aligned_add() [1/3]

void madness::aligned_add ( long  n,
double *MADNESS_RESTRICT  a,
const double *MADNESS_RESTRICT  b 
)

Referenced by main().

◆ aligned_add() [2/3]

void madness::aligned_add ( long  n,
double_complex *MADNESS_RESTRICT  a,
const double_complex *MADNESS_RESTRICT  b 
)

◆ aligned_add() [3/3]

template<typename T , typename Q >
static void madness::aligned_add ( long  n,
T *MADNESS_RESTRICT  a,
const Q *MADNESS_RESTRICT  b 
)
inlinestatic

References a, and b.

◆ aligned_axpy() [1/4]

template<>
void madness::aligned_axpy ( long  n,
double *MADNESS_RESTRICT  a,
const double *MADNESS_RESTRICT  b,
double  s 
)
inline

References a, madness::cblas::axpy(), and b.

◆ aligned_axpy() [2/4]

template<>
void madness::aligned_axpy ( long  n,
double_complex *MADNESS_RESTRICT  a,
const double_complex *MADNESS_RESTRICT  b,
double  s 
)
inline

References a, madness::cblas::axpy(), and b.

◆ aligned_axpy() [3/4]

template<>
void madness::aligned_axpy ( long  n,
double_complex *MADNESS_RESTRICT  a,
const double_complex *MADNESS_RESTRICT  b,
double_complex  s 
)
inline

References a, madness::cblas::axpy(), and b.

◆ aligned_axpy() [4/4]

template<typename T , typename Q >
static void madness::aligned_axpy ( long  n,
T *MADNESS_RESTRICT  a,
const T *MADNESS_RESTRICT  b,
Q  s 
)
inlinestatic

◆ aligned_sub() [1/3]

void madness::aligned_sub ( long  n,
double *MADNESS_RESTRICT  a,
const double *MADNESS_RESTRICT  b 
)

Referenced by main().

◆ aligned_sub() [2/3]

void madness::aligned_sub ( long  n,
double_complex *MADNESS_RESTRICT  a,
const double_complex *MADNESS_RESTRICT  b 
)

◆ aligned_sub() [3/3]

template<typename T , typename Q >
static void madness::aligned_sub ( long  n,
T *MADNESS_RESTRICT  a,
const Q *MADNESS_RESTRICT  b 
)
inlinestatic

References a, and b.

◆ aligned_zero()

template<typename T >
static void madness::aligned_zero ( long  n,
T a 
)
inlinestatic

References a, and T().

Referenced by madness::Tensor< T >::allocate().

◆ alloc_am_arg()

AmArg * madness::alloc_am_arg ( std::size_t  nbyte)
inline

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

Referenced by copy_am_arg(), and new_am_arg().

◆ analytical_slater_functor()

static double madness::analytical_slater_functor ( double  rho)
static

References pow().

◆ append()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::append ( const std::vector< Function< T, NDIM > > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

◆ APPLY()

complex_functionT madness::APPLY ( const complex_operatorT q1d,
const complex_functionT psi 
)

◆ apply() [1/21]

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)

References f.

◆ apply() [2/21]

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 
)

Apply operator in non-standard form.

Returns a new function with the same distribution

!!! For the moment does NOT respect fence option ... always fences if the operator acts on one particle only the result will be sorted as g.particle=1: g(f) = \int g(x,x') f(x',y) dx' = result(x,y) g.particle=2: g(f) = \int g(y,y') f(x,y') dy' = result(x,y) for the second case it will notably not be as it is implemented in the partial inner product! g.particle=2 g(f) = result(x,y) inner(g(y,y'),f(x,y'),1,1) = result(y,x) also note the confusion with the counting of the particles/integration variables

References apply_only(), madness::Function< T, NDIM >::change_tree_state(), madness::Function< T, NDIM >::clear(), f, madness::WorldGopInterface::fence(), madness::Function< T, NDIM >::get_impl(), madness::World::gop, MADNESS_ASSERT, madness::Function< T, NDIM >::make_nonstandard(), nonstandard_after_apply, op(), madness::Function< T, NDIM >::print_size(), print_timings, R, madness::Function< T, NDIM >::reconstruct(), redundant, madness::Function< T, NDIM >::standard(), TENSOR_RESULT_TYPE, TT_2D, VERIFY_TREE, madness::Function< T, NDIM >::verify_tree(), and madness::Function< T, NDIM >::world().

◆ apply() [3/21]

template<typename opT , typename T , std::size_t LDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, T), LDIM+LDIM > madness::apply ( const opT &  op,
const std::vector< Function< T, LDIM > > &  f1,
const std::vector< Function< T, LDIM > > &  f2,
bool  fence = true 
)

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

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(), f, f1, f2, madness::WorldGopInterface::fence(), madness::FunctionFactory< T, NDIM >::fence(), madness::Function< T, NDIM >::get_impl(), get_impl(), madness::World::gop, madness::FunctionFactory< T, NDIM >::k(), op(), reconstruct(), standard(), T(), TENSOR_RESULT_TYPE, and madness::FunctionFactory< T, NDIM >::thresh().

◆ apply() [4/21]

template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIM > madness::apply ( const ProjectorBase projector,
const CCPairFunction< T, NDIM > &  argument 
)

References apply(), and MADNESS_CHECK.

◆ apply() [5/21]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::apply ( const ProjectorBase projector,
const std::vector< CCPairFunction< T, NDIM > > &  argument 
)

apply the projector on the argument function, potentially yielding a vector of CCPairfunctions as result

result can be Q12 f12 |ij> = (1 - O1) (1 - O2) f12 i(1) j(2) = f12 ij - \sum_k k(1) f_ik(2) j(2) - \sum_k k(2) f_ij(1)j(1) which is a pure function and a decomposed function

References madness::CCPairFunction< T, NDIM >::apply().

◆ apply() [6/21]

template<typename T , typename R , std::size_t NDIM, std::size_t KDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::apply ( const SeparatedConvolution< T, KDIM > &  op,
const std::vector< Function< R, NDIM > >  f 
)

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

References apply(), f, and op().

◆ apply() [7/21]

template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIM > madness::apply ( const SeparatedConvolution< T, NDIM > &  G,
const CCPairFunction< T, NDIM > &  argument 
)

apply the operator on a CCPairfunction, both with the same dimension

note there is another function, where the operator works only on some dimensions of the CCPairFunction!

Returns
result(x) = \int op(x,x') arg(x') dx': a CCPairfunction with the same dimension as the argument

References madness::timer::end(), madness::CCPairFunction< T, NDIM >::get_a(), madness::CCPairFunction< T, NDIM >::get_b(), madness::CCPairFunction< T, NDIM >::get_function(), madness::CCPairFunction< T, NDIM >::is_decomposed_no_op(), madness::CCPairFunction< T, NDIM >::is_pure(), MADNESS_ASSERT, MADNESS_EXCEPTION, madness::CCPairFunction< T, NDIM >::name(), and madness::CCPairFunction< T, NDIM >::world().

◆ apply() [8/21]

template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIM > madness::apply ( const SeparatedConvolution< T, NDIM > &  G,
const std::vector< CCPairFunction< T, NDIM > > &  argument 
)

References a.

◆ apply() [9/21]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::apply ( const SeparatedConvolution< T, NDIM > &  op,
const std::vector< CCPairFunction< T, NDIM > > &  argument 
)

References a.

◆ apply() [10/21]

template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIM > madness::apply ( const SeparatedConvolution< T, NDIM/2 > &  op,
const CCPairFunction< T, NDIM > &  arg 
)

apply the operator to the argument

the operator is applied to one particle only, the other one is left untouched note the ordering of the particles, cf the corresponding comment in mra.h op.particle==1 : op(f(x,y)) = op(x,x') f(x',y) = result(x,y); op.particle==2 : op(f(x,y)) = op(y,y') f(x,y') = result(y,x);

References apply(), arg(), MADNESS_CHECK, MADNESS_CHECK_THROW, op(), and madness::CCPairFunction< T, NDIM >::swap_particles().

◆ apply() [11/21]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::apply ( const SeparatedConvolution< T, NDIM/2 > &  op,
const std::vector< CCPairFunction< T, NDIM > > &  argument 
)

apply the operator to the argument

the operator is applied to one particle only, the other one is left untouched note the ordering of the particles, cf the corresponding comment in mra.h op.particle==1 : op(f(x,y)) = op(x,x') f(x',y) = result(x,y); op.particle==2 : op(f(x,y)) = op(y,y') f(x,y') = result(y,x);

References apply(), arg(), op(), and madness::response_space::push_back().

◆ apply() [12/21]

template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> madness::apply ( const TensorTrain< T > &  op,
const TensorTrain< Q > &  t,
const double  thresh 
)

apply an operator in TT format on a tensor in TT format

Parameters
[in]opoperator in TT format ..(r_1,k',k,r_2)..
[in]ttensor in TT format ..(r_1,k',r_2).. the result tensor will be .. (r_1,k,r_2) = \sum_k' ..(r_1,k',k,r_2).. ..(r_1,k',r_2).. during the apply a rank reduction will be performed 2*ndim allocates are needed

References copy(), madness::Tensor< T >::cycledim(), d, madness::BaseTensor::dim(), madness::BaseTensor::dims(), madness::TensorTrain< T >::get_core(), inner_result(), k, k0, MADNESS_ASSERT, maxR, madness::BaseTensor::ndim(), op(), print(), Q(), R, R1, r2(), R2, rank_revealing_decompose(), madness::TensorTrain< T >::ranks(), madness::Tensor< T >::reshape(), T(), TENSOR_RESULT_TYPE, and thresh.

◆ apply() [13/21]

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, reconstruct(), and v.

◆ apply() [14/21]

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, reconstruct(), and v.

◆ apply() [15/21]

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

◆ apply() [16/21]

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, NDIM, nonstandard, op(), PROFILE_BLOCK, R, reconstruct(), standard(), T(), and TENSOR_RESULT_TYPE.

◆ apply() [17/21]

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 
)

◆ apply() [18/21]

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, MADNESS_ASSERT, NDIM, nonstandard, op(), PROFILE_BLOCK, R, reconstruct(), madness::BaseTensor::size(), standard(), and TENSOR_RESULT_TYPE.

◆ apply() [19/21]

response_space madness::apply ( World world,
real_derivative_3d op,
response_space f 
)

◆ apply() [20/21]

response_space madness::apply ( World world,
std::vector< std::shared_ptr< real_convolution_3d > > &  op,
response_space f 
)

◆ apply() [21/21]

response_space madness::apply ( World world,
std::vector< std::vector< std::shared_ptr< real_convolution_3d > > > &  op,
response_space f 
)

References apply(), f, MADNESS_ASSERT, op(), madness::BaseTensor::size(), and madness::World::size().

Referenced by madness::DFTNuclearChargeDensityOp< T, NDIM >::DFTNuclearChargeDensityOp(), NuclearChargeDensityOp< T, NDIM >::NuclearChargeDensityOp(), madness::Solver< T, NDIM >::Solver(), madness::Solver< T, NDIM >::Solver(), madness::Solver< T, NDIM >::Solver(), madness::CCPairFunction< T, NDIM >::apply(), apply(), apply(), apply(), apply(), Fcwf::apply(), Fcwf::apply(), apply(), apply(), apply(), apply_bsh(), apply_BSH(), apply_BSH_new(), madness::MP2::apply_exchange_vector(), madness::TDHF::apply_G(), madness::Solver< T, NDIM >::apply_hf_exchange(), madness::Solver< T, NDIM >::apply_hf_exchange3(), madness::Solver< T, NDIM >::apply_hf_exchange4(), apply_periodic_bsh(), madness::Diamagnetic_potential_factor::apply_potential(), madness::Solver< T, NDIM >::apply_potential(), apply_potential(), madness::F12Potentials::apply_regularized_potential(), apply_T(), 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::Nemo::compute_all_cphf(), madness::PNO::compute_cispd_correction_es(), madness::PNO::compute_cispd_correction_gs(), madness::PNO::compute_cispd_f12_correction_es(), madness::PNO::compute_cispd_f12_correction_gs(), madness::F12Potentials::compute_cispd_f12_energies(), madness::Znemo::compute_energy(), compute_energy(), madness::Nemo::compute_energy_regularized(), compute_energy_simple(), madness::PNO::compute_fluctuation_matrix(), madness::F12Potentials::compute_fQc_integrals_ij(), madness::F12Potentials::compute_fQg_integral(), madness::F12Potentials::compute_fQg_integrals(), madness::F12Potentials::compute_fQU_integrals(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::NemoBase::compute_kinetic_energy(), madness::NemoBase::compute_kinetic_energy1a(), madness::NemoBase::compute_kinetic_energy2(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::PNO::compute_projected_mp2_energies(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::SCF::compute_residual(), madness::Znemo::compute_residuals(), madness::Zcis::compute_residuals(), madness::OEP::compute_total_kinetic_density(), madness::PNO::compute_V_aj_i(), madness::PNO::compute_Vreg_aj_i_commutator_response(), madness::PNO::compute_Vreg_aj_i_fock_residue(), madness::F12Potentials::compute_xyab_integrals(), converge(), converge(), converge2s(), madness::F12Potentials::convolve_with_fg(), madness::F12Potentials::convolve_with_fU(), madness::F12Potentials::convolve_with_gradslater(), madness::F12Potentials::convolve_with_slater_potential(), DF::diagonalize(), div(), madness::SCF::do_plots(), doit(), DF::exchange(), madness::smooth< T, NDIM >::gaussian_smoothing(), grad(), grad_ble_one(), grad_ble_two(), grad_bpsline_two(), grad_bspline_one(), grad_bspline_three(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), madness::LRFunctorF12< T, NDIM, LDIM >::inner(), iterate(), iterate(), DF::iterate(), iterate(), iterate(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_small_memory(), madness::SCF::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), MiniDFT::kinetic_energy_matrix(), madness::Nemo::kinetic_energy_potential(), main(), madness::MP2::make_chi(), madness::SCF::make_coulomb_potential(), DF::make_fermi_potential(), make_kinetic_matrix(), madness::Solver< T, NDIM >::make_kinetic_matrix(), make_kinetic_matrix(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), madness::TDHF::make_perturbed_fock_matrix(), Calculation::make_reference(), molresponseExchange(), madness::EigSolver< T, NDIM >::multi_solve(), madness::HartreeFockExchangeOp< T, NDIM >::op_o(), madness::HartreeFockCoulombOp< T, NDIM >::op_r(), madness::Projector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), MicroTask::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::BSHApply< T, NDIM >::operator()(), MyDerivativeOperator< T, NDIM >::operator()(), madness::DerivativeOperator< T, NDIM >::operator()(), madness::TDHF::oscillator_strength_velocity(), madness::DFTCoulombOp< T, NDIM >::prepare_op(), madness::DFTCoulombPeriodicOp< T, NDIM >::prepare_op(), rot(), madness::Solver< T, NDIM >::solve(), madness::EigSolver< T, NDIM >::solve(), madness::SCF::solve(), madness::Nemo::solve_cphf(), DF::solve_occupied(), T(), test(), madness::smooth< T, NDIM >::test_1d(), test_he_potential(), test_hf_be(), test_hf_he(), test_inner(), test_nuclear_potential(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_op(), test_per(), test_periodic_bsh(), testbsh(), testNavierStokes(), testPeriodicCoulomb3d(), trotter(), madness::SCF::twoint(), MiniDFT::update(), and madness::PNO::update_pno().

◆ apply_1d_realspace_push()

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 
)

◆ apply_only()

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 
)

Apply operator ONLY in non-standard form - required other steps missing !!

References f, NDIM, op(), R, madness::Function< T, NDIM >::set_impl(), and TENSOR_RESULT_TYPE.

Referenced by apply(), apply(), apply(), apply(), apply(), and test_coulomb().

◆ assign_calctype()

CalcType madness::assign_calctype ( const std::string  name)

Assigns enum to string.

References CT_ADC2, CT_CC2, CT_CISPD, CT_LRCC2, CT_LRCCS, CT_MP2, CT_TDHF, CT_TEST, MADNESS_EXCEPTION, and name().

◆ assign_name() [1/4]

std::string madness::assign_name ( const CalcType inp)

Assigns strings to enums for formated output.

References CT_ADC2, CT_CC2, CT_CISPD, CT_LRCC2, CT_LRCCS, CT_MP2, CT_TDHF, CT_TEST, and MADNESS_EXCEPTION.

◆ assign_name() [2/4]

std::string madness::assign_name ( const CCState input)

◆ assign_name() [3/4]

std::string madness::assign_name ( const FuncType inp)

Assigns strings to enums for formated output.

References HOLE, MADNESS_EXCEPTION, MIXED, PARTICLE, RESPONSE, and UNDEFINED.

◆ assign_name() [4/4]

std::string madness::assign_name ( const PotentialType inp)

◆ atomic_number_to_symbol()

std::string madness::atomic_number_to_symbol ( const unsigned int  atomic_number)

◆ autoc()

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)
char * p(char *buf, const char *name, int k, int initial_level, double thresh, int order)
Definition derivatives.cc:72
AtomicInt sum
Definition test_atomicint.cc:46

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).

References _c, _cread, c, k, kcur, and kread.

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

◆ bandlimited_propagator_plot()

void madness::bandlimited_propagator_plot ( )

References madness::BandlimitedPropagator::plot().

Referenced by main().

◆ begin_papi_measurement()

void madness::begin_papi_measurement ( )
inline

◆ bgq_mtxmq_padded() [1/4]

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, k, and posix_memalign().

◆ bgq_mtxmq_padded() [2/4]

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, posix_memalign(), and xc.

◆ bgq_mtxmq_padded() [3/4]

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, k, and posix_memalign().

◆ bgq_mtxmq_padded() [4/4]

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, k, and posix_memalign().

◆ binary_op()

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 
)

◆ BSHOperator()

template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > madness::BSHOperator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with BSH kernel in general NDIM.

References k, lo, MADNESS_EXCEPTION, mu, OT_BSH, print(), and madness::World::rank().

◆ BSHOperator3D()

static SeparatedConvolution< double, 3 > madness::BSHOperator3D ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.

References k, lo, mu, and OT_BSH.

Referenced by apply_BSH_new(), converge(), converge2s(), doit(), iterate(), iterate(), iterate(), iterate(), iterate_excite(), iterate_excite(), iterate_ground(), iterate_ground(), iterate_xy(), iterate_xy(), main(), make_bsh_operator(), test_modified(), and test_periodic_bsh().

◆ BSHOperatorPtr()

template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * madness::BSHOperatorPtr ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with BSH kernel in general NDIM.

References k, lo, MADNESS_EXCEPTION, mu, OT_BSH, print(), and madness::World::rank().

◆ BSHOperatorPtr3D()

static SeparatedConvolution< double, 3 > * madness::BSHOperatorPtr3D ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

◆ c_rks_vwn5__()

int madness::c_rks_vwn5__ ( const double *  r__,
double *  f,
double *  dfdra 
)

◆ c_uks_vwn5__()

int madness::c_uks_vwn5__ ( double *  ra,
double *  rb,
double *  f,
double *  dfdra,
double *  dfdrb 
)

References a1, a2, c_b14, c_b7, f, f1, f2, f3, pow(), ss1, v, and zeta.

Referenced by madness::XCfunctional::exc(), and madness::XCfunctional::vxc().

◆ CCConvolutionOperatorPtr()

template<typename T , std::size_t NDIM>
std::shared_ptr< CCConvolutionOperator< T, NDIM > > madness::CCConvolutionOperatorPtr ( World world,
const OpType  type,
typename CCConvolutionOperator< T, NDIM >::Parameters  param 
)

References param, and type().

◆ change_tensor_type()

template<typename T >
void madness::change_tensor_type ( GenTensor< T > &  t,
const TensorArgs targs 
)

◆ change_tree_state()

template<typename T , std::size_t NDIM>
const std::vector< Function< T, NDIM > > & madness::change_tree_state ( const std::vector< Function< T, NDIM > > &  v,
const TreeState  finalstate,
const bool  fence = true 
)

◆ check_for_inf() [1/2]

template<typename T >
static std::enable_if< std::is_floating_point< T >::value, void >::type madness::check_for_inf ( const std::string &  str,
T arg 
)
static

References arg().

Referenced by operator>>().

◆ check_for_inf() [2/2]

template<typename T >
static std::enable_if<!std::is_floating_point< T >::value, void >::type madness::check_for_inf ( const std::string &  str,
T arg 
)
static

◆ check_if_pseudo_atom()

bool madness::check_if_pseudo_atom ( const std::string &  symbol)

◆ check_linear_dependence()

template<typename C >
void madness::check_linear_dependence ( const Tensor< C > &  Q,
Tensor< C > &  c,
const double  rcondtol,
const double  cabsmax,
bool  do_print = true 
)

check for subspace linear dependency

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 c, e(), KAIN(), m, print(), and Q().

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

◆ checksum_file()

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

Simple checksum for ASCII characters in file.

References c, filename, and sum.

Referenced by read_twoscale(), and test_autoc().

◆ cholesky() [1/8]

template<>
void madness::cholesky ( char  uplo,
integer  n,
complex_real4 A,
integer  lda 
)

References cpotrf_(), and LINALG_ASSERT.

◆ cholesky() [2/8]

template<>
void madness::cholesky ( char  uplo,
integer  n,
complex_real8 A,
integer  lda 
)

References LINALG_ASSERT, and zpotrf_().

◆ cholesky() [3/8]

template<>
void madness::cholesky ( char  uplo,
integer  n,
real4 A,
integer  lda 
)

References LINALG_ASSERT, and spotrf_().

◆ cholesky() [4/8]

template<>
void madness::cholesky ( char  uplo,
integer  n,
real8 A,
integer  lda 
)

References dpotrf_(), and LINALG_ASSERT.

◆ cholesky() [5/8]

template<typename T >
void madness::cholesky ( char  uplo,
integer  n,
T A,
integer  lda 
)

Compute the Cholesky Factorization via LAPACK.

◆ cholesky() [6/8]

template void madness::cholesky ( Tensor< double > &  A)

◆ cholesky() [7/8]

template void madness::cholesky ( Tensor< double_complex > &  A)

◆ cholesky() [8/8]

template<typename T >
void madness::cholesky ( Tensor< T > &  A)

Compute the Cholesky factorization.

Solves symmetric or Hermitian generalized eigenvalue problem.

Compute the Cholesky factorization of the symmetric positive definite matrix A

For memory efficiency A is modified inplace. Its upper triangle will hold the result and the lower trianlge will be zeroed such that input = inner(transpose(output),output).

Cholesky factorization

References mask_info(), potrf_(), and TENSOR_ASSERT.

Referenced by orthonormalize_cd(), and test_cholesky().

◆ column_distributed_matrix()

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

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)
Returns
A new zero matrix with the requested dimensions and distribution

References column_distributed_matrix_distribution(), and m.

◆ column_distributed_matrix_distribution()

static DistributedMatrixDistribution madness::column_distributed_matrix_distribution ( World world,
int64_t  n,
int64_t  m,
int64_t  coltile 
)
inlinestatic

Generates distribution for 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

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)
Returns
An object encoding the dimension and distribution information

Referenced by column_distributed_matrix().

◆ compress() [1/3]

template<typename T , std::size_t NDIM>
const std::vector< Function< T, NDIM > > & madness::compress ( const std::vector< Function< T, NDIM > > &  v)

compress a vector of functions

implies fence return v for chaining

References change_tree_state(), compressed, and v.

◆ compress() [2/3]

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

Compress a vector of functions.

References change_tree_state(), compressed, PROFILE_BLOCK, and v.

Referenced by add(), add(), add(), add(), madness::GTHPseudopotential< Q >::apply_potential(), madness::FunctionImpl< T, NDIM >::change_tree_state(), madness::NemoBase::compute_gradient(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Solver< T, NDIM >::compute_rho(), cross(), DF::exchange(), gaxpy(), gaxpy(), gaxpy_oop(), gaxpy_oop(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), inner(), inner(), madness::SCF::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Nemo::make_density(), madness::SCF::make_density(), madness::SCF::make_density(), MiniDFT::make_density(), madness::FunctionImpl< T, NDIM >::make_redundant(), Calculation::make_reference(), matrix_dot(), matrix_inner(), matrix_inner_old(), molresponseExchange(), MiniDFT::orthogonalize(), orthogonalize(), madness::FunctionImpl< Q, NDIM >::print_plane(), madness::projector_irrep::project_on_irreps(), q_c(), madness::MacroTask< taskT >::MacroTaskInternal::run(), sub(), sub(), sum(), test2(), test_cross(), test_dot(), test_inner(), test_math(), test_rot(), madness::TDHF::transform(), transform(), transform(), transform(), transform(), transform(), madness::Zcis::transform(), madness::PNO::transform_pairs(), truncate(), truncate(), madness::PNO::truncate_pairs(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), and madness::SCF::update_subspace().

◆ compress() [3/3]

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, PROFILE_BLOCK, and v.

◆ concatenate_columns()

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 _(), ___, a, b, c, and MADNESS_CHECK.

◆ concatenate_rows() [1/2]

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

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

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

Referenced by distributed_localize_PM().

◆ concatenate_rows() [2/2]

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 _(), ___, a, b, c, d, madness::DistributedMatrix< T >::data(), and MADNESS_CHECK.

◆ conditional_conj()

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

For real types return value, for complex return conjugate.

References op().

Referenced by madness::Tensor< T >::conj(), conj(), madness::Tensor< T >::TENSOR_RESULT_TYPE(), and madness::Localizer::undo_reordering().

◆ conj() [1/4]

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

◆ conj() [2/4]

double madness::conj ( double  x)
inline

◆ conj() [3/4]

double madness::conj ( float  x)
inline

◆ conj() [4/4]

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, PROFILE_BLOCK, and v.

◆ convert() [1/3]

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 f, madness::Function< T, NDIM >::get_impl(), PROFILE_FUNC, madness::Function< T, NDIM >::set_impl(), and madness::Function< T, NDIM >::verify().

◆ convert() [2/3]

template<class Q , class T >
GenTensor< Q > madness::convert ( const GenTensor< T > &  other)

type conversion implies a deep copy

Returns
Returns a new tensor that is a deep copy of the input

References copy(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), and MADNESS_EXCEPTION.

◆ convert() [3/3]

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

Returns a deep copy of a vector of functions.

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

◆ copy() [1/7]

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)

◆ copy() [2/7]

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(), f, and PROFILE_FUNC.

◆ copy() [3/7]

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 f, madness::Function< T, NDIM >::get_impl(), PROFILE_FUNC, madness::Function< T, NDIM >::set_impl(), madness::Function< T, NDIM >::verify(), VERIFY_TREE, and madness::Function< T, NDIM >::verify_tree().

Referenced by madness::ConvolutionData1D< Q >::ConvolutionData1D(), madness::DFTNuclearPotentialOp< T, NDIM >::DFTNuclearPotentialOp(), madness::Solver< T, NDIM >::Solver(), madness::Solver< T, NDIM >::Solver(), madness::Solver< T, NDIM >::Solver(), madness::FunctionCommonData< T, NDIM >::_init_twoscale(), abs(), abs_square(), madness::FunctionNode< T, NDIM >::accumulate(), RealFuncIdentOp::action(), ComplexFuncIdentOp::action(), madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), madness::SeparatedConvolution< Q, NDIM >::apply(), apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::MP2::apply_exchange(), madness::MP2::apply_exchange_vector(), madness::TDHF::apply_excitation_operators(), madness::Solver< T, NDIM >::apply_potential(), madness::SCF::apply_potential(), madness::projector_irrep::apply_symmetry_operators(), apply_U_mix(), apply_U_ncf(), apply_V(), applyexpLt(), madness::FunctionImpl< T, NDIM >::binaryXXa(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), madness::DFT< T, NDIM >::calculate_tot_xc_energy(), madness::Localizer::check_core_valence_separation(), madness::TwoBodyFunctionPureComponent< T, NDIM >::clone(), madness::TwoBodyFunctionSeparatedComponent< T, NDIM >::clone(), madness::CCPairFunction< T, NDIM >::collect_same_types(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), madness::MP2::compute_energy(), compute_energy(), compute_energy(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::MP2::compute_gQf_cc2interface(), madness::CC2::compute_local_coupling(), madness::OEP::compute_ocep_correction(), madness::OEP::compute_Pauli_kinetic_density(), madness::Zcis::compute_potentials(), compute_R2f2_psi(), madness::MolecularOptimizer::compute_reduced_mass(), compute_reduced_mass(), madness::Zcis::compute_residuals(), madness::SVDTensor< T >::compute_svd(), madness::SVDTensor< T >::compute_svd_from_range(), madness::OEP::compute_total_kinetic_density(), conj(), conj(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), convert(), madness::X_space::copy(), copy(), madness::X_space::copy(), copy(), copy(), copy(), copy(), madness::SCF::copy_data(), cplxfunc0(), cplxfunc2(), madness::CCPairFunction< T, NDIM >::dec_to_pure(), madness::TensorTrain< T >::decompose(), diag_and_transform(), DF::diagonalize(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), distributed_localize_PM(), dnuclear_anchor_test(), madness::Derivative< T, NDIM >::do_diff2b(), madness::SCF::do_plots(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), MiniDFT::doit(), doit(), madness::CC2::enforce_core_valence_separation(), fixphases(), madness::FunctionImpl< T, NDIM >::gaxpy_ext_node(), madness::FunctionImpl< T, NDIM >::gaxpy_ext_recursive(), geev(), gelss(), general_transform(), gesv(), data< T, NDIM >::get_ccpairfunctions(), madness::HartreeFock< T, NDIM >::get_coulomb_potential(), madness::MP2::get_fock_matrix(), madness::Convolution1D< Q >::get_rnlp(), madness::MolecularOrbitals< T, NDIM >::get_subset(), ggev(), GMRES(), ground_exchange(), madness::MP2::guess_mp1_3(), madness::BasisFunctions::guess_with_exop(), madness::SCF::initial_guess(), inner(), madness::LRFunctorF12< T, NDIM, LDIM >::inner(), madness::FunctionImpl< T, NDIM >::inner_adaptive_recursive(), madness::FunctionImpl< T, NDIM >::inner_ext_recursive(), madness::CCPairFunction< T, NDIM >::inner_internal(), inverse(), madness::MP2::iterate(), madness::OEP::iterate(), madness::CC2::iterate_pair(), madness::CC2::iterate_singles(), madness::MP2::JK1phi0_on_demand(), madness::MP2::JK2phi0_on_demand(), madness::MolecularOrbitals< T, NDIM >::load_mos(), madness::SCF::load_mos(), loadbal(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), madness::Nemo::make_ddensity(), madness::smooth< T, NDIM >::make_explog(), madness::MP2::make_fKphi0(), madness::SCF::make_fock_matrix(), madness::Zcis::make_guess(), madness::MP2::make_KffKphi0(), madness::Nemo::make_laplacian_density(), madness::SCF::make_lda_potential(), MiniDFT::make_lda_potential(), make_lda_potential(), madness::Solver< T, NDIM >::make_lda_potential(), madness::TDHF::make_mo_ket(), madness::Solver< T, NDIM >::make_nuclear_potential_impl(), make_potential(), madness::FunctionImpl< T, NDIM >::make_redundant_op(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), SurfaceMoleculeInteraction::make_surfcharge(), madness::MP2::make_Uphi0(), madness::CCPairFunction< T, NDIM >::make_xy_u(), madness::TwoElectronInterface< T, NDIM >::map_coeff(), map_tensor(), madness::Convolution1D< Q >::mod_nonstandard(), molresponseExchange(), madness::FunctionImpl< T, NDIM >::mul(), madness::FunctionImpl< T, NDIM >::multiply(), multiply_by_V(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::FunctionImpl< T, NDIM >::mulXXa(), madness::FunctionImpl< T, NDIM >::mulXXveca(), madness::smooth< T, NDIM >::munge_density(), madness::MP2::nemo0_on_demand(), madness::Znemo::normalize(), nuclear_anchor_test(), madness::CCPairFunction< T, NDIM >::op_dec_to_pure(), madness::XCFunctionalLDA< T, NDIM >::op_r(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::pg_operator::operator()(), madness::divide_add_interpolate::operator()(), madness::XCOperator< T, NDIM >::logme::operator()(), madness::XCOperator< T, NDIM >::expme::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), test_multiop< T, NDIM >::operator()(), myunaryop_square< T, NDIM >::operator()(), madness::BinaryOpStructure< NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::add_op::operator()(), madness::BSHApply< T, NDIM >::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 >::do_map_and_mirror::operator()(), BoysLocalization::operator()(), operator*(), operator*(), madness::DistributedMatrix< T >::operator+(), madness::FunctionNode< T, NDIM >::operator=(), orth(), ortho5(), madness::Znemo::orthonormalize(), orthonormalize(), outer(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::MP2::phi0_on_demand(), plot_cubefile(), madness::XCOperator< T, NDIM >::prep_xc_args(), print_tree_jsonfile(), madness::projector_irrep::project_on_irreps(), madness::FunctionImpl< T, NDIM >::project_refine_op(), propagate(), madness::Nemo::purify_hessian(), rank_revealing_decompose(), Plotter::read(), madness::InitParameters::read(), real(), realfunc0(), realfunc2(), madness::FunctionDefaults< NDIM >::recompute_cell_info(), madness::SVDTensor< T >::recompute_from_range(), madness::FunctionNode< T, NDIM >::recompute_snorm_and_dnorm(), madness::FunctionImpl< T, NDIM >::reconstruct_op(), reconstruct_psi(), madness::FunctionImpl< T, NDIM >::recur_down_for_contraction_map(), reduce(), madness::FunctionImpl< T, NDIM >::refine_op(), madness::FunctionImpl< T, NDIM >::refine_to_common_level(), residual(), madness::OEP::selftest(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::set_bra_and_ket(), madness::FunctionDefaults< NDIM >::set_cell(), madness::AtomicBasis::set_guess_info(), madness::MolecularOptimizer::set_hessian(), madness::QuasiNewton::set_hessian(), madness::Localizer::set_metric(), madness::LocalPotentialOperator< T, NDIM >::set_potential(), madness::apply_kernel_helper::slater_apply(), madness::smooth< T, NDIM >::smooth_density(), madness::CC2::solve(), madness::Nemo::solve(), madness::OEP::solve(), solve(), madness::Nemo::solve_cphf(), madness::CC2::solve_lrcc2(), madness::CC2::solve_mp2_coupled(), madness::Zcis::split(), square(), madness::archive::ArchiveStoreImpl< Archive, GenTensor< T > >::store(), madness::archive::ArchiveStoreImpl< Archive, Tensor< T > >::store(), madness::FunctionImpl< T, NDIM >::sum_down_spawn(), svd(), test2(), Test5(), Test7(), test_adaptive_tree(), test_add(), test_addition(), test_asymmetric(), test_bsh(), test_chin_chen(), test_cholesky(), test_compress(), test_constructor(), test_conversion(), test_convolution(), test_coulomb(), test_hermiticity(), test_Kcommutator(), test_multiply(), test_partial_inner_3d(), test_projector(), test_qr(), test_recursive_application(), test_rr_cholesky(), test_scalar_multiplication(), test_slater_exchange(), test_sliced_addition(), test_swap_particles(), test_tight_diffuse(), test_transformations(), test_trotter(), test_truncation(), test_U_el(), test_unaryop(), test_vector_composite(), test_xc2(), madness::FunctionImpl< T, NDIM >::tnorm(), madness::FunctionImpl< T, NDIM >::tnorm(), to_response_vector(), transform(), transform_dir(), transform_dir(), transpose(), trotter(), madness::TensorTrain< T >::truncate(), two_scale_coefficients(), madness::Localizer::undo_reordering(), madness::Localizer::undo_rotation(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), madness::MolecularOrbitals< T, NDIM >::update_mos_and_eps(), CoreFittingTarget::value(), vector_to_PQ(), madness::FunctionImpl< T, NDIM >::vtransform(), and madness::MolecularOrbitals< T, NDIM >::write_to().

◆ copy() [4/7]

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

Returns a deep copy of a vector of functions.

References copy(), PROFILE_BLOCK, and v.

◆ copy() [5/7]

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 n deep copies of a function.

Returns a vector of deep copies of of a function.

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

◆ copy() [6/7]

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, PROFILE_BLOCK, and v.

◆ copy() [7/7]

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

Returns a deep copy of a vector of functions.

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 copy(), madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, and v.

◆ copy_2d_patch()

template<typename T >
static void madness::copy_2d_patch ( T *MADNESS_RESTRICT  out,
long  ldout,
const T *MADNESS_RESTRICT  in,
long  ldin,
long  n,
long  m 
)
static

References m.

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

◆ copy_am_arg()

AmArg * madness::copy_am_arg ( const AmArg arg)
inline

◆ CoulombOperator()

static SeparatedConvolution< double, 3 > madness::CoulombOperator ( World world,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

◆ CoulombOperatorPtr()

static SeparatedConvolution< double, 3 > * madness::CoulombOperatorPtr ( World world,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

◆ cpu_frequency()

double madness::cpu_frequency ( )

Estimate the processor frequency, in Hz.

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

If cycle_count() returns wall_time() in nanoseconds, this will return 1GHz.

If not available returns 0.

Returns
CPU frequency, in Hz.

References cycle_count(), and wall_time().

Referenced by cpu_time(), main(), and startup().

◆ cpu_relax()

void madness::cpu_relax ( )
inline

◆ cpu_time()

static double madness::cpu_time ( )
inlinestatic

Returns the cpu time in seconds relative to an arbitrary origin.

As accurate and lightweight as we can get it, but may not be any better than the clock system call.

Returns
The cpu time, in second.

References cpu_frequency(), and cycle_count().

Referenced by madness::test_output::test_output(), madness::Znemo::timer::timer(), madness::WorldProfileObj::~WorldProfileObj(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::ThreadPool::await(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::WorldProfile::clear(), madness::FunctionImpl< T, NDIM >::compress_op(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::FunctionImpl< T, NDIM >::do_apply_kernel3(), madness::test_output::end(), madness::Znemo::timer::end(), molresponse::end_timer(), molresponse::end_timer(), DF::end_timer(), END_TIMER(), END_TIMER(), END_TIMER(), madness::Solver< T, NDIM >::END_TIMER(), END_TIMER(), madness::MP2::END_TIMER(), DF::get_times(), madness::timer::interrupt(), main(), main(), myusleep(), madness::BSHApply< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_change_tensor_type::operator()(), madness::WorldProfile::print(), print_stats(), madness::timer::resume(), madness::MacroTask< taskT >::MacroTaskInternal::run(), madness::MacroTaskQ::run_all(), madness::CCTimer::start(), madness::MyTimer::start(), molresponse::start_timer(), DF::start_timer(), START_TIMER(), START_TIMER(), START_TIMER(), madness::Solver< T, NDIM >::START_TIMER(), START_TIMER(), madness::MP2::START_TIMER(), madness::CCTimer::stop(), madness::MyTimer::stop(), madness::Znemo::timer::tag(), test9(), test_bsh(), test_Kcommutator(), test_lowrank_function(), test_multi(), test_partial_inner(), test_time(), time_transform(), and madness::CCTimer::update_time().

◆ create_nuclear_correlation_factor() [1/2]

std::shared_ptr< NuclearCorrelationFactor > madness::create_nuclear_correlation_factor ( World world,
const Molecule molecule,
const std::shared_ptr< PotentialManager pm,
const std::pair< std::string, double > &  ncf 
)

◆ create_nuclear_correlation_factor() [2/2]

std::shared_ptr< NuclearCorrelationFactor > madness::create_nuclear_correlation_factor ( World world,
const Molecule molecule,
const std::shared_ptr< PotentialManager potentialmanager,
const std::string  inputline 
)

create and return a new nuclear correlation factor

note there is also an Ad-hoc nuclear correlation factor, which can only be created directly

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

References a, lowercase(), MADNESS_EXCEPTION, molecule, print(), and madness::World::rank().

Referenced by madness::NemoBase::construct_nuclear_correlation_factor(), create_nuclear_correlation_factor(), dnuclear_anchor_test(), main(), and nuclear_anchor_test().

◆ create_response_matrix()

auto madness::create_response_matrix ( const size_t &  num_states,
const size_t &  num_orbitals 
) -> response_matrix

Create a response matrix object.

Parameters
num_states
num_orbitals
Returns
response_matrix

References xi.

Referenced by molresponseExchange().

◆ cross() [1/2]

template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::cross ( const std::vector< Function< T, NDIM > > &  f,
const std::vector< Function< R, NDIM > > &  g,
bool  do_refine = false,
bool  fence = true 
)

shorthand cross operator

returns the cross product of vectors f and g

Parameters
[in]fthe vector of functions on which the rot operator works on
[in]gthe vector of functions on which the rot operator works on
[in]fencefence after completion; currently always fences
Returns
the vector \frac{\partial}{\partial x_i} f TODO: add this to operator fusion

References compress(), d, f, madness::WorldGopInterface::fence(), g, madness::World::gop, MADNESS_ASSERT, mul(), NDIM, R, reconstruct(), T(), and TENSOR_RESULT_TYPE.

Referenced by madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), madness::Diamagnetic_potential_factor::compute_U2(), madness::Diamagnetic_potential_factor::compute_v_vector(), madness::Diamagnetic_potential_factor::custom_factor(), madness::Diamagnetic_potential_factor::factor_with_phase(), madness::R_times_arg_div_R::operator()(), and test_cross().

◆ cross() [2/2]

template<typename T , std::size_t N>
std::enable_if< N==3, Vector< T, N > >::type madness::cross ( const Vector< T, N > &  l,
const Vector< T, N > &  r 
)

compute the cross product two Vectors of dimension 3

Do a cross product of l and r and return the result in a new Vector.

Template Parameters
TThe Vector element type.
NThe Vector size.
Parameters
[in]lThe left-hand Vector.
[in]rThe right-hand Vector.
Returns
the cross product

◆ cstr_to_memory_size()

std::uint64_t madness::cstr_to_memory_size ( const char *  str)

Unit-aware conversion of a C string to a size_t.

See https://en.wikipedia.org/wiki/Kilobyte for units. This assumes memory units throughout, i.e. MiB and MB both mean 1024*1024 bytes, etc. To reduce confusion, KiB, kB, and KB all mean 1024 bytes.

Parameters
strThe C string to convert.
Returns
The memory size, in bytes

References MADNESS_ASSERT.

Referenced by madness::RMI::RmiTask::RmiTask(), and madness::WorldGopInterface::initial_max_reducebcast_msg_size().

◆ cubefile_header()

std::vector< std::string > madness::cubefile_header ( std::string  filename = "input",
const bool &  no_orient = false 
)
extern

read molecule from the input file and return part of the header for a Gaussian cube file.

Parameters
[in]filenameinput file name (usually "input")

References madness::Molecule::cubefile_header(), filename, molecule, madness::Molecule::orient(), and madness::Molecule::read_file().

Referenced by main(), and madness::MolecularOrbitals< T, NDIM >::print_cubefiles().

◆ cycle_count()

static uint64_t madness::cycle_count ( )
inlinestatic

On some machines we have access to a cycle count.

For small intervals this is probably the most lightweight and accurate timer but may not be meaningful over long intervals due to O/S scheduling, migration to different cores, frequency shifts, etc. On x86 uses rtdsc. Otherwise uses wall_time() in nanoseconds.

Returns
Timing, in cycle count.

References a, d, and wall_time().

Referenced by cpu_frequency(), and cpu_time().

◆ d2smoothed_potential()

double madness::d2smoothed_potential ( double  r)

second radial derivative of the regularized 1/r potential

invoke as d2smoothed_potential(r*rc) * rc*rc*rc with rc the reciprocal smoothing radius d2u[r*rc]*rc*rc*rc \approx 2/r^3

References e(), and madness::constants::pi.

Referenced by madness::Molecule::nuclear_attraction_potential_second_derivative().

◆ decay_types()

template<typename ... Ts>
constexpr auto madness::decay_types ( std::tuple< Ts... > const &  ) -> std::tuple< std::remove_cv_t< std::remove_reference_t< Ts > >... >
constexpr

◆ displacement()

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_ASSERT, source(), and target().

Referenced by madness::MolecularOptimizer::converged(), and madness::MolecularOptimizer::optimize_conjugate_gradients().

◆ distance() [1/5]

double madness::distance ( const Fred a,
const Fred b 
)

References a, and b.

◆ distance() [2/5]

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

◆ distance() [3/5]

static double madness::distance ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
)
inlinestatic

◆ distance() [4/5]

double madness::distance ( madness::Function< std::complex< double >, 1ul > &  a,
madness::Function< std::complex< double >, 1ul > &  b 
)

References a, and b.

◆ distance() [5/5]

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 a, std::abs(), and b.

◆ distance_sq()

static double madness::distance_sq ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
)
inlinestatic

◆ distributed_localize_PM() [1/2]

DistributedMatrix< double > madness::distributed_localize_PM ( World world,
const std::vector< Function< double, 3 > > &  mo,
const std::vector< Function< double, 3 > > &  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 
)
extern

◆ distributed_localize_PM() [2/2]

DistributedMatrix< double > 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,
const double  thetamax,
const bool  randomize,
const bool  doprint 
)

◆ div()

template<typename T , std::size_t NDIM>
Function< T, NDIM > madness::div ( const std::vector< Function< T, NDIM > > &  v,
bool  do_refine = false,
bool  fence = true 
)

shorthand div operator

returns the dot product of nabla with a vector f

Parameters
[in]fthe vector of functions on which the div operator works on
[in]refinerefinement before diff'ing makes the result more accurate
[in]fencefence after completion; currently always fences
Returns
the vector \frac{\partial}{\partial x_i} f TODO: add this to operator fusion

References apply(), madness::WorldGopInterface::fence(), madness::World::gop, grad(), MADNESS_ASSERT, NDIM, reconstruct(), refine(), sum, and v.

Referenced by madness::XCOperator< T, NDIM >::apply_xc_kernel(), madness::Znemo::compute_current_density(), madness::Diamagnetic_potential_factor::compute_R_times_T_commutator_scalar_term_numerically(), madness::Nuclear< double, 3 >::operator()(), and test_rot().

◆ do_adq()

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(), lo, sum, and w().

Referenced by adq1().

◆ do_response_density_vtk_plots()

void madness::do_response_density_vtk_plots ( World world,
int  npt_plot,
double  L,
const Molecule molecule,
const real_function_3d ground_density,
const vector_real_function_3d response_density 
)

◆ do_response_orbital_vtk_plots()

void madness::do_response_orbital_vtk_plots ( World world,
int  npt_plot,
double  L,
const Molecule molecule,
const vector_real_function_3d ground_orbs,
const response_matrix responseMatrix 
)

◆ do_vtk_plots() [1/2]

void madness::do_vtk_plots ( World world,
int  npt_plot,
double  L,
int  lowest_orbital,
int  highest_orbital,
const Molecule molecule,
std::vector< real_function_3d densities,
const std::string &  name 
)

References b, do_vtk_plots(), f, L, and name().

Referenced by do_vtk_plots(), and do_vtk_plots().

◆ do_vtk_plots() [2/2]

void madness::do_vtk_plots ( World world,
int  npt_plot,
double  L,
Molecule  molecule,
real_function_3d rho_0,
std::vector< real_function_3d > &  rho_omega,
std::vector< real_function_3d > &  ground_orbitals,
X_space Chi 
)

◆ dot()

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

◆ DPEC() [1/6]

madness::DPEC ( double  ,
double  ,
double   
)

◆ DPEC() [2/6]

madness::DPEC ( double_complex  ,
double_complex  ,
double_complex   
)

◆ DPEC() [3/6]

madness::DPEC ( float  ,
float  ,
float   
)

◆ DPEC() [4/6]

madness::DPEC ( float_complex  ,
float_complex  ,
float_complex   
)

◆ DPEC() [5/6]

madness::DPEC ( int  ,
int  ,
int   
)

◆ DPEC() [6/6]

madness::DPEC ( long  ,
long  ,
long   
)

◆ drot()

void madness::drot ( long  n,
double *MADNESS_RESTRICT  a,
double *MADNESS_RESTRICT  b,
double  s,
double  c,
long  inc 
)

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

References a, aa, b, and c.

Referenced by madness::SystolicPMOrbitalLocalize::localize_PM_ij(), and main().

◆ dsmoothed_potential()

double madness::dsmoothed_potential ( double  r)

Derivative of the regularized 1/r potential.

dV/dx = (x/r) * du(r/c)/(c*c)

References a, and r2().

Referenced by madness::CorePotential::eval_derivative(), madness::Molecule::nuclear_attraction_potential_derivative(), and Vderiv::operator()().

◆ dxprintvalue() [1/2]

static void madness::dxprintvalue ( FILE *  f,
const double  t 
)
inlinestatic

References f.

Referenced by plotdx().

◆ dxprintvalue() [2/2]

static void madness::dxprintvalue ( FILE *  f,
const double_complex t 
)
inlinestatic

References f.

◆ end_papi_measurement()

void madness::end_papi_measurement ( )
inline

◆ END_TIMER()

static void madness::END_TIMER ( World world,
const char *  msg 
)
static

◆ enforce_bc()

static bool madness::enforce_bc ( bool  is_periodic,
Level  n,
Translation l 
)
inlinestatic

◆ error() [1/2]

void madness::error ( const char *  msg)
Todo:
Brief description needed.
Todo:
Detailed description needed. I imagine this prints/logs the supplied error message and subsequently aborts the program.
Parameters
[in]msgMessage associated with the error.

References SafeMPI::Intracomm::Abort(), and SafeMPI::COMM_WORLD.

Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), EmbeddedDirichlet::EmbeddedDirichlet(), madness::DependencyInterface::~DependencyInterface(), madness::WorldGopInterface::barrier(), check(), madness::Localizer::check_core_valence_separation(), madness::PNO::check_orthonormality(), check_vector(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::CCConvolutionOperator< T, NDIM >::clear_intermediates(), compare(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::DependencyInterface::dec(), madness::DependencyInterface::dec_debug(), doit(), madness::DependencyInterface::inc(), madness::DependencyInterface::inc_debug(), madness::CC2::initialize_pairs(), madness::CC2::iterate_pair(), madness::LowRankFunction< T, NDIM, LDIM >::l2error(), Calculation::load_mos(), main(), main(), main(), madness::ThreadBase::main(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::MP2::make_Uphi0(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()(), madness::hartree_leaf_op< T, NDIM >::operator()(), madness::hartree_convolute_leaf_op< T, NDIM, LDIM, opT >::operator()(), EmbeddedDirichlet::operator()(), madness::DomainMaskSDFFunctor< NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_truncate_NS_leafs::operator()(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::test_output::print_success_fail(), madness::CalculationParameters::set_derived_values(), madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction(), madness::TDHF::test(), test(), test_add(), test_addition(), test_combined_operators(), test_construction_optimization(), test_custom_worldobject(), test_emul(), test_G_R_vectors(), test_gaussian_num_coeffs(), test_gconv(), test_hf_be(), test_hf_he(), test_integration(), test_lowrank_function(), madness::Diamagnetic_potential_factor::test_lz_commutator(), test_molecular_grid(), test_multi_to_multi_op(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_orthogonalization(), test_per(), test_projector(), test_qr(), test_reconstruct(), test_reduce_rank(), test_sliced_addition(), test_sliced_assignment(), test_spherical_box(), test_stuff(), madness::Znemo::test_U_potentials(), madness::Diamagnetic_potential_factor::test_vector_potentials(), testNavierStokes(), testPeriodicCoulomb3d(), and madness::CCConvolutionOperator< T, NDIM >::update_elements().

◆ error() [2/2]

template<typename T >
static void madness::error ( const char *  msg,
const T data 
)
static

Prints an error message, along with some data, and aborts the program.

Todo:
Does this function need to be static? (Esp. since it's in a header file...)
Template Parameters
TThe type of data.
Parameters
[in]msgThe error message.
[in]dataThe data to be printed.

References SafeMPI::Intracomm::Abort(), and SafeMPI::COMM_WORLD.

◆ estimate_area()

double madness::estimate_area ( double  x)

◆ exception_break()

void madness::exception_break ( bool  message)

This function is executed just before a MadnessException is thrown.

Parameters
[in]messageTrue to print an error message to cerr; false otherwise.

◆ exchange_anchor_test()

template<typename T >
int madness::exchange_anchor_test ( World world,
Exchange< T, 3 > &  K,
const double  thresh 
)

◆ F2GOperator()

static SeparatedConvolution< double, 3 > madness::F2GOperator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in 3D.

f2g = (1/(2 gamma) (1 - exp(-gamma r12)))^2 / r12 = 1/(4 gamma) * [ 1/r12 - 2 exp(-gamma r12)/r12 + exp(-2 gamma r12)/r12 ] includes the factor 1/(2 mu)^2

References k, lo, mu, and OT_F2G12.

◆ F2GOperatorPtr()

static SeparatedConvolution< double, 3 > * madness::F2GOperatorPtr ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in 3D.

f2g = (1/(2 gamma) (1 - exp(-gamma r12)))^2 / r12 = 1/(4 gamma) * [ 1/r12 - 2 exp(-gamma r12)/r12 + exp(-2 gamma r12)/r12 ] includes the factor 1/(2 mu)^2

References k, lo, mu, and OT_F2G12.

◆ fast_transpose()

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

◆ fcube() [1/3]

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 
)

◆ fcube() [2/3]

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

◆ fcube() [3/3]

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 
)

◆ FGOperator()

static SeparatedConvolution< double, 3 > madness::FGOperator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D.

fg = (1 - exp(-gamma r12)) / r12 = 1/r12 - exp(-gamma r12)/r12 = coulomb - bsh includes the factor 1/(2 mu)

References k, lo, mu, and OT_FG12.

◆ FGOperatorPtr()

static SeparatedConvolution< double, 3 > * madness::FGOperatorPtr ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D.

fg = (1 - exp(-gamma r12)) / r12 = 1/r12 - exp(-gamma r12)/r12 = coulomb - bsh includes the factor 1/(2 mu)

References k, lo, mu, and OT_FG12.

◆ finalize()

void madness::finalize ( )

◆ flatten()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::flatten ( const std::vector< std::vector< Function< T, NDIM > > > &  vv)

◆ foreach_child() [1/2]

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.

◆ foreach_child() [2/2]

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().

◆ free_am_arg()

void madness::free_am_arg ( AmArg arg)
inline

Frees an AmArg allocated with alloc_am_arg.

References arg().

Referenced by madness::WorldAmInterface::SendReq::free(), and madness::detail::PendingMsg::invokehandler().

◆ free_space_derivative()

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 axis, BC_FREE, and k.

◆ from_json()

void madness::madness::from_json ( const nlohmann::json &  j,
ResponseParameters p 
)

References p(), and print().

◆ func()

std::shared_ptr< FunctionFunctorInterface< double, 3 > > madness::func ( new   opTg)

◆ function_real2complex()

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

◆ functor_r2()

static double madness::functor_r2 ( const coord_3d r)
static

◆ functor_x()

static double madness::functor_x ( const coord_3d r)
static

◆ functor_y()

static double madness::functor_y ( const coord_3d r)
static

◆ future_vector_factory()

template<typename T >
std::vector< Future< T > > madness::future_vector_factory ( std::size_t  n)

Factory for a vectors of futures.

Rationale for this function can be found in Futures.

Template Parameters
TThe type of future in the vector.
Parameters
[in]nThe size of the vector to create.
Returns
A vector of futures, as described in Futures.

References madness::Future< T >::default_initializer().

◆ gauss_legendre()

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(), max_npt, points, read_data(), w(), and weights.

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

◆ gauss_legendre_numeric()

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 std::abs(), delta, e(), k, legendre_polynomials(), p(), pi, scale(), and w().

Referenced by gauss_legendre().

◆ gauss_legendre_test()

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 std::abs(), gauss_legendre(), print(), sum, testf(), and w().

Referenced by startup().

◆ GaussOperator()

template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > madness::GaussOperator ( World world,
double  mu,
double  lo = 0.0,
double  eps = 0.0,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r*r)

lo and eps are not used here

References k, lo, mu, and OT_GAUSS.

◆ GaussOperatorPtr()

template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * madness::GaussOperatorPtr ( World world,
double  mu,
double  lo = 0.0,
double  eps = 0.0,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r*r) in 3D.

lo and eps are not used here

References k, lo, mu, and OT_GAUSS.

◆ gaxpy() [1/5]

template<typename T >
void madness::gaxpy ( const double  a,
ScalarResult< T > &  left,
const double  b,
const T right,
const bool  fence = true 
)

◆ gaxpy() [2/5]

template<typename T , typename Q , typename R , std::size_t NDIM>
void madness::gaxpy ( Q  alpha,
std::vector< Function< T, NDIM > > &  a,
Q  beta,
const std::vector< Function< R, NDIM > > &  b,
const bool  fence 
)

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

References a, alpha, b, beta, and gaxpy().

◆ gaxpy() [3/5]

template<typename L , typename R , std::size_t NDIM>
void madness::gaxpy ( TENSOR_RESULT_TYPE(L, R alpha,
Function< L, NDIM > &  left,
TENSOR_RESULT_TYPE(L, R beta,
const Function< R, NDIM > &  right,
bool  fence = true 
)

adds beta*right only left: alpha*left + beta*right optional fence and no automatic compression

left and right might live in different worlds, the accumulation is non-blocking

References alpha, beta, madness::Function< T, NDIM >::gaxpy(), L, NDIM, PROFILE_FUNC, R, and TENSOR_RESULT_TYPE.

◆ gaxpy() [4/5]

template<typename T , typename Q , typename R , std::size_t NDIM>
void madness::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].

References a, aa, alpha, b, beta, compress(), madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_ASSERT, MADNESS_CHECK_THROW, and PROFILE_BLOCK.

◆ gaxpy() [5/5]

template<typename T , typename Q , typename R , std::size_t NDIM>
void madness::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].

References a, alpha, b, beta, compress(), madness::WorldGopInterface::fence(), gaxpy(), madness::World::gop, MADNESS_ASSERT, and PROFILE_BLOCK.

◆ gaxpy_oop() [1/3]

template<typename T , typename Q , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(Q, TENSOR_RESULT_TYPE(T, R)), NDIM > > madness::gaxpy_oop ( Q  alpha,
const std::vector< Function< T, NDIM > > &  a,
Q  beta,
const Function< R, NDIM > &  b,
bool  fence = true 
)

out-of-place gaxpy for a vectors and a function: result[i] = alpha * a[i] + beta * b

References a, alpha, b, beta, compress(), gaxpy_oop(), Q(), R, T(), and TENSOR_RESULT_TYPE.

◆ gaxpy_oop() [2/3]

template<typename T , typename Q , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(Q, TENSOR_RESULT_TYPE(T, R)), NDIM > > madness::gaxpy_oop ( Q  alpha,
const std::vector< Function< T, NDIM > > &  a,
Q  beta,
const std::vector< Function< R, NDIM > > &  b,
bool  fence = true 
)

out-of-place gaxpy for two vectors: result[i] = alpha * a[i] + beta * b[i]

References a, alpha, b, beta, compress(), gaxpy_oop(), MADNESS_ASSERT, Q(), R, T(), and TENSOR_RESULT_TYPE.

◆ gaxpy_oop() [3/3]

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 
)

◆ gaxpy_oop_reconstructed()

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 
)

Returns new function alpha*left + beta*right optional fence, having both addends reconstructed.

References alpha, beta, madness::Function< T, NDIM >::get_impl(), madness::Function< T, NDIM >::is_reconstructed(), MADNESS_ASSERT, and madness::Function< T, NDIM >::set_impl().

Referenced by operator+(), operator-(), and test_add().

◆ geev() [1/2]

template void madness::geev ( const Tensor< double > &  A,
Tensor< double > &  V,
Tensor< double_complex > &  e 
)

◆ geev() [2/2]

template<typename T >
void madness::geev ( const Tensor< T > &  A,
Tensor< T > &  VR,
Tensor< std::complex< T > > &  e 
)

Real non-symmetric or complex non-Hermitian eigenproblem.

Solves non-symmetric or non-Hermitian eigenvalue problem.

A is a real non-symmetric or complex non-Hermitian matrix. Return V and e where V is a matrix whose columns are the right eigenvectors and e is a vector containing the corresponding eigenvalues. If the LAPACK routine fails, it raises a TensorException with value=infor. The input matrix is unchanged. The eigenvalues are sorted into ascending order. s/dgeev are used for real non-symmetric matrices; c/zgeev are used for complex non-Hermitian.

Note on the eigenvectors: If the j-th eigenvalue is real, then j-th eigenvector is VR(:,j), the j-th column of VR. If the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then j-th eigenvector is VR(:,j) + i*VR(:,j+1) and j+1-th eigenvector is VR(:,j) - i*VR(:,j+1).

The results will satisfy A*V(_,i) = V(_,i)*e(i).

References copy(), e(), geev_(), mask_info(), max, madness::Tensor< T >::ptr(), and TENSOR_ASSERT.

Referenced by geevp().

◆ geevp()

template<typename T >
void madness::geevp ( World world,
const Tensor< T > &  A,
Tensor< T > &  VR,
Tensor< std::complex< T > > &  e 
)

References e(), and geev().

◆ gelss() [1/3]

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 
)

◆ gelss() [2/3]

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 
)

◆ gelss() [3/3]

template<typename T >
void madness::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.

Solves linear equations using least squares.

A should be a matrix (float, double, float_complex, double_complex) and b should be either a vector, or a matrix with each vector stored in a column (i.e., b[n,nrhs]).

If the LAPACK routine fails, it throws a TensorException with the LAPACK info as the value. Otherwise, it returns the solution(s). The input A and b are unchanged. There is no need to worry about Python/C/Fortran ordering issues. It will solve Ax=b as written.

This from the LAPACK documentation

RCOND   (input) REAL
RCOND is used to determine the effective  rank  of A.
Singular values S(i) <= RCOND*S(1) are treated
as zero.  If RCOND < 0, machine precision is  used
instead.

RANK    (output) INTEGER
The  effective rank of A, i.e., the number of singular
values which are greater than RCOND*S(1).

Finally, the optional vector sumsq will store the sum-of-squares residual in the case of a rectangular matrix (least squares regression).

References a, b, copy(), gelss_(), m, mask_info(), max, madness::Tensor< T >::normf(), madness::Tensor< T >::ptr(), TENSOR_ASSERT, and transpose().

Referenced by Calculation::calc_optimal_coeffs(), GMRES(), KAIN(), KAIN(), optimize_coeffs(), and test_gelss().

◆ general_transform() [1/2]

template<typename R , typename Q >
GenTensor< TENSOR_RESULT_TYPE(R, Q)> madness::general_transform ( const GenTensor< R > &  t,
const Tensor< Q 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) ...
static const double c
Definition relops.cc:10
static const long k
Definition rk.cc:44

The first dimension of the matrices c must match the corresponding dimension of t. template <typename R, typename Q>

Referenced by madness::SeparatedConvolution< Q, NDIM >::apply_transformation2(), madness::SeparatedConvolution< Q, NDIM >::apply_transformation3(), madness::FunctionImpl< T, NDIM >::downsample(), madness::FunctionImpl< T, NDIM >::fcube_for_mul(), madness::FunctionImpl< T, NDIM >::fcube_for_mul(), madness::FunctionImpl< T, NDIM >::NS_fcube_for_mul(), madness::SeparatedConvolution< Q, NDIM >::partial_upsample(), test_general_transform(), madness::SeparatedConvolution< Q, NDIM >::upsample(), and madness::FunctionImpl< T, NDIM >::upsample().

◆ general_transform() [2/2]

template<typename R , typename Q >
SVDTensor< TENSOR_RESULT_TYPE(R, Q)> madness::general_transform ( const SVDTensor< R > &  t,
const Tensor< Q c[] 
)

◆ geqp3() [1/3]

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

◆ geqp3() [2/3]

template void madness::geqp3 ( Tensor< double_complex > &  A,
Tensor< double_complex > &  tau,
Tensor< integer > &  jpvt 
)

◆ geqp3() [3/3]

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, TENSOR_ASSERT, and transpose().

◆ geqp3_result()

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

◆ gesv() [1/3]

template void madness::gesv ( const Tensor< double > &  a,
const Tensor< double > &  b,
Tensor< double > &  x 
)

◆ gesv() [2/3]

template void madness::gesv ( const Tensor< double_complex > &  a,
const Tensor< double_complex > &  b,
Tensor< double_complex > &  x 
)

◆ gesv() [3/3]

template<typename T >
void madness::gesv ( const Tensor< T > &  a,
const Tensor< T > &  b,
Tensor< T > &  x 
)

Solve Ax = b for general A using the LAPACK *gesv routines.

Solves symmetric or Hermitian eigenvalue problem - MATLAB syntax.

Solves linear equations.

A should be a square matrix (float, double, float_complex, double_complex) and b should be either a vector, or a matrix with each vector stored in a column (i.e., b[n,nrhs]).

If the LAPACK routine fails, it throws a TensorException with the LAPACK info as the value. Otherwise, it returns the solution(s). The input A and b are unchanged. There is no need to worry about Python/C/Fortran ordering issues. It will solve Ax=b as written.

Solves linear equations

References a, b, copy(), gesv_(), m, mask_info(), madness::Tensor< T >::ptr(), TENSOR_ASSERT, and transpose().

Referenced by madness::GFit< T, NDIM >::bsh_fit(), gesvp(), and test_gesv().

◆ gesvp()

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

◆ get_atomic_data()

const AtomicData & madness::get_atomic_data ( unsigned int  atomic_number)

◆ get_charge_from_file()

double madness::get_charge_from_file ( const std::string  filename,
unsigned int  atype 
)

◆ get_impl()

template<typename T , std::size_t NDIM>
std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > madness::get_impl ( const std::vector< Function< T, NDIM > > &  v)

◆ get_index_of_first_vector_argument()

template<typename tupleT , std::size_t I>
constexpr std::size_t madness::get_index_of_first_vector_argument ( )
constexpr

given a tuple return the index of the first argument that is a vector of Function<T,NDIM>

References I.

◆ get_index_of_second_vector_argument()

template<typename tupleT , std::size_t I>
constexpr std::size_t madness::get_index_of_second_vector_argument ( )
constexpr

given a tuple return the index of the second argument that is a vector of Function<T,NDIM>

◆ get_mra_data_dir()

std::string madness::get_mra_data_dir ( )

◆ get_papi_measurement()

const long long * madness::get_papi_measurement ( )
inline

Referenced by print_stats().

◆ get_size() [1/2]

template<typename T , std::size_t NDIM>
double madness::get_size ( const Function< T, NDIM > &  f)

References d, f, and T().

◆ get_size() [2/2]

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

◆ ggev() [1/2]

template void madness::ggev ( const Tensor< double > &  A,
Tensor< double > &  B,
Tensor< double > &  V,
Tensor< double_complex > &  e 
)

◆ ggev() [2/2]

template<typename T >
void madness::ggev ( const Tensor< T > &  A,
Tensor< T > &  B,
Tensor< T > &  VR,
Tensor< std::complex< T > > &  e 
)

Generalized real-non-symmetric or complex-non-Hermitian eigenproblem.

Solves non-symmetric or non-Hermitian generalized eigenvalue problem.

This from the LAPACK documentation

S/DGGEV computes all the eigenvalues, and optionally, the eigenvectors
of a real generalized non-symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x.

C/ZGGEV computes all the eigenvalues, and optionally, the eigenvectors
of a complex generalized non-Hermitian-definite eigenproblem, of the form
A*x=(lambda)*B*x.

Note on the eigenvalues: On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will be the generalized eigenvalues. If ALPHAI(j) is zero, then the j-th eigenvalue is real; if positive, then the j-th and (j+1)-st eigenvalues are a complex conjugate pair, with ALPHAI(j+1) negative.

Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) may easily over- or underflow, and BETA(j) may even be zero. Thus, the user should avoid naively computing the ratio alpha/beta. However, ALPHAR and ALPHAI will be always less than and usually comparable with norm(A) in magnitude, and BETA always less than and usually comparable with norm(B).

Note on the eigenvectors: The right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. If the j-th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. If the j-th and (j+1)-th eigenvalues form a complex conjugate pair, then v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1). Each eigenvector is scaled so the largest component has abs(real part)+abs(imag. part)=1.

References beta, copy(), e(), ggev_(), MADNESS_ASSERT, mask_info(), max, madness::Tensor< T >::ptr(), TENSOR_ASSERT, and transpose().

Referenced by ggevp().

◆ ggevp()

template<typename T >
void madness::ggevp ( World world,
const Tensor< T > &  A,
Tensor< T > &  B,
Tensor< T > &  VR,
Tensor< std::complex< T > > &  e 
)

References e(), and ggev().

◆ GMRES()

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 b, 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::Tensor< T >::normf(), op(), madness::World::rank(), real(), madness::AbstractVectorSpace< T, real_type, scalar_type >::scale(), T(), V(), and madness::AbstractVectorSpace< T, real_type, scalar_type >::world.

Referenced by cplxfunc0(), cplxfunc1(), cplxfunc2(), cplxvec0(), cplxvec1(), cplxvec2(), main(), realfunc0(), realfunc1(), realfunc2(), realvec0(), realvec1(), and realvec2().

◆ gprofexit()

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

References bufsize, and p().

◆ grad()

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

◆ grad_ble_one()

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

◆ grad_ble_two()

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

◆ grad_bpsline_two()

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

◆ grad_bspline_one()

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

◆ grad_bspline_three()

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

◆ GradBSHOperator()

static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > madness::GradBSHOperator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating operator for convolution with grad(bsh) in 3D.

Returns a 3-vector containing the convolution operator for the x, y, and z components of grad(bsh)

References BC_PERIODIC, madness::GFit< T, NDIM >::BSHFit(), c, d, madness::BaseTensor::dim(), dir, fit(), madness::FunctionDefaults< NDIM >::get_cell_width(), k, lo, madness::Tensor< T >::max(), mu, madness::Tensor< T >::normf(), pi, and madness::constants::pi.

Referenced by apply_BSH().

◆ GradCoulombOperator()

static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > madness::GradCoulombOperator ( World world,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating operator for convolution with grad(1/r) in 3D.

Returns a 3-vector containing the convolution operator for the x, y, and z components of grad(1/r)

References BC_PERIODIC, c, madness::GFit< T, NDIM >::CoulombFit(), d, madness::BaseTensor::dim(), dir, fit(), madness::FunctionDefaults< NDIM >::get_cell_width(), k, lo, madness::Tensor< T >::max(), mu, madness::Tensor< T >::normf(), pi, and madness::constants::pi.

Referenced by testgradG().

◆ gradient_operator()

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, d, k, MADNESS_CHECK, and NDIM.

◆ GradSlaterOperator()

static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > madness::GradSlaterOperator ( World world,
double  gamma,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating operator for convolution with grad(e^{-\gamma*r}) in 3D.

Returns a 3-vector containing the convolution operator for the x, y, and z components of grad(e^{-\gamma*r}) maybe move to madness library (operator.h) at some point

References BC_PERIODIC, c, d, madness::BaseTensor::dim(), dir, fit(), madness::FunctionDefaults< NDIM >::get_cell_width(), k, lo, madness::Tensor< T >::max(), mu, madness::Tensor< T >::normf(), pi, madness::constants::pi, and madness::GFit< T, NDIM >::SlaterFit().

Referenced by madness::F12Potentials::F12Potentials().

◆ hartree_product() [1/3]

template<typename T , std::size_t KDIM, std::size_t LDIM>
Function< T, KDIM+LDIM > madness::hartree_product ( const Function< T, KDIM > &  left2,
const Function< T, LDIM > &  right2 
)

Performs a Hartree product on the two given low-dimensional functions.

References hartree_product().

◆ hartree_product() [2/3]

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 
)

◆ hartree_product() [3/3]

template<typename T , std::size_t KDIM, std::size_t LDIM>
Function< T, KDIM+LDIM > madness::hartree_product ( const std::vector< Function< T, KDIM > > &  left,
const std::vector< Function< T, LDIM > > &  right 
)

◆ hash_combine()

template<class T >
void madness::hash_combine ( hashT seed,
const T v 
)
inline

◆ hash_range() [1/7]

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().

◆ hash_range() [2/7]

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().

◆ hash_range() [3/7]

template<class T >
std::enable_if< std::is_fundamental< T >::value >::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 T().

◆ hash_range() [4/7]

template<class T >
std::enable_if<!std::is_fundamental< T >::value >::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().

◆ hash_range() [5/7]

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().

◆ hash_range() [6/7]

template<class It >
void madness::hash_range ( hashT seed,
It  first,
It  last 
)
inline
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 madness::Recordlist< keyT >::compute_record(), madness::Molecule::hash(), madness::QCCalculationParametersBase::hash(), hash_range(), hash_range(), hash_range(), hash_range(), hash_range(), hash_value(), and hash_value().

◆ hash_range() [7/7]

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().

◆ hash_value() [1/7]

template<typename T , std::size_t N>
madness::hashT madness::hash_value ( const std::array< T, N > &  a)

◆ hash_value() [2/7]

template<typename T >
hashT madness::hash_value ( const std::basic_string< T > &  t)
inline

Hash a std::basic_string.

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

References hash_range().

◆ hash_value() [3/7]

template<typename T , typename R >
hashT madness::hash_value ( const std::pair< T, R > &  t)
inline

Hash a std::pair.

Parameters
ta pair to hash
Returns
The hashed value of t

References hash_combine(), and hash_value().

◆ hash_value() [4/7]

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

Hash a class object.

Template Parameters
TThe class type
Parameters
tThe object to hash
Returns
t.hash()

◆ hash_value() [5/7]

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().

◆ hash_value() [6/7]

template<class T >
std::enable_if< 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(), T(), and u().

◆ hash_value() [7/7]

template<class T >
std::enable_if< 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(), T(), and u().

◆ hereig() [1/5]

template<>
void madness::hereig ( char  jobz,
char  uplo,
integer  n,
complex_real4 A,
integer  lda,
real4 W 
)

References cheev_(), and LINALG_ASSERT.

◆ hereig() [2/5]

template<>
void madness::hereig ( char  jobz,
char  uplo,
integer  n,
complex_real8 A,
integer  lda,
real8 W 
)

References LINALG_ASSERT, and zheev_().

◆ hereig() [3/5]

template<>
void madness::hereig ( char  jobz,
char  uplo,
integer  n,
real4 A,
integer  lda,
real4 W 
)

References LINALG_ASSERT, and ssyev_().

◆ hereig() [4/5]

template<>
void madness::hereig ( char  jobz,
char  uplo,
integer  n,
real8 A,
integer  lda,
real8 W 
)

References dsyev_(), and LINALG_ASSERT.

◆ hereig() [5/5]

template<typename T >
void madness::hereig ( char  jobz,
char  uplo,
integer  n,
T A,
integer  lda,
typename detail::real_type< T >::type W 
)

Solve the EVP via LAPACK.

◆ hereig_gen() [1/5]

template<>
void madness::hereig_gen ( integer  itype,
char  jobz,
char  uplo,
integer  n,
complex_real4 A,
integer  lda,
complex_real4 B,
integer  ldb,
real4 W 
)

References chegv_(), and LINALG_ASSERT.

◆ hereig_gen() [2/5]

template<>
void madness::hereig_gen ( integer  itype,
char  jobz,
char  uplo,
integer  n,
complex_real8 A,
integer  lda,
complex_real8 B,
integer  ldb,
real8 W 
)

References LINALG_ASSERT, and zhegv_().

◆ hereig_gen() [3/5]

template<>
void madness::hereig_gen ( integer  itype,
char  jobz,
char  uplo,
integer  n,
real4 A,
integer  lda,
real4 B,
integer  ldb,
real4 W 
)

References LINALG_ASSERT, and ssygv_().

◆ hereig_gen() [4/5]

template<>
void madness::hereig_gen ( integer  itype,
char  jobz,
char  uplo,
integer  n,
real8 A,
integer  lda,
real8 B,
integer  ldb,
real8 W 
)

References dsygv_(), and LINALG_ASSERT.

◆ hereig_gen() [5/5]

template<typename T >
void madness::hereig_gen ( integer  itype,
char  jobz,
char  uplo,
integer  n,
T A,
integer  lda,
T B,
integer  ldb,
typename detail::real_type< T >::type W 
)

Solve the Generalized EVP via LAPACK.

◆ imag() [1/4]

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 unary_op_coeffs().

◆ imag() [2/4]

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

References func(), and unary_op_coeffs().

◆ imag() [3/4]

template<typename T , std::size_t NDIM>
std::vector< Function< typename Tensor< T >::scalar_type, NDIM > > madness::imag ( const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

return the imaginary parts of the vector's function (if complex)

References imag(), NDIM, and v.

◆ imag() [4/4]

static double madness::imag ( double  x)
inline

◆ impl2function()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::impl2function ( const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > >  vimpl)

◆ init_tensor_lapack()

void madness::init_tensor_lapack ( )

World/MRA initialization calls this before going multithreaded due to static data in dlamch.

References dlamch_(), e(), and slamch_().

Referenced by startup().

◆ initialize() [1/5]

World & madness::initialize ( int &  argc,
char **&  argv,
bool  quiet = false 
)

Initializes the MADNESS runtime with default MPI communicator and default number of compute threads Call this once at the very top of your main program to initialize the MADNESS runtime. This function should be called instead of MPI_Init() or MPI_Init_thread().

Parameters
[in,out]argcApplication argument count.
[in,out]argvApplication argument values.
[in]quietIf false, will announce to std::cout on rank 0 when the runtime has been initialized.
Returns
A reference to the default World, which is constructed with MPI_COMM_WORLD.
Note
The default number of compute threads is read from the environment variable MAD_NUM_THREADS; if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.

References SafeMPI::COMM_WORLD, initialize(), and quiet().

Referenced by initialize(), initialize(), initialize(), initialize(), main(), main(), main(), main(), TEST_CASE(), TEST_CASE(), 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().

◆ initialize() [2/5]

World & madness::initialize ( int &  argc,
char **&  argv,
const MPI_Comm comm,
int  nthread,
bool  quiet = false 
)

Initializes the MADNESS runtime with the given MPI communicator and the given number of compute threads Call this once at the very top of your main program to initialize the MADNESS runtime. This function should be called instead of MPI_Init() or MPI_Init_thread().

Parameters
[in,out]argcApplication argument count.
[in,out]argvApplication argument values.
commThe MPI communicator that should be used to construct the World object.
[in]nthreadThe total number of compute threads to create (the main thread is counted among the compute threads) if a negative value is given then the default number of compute threads will be used.
[in]quietIf false, will announce to std::cout on rank 0 when the runtime has been initialized.
Returns
A reference to the World constructed with comm.
Note
The default number of compute threads is read from the environment variable MAD_NUM_THREADS; if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.

References initialize(), and quiet().

◆ initialize() [3/5]

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

Initializes the MADNESS runtime with the given MPI communicator and the default number of compute threads Call this once at the very top of your main program to initialize the MADNESS runtime. This function should be called instead of MPI_Init() or MPI_Init_thread().

Parameters
[in,out]argcApplication argument count.
[in,out]argvApplication argument values.
commThe communicator that should be used to construct the World object.
[in]quietIf false, will announce to std::cout on rank 0 when the runtime has been initialized.
Returns
A reference to the World constructed with comm.
Note
The default number of compute threads is read from the environment variable MAD_NUM_THREADS; if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.

References initialize(), and quiet().

◆ initialize() [4/5]

World & madness::initialize ( int &  argc,
char **&  argv,
const SafeMPI::Intracomm comm,
int  nthread,
bool  quiet = false 
)

Initializes the MADNESS runtime with the given MPI communicator and the given number of compute threads Call this once at the very top of your main program to initialize the MADNESS runtime. This function should be called instead of MPI_Init() or MPI_Init_thread().

Parameters
[in,out]argcApplication argument count.
[in,out]argvApplication argument values.
commThe communicator that should be used to construct the World object.
[in]nthreadThe total number of compute threads to create (the main thread is counted among the compute threads); if a negative value is given then the default number of compute threads will be used.
[in]quietIf false, will announce to std::cout on rank 0 when the runtime has been initialized.
Returns
A reference to the World constructed with comm.
Note
The default number of compute threads is read from the environment variable MAD_NUM_THREADS; if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.

◆ initialize() [5/5]

World & madness::initialize ( int &  argc,
char **&  argv,
int  nthread,
bool  quiet = false 
)

Initializes the MADNESS runtime with default MPI communicator and the given number of compute threads Call this once at the very top of your main program to initialize the MADNESS runtime. This function should be called instead of MPI_Init() or MPI_Init_thread().

Parameters
[in,out]argcApplication argument count.
[in,out]argvApplication argument values.
[in]nthreadThe total number of compute threads to create (the main thread is counted among the compute threads) if a negative value is given then the default number of compute threads will be used.
[in]quietIf false, will announce to std::cout on rank 0 when the runtime has been initialized.
Returns
A reference to the default World, which is constructed with MPI_COMM_WORLD.
Note
The default number of compute threads is read from the environment variable MAD_NUM_THREADS; if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.

References SafeMPI::COMM_WORLD, initialize(), and quiet().

◆ initialize_legendre_stuff()

void madness::initialize_legendre_stuff ( )

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

References nn1, and phi_norms.

Referenced by startup().

◆ initialize_papi()

void madness::initialize_papi ( )
inline

◆ initialized()

bool madness::initialized ( )

Check if the MADNESS runtime has been initialized (and not subsequently finalized).

Returns
true if madness::initialize had been called more recently than madness::finalize, false otherwise.

Referenced by madness::WorldObject< Derived >::~WorldObject(), madness::archive::archive_initialize_type_names(), madness::FunctionDefaults< NDIM >::get_pmap(), and wall_time().

◆ inner() [1/22]

template<typename T , std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::inner ( const CCPairFunction< T, NDIM > &  c,
const Function< T, CCPairFunction< T, NDIM >::LDIM > &  f,
const std::array< int, CCPairFunction< T, NDIM >::LDIM > &  v1,
const std::array< int, CCPairFunction< T, NDIM >::LDIM > &  v2 
)

References c, and f.

◆ inner() [2/22]

template<typename T , std::size_t NDIM>
Function< T, CCPairFunction< T, NDIM >::LDIM > madness::inner ( const CCPairFunction< T, NDIM > &  c,
const Function< T, CCPairFunction< T, NDIM >::LDIM > &  f,
const std::tuple< int, int, int >  v1,
const std::tuple< int, int, int >  v2 
)

◆ inner() [3/22]

template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIM > madness::inner ( const CCPairFunction< T, NDIM > &  c1,
const CCPairFunction< T, NDIM > &  c2,
const std::array< int, CCPairFunction< T, NDIM >::LDIM > &  v1,
const std::array< int, CCPairFunction< T, NDIM >::LDIM > &  v2 
)

◆ inner() [4/22]

template<typename T , std::size_t NDIM>
CCPairFunction< T, NDIM > madness::inner ( const CCPairFunction< T, NDIM > &  c1,
const CCPairFunction< T, NDIM > &  c2,
const std::tuple< int, int, int >  v1,
const std::tuple< int, int, int >  v2 
)

◆ inner() [5/22]

template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-2 > madness::inner ( const Function< T, LDIM > &  f,
const Function< R, KDIM > &  g,
const std::tuple< int >  v1,
const std::tuple< int >  v2 
)

Computes the partial scalar/inner product between two functions, returns a low-dim function.

syntax similar to the inner product in tensor.h e.g result=inner<3>(f,g),{0},{1}) : r(x,y) = int f(x1,x) g(y,x1) dx1

References f, g, and innerXX().

◆ inner() [6/22]

template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-4 > madness::inner ( const Function< T, LDIM > &  f,
const Function< R, KDIM > &  g,
const std::tuple< int, int >  v1,
const std::tuple< int, int >  v2 
)

Computes the partial scalar/inner product between two functions, returns a low-dim function.

syntax similar to the inner product in tensor.h e.g result=inner<3>(f,g),{0,1},{1,2}) : r(y) = int f(x1,x2) g(y,x1,x2) dx1 dx2

References f, g, and innerXX().

◆ inner() [7/22]

template<typename T , std::size_t LDIM, typename R , std::size_t KDIM>
Function< TENSOR_RESULT_TYPE(T, R), KDIM+LDIM-6 > madness::inner ( const Function< T, LDIM > &  f,
const Function< R, KDIM > &  g,
const std::tuple< int, int, int >  v1,
const std::tuple< int, int, int >  v2 
)

Computes the partial scalar/inner product between two functions, returns a low-dim function.

syntax similar to the inner product in tensor.h e.g result=inner<3>(f,g),{1},{2}) : r(x,y,z) = int f(x,x1) g(y,z,x1) dx1

References f, g, and innerXX().

◆ inner() [8/22]

template<typename T , std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIM > madness::inner ( const Function< T, NDIM > &  f1,
const LowRankFunction< T, NDIM > &  f2,
const particle< PDIM >  p1,
const particle< PDIM >  p2 
)

lrf(1,3) = inner(full(1,2), lrf(2,3))

inner product: LowRankFunction lrf; Function f, g; double d lrf(1,3) = inner(lrf(1,2), lrf(2,3)) lrf(1,3) = inner(lrf(1,2), f(2,3)) g(1) = inner(lrf(1,2), f(2)) d = inner(lrf(1,2), f(1,2)) d = inner(lrf(1,2), lrf(1,2))

Parameters
[in]f1the first function
[in]f2the second function
[in]p1the integration variable of the first function
[in]p2the integration variable of the second function

References f1, f2, and inner().

◆ inner() [9/22]

template<typename T , std::size_t NDIM>
double madness::inner ( const LowRankFunction< T, NDIM > &  a,
const LowRankFunction< T, NDIM > &  b 
)

References a, b, and matrix_inner().

◆ inner() [10/22]

template<typename T , std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIM > madness::inner ( const LowRankFunction< T, NDIM > &  f1,
const Function< T, NDIM > &  f2,
const particle< PDIM >  p1,
const particle< PDIM >  p2 
)

lrf(1,3) = inner(lrf(1,2), full(2,3))

Parameters
[in]f1the first function
[in]f2the second function
[in]p1the integration variable of the first function
[in]p2the integration variable of the second function

References change_tree_state(), f1, f2, madness::LowRankFunction< T, NDIM, LDIM >::g, madness::particle< PDIM >::get_array(), madness::LowRankFunction< T, NDIM, LDIM >::h, madness::particle< PDIM >::is_first(), madness::particle< PDIM >::is_last(), NDIM, and reconstructed.

◆ inner() [11/22]

template<typename T , std::size_t NDIM, std::size_t PDIM>
Function< T, NDIM > madness::inner ( const LowRankFunction< T, NDIM > &  f1,
const Function< T, PDIM > &  f2,
const particle< PDIM >  p1,
const particle< PDIM >  p2 = particle<PDIM>::particle1() 
)

f(1) = inner(lrf(1,2), f(2))

Parameters
[in]f1the first function
[in]vfthe second function
[in]p1the integration variable of the first function
[in]p2the integration variable of the second function, dummy variable for consistent notation

References f1, f2, and inner().

◆ inner() [12/22]

template<typename T , std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIM > madness::inner ( const LowRankFunction< T, NDIM > &  f1,
const LowRankFunction< T, NDIM > &  f2,
const particle< PDIM >  p1,
const particle< PDIM >  p2 
)

lrf(1,3) = inner(lrf(1,2), lrf(2,3))

Parameters
[in]f1the first function
[in]f2the second function
[in]p1the integration variable of the first function
[in]p2the integration variable of the second function

References madness::particle< PDIM >::complement(), copy(), f1, f2, matrix_inner(), NDIM, and transform().

◆ inner() [13/22]

template<typename T , std::size_t NDIM, std::size_t PDIM>
std::vector< Function< T, NDIM-PDIM > > madness::inner ( const LowRankFunction< T, NDIM > &  f1,
const std::vector< Function< T, PDIM > > &  vf,
const particle< PDIM >  p1,
const particle< PDIM >  p2 = particle<PDIM>::particle1() 
)

f(1) = inner(lrf(1,2), f(2))

Parameters
[in]f1the first function
[in]vfvector of the second functions
[in]p1the integration variable of the first function
[in]p2the integration variable of the second function, dummy variable for consistent notation

References madness::particle< PDIM >::complement(), f1, MADNESS_CHECK, matrix_inner(), NDIM, and transform().

◆ inner() [14/22]

double madness::inner ( const std::valarray< double > &  bra,
const std::valarray< double > &  ket 
)

inner product for std::valarray

◆ inner() [15/22]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::inner ( const std::vector< CCPairFunction< T, NDIM > > &  c1,
const std::vector< CCPairFunction< T, NDIM > > &  c2,
const std::array< int, CCPairFunction< T, NDIM >::LDIM > &  v1,
const std::array< int, CCPairFunction< T, NDIM >::LDIM > &  v2 
)

References inner(), and print().

◆ inner() [16/22]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::inner ( const std::vector< CCPairFunction< T, NDIM > > &  c1,
const std::vector< CCPairFunction< T, NDIM > > &  c2,
const std::tuple< int, int, int >  v1,
const std::tuple< int, int, int >  v2 
)

References inner().

◆ inner() [17/22]

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

compute the inner product two Vectors.

Do an inner product of l and r and return the result in a new Vector.

Template Parameters
TThe Vector element type.
NThe Vector size.
Parameters
[in]lThe left-hand Vector.
[in]rThe right-hand Vector.
Returns
the inner product, where result==\sum_i(l[i]*r[i]).

References N, and T().

◆ inner() [18/22]

auto madness::inner ( const X_space A,
const X_space B 
) -> Tensor<double>

Computes the matrix elements between two response spaces.

cij=inner(ai,bj)

Parameters
A
B
Returns
Tensor<double>

◆ inner() [19/22]

return f madness::inner ( g  )

◆ inner() [20/22]

double madness::inner ( response_space a,
response_space b 
)
inline

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

Referenced by madness::Znemo::analyze(), madness::SCF::analyze_vectors(), madness::Solver< T, NDIM >::apply_hf_exchange3(), madness::Solver< T, NDIM >::apply_hf_exchange4(), madness::Solver< T, NDIM >::apply_potential(), madness::SCF::apply_potential(), madness::projector_irrep::apply_symmetry_operators(), madness::Diamagnetic_potential_factor::bare_diamagnetic_potential(), bend(), Calculation::calc_optimal_coeffs(), 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(), madness::RandomizedMatrixDecomposition< T >::check_range(), madness::SRConf< T >::check_right_orthonormality(), madness::OEP::compute_and_print_final_energies(), madness::MolecularOrbitals< T, NDIM >::compute_center(), madness::guessfactory::compute_centroids(), madness::PNO::compute_cispd_correction_gs(), madness::PNO::compute_cispd_f12_correction_es(), madness::PNO::compute_cispd_f12_correction_gs(), madness::F12Potentials::compute_cispd_f12_energies(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), madness::OEP::compute_E_first(), compute_energy(), madness::Znemo::compute_energy(), madness::OEP::compute_energy(), madness::MP2::compute_energy(), compute_energy(), compute_energy(), compute_energy(), compute_energy(), compute_energy(), compute_energy(), madness::Nemo::compute_energy_regularized(), compute_energy_simple(), compute_energy_with_U(), madness::OEP::compute_exchange_energy_conv(), madness::OEP::compute_exchange_energy_vir(), madness::OEP::compute_fock_diagonal_elements(), compute_fock_matrix(), madness::Zcis::compute_fock_pt(), madness::F12Potentials::compute_fQc_integrals_ij(), madness::F12Potentials::compute_fQg_integral(), madness::F12Potentials::compute_fQg_integrals(), madness::F12Potentials::compute_fQU_integrals(), compute_frequencies(), madness::MP2::compute_gQf(), madness::NemoBase::compute_gradient(), madness::Nemo::compute_IR_intensities(), madness::NemoBase::compute_kinetic_energy(), madness::NemoBase::compute_kinetic_energy2(), madness::Znemo::compute_kinetic_momentum(), madness::Znemo::compute_linear_moment(), madness::Znemo::compute_magnetic_potential_expectation(), madness::MP3::compute_mp3_cd(), madness::MP3::compute_mp3_cd(), madness::MP3::compute_mp3_ef(), madness::MP3::compute_mp3_ef(), madness::MP3::compute_mp3_ef_low_scaling(), madness::MP3::compute_mp3_ef_with_permutational_symmetry(), madness::MP3::compute_mp3_ghij(), madness::MP3::compute_mp3_ghij(), madness::MP3::compute_mp3_ghij_fast(), madness::MP3::compute_mp3_klmn(), madness::MP3::compute_mp3_klmn(), madness::MP3::compute_mp3_klmn_fast(), madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), compute_R2f2_psi(), madness::MolecularOptimizer::compute_reduced_mass(), compute_reduced_mass(), madness::Znemo::compute_residuals(), madness::Zcis::compute_residuals(), madness::SVDTensor< T >::compute_svd_from_range(), madness::Diamagnetic_potential_factor::compute_U2(), converge(), converge(), converge2s(), madness::PotentialManager::core_projection(), madness::PotentialManager::core_projector_derivative(), madness::Diamagnetic_potential_factor::custom_factor(), madness::Znemo::custom_guess(), madness::SCF::derivatives(), DF::diagonalize(), dnuclear_anchor_test(), madness::RandomizedMatrixDecomposition< T >::do_compute_range(), madness::Derivative< T, NDIM >::do_diff2b(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), dx2y2_func(), dxy_func(), dxz_func(), dyz_func(), dz2_func(), eigenvector_test(), energy(), energy(), energy(), energy(), madness::Diamagnetic_potential_factor::factor_with_phase(), fixphases(), madness::TensorTrain< T >::fusedim(), madness::SRConf< T >::general_transform(), general_transform(), general_transform(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), madness::Solver< T, NDIM >::gram_schmidt(), madness::MP2::guess_mp1_3(), madness::Nemo::hessian(), QuasiNewton::hessian_update_bfgs(), madness::QuasiNewton::hessian_update_bfgs(), QuasiNewton::hessian_update_sr1(), madness::QuasiNewton::hessian_update_sr1(), madness::SCF::initial_guess(), data< T, NDIM >::initialize(), inner(), inner(), inner(), inner(), inner(), inner(), inner(), Fcwf::inner(), madness::CCPairFunction< T, NDIM >::inner_internal(), is_aligned(), is_centered_normal(), madness::Znemo::iterate(), iterate(), madness::Zcis::iterate(), iterate(), iterate(), iterate(), iterate(), DF::iterate(), iterate(), iterate(), iterate(), iterate_excite(), iterate_ground(), iterate_ground(), madness::CC2::iterate_singles(), madness::TDHF::iterate_vectors(), iterate_xy(), iterate_xy(), madness::LowRankFunction< T, NDIM, LDIM >::l2error(), madness::Localizer::localize(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), madness::TDHF::make_cis_matrix(), madness::TwoElectronInterface< T, NDIM >::make_coeff(), madness::Nemo::make_incomplete_hessian(), madness::Nemo::make_incomplete_hessian_response_part(), madness::MP2::make_KffKphi0(), madness::TDHF::make_overlap_matrix(), madness::TDHF::make_perturbed_fock_matrix(), Calculation::make_reference(), madness::RandomizedMatrixDecomposition< T >::make_SVD_decaying_matrix(), madness::MP2::make_Uphi0(), madness::TDHF::make_virtuals(), madness::CCPairFunction< T, NDIM >::make_xy_u(), madness::EigSolver< T, NDIM >::matrix_element(), madness::Solver< T, NDIM >::matrix_exponential(), madness::Localizer::matrix_exponential(), matrix_exponential(), matrix_inner(), madness::AtomicBasisSet::modify_dmat_psp(), moments(), madness::MP3::mp3_test(), madness::EigSolver< T, NDIM >::multi_solve(), QuasiNewton::new_search_direction(), madness::QuasiNewton::new_search_direction(), madness::MolecularOptimizer::new_search_direction2(), Fcwf::norm2(), madness::LRFunctorF12< T, NDIM, LDIM >::norm2(), AnsatzBase::normalize(), madness::FunctionImpl< T, NDIM >::NScoeffs2values(), nuclear_anchor_test(), LProjector::operator()(), madness::R_times_arg_div_R::operator()(), madness::NuclearCorrelationFactor::U1_dot_U1_functor::operator()(), madness::harmonic_potential_boxed::operator()(), madness::spherical_box< NDIM >::operator()(), madness::Exchange< T, NDIM >::operator()(), madness::Coulomb< T, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::LocalPotentialOperator< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), MicroTask1::operator()(), MatrixOperator::operator()(), madness::BSHApply< T, NDIM >::operator()(), MicroTask2::operator()(), madness::RandomizedMatrixDecomposition< T >::Y_former::operator()(), madness::LRFunctorF12< T, NDIM, LDIM >::operator()(), HO_function< NDIM >::operator()(), slater::operator()(), gaussian::operator()(), madness::LowRankFunction< T, NDIM, LDIM >::optimize(), madness::MolecularOptimizer::optimize_conjugate_gradients(), madness::MolecularOptimizer::optimize_quasi_newton(), ortho3(), ortho5(), MiniDFT::orthogonalize(), orthogonalize(), madness::Zcis::orthonormalize(), madness::Zcis::orthonormalize(), orthonormalize_fock(), orthonormalize_symmetric(), madness::TDHF::oscillator_strength_length(), madness::TDHF::oscillator_strength_velocity(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::PNO::pno_compress(), print_info(), print_info(), madness::EigSolver< T, NDIM >::print_matrix_elements(), print_stats(), print_stats(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project(), madness::CCPairFunction< T, NDIM >::project_out_decomposed(), projector_external_dof(), madness::MolecularOptimizer::projector_external_dof(), propagate(), px_func(), py_func(), pz_func(), Q3(), madness::Solver< T, NDIM >::Q3(), Q3(), madness::SVDTensor< T >::recompute_from_range(), madness::SRConf< T >::reconstruct(), madness::TensorTrain< T >::reconstruct(), reconstruct_psi(), DF::rele(), remove_external_dof(), madness::MolecularOptimizer::remove_external_dof(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::Convolution1D< Q >::rnlij(), madness::Molecule::rotate(), s_func(), madness::OEP::selftest(), madness::Localizer::separate_core_valence(), show_norms(), madness::EigSolver< T, NDIM >::solve(), madness::SCF::solve(), madness::Nemo::solve_cphf(), su_complex(), madness::PNO::t_solve(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), test2(), Test7(), test_adaptive_tree(), test_apply(), test_arithmetic(), test_cholesky(), test_combined_operators(), madness::Znemo::test_compute_current_density(), test_consolidate(), test_construction_optimization(), test_converged_function(), test_convergence(), test_conversion(), test_convolution(), test_coulomb(), madness::Diamagnetic_potential_factor::test_factor(), test_full_rank_functor(), test_gelss(), test_gesv(), test_hartree_product(), test_he_potential(), test_inner(), test_inner(), test_inner(), test_integration(), test_inverse(), test_Kcommutator(), test_kinetic(), madness::Znemo::test_landau_wave_function(), test_load_store(), test_lowrank_function(), test_modified(), test_molecular_grid(), test_multiply(), test_multiply_with_f12(), test_norm(), test_operator_apply(), test_partial_inner(), test_partial_inner_3d(), test_partial_inner_6d(), test_projector(), test_projector(), test_projector_outer(), test_Q12_projector(), test_qr(), test_recursive_application(), test_rr_cholesky(), test_scalar_multiplication(), madness::Diamagnetic_potential_factor::test_scalar_potentials(), test_slater_exchange(), test_swap_particles(), test_syev(), test_sygv(), test_tight_diffuse(), test_transformations(), test_two_scale_coefficients(), test_U_el(), madness::Znemo::test_U_potentials(), test_vector_composite(), test_XCOperator(), madness::SRConf< T >::transform(), transform(), transform(), transform_dir(), transform_dir(), madness::PNO::transform_pairs(), madness::TensorTrain< T >::truncate(), madness::TensorTrain< T >::two_mode_representation(), madness::Localizer::undo_rotation(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), madness::PNO::update_pno(), madness::FunctionImpl< T, NDIM >::values2NScoeffs(), and madness::LowRankFunctionFactory< T, NDIM, LDIM >::Yformer().

◆ inner() [21/22]

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 
)

◆ inner() [22/22]

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 
)

◆ inner_adaptive()

return f madness::inner_adaptive ( func  )

◆ innerXX() [1/2]

template<std::size_t NDIM, typename T , std::size_t LDIM, typename R , std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
Function< TENSOR_RESULT_TYPE(T, R), NDIM > madness::innerXX ( const Function< T, LDIM > &  f,
const Function< R, KDIM > &  g,
const std::array< int, CDIM >  v1,
const std::array< int, CDIM >  v2,
int  task = 0 
)

Computes the partial scalar/inner product between two functions, returns a low-dim function.

syntax similar to the inner product in tensor.h e.g result=inner<3>(f,g),{0},{1}) : r(x,y) = int f(x1,x) g(y,x1) dx1

Parameters
[in]task0: everything, 1; prepare only (fence), 2: work only (no fence), 3: finalize only (fence)

References f, g, and task().

◆ innerXX() [2/2]

template<std::size_t NDIM, typename T , std::size_t LDIM, typename R , std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::innerXX ( const Function< T, LDIM > &  f,
const std::vector< Function< R, KDIM > > &  vg,
const std::array< int, CDIM >  v1,
const std::array< int, CDIM >  v2,
int  task = 0 
)

◆ interleave_rows()

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.

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

◆ inverse() [1/3]

template Tensor< double > madness::inverse ( const Tensor< double > &  A)

◆ inverse() [2/3]

template Tensor< double_complex > madness::inverse ( const Tensor< double_complex > &  A)

◆ inverse() [3/3]

template<typename T >
Tensor< T > madness::inverse ( const Tensor< T > &  a_in)

◆ is_collected()

template<typename T , std::size_t NDIM>
bool madness::is_collected ( const std::vector< CCPairFunction< T, NDIM > > &  other)

◆ is_madness_thread()

bool madness::is_madness_thread ( )
inline
Returns
true if this thread is managed by MADNESS

References madness::detail::thread_tag_accessor(), and ThreadTag_MADNESS.

Referenced by madness::DQueue< T >::push_back(), and madness::DQueue< T >::push_front().

◆ is_same_tensor_type()

template<typename Q , typename R >
bool madness::is_same_tensor_type ( const GenTensor< R > &  rhs,
const GenTensor< Q > &  lhs 
)

Referenced by outer().

◆ jacobi()

void madness::jacobi ( Tensor< double > &  A,
Tensor< double > &  V,
const std::vector< int > &  set 
)

◆ junkjunkjunk()

Exchange< double, 3 >::ExchangeImpl madness::junkjunkjunk ( World world,
const SCF calc,
const int  ispin 
)

◆ KAIN()

template<typename T >
Tensor< T > madness::KAIN ( const Tensor< T > &  Q,
double  rcond = 1e-12 
)

Solves non-linear equation using KAIN (returns coefficients to compute next vector)

The Krylov-accelerated inexact-Newton method employs directional derivatives to estimate the Jacobian in the subspace and separately computes updates in the subspace and its complement.

We wish to solve the non-linear equations $ f(x)=0 $ where $ f $ and $ x $ are vectors of the same dimension (e.g., consider both being MADNESS functions).

Define the following matrices and vector (with $ i $ and $
j $ denoting previous iterations in the Krylov subspace and $ m $ the current iteration):

\begin{eqnarray*}
Q_{i j} & = & \langle x_i \mid f_j \rangle \\
A_{i j} & = & \langle x_i - x_m \mid f_j - f_m \rangle = Q_{i j} - Q_{m j} - Q_{i m} + Q{m m} \\
b_i & =& -\langle x_i - x_m \mid f_m \rangle = -Q_{i m} + Q_{m m}
\end{eqnarray*}

The subspace equation is of dimension $ m $ (assuming iterations are indexed from zero) and is given by

\[
A c = b
\]

The interior and exterior updates may be combined into one simple expression as follows. First, define an additional element of the solution vector

\[
c_m = 1 - \sum_{i<m} c_i
\]

and then the new vector (guess for next iteration) is given by

\[
x_{m+1} = \sum_{i \le m}{c_i ( x_i - f_i)}
\]

To employ the solver, each iteration

  1. Compute the additional row and column of the matrix $ Q $ that is the inner product between solution vectors ( $ x_i $) and residuals ( $ f_j $).
  2. Call this routine to compute the coefficients $ c $ and from these compute the next solution vector
  3. Employ step restriction or line search as necessary to ensure stable/robust solution.
Parameters
[in]QThe matrix of inner products between subspace vectors and residuals.
[in]rcondThreshold for discarding small singular values in the subspace equations.
Returns
Vector for computing next solution vector

References b, c, madness::BaseTensor::dim(), gelss(), L, m, Q(), and T().

Referenced by check_linear_dependence(), main(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), and madness::SCF::update_subspace().

◆ legendre_polynomials()

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.

References nn1, and p().

Referenced by gauss_legendre_numeric(), and legendre_scaling_functions().

◆ legendre_scaling_functions()

void madness::legendre_scaling_functions ( double  x,
long  k,
double *  p 
)

◆ load()

template<class T , std::size_t NDIM>
void madness::load ( Function< T, NDIM > &  f,
const std::string  name 
)

◆ load_balance()

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(), f, madness::LoadBalanceDeux< NDIM >::load_balance(), and madness::FunctionDefaults< NDIM >::redistribute().

Referenced by madness::MP2::apply_exchange(), madness::MP2::guess_mp1_3(), madness::MP2::increment(), and madness::MP2::solve_residual_equations().

◆ load_coeffs()

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

◆ load_function()

template<typename T , size_t NDIM>
void madness::load_function ( World world,
std::vector< Function< T, NDIM > > &  f,
const std::string  name 
)

◆ load_quadrature()

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(), data_is_read, dir, madness::WorldGopInterface::fence(), filename, madness::World::gop, max_npt, points, madness::World::rank(), read_data(), and weights.

Referenced by startup().

◆ lookup_func()

static xc_func_type * madness::lookup_func ( const std::string &  name,
bool  polarized 
)
static

References lookup_name(), make_func(), and name().

◆ lookup_id()

static std::string madness::lookup_id ( const int  id)
static

◆ lookup_name()

static int madness::lookup_name ( const std::string &  name)
static

References name().

Referenced by lookup_func().

◆ lowercase()

std::string madness::lowercase ( const std::string &  s)

◆ lq() [1/3]

template void madness::lq ( Tensor< double > &  A,
Tensor< double > &  L 
)

◆ lq() [2/3]

template void madness::lq ( Tensor< double_complex > &  A,
Tensor< double_complex > &  L 
)

◆ lq() [3/3]

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]Rthe (n,n) matrix L (square form)
Todo:
MGR: Check this.

References lq_result(), m, R, and TENSOR_ASSERT.

Referenced by test_qr().

◆ lq_result() [1/3]

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

◆ lq_result() [2/3]

template void madness::lq_result ( Tensor< double_complex > &  A,
Tensor< double_complex > &  R,
Tensor< double_complex > &  tau,
Tensor< double_complex > &  work,
bool  do_qr 
)

◆ lq_result() [3/3]

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

LQ decomposition.

Parameters
[in,out]Aon entry the (n,m) matrix to be decomposed on exit the Q matrix
[in,out]Rthe (n,n) matrix L (square form)
Todo:
MGR: Check this.
Parameters
[in]do_qrdo QR instead of LQ

References geqrf_(), k, m, mask_info(), orgqr_(), madness::Tensor< T >::ptr(), R, madness::BaseTensor::size(), T(), and TENSOR_ASSERT.

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

◆ main()

int madness::main ( int  argc,
char **  argv 
)

◆ make_atom_vec()

std::vector< atom_information< 3 > > madness::make_atom_vec ( const Molecule molecule,
double  R1_,
double  R2_ 
)

◆ make_exp()

double madness::make_exp ( double  x)

◆ make_func()

static xc_func_type * madness::make_func ( int  id,
bool  polarized 
)
static

References func().

Referenced by lookup_func().

◆ make_log()

double madness::make_log ( double  x)

◆ make_nonstandard()

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

Generates non-standard form of a vector of functions.

References change_tree_state(), nonstandard, PROFILE_BLOCK, and v.

Referenced by apply(), and apply().

◆ make_radius()

template<std::size_t NDIM>
static double madness::make_radius ( const Vector< double, NDIM > &  x)
static

References r2(), and xi.

◆ make_redundant()

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

change tree_state of a vector of functions to redundant

References change_tree_state(), PROFILE_BLOCK, redundant, and v.

Referenced by madness::MP2::apply_exchange_vector(), madness::FunctionImpl< T, NDIM >::erase(), and partial_mul().

◆ map_and_mirror()

template<typename T , std::size_t NDIM>
Function< T, NDIM > madness::map_and_mirror ( const Function< T, NDIM > &  f,
const std::vector< long > &  map,
const std::vector< long > &  mirror,
bool  fence = true 
)

This is replaced with mirror(map(f)), optional fence.

first map then mirror! mirror is similar to mapdim, but maps from x to -x, y to -y, and so on Example: mirror a 3d function on the xy plane: mirror={1,1,-1} Example: c4 rotation of a 3d function around the z axis: x->y, y->-x, z->z: map(1,0,2); mirror(-1,1,1)

Parameters
[in]maparray holding dimensions
[in]mirrorarray of -1 and 1, corresponding to mirror or not

References f, madness::Function< T, NDIM >::map_and_mirror(), mirror(), and PROFILE_FUNC.

Referenced by madness::pg_operator::operator()().

◆ mapdim()

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]
Function< T, NDIM > mapdim(const Function< T, NDIM > &f, const std::vector< long > &map, bool fence=true)
Generate a new function by reordering dimensions ... optional fence.
Definition mra.h:2259

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 f, madness::Function< T, NDIM >::mapdim(), and PROFILE_FUNC.

Referenced by swap_particles().

◆ mask1()

double madness::mask1 ( double  x)
inline

Referenced by mask3().

◆ mask3()

static double madness::mask3 ( const coordT ruser)
static

References lo, mask1(), and user_to_sim().

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

◆ mask_functor_box()

static double madness::mask_functor_box ( const coord_3d x)
static

References r2().

◆ mask_info()

static void madness::mask_info ( integer info)
static

◆ mask_munging()

template<std::size_t NDIM>
static double madness::mask_munging ( const double  x)
static

◆ matrix_dot() [1/2]

template<typename T , std::size_t NDIM>
DistributedMatrix< T > madness::matrix_dot ( const DistributedMatrixDistribution d,
const std::vector< Function< T, NDIM > > &  f,
const std::vector< Function< T, NDIM > > &  g,
bool  sym = false 
)

References d, f, g, m, MADNESS_ASSERT, matrix_dot(), P, and PROFILE_FUNC.

Referenced by matrix_dot(), and test_dot().

◆ matrix_dot() [2/2]

template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R)> madness::matrix_dot ( 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(), madness::FunctionImpl< T, NDIM >::dot_local(), f, madness::WorldGopInterface::fence(), g, get_impl(), madness::World::gop, madness::Tensor< T >::ptr(), R, madness::WorldGopInterface::sum(), T(), and TENSOR_RESULT_TYPE.

◆ matrix_inner() [1/3]

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 
)

References d, f, g, m, MADNESS_ASSERT, matrix_inner(), P, and PROFILE_FUNC.

◆ matrix_inner() [2/3]

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 
)

References f, g, m, MADNESS_ASSERT, matrix_inner(), and P.

Referenced by madness::SCF::analyze_vectors(), madness::GTHPseudopotential< Q >::apply_potential(), madness::projector_irrep::apply_symmetry_operators(), madness::Solver< T, NDIM >::build_fock_matrix(), Calculation::calc_optimal_coeffs(), madness::Zcis::canonicalize(), madness::TDHF::canonicalize(), madness::LowRankFunction< T, NDIM, LDIM >::check_orthonormality(), madness::PNO::check_orthonormality(), madness::PNO::compute_cispd_correction_es(), madness::PNO::compute_cispd_correction_gs(), madness::PNO::compute_cispd_fluctuation_matrix(), madness::Nemo::compute_cphf_parallel_term(), madness::PNO::compute_fluctuation_matrix(), madness::Nemo::compute_fock_matrix(), compute_fock_matrix(), madness::F12Potentials::compute_fQg_integrals(), madness::F12Potentials::compute_fQU_integrals(), madness::MP2::compute_gQf(), madness::PNO::compute_projected_mp2_energies(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_uijab_integrals(), madness::Znemo::compute_vmat(), madness::F12Potentials::compute_xyab_integrals(), diag_and_transform(), madness::SCF::diag_fock_matrix(), DF::diagonalize(), distributed_localize_PM(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), MiniDFT::doit(), doit(), exchange_anchor_test(), exchange_anchor_test(), fixphases(), hamiltonian_matrix(), madness::Znemo::hcore_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), initial_guess(), inner(), inner(), inner(), madness::CCPairFunction< T, NDIM >::inner_internal(), madness::Znemo::iterate(), madness::OEP::iterate(), madness::PNO::iterate_pairs_internal(), madness::SCF::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), MiniDFT::kinetic_energy_matrix(), madness::LowRankFunction< T, NDIM, LDIM >::l2error(), Calculation::load_mos(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), madness::TDHF::make_cis_matrix(), madness::SCF::make_fock_matrix(), madness::TDHF::make_guess_from_initial_diagonalization(), make_kinetic_matrix(), madness::Solver< T, NDIM >::make_kinetic_matrix(), make_kinetic_matrix(), matrix_inner(), matrix_inner(), madness::LowRankFunction< T, NDIM, LDIM >::norm2(), madness::Coulomb< T, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::LocalPotentialOperator< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::Exchange< T, NDIM >::operator()(), madness::DerivativeOperator< T, NDIM >::operator()(), BoysLocalization::operator()(), orth(), DF::orthogonalize_inplace(), madness::LowRankFunction< T, NDIM, LDIM >::orthonormalize(), orthonormalize(), madness::NemoBase::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), orthonormalize_canonical(), orthonormalize_cd(), madness::PNO::orthonormalize_cholesky(), orthonormalize_rrcd(), orthonormalize_symmetric(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::SCF::restart_aos(), madness::SCF::save_mos(), madness::MolecularOrbitals< T, NDIM >::save_restartaodata(), madness::Solver< T, NDIM >::solve(), madness::Nemo::solve(), madness::SCF::solve(), test_dot(), test_inner(), test_inner(), test_orthogonalization(), test_projector(), test_projector(), test_swap_particles(), and madness::SCF::twoint().

◆ matrix_inner() [3/3]

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(), f, madness::WorldGopInterface::fence(), g, get_impl(), madness::World::gop, madness::FunctionImpl< T, NDIM >::inner_local(), madness::Tensor< T >::ptr(), R, madness::WorldGopInterface::sum(), T(), and TENSOR_RESULT_TYPE.

◆ matrix_inner_old()

template<typename T , typename R , std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > madness::matrix_inner_old ( 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, MADNESS_ASSERT, PROFILE_BLOCK, madness::Tensor< T >::ptr(), R, madness::WorldGopInterface::sum(), T(), and TENSOR_RESULT_TYPE.

Referenced by test_inner().

◆ matrix_mul_sparse()

template<typename T , typename R , std::size_t NDIM>
std::vector< std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > > madness::matrix_mul_sparse ( World world,
const std::vector< Function< R, NDIM > > &  f,
const std::vector< Function< R, NDIM > > &  g,
double  tol,
bool  fence = true,
bool  symm = false 
)

Outer product of a vector of functions with a vector of functions using sparsity.

Template Parameters
Ttype parameter for first factor
Rtype parameter for second factor
NDIMdimension of first and second factors
Parameters
worldthe world
ffirst vector of functions
gsecond vector of functions
tolthreshold for multiplication
fenceforce fence (will always fence if necessary)
symmif true, only compute f(i) * g(j) for j<=i
Returns
fg(i,j) = f(i) * g(j), as a vector of vectors

References f, madness::WorldGopInterface::fence(), g, madness::World::gop, PROFILE_BLOCK, reconstruct(), and vmulXX().

◆ mirror()

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

Generate a new function by mirroring within the dimensions .. optional fence.

similar to mapdim

Parameters
[in]mirrorarray with -1 and 1, corresponding to mirror this dimension or not

References f, madness::Function< T, NDIM >::mirror(), and PROFILE_FUNC.

Referenced by map_and_mirror(), madness::FunctionImpl< T, NDIM >::map_and_mirror(), and madness::pg_operator::operator()().

◆ mTxm() [1/3]

template<>
void madness::mTxm ( long  dimi,
long  dimj,
long  dimk,
double *MADNESS_RESTRICT  c,
const double *MADNESS_RESTRICT  a,
const double *MADNESS_RESTRICT  b 
)
inline

Matrix transpose * matrix (hand unrolled version)

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

◆ mTxm() [2/3]

template<typename T , typename Q , typename S >
static void madness::mTxm ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

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

◆ mTxm() [3/3]

template<typename T >
void madness::mTxm ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const T a,
const T b 
)

Matrix += Matrix transpose * matrix ... MKL interface version.

Does C=C+AT*B

c(i,j) = c(i,j) + sum(k) a(k,i)*b(k,j)
static const double b
Definition nonlinschro.cc:119
static const double a
Definition nonlinschro.cc:118

References a, b, c, madness::cblas::gemm(), madness::cblas::NoTrans, T(), and madness::cblas::Trans.

Referenced by fast_transform(), inner_result(), and main().

◆ mTxm_reference()

template<typename T , typename Q , typename S >
static void madness::mTxm_reference ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

Matrix += Matrix transpose * matrix ... reference implementation (slow but correct)

References a, b, c, and k.

Referenced by mTxm().

◆ mTxmq() [1/2]

template<typename aT , typename bT , typename cT >
void madness::mTxmq ( long  dimi,
long  dimj,
long  dimk,
cT *MADNESS_RESTRICT  c,
const aT *  a,
const bT *  b,
long  ldb = -1 
)

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

◆ mTxmq() [2/2]

template<typename T >
void madness::mTxmq ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const T a,
const T b,
long  ldb = -1 
)

Matrix = Matrix transpose * matrix ... MKL interface version.

Does C=AT*B whereas mTxm does C=C+AT*B.

c(i,j) = sum(k) a(k,i)*b(k,j) <------ does not accumulate into C
Definition test_ar.cc:170

ldb is the last dimension of b in C storage (the leading dimension in fortran storage). It is here to accomodate multiplying by a matrix stored with ldb>dimj which happens in madness when transforming with low rank matrices. A matrix in dense storage has ldb=dimj which is the default for backward compatibility.

References a, b, c, madness::cblas::gemm(), MADNESS_ASSERT, madness::cblas::NoTrans, T(), and madness::cblas::Trans.

Referenced by madness::SeparatedConvolution< Q, NDIM >::apply_transformation(), madness::SeparatedConvolution< Q, NDIM >::apply_transformation2(), fast_transform(), main(), main(), timer(), and trantimer().

◆ mTxmq_padding()

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 
)

◆ mTxmq_reference()

template<typename aT , typename bT , typename cT >
void madness::mTxmq_reference ( long  dimi,
long  dimj,
long  dimk,
cT *MADNESS_RESTRICT  c,
const aT *  a,
const bT *  b,
long  ldb = -1 
)

Matrix = Matrix transpose * matrix ... slow reference implementation.

This routine does C=AT*B whereas mTxm does C=C+AT*B.

c(i,j) = sum(k) a(k,i)*b(k,j) <------ does not accumulate into C

ldb is the last dimension of b in C storage (the leading dimension in fortran storage). It is here to accomodate multiplying by a matrix stored with ldb>dimj which happens in madness when transforming with low rank matrices. A matrix in dense storage has ldb=dimj which is the default for backward compatibility.

References a, b, c, k, and MADNESS_ASSERT.

Referenced by mTxmq().

◆ mTxmT() [1/3]

template<>
void madness::mTxmT ( long  dimi,
long  dimj,
long  dimk,
double *MADNESS_RESTRICT  csave,
const double *MADNESS_RESTRICT  asave,
const double *MADNESS_RESTRICT  b 
)
inline

Matrix transpose * matrix transpose (hand tiled and unrolled)

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

◆ mTxmT() [2/3]

template<typename T , typename Q , typename S >
static void madness::mTxmT ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

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

◆ mTxmT() [3/3]

template<typename T >
void madness::mTxmT ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const T a,
const T b 
)

Matrix += Matrix transpose * matrix transpose ... MKL interface version.

Does C=C+AT*BT

c(i,j) = c(i,j) + sum(k) a(k,i)*b(j,k)

References a, b, c, madness::cblas::gemm(), T(), and madness::cblas::Trans.

Referenced by inner_result().

◆ mTxmT_reference()

template<typename T , typename Q , typename S >
static void madness::mTxmT_reference ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

Matrix += Matrix transpose * matrix transpose reference implementation (slow but correct)

References a, b, c, and k.

Referenced by mTxmT().

◆ mul() [1/7]

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 mul_sparse().

◆ mul() [2/7]

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 alpha, f, mul(), and PROFILE_FUNC.

◆ mul() [3/7]

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 
)

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

References alpha, f, NDIM, PROFILE_FUNC, Q(), madness::Function< T, NDIM >::set_impl(), T(), TENSOR_RESULT_TYPE, madness::Function< T, NDIM >::verify(), and VERIFY_TREE.

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl(), KPeriodicBSHOperator::apply(), apply_potential(), apply_potential(), madness::Nemo::compute_all_cphf(), madness::Nemo::compute_cphf_parallel_term(), madness::PNO::compute_fluctuation_matrix(), madness::Nemo::compute_fock_matrix(), madness::F12Potentials::compute_fQc_integrals_ij(), madness::Zcis::compute_potentials(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::PNO::compute_V_aj_i(), cross(), madness::CCPairFunction< T, NDIM >::dirac_convolution_decomposed(), dot(), DF::exchange(), fixphases(), madness::Nemo::hessian(), inner_func(), DF::iterate(), madness::MP2::K(), madness::Nemo::kinetic_energy_potential(), madness::TDHF::make_bra(), madness::Nemo::make_density(), madness::TDHF::make_perturbed_fock_matrix(), molresponseExchange(), mul(), mul(), mul(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::response_space::operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), madness::CCPairFunction< T, NDIM >::project_out_op_decomposed(), madness::Nemo::solve(), madness::Nemo::solve_cphf(), test_Kcommutator(), test_math(), and vector_to_PQ().

◆ mul() [4/7]

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 a, madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, reconstruct(), v, and vmulXX().

◆ mul() [5/7]

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 a, madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, reconstruct(), v, and vmulXX().

◆ mul() [6/7]

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(), NDIM, PROFILE_BLOCK, q(), R, reconstruct(), T(), and TENSOR_RESULT_TYPE.

◆ mul() [7/7]

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, mul(), NDIM, PROFILE_BLOCK, q(), R, reconstruct(), T(), and TENSOR_RESULT_TYPE.

◆ mul_sparse() [1/3]

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 
)

◆ mul_sparse() [2/3]

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 a, madness::WorldGopInterface::fence(), madness::World::gop, norm_tree(), PROFILE_BLOCK, reconstruct(), v, and vmulXX().

◆ mul_sparse() [3/3]

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 a, madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, reconstruct(), v, and vmulXX().

◆ multi_to_multi_op_values()

template<typename T , typename opT , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::multi_to_multi_op_values ( const opT &  op,
const std::vector< Function< T, NDIM > > &  vin,
const bool  fence = true 
)

apply op on the input vector yielding an output vector of functions

Parameters
[in]opthe operator working on vin
[in]vinvector of input Functions; needs to be refined to common level!
Returns
vector of output Functions vout = op(vin)

References MADNESS_ASSERT, madness::Function< T, NDIM >::multi_to_multi_op_values(), op(), and madness::Function< T, NDIM >::set_impl().

Referenced by madness::XCOperator< T, NDIM >::apply_xc_kernel(), madness::OEP::compute_dcep_correction(), madness::OEP::compute_mrks_correction(), madness::OEP::compute_ocep_correction(), madness::OEP::compute_slater_potential(), and test_multi_to_multi_op().

◆ multiop_values()

template<typename T , typename opT , std::size_t NDIM>
Function< T, NDIM > madness::multiop_values ( const opT &  op,
const std::vector< Function< T, NDIM > > &  vf 
)

◆ multiply() [1/2]

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 
)

◆ multiply() [2/2]

template<typename T , std::size_t NDIM, std::size_t LDIM>
std::vector< Function< T, NDIM > > madness::multiply ( const Function< T, NDIM f,
const std::vector< Function< T, LDIM > >  g,
const std::tuple< int, int, int >  v 
)

References f, g, and v.

◆ munge()

template<std::size_t NDIM>
static double madness::munge ( const double  x)
static

Referenced by da_ldaop().

◆ mxm() [1/3]

template<>
void madness::mxm ( long  dimi,
long  dimj,
long  dimk,
double *MADNESS_RESTRICT  c,
const double *MADNESS_RESTRICT  a,
const double *MADNESS_RESTRICT  b 
)
inline

Matrix * matrix (hand unrolled version)

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

◆ mxm() [2/3]

template<typename T , typename Q , typename S >
static void madness::mxm ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

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

◆ mxm() [3/3]

template<typename T >
void madness::mxm ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const T a,
const T b 
)

Matrix += Matrix * matrix ... BLAS/MKL interface version.

Does C=C+A*B

c(i,j) = c(i,j) + sum(k) a(i,k)*b(k,j)

References a, b, c, madness::cblas::gemm(), madness::cblas::NoTrans, and T().

Referenced by inner_result().

◆ mxm_reference()

template<typename T , typename Q , typename S >
static void madness::mxm_reference ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

Matrix += Matrix * matrix reference implementation (slow but correct)

References a, b, c, and k.

Referenced by mxm().

◆ mxmT() [1/3]

template<>
void madness::mxmT ( long  dimi,
long  dimj,
long  dimk,
double *MADNESS_RESTRICT  c,
const double *MADNESS_RESTRICT  a,
const double *MADNESS_RESTRICT  b 
)
inline

Matrix * matrix transpose (hand unrolled version)

References a, b, c, k, and sum.

◆ mxmT() [2/3]

template<typename T , typename Q , typename S >
static void madness::mxmT ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

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

◆ mxmT() [3/3]

template<typename T >
void madness::mxmT ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const T a,
const T b 
)

Matrix += Matrix * matrix transpose ... MKL interface version.

Does C=C+A*BT

c(i,j) = c(i,j) + sum(k) a(i,k)*b(j,k)

References a, b, c, madness::cblas::gemm(), madness::cblas::NoTrans, T(), and madness::cblas::Trans.

Referenced by madness::FunctionImpl< T, NDIM >::do_dot_localX(), madness::FunctionImpl< T, NDIM >::do_inner_localX(), and inner_result().

◆ mxmT_reference()

template<typename T , typename Q , typename S >
static void madness::mxmT_reference ( long  dimi,
long  dimj,
long  dimk,
T *MADNESS_RESTRICT  c,
const Q *MADNESS_RESTRICT  a,
const S *MADNESS_RESTRICT  b 
)
inlinestatic

Matrix += Matrix * matrix transpose ... reference implementation (slow but correct)

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

Referenced by mxmT().

◆ my_conj_transpose() [1/4]

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

References a, and transpose().

◆ my_conj_transpose() [2/4]

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

References a, and conj_transpose().

◆ my_conj_transpose() [3/4]

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

References a, and transpose().

Referenced by test_cholesky(), test_rr_cholesky(), and test_sygv().

◆ my_conj_transpose() [4/4]

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

References a, and conj_transpose().

◆ myusleep()

static void madness::myusleep ( unsigned int  us)
inlinestatic

Sleep or spin for specified number of microseconds.

Wrapper to ensure desired behavior across various platforms.

Parameters
[in]usThe number of microseconds.

References cpu_relax(), cpu_time(), and e().

Referenced by madness::WorldAmInterface::~WorldAmInterface(), madness::ThreadPool::await(), madness::RMI::begin(), madness::RMI::RmiTask::exit(), madness::RMI::RmiTask::process_some(), madness::WorldAmInterface::send(), and madness::MutexWaiter::yield().

◆ name()

std::string madness::name ( const FuncType type,
const int  ex = -1 
)
inline

References HOLE, MADNESS_CHECK_THROW, MADNESS_EXCEPTION, MIXED, PARTICLE, RESPONSE, and type().

Referenced by madness::Fock< T, NDIM >::add_operator(), madness::Fock< T, NDIM >::add_operator(), assign_calctype(), madness::QCCalculationParametersBase::check_type(), madness::CCConvolutionOperator< T, NDIM >::clear_intermediates(), madness::Gnuplot::db(), madness::Gnuplot::db(), madness::Molecule::GeometryParameters::derive_source_type_from_name(), madness::Cloud::do_load(), do_vtk_plots(), madness::Gnuplot::doplot(), madness::Gnuplot::doplot(), madness::WorldProfile::find(), madness::smooth< T, NDIM >::gaussian_smoothing(), get_charge_from_file(), madness::BasisFunctions::guess_virtuals_internal(), madness::CCConvolutionOperator< T, NDIM >::info(), madness::CC2::initialize_singles(), load(), madness::Cloud::load_from_cache(), load_function(), load_function(), madness::ElectronPair::load_pair(), madness::GTHPseudopotential< Q >::load_pseudo_from_file(), madness::Cloud::load_tuple(), lookup_func(), lookup_name(), main(), madness::PoolTaskInterface::make_id(), madness::smooth< T, NDIM >::make_plots(), madness::smooth< T, NDIM >::merge_functions(), madness::CC_vecfunction::name(), madness::CCConvolutionOperator< T, NDIM >::operator()(), operator<<(), p(), madness::MacroTaskPartitioner::partition_tasks(), plot(), plot_plane(), plot_plane(), plot_plane(), plot_plane(), plot_plane(), plot_plane(), madness::Molecule::position_stream_in_library(), madness::BasisFunctions::predefined_guess(), MatrixOperator::print(), madness::MolecularOrbitals< T, NDIM >::print_cubefiles(), madness::profiling::TaskEvent::print_demangled(), madness::FunctionImpl< T, NDIM >::print_size(), madness::Function< T, NDIM >::print_size(), madness::guessfactory::PolynomialFunctor::read_string(), madness::Molecule::read_structure_from_library(), madness::WorldProfile::recv_stats(), madness::WorldProfile::register_id(), madness::WorldProfile::register_id(), madness::Fock< T, NDIM >::remove_operator(), save(), save_function(), save_function(), save_function(), show_norms(), madness::SCF::solve(), solve(), madness::CC2::solve_cc2(), madness::Cloud::store_other(), madness::Cloud::store_other(), madness::ElectronPair::store_pair(), test_exchange(), test_exchange(), test_kinetic(), test_serialize(), madness::QCCalculationParametersBase::try_setting_user_defined_value(), and madness::CCConvolutionOperator< T, NDIM >::update_elements().

◆ new_am_arg()

template<typename... argT>
AmArg * madness::new_am_arg ( const argT &...  args)
inline

◆ nonlinear_vector_solver()

template<typename T , std::size_t NDIM>
static XNonlinearSolver< std::vector< Function< T, NDIM > >, T, vector_function_allocator< T, NDIM > > madness::nonlinear_vector_solver ( World world,
const long  nvec 
)
inlinestatic

References T().

◆ nonstandard()

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, PROFILE_BLOCK, reconstruct(), and v.

◆ norm2()

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

Computes the 2-norm of a vector of functions.

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

Referenced by Calculation::Calculation(), DipoleVector::DipoleVector(), madness::F12Potentials::F12Potentials(), NuclearVector::NuclearVector(), madness::Solver< T, NDIM >::apply_potential(), madness::MP2::asymmetry(), check(), check_multiplication_table_c2v(), check_operator_multiplications_2d(), check_operator_multiplications_3d(), check_vector(), compare(), compare_calc_and_mos(), madness::NemoBase::compute_kinetic_energy1(), madness::NemoBase::compute_kinetic_energy1a(), Calculation::compute_residuals(), madness::F12Potentials::convolve_with_fU(), madness::TDHF::get_tda_potential(), madness::Solver< T, NDIM >::gram_schmidt(), madness::OEP::iterate(), iterate(), madness::Zcis::iterate(), iterate(), DF::iterate(), madness::CC2::iterate_lrcc2_pairs(), madness::CC2::iterate_singles(), madness::TDHF::iterate_vectors(), iterate_xy(), iterate_xy(), madness::Nemo::kinetic_energy_potential(), main(), main(), madness::EigSolver< T, NDIM >::multi_solve(), norm(), madness::response_space::norm2(), madness::X_space::norm2s(), AnsatzBase::normalize(), madness::Zcis::normalize(), MatrixOperator::operator()(), print_info(), madness::CCPairFunction< T, NDIM >::print_size(), q_c(), madness::InitParameters::readnw(), madness::OEP::selftest(), SVPESolver::solve(), madness::Nemo::solve(), madness::SCF::solve(), madness::Nemo::solve_cphf(), madness::smooth< T, NDIM >::test_1d(), test_adaptive_tree(), test_add(), test_add(), test_combined_operators(), test_converged_function(), test_convergence(), test_cross(), madness::Diamagnetic_potential_factor::test_factor(), test_gconv(), test_inner(), test_io(), test_kinetic(), madness::Diamagnetic_potential_factor::test_lz_commutator(), test_math(), test_matrix_mul_sparse(), test_multi_to_multi_op(), test_multiply(), test_projector(), test_projector_outer(), test_Q12_projector(), test_recursive_application(), test_rot(), test_scalar_multiplication(), test_swap_particles(), test_transform(), test_unaryop(), test_vector_composite(), madness::Diamagnetic_potential_factor::test_vector_potentials(), testbsh(), update(), MiniDFT::update(), and madness::Solver< T, NDIM >::update_orbitals().

◆ norm2s() [1/2]

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

◆ norm2s() [2/2]

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 
)

Computes the 2-norms of a vector of functions.

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

◆ norm2s_T()

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

◆ norm_tree() [1/2]

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

◆ norm_tree() [2/2]

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, norm_tree(), PROFILE_BLOCK, and v.

◆ normalize()

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

◆ operator!=() [1/3]

bool madness::operator!= ( const DistributedID left,
const DistributedID right 
)
inline

Distributed ID inequality comparison operator.

Parameters
[in]leftThe first key to compare.
[in]rightThe second key to compare.
Returns
True when first or second of left and right are not equal; otherwise false.

◆ operator!=() [2/3]

bool madness::operator!= ( const QCCalculationParametersBase p1,
const QCCalculationParametersBase p2 
)

◆ operator!=() [3/3]

bool madness::madness::operator!= ( const ResponseParameters p1,
const ResponseParameters p2 
)

◆ operator*() [1/12]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::operator* ( const double  fac,
const std::vector< CCPairFunction< T, NDIM > > &  arg 
)

References arg().

◆ operator*() [2/12]

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_on_demand(), madness::Function< T, NDIM >::is_reconstructed(), MADNESS_ASSERT, mul(), and madness::Function< T, NDIM >::reconstruct().

◆ operator*() [3/12]

template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::operator* ( const Function< T, NDIM > &  a,
const std::vector< Function< R, NDIM > > &  v 
)

multiply a vector of functions with a function: r[i] = v[i] * a

References a, mul(), NDIM, R, T(), TENSOR_RESULT_TYPE, and v.

◆ operator*() [4/12]

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 alpha, f, and mul().

◆ operator*() [5/12]

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.

◆ operator*() [6/12]

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 alpha, f, and mul().

◆ operator*() [7/12]

template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::operator* ( const R  fac,
const std::vector< Function< T, NDIM > > &  rhs 
)

References copy(), NDIM, R, scale(), T(), and TENSOR_RESULT_TYPE.

◆ operator*() [8/12]

template<typename T , typename R , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator* ( const std::vector< Function< T, NDIM > > &  rhs,
const R  fac 
)

References copy(), NDIM, R, scale(), T(), and TENSOR_RESULT_TYPE.

◆ operator*() [9/12]

template<typename T , typename R , std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > madness::operator* ( const std::vector< Function< T, NDIM > > &  v,
const Function< R, NDIM > &  a 
)

multiply a vector of functions with a function: r[i] = a * v[i]

References a, mul(), NDIM, R, T(), TENSOR_RESULT_TYPE, and v.

◆ operator*() [10/12]

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

Scale a Vector.

Multiply the scalar value l by each Vector element.

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

References N.

◆ operator*() [11/12]

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

Multiply (element-wise) two Vectors.

Do an element-wise multiplication 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
[in]lThe left-hand Vector.
[in]rThe right-hand Vector.
Returns
A new Vector, c, where c[i]==(l[i]*r[i]).

References N.

◆ operator*() [12/12]

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

Scale a Vector.

Multiply each Vector element by the scalar value r.

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

References N.

◆ operator+() [1/9]

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(), VERIFY_TREE, and madness::Function< T, NDIM >::verify_tree().

◆ operator+() [2/9]

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 
)

References f, and R.

◆ operator+() [3/9]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator+ ( const Function< T, NDIM > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

result[i] = a + b[i]

References gaxpy_oop().

◆ operator+() [4/9]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::operator+ ( const std::vector< CCPairFunction< T, NDIM > >  c1,
const std::vector< CCPairFunction< T, NDIM > > &  c2 
)

◆ operator+() [5/9]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator+ ( const std::vector< Function< T, NDIM > > &  lhs,
const Function< T, NDIM > &  rhs 
)

result[i] = a[i] + b

References gaxpy_oop().

◆ operator+() [6/9]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator+ ( const std::vector< Function< T, NDIM > > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

result[i] = a[i] + b[i]

References gaxpy_oop(), and MADNESS_CHECK.

◆ operator+() [7/9]

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 
)

References f, and R.

◆ operator+() [8/9]

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

Add (element-wise) two Vectors.

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
[in]lThe left-hand Vector.
[in]rThe right-hand Vector.
Returns
A new Vector, c, where c[i]==(l[i]+r[i]).

References N.

◆ operator+() [9/9]

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
[in]lThe left-hand Vector.
[in]rThe right-hand scalar value to be added to the Vector.
Returns
A new Vector, c, where c[i]==(l[i]+r).

References N.

◆ operator+=() [1/3]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > & madness::operator+= ( std::vector< CCPairFunction< T, NDIM > > &  lhs,
const CCPairFunction< T, NDIM > &  rhs 
)

◆ operator+=() [2/3]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > & madness::operator+= ( std::vector< CCPairFunction< T, NDIM > > &  rhs,
const std::vector< CCPairFunction< T, NDIM > > &  lhs 
)

◆ operator+=() [3/3]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator+= ( std::vector< Function< T, NDIM > > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

References gaxpy(), and MADNESS_CHECK.

◆ operator-() [1/9]

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().

◆ operator-() [2/9]

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 
)

References f, and R.

◆ operator-() [3/9]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator- ( const Function< T, NDIM > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

result[i] = a - b[i]

References gaxpy_oop().

◆ operator-() [4/9]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > madness::operator- ( const std::vector< CCPairFunction< T, NDIM > >  c1,
const std::vector< CCPairFunction< T, NDIM > > &  c2 
)

◆ operator-() [5/9]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator- ( const std::vector< Function< T, NDIM > > &  lhs,
const Function< T, NDIM > &  rhs 
)

result[i] = a[i] - b

References gaxpy_oop().

◆ operator-() [6/9]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator- ( const std::vector< Function< T, NDIM > > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

result[i] = a[i] - b[i]

References gaxpy_oop(), and MADNESS_CHECK.

◆ operator-() [7/9]

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 
)

References f, and R.

◆ operator-() [8/9]

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

Subtract (element-wise) two Vectors.

Do an element-wise subtraction 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
[in]lThe left-hand Vector.
[in]rThe right-hand Vector.
Returns
A new Vector, c, where c[i]==(l[i]-r[i]).

References N.

◆ operator-() [9/9]

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
[in]lThe left-hand Vector.
[in]rThe right-hand scalar value to be added to the Vector.
Returns
A new Vector, c, where c[i]==(l[i]-r).

References N.

◆ operator-=() [1/2]

template<typename T , std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > & madness::operator-= ( std::vector< CCPairFunction< T, NDIM > > &  rhs,
const std::vector< CCPairFunction< T, NDIM > > &  lhs 
)

◆ operator-=() [2/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::operator-= ( std::vector< Function< T, NDIM > > &  lhs,
const std::vector< Function< T, NDIM > > &  rhs 
)

References gaxpy(), and MADNESS_CHECK.

◆ operator<<() [1/25]

std::ostream & madness::operator<< ( std::ostream &  os,
const DistributedID did 
)
inline

Overload redirect to std::ostream to be discoverable via ADL.

References madness::operators::operator<<().

◆ operator<<() [2/25]

std::ostream & madness::operator<< ( std::ostream &  os,
const EnergyType en 
)

◆ operator<<() [3/25]

std::ostream & madness::operator<< ( std::ostream &  os,
const GuessType en 
)

◆ operator<<() [4/25]

template<std::size_t N = 1>
std::ostream & madness::operator<< ( std::ostream &  os,
const OpType  type 
)

operator type to string

References name(), OT_BSH, OT_F12, OT_F212, OT_F2G12, OT_FG12, OT_G12, OT_GAUSS, OT_ONE, OT_SLATER, OT_UNDEFINED, and type().

◆ operator<<() [5/25]

std::ostream & madness::operator<< ( std::ostream &  os,
const PairType en 
)

◆ operator<<() [6/25]

template<std::size_t PDIM>
std::ostream & madness::operator<< ( std::ostream &  os,
const particle< PDIM > &  p 
)

References p().

◆ operator<<() [7/25]

std::ostream & madness::operator<< ( std::ostream &  os,
const permutation p 
)

References p().

◆ operator<<() [8/25]

template<typename Key , typename Tag >
std::ostream & madness::operator<< ( std::ostream &  os,
const ProcessKey< Key, Tag > &  key 
)
inline

Overload redirect to std::ostream to be discoverable via ADL.

References madness::ProcessKey< Key, Tag >::key(), and madness::ProcessKey< Key, Tag >::proc().

◆ operator<<() [9/25]

template<typename Key , typename Tag >
std::ostream & madness::operator<< ( std::ostream &  os,
const TaggedKey< Key, Tag > &  key 
)
inline

Overload redirect to std::ostream to be discoverable via ADL.

References madness::TaggedKey< Key, Tag >::key().

◆ operator<<() [10/25]

template<std::size_t NDIM = 1>
std::ostream & madness::operator<< ( std::ostream &  os,
const TreeState  treestate 
)

◆ operator<<() [11/25]

template<typename T >
std::ostream & madness::operator<< ( std::ostream &  out,
const Future< T > &  f 
)

Human readable printing of a Future to a stream.

Stream output operator for a future.

Template Parameters
TThe type of future.
Parameters
[in,out]outThe output stream.
[in]fThe future.
Returns
The output stream.
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
TDescription needed.
Parameters
[in,out]Theoutput stream.
[in]fThe future to be output.
Returns
The output stream.

◆ operator<<() [12/25]

template<>
std::ostream & madness::operator<< ( std::ostream &  out,
const Future< void > &  f 
)

Stream output operator for a void future.

Parameters
[in,out]outThe output stream.
[in]fThe future.
Returns
The output stream.

◆ operator<<() [13/25]

template<>
std::ostream & madness::operator<< ( std::ostream &  out,
const Future< void > &  f 
)

Stream output operator for a void future.

Parameters
[in,out]outThe output stream.
[in]fThe future.
Returns
The output stream.

◆ operator<<() [14/25]

std::ostream & madness::operator<< ( std::ostream &  out,
const MadnessException e 
)

Enables easy printing of a MadnessException.

Parameters
[in,out]outOutput stream.
[in]eThe MadnessException.
Returns
The output stream.

References e().

◆ operator<<() [15/25]

std::ostream & madness::operator<< ( std::ostream &  s,
const Atom atom 
)

◆ operator<<() [16/25]

std::ostream & madness::operator<< ( std::ostream &  s,
const AtomicBasis c 
)

References c.

◆ operator<<() [17/25]

std::ostream & madness::operator<< ( std::ostream &  s,
const AtomicBasisFunction a 
)

References a.

◆ operator<<() [18/25]

template<std::size_t NDIM>
static std::ostream & madness::operator<< ( std::ostream &  s,
const BoundaryConditions< NDIM > &  bc 
)
inlinestatic

◆ operator<<() [19/25]

template<typename T , std::size_t NDIM>
std::ostream & madness::operator<< ( std::ostream &  s,
const CoeffTracker< T, NDIM > &  ct 
)

◆ operator<<() [20/25]

std::ostream & madness::operator<< ( std::ostream &  s,
const ContractedGaussianShell c 
)

References bufsize, c, and p().

◆ operator<<() [21/25]

template<typename T , std::size_t NDIM>
std::ostream & madness::operator<< ( std::ostream &  s,
const FunctionNode< T, NDIM > &  node 
)

◆ operator<<() [22/25]

template<std::size_t NDIM>
std::ostream & madness::operator<< ( std::ostream &  s,
const Key< NDIM > &  key 
)

◆ operator<<() [23/25]

template<typename T >
static std::ostream & madness::operator<< ( std::ostream &  s,
const SRConf< T > &  sr 
)
inlinestatic

◆ operator<<() [24/25]

static std::ostream & madness::operator<< ( std::ostream &  s,
const TensorType tt 
)
inlinestatic

References TT_2D, TT_FULL, and TT_TENSORTRAIN.

◆ operator<<() [25/25]

std::ostream & madness::operator<< ( std::ostream &  stream,
const Slice s 
)

◆ operator==() [1/2]

bool madness::operator== ( const DistributedID left,
const DistributedID right 
)
inline

Distributed ID equality comparison operator.

Parameters
[in]leftThe first key to compare.
[in]rightThe second key to compare.
Returns
True when first and second of left and right are equal; otherwise false.

◆ operator==() [2/2]

bool madness::madness::operator== ( const ResponseParameters p1,
const ResponseParameters p2 
)

◆ operator>>() [1/5]

std::istream & madness::operator>> ( std::istream &  is,
EnergyType en 
)

◆ operator>>() [2/5]

std::istream & madness::operator>> ( std::istream &  is,
GuessType en 
)

◆ operator>>() [3/5]

std::istream & madness::operator>> ( std::istream &  is,
PairType en 
)

◆ operator>>() [4/5]

template<typename Q , typename T >
std::istream & madness::operator>> ( std::istream &  is,
std::pair< T, Q > &  p 
)

inverting the print method from print.h for std::vector TODO: move this where it belongs (into print.h ??)

References c, p(), print(), Q(), and T().

◆ operator>>() [5/5]

template<typename T , typename A = std::allocator<T>>
std::istream & madness::operator>> ( std::istream &  is,
std::vector< T, A > &  v 
)

inverting the print method from print.h for std::vector TODO: move this where it belongs (into print.h ??)

References c, check_for_inf(), print(), T(), and v.

◆ orgqr() [1/5]

template void madness::orgqr ( Tensor< complex_real4 > &  A,
const Tensor< complex_real4 > &  tau 
)

◆ orgqr() [2/5]

template void madness::orgqr ( Tensor< double > &  A,
const Tensor< double > &  tau 
)

◆ orgqr() [3/5]

template void madness::orgqr ( Tensor< double_complex > &  A,
const Tensor< double_complex > &  tau 
)

◆ orgqr() [4/5]

template void madness::orgqr ( Tensor< float > &  A,
const Tensor< float > &  tau 
)

◆ orgqr() [5/5]

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 k, m, mask_info(), orgqr_(), madness::Tensor< T >::ptr(), madness::BaseTensor::size(), T(), TENSOR_ASSERT, and transpose().

◆ ortho3()

template<typename T >
void madness::ortho3 ( Tensor< T > &  x,
Tensor< T > &  y,
Tensor< typename Tensor< T >::scalar_type > &  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]xnormalized left subspace
[in,out]ynormalize right subspace
[in,out]weightsweights
[in]threshtruncation threshold

References _(), std::abs(), madness::Tensor< T >::absmax(), madness::Tensor< T >::clear(), madness::BaseTensor::dim(), e1(), inner(), MADNESS_ASSERT, madness::SRConf< T >::max_sigma(), madness::Tensor< T >::screen(), madness::BaseTensor::size(), svd(), syev(), thresh, wall_time(), and weights.

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

◆ ortho5()

template<typename T >
void madness::ortho5 ( Tensor< T > &  x1,
Tensor< T > &  y1,
Tensor< typename Tensor< T >::scalar_type > &  w1,
const Tensor< T > &  x2,
const Tensor< T > &  y2,
const Tensor< typename Tensor< T >::scalar_type > &  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]x1left subspace, will hold the result on exit
[in,out]y1right subspace, will hold the result on exit
[in]x2left subspace, will be accumulated onto x1
[in]y2right subspace, will be accumulated onto y1

References _(), std::abs(), madness::Tensor< T >::absmax(), madness::Tensor< T >::clear(), copy(), madness::BaseTensor::dim(), e1(), madness::Tensor< T >::emul(), inner(), inner_result(), outer(), residual(), s0, madness::Tensor< T >::screen(), svd(), syev(), thresh, transpose(), and wall_time().

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

◆ orthonormalize()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize ( const std::vector< Function< T, NDIM > > &  vf_in)

◆ orthonormalize_canonical() [1/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_canonical ( const std::vector< Function< T, NDIM > > &  v,
const double  lindep 
)

convenience routine for canonical routine for symmetric orthonormalization (see e.g. Szabo/Ostlund) overlap matrix is calculated

Parameters
[in]thevector to orthonormalize

References matrix_inner(), orthonormalize_canonical(), and v.

◆ orthonormalize_canonical() [2/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_canonical ( const std::vector< Function< T, NDIM > > &  v,
const Tensor< T > &  ovlp,
double  lindep 
)

canonical orthonormalization (see e.g. Szabo/Ostlund)

Parameters
[in]thevector to orthonormalize
[in]overlapmatrix
[in]lindeplinear dependency threshold relative to largest eigenvalue

References _(), lo, MADNESS_ASSERT, syev(), transform(), and v.

Referenced by madness::Zcis::make_guess(), madness::LowRankFunction< T, NDIM, LDIM >::orthonormalize(), and orthonormalize_canonical().

◆ orthonormalize_cd() [1/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_cd ( const std::vector< Function< T, NDIM > > &  v)

convenience routine for cholesky orthonormalization without pivoting

Parameters
[in]thevector to orthonormalize
[in]overlapmatrix

References matrix_inner(), orthonormalize_cd(), and v.

◆ orthonormalize_cd() [2/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_cd ( const std::vector< Function< T, NDIM > > &  v,
Tensor< T > &  ovlp 
)

cholesky orthonormalization without pivoting

Parameters
[in]thevector to orthonormalize
[in]overlapmatrix, destroyed on return!

References cholesky(), inverse(), L, transform(), transpose(), and v.

Referenced by orthonormalize_cd().

◆ orthonormalize_rrcd() [1/3]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_rrcd ( const std::vector< Function< T, NDIM > > &  v,
const double  tol 
)

convenience routine for orthonromalize_cholesky: computes the overlap matrix and then calls orthonromalize_cholesky

Parameters
[in]thevector to orthonormalize
[in]tolerancefor numerical rank reduction

References matrix_inner(), orthonormalize_rrcd(), and v.

◆ orthonormalize_rrcd() [2/3]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_rrcd ( const std::vector< Function< T, NDIM > > &  v,
Tensor< T > &  ovlp,
const double  tol,
Tensor< integer > &  piv,
int &  rank 
)
Parameters
[in]thevector to orthonormalize
[in]overlapmatrix, will be destroyed on return!
[in]tolerancefor numerical rank reduction
[out]pivotingvector, no allocation on input needed
[out]rank
Returns
orthonrormalized vector (may or may not be truncated)

References inverse(), L, rr_cholesky(), transform(), transpose(), and v.

Referenced by madness::F12Potentials::compute_hylleraas_f12_energies(), madness::PNO::initialize_pairs(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::LowRankFunction< T, NDIM, LDIM >::orthonormalize(), orthonormalize_rrcd(), orthonormalize_rrcd(), and madness::LowRankFunctionFactory< T, NDIM, LDIM >::project().

◆ orthonormalize_rrcd() [3/3]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_rrcd ( const std::vector< Function< T, NDIM > > &  v,
Tensor< T ovlp,
const double  tol 
)

convenience routine for orthonromalize_cholesky: orthonromalize_cholesky without information on pivoting and rank

Parameters
[in]thevector to orthonormalize
[in]overlapmatrix
[in]tolerancefor numerical rank reduction

References orthonormalize_rrcd(), and v.

◆ orthonormalize_symmetric() [1/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_symmetric ( const std::vector< Function< T, NDIM > > &  v)

convenience routine for symmetric orthonormalization (see e.g. Szabo/Ostlund) overlap matrix is calculated

Parameters
[in]thevector to orthonormalize

References matrix_inner(), orthonormalize_symmetric(), and v.

◆ orthonormalize_symmetric() [2/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::orthonormalize_symmetric ( const std::vector< Function< T, NDIM > > &  v,
const Tensor< T > &  ovlp 
)

symmetric orthonormalization (see e.g. Szabo/Ostlund)

Parameters
[in]thevector to orthonormalize
[in]overlapmatrix

References inner(), syev(), transform(), transpose(), and v.

Referenced by orthonormalize_symmetric(), madness::MolecularOrbitals< T, NDIM >::project_ao(), test_projector(), and test_Q12_projector().

◆ outer() [1/4]

template<class T , class Q >
GenTensor< TENSOR_RESULT_TYPE(T, Q)> madness::outer ( const GenTensor< T > &  t1,
const GenTensor< Q > &  t2,
const TensorArgs  final_tensor_args = TensorArgs(-1.0,TT_2D) 
)

◆ outer() [2/4]

template<typename projT , typename projQ >
std::enable_if< std::is_base_of< ProjectorBase, projT >::value, OuterProjector< projT, projQ > >::type madness::outer ( const projT &  p0,
const projQ &  p1 
)

◆ outer() [3/4]

template<class T , class Q >
GenTensor< TENSOR_RESULT_TYPE(T, Q)> madness::outer ( const Tensor< T > &  lhs2,
const Tensor< Q > &  rhs2,
const TensorArgs  final_tensor_args 
)

outer product of two Tensors, yielding a low rank tensor

References MADNESS_EXCEPTION, outer(), Q(), T(), TENSOR_RESULT_TYPE, madness::TensorArgs::thresh, madness::TensorArgs::tt, TT_2D, TT_FULL, and TT_TENSORTRAIN.

◆ outer() [4/4]

template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> madness::outer ( const TensorTrain< T > &  t1,
const TensorTrain< Q > &  t2 
)

computes the outer product of two tensors

result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)

Returns
Returns a new tensor train

References copy(), madness::TensorTrain< T >::core, madness::BaseTensor::dim(), k1, k2, madness::BaseTensor::ndim(), Q(), T(), TENSOR_RESULT_TYPE, and madness::TensorTrain< T >::zero_rank.

◆ outer_result()

template<class T >
void madness::outer_result ( const Tensor< T > &  left,
const Tensor< T > &  right,
Tensor< T > &  result 
)

◆ parity()

static int madness::parity ( int  i)
inlinestatic

Return +1 if i is even, -1 if i is odd ... perverse no if-test form.

Referenced by read_data().

◆ partial_mul()

template<typename T , std::size_t NDIM, std::size_t LDIM>
std::vector< Function< T, NDIM > > madness::partial_mul ( const Function< T, NDIM f,
const std::vector< Function< T, LDIM > >  g,
const int  particle 
)

multiply a high-dimensional function with a low-dimensional function

Parameters
[in]fNDIM function of NDIM dimensions
[in]gLDIM function of LDIM
[in]vdimension indices of f to multiply
Returns
h[i](0,1,2,3) = f(0,1,2,3) * g[i](1,2,3) for v={1,2,3}

References madness::FunctionImpl< T, NDIM >::change_tree_state(), f, madness::WorldGopInterface::fence(), g, madness::World::gop, make_redundant(), madness::FunctionImpl< T, NDIM >::multiply(), redundant, and madness::FunctionImpl< T, NDIM >::undo_redundant().

◆ periodic_derivative()

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 axis, BC_PERIODIC, and k.

◆ PeriodicBSHOp()

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, madness::BaseTensor::dim(), k, L, lo, mu, NDIM, and pow().

◆ PeriodicBSHOperator3D()

static SeparatedConvolution< double_complex, 3 > madness::PeriodicBSHOperator3D ( World world,
Vector< double, 3 >  args,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.

References BC_PERIODIC, madness::GFit< T, NDIM >::BSHFit(), fit(), madness::FunctionDefaults< NDIM >::get_cell_width(), k, lo, madness::Tensor< T >::max(), mu, and madness::Tensor< T >::normf().

Referenced by apply_periodic_bsh().

◆ PeriodicBSHOperatorPtr3D()

static SeparatedConvolution< double_complex, 3 > * madness::PeriodicBSHOperatorPtr3D ( World world,
Vector< double, 3 >  args,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.

References BC_PERIODIC, madness::GFit< T, NDIM >::BSHFit(), fit(), madness::FunctionDefaults< NDIM >::get_cell_width(), k, lo, madness::Tensor< T >::max(), mu, and madness::Tensor< T >::normf().

Referenced by KPeriodicBSHOperator::apply().

◆ PeriodicBSHOpPtr()

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, madness::BaseTensor::dim(), k, L, lo, mu, NDIM, and pow().

◆ PeriodicCoulombOp()

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

◆ PeriodicCoulombOpPtr()

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

◆ PeriodicHFExchangeOperator()

static SeparatedConvolution< double_complex, 3 > madness::PeriodicHFExchangeOperator ( World world,
Vector< double, 3 >  args,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

◆ pg_c2()

static pg_operator madness::pg_c2 ( )
inlinestatic

◆ pg_c2x()

static pg_operator madness::pg_c2x ( )
inlinestatic

◆ pg_c2y()

static pg_operator madness::pg_c2y ( )
inlinestatic

◆ pg_c2z()

static pg_operator madness::pg_c2z ( )
inlinestatic

◆ pg_c4()

static pg_operator madness::pg_c4 ( )
inlinestatic

◆ pg_c4x()

static pg_operator madness::pg_c4x ( )
inlinestatic

◆ pg_c4y()

static pg_operator madness::pg_c4y ( )
inlinestatic

◆ pg_c4z()

static pg_operator madness::pg_c4z ( )
inlinestatic

◆ pg_identity()

static pg_operator madness::pg_identity ( )
inlinestatic

◆ pg_inversion()

static pg_operator madness::pg_inversion ( )
inlinestatic

◆ pg_sigma_x()

static pg_operator madness::pg_sigma_x ( )
inlinestatic

◆ pg_sigma_xy()

static pg_operator madness::pg_sigma_xy ( )
inlinestatic

◆ pg_sigma_xz()

static pg_operator madness::pg_sigma_xz ( )
inlinestatic

◆ pg_sigma_y()

static pg_operator madness::pg_sigma_y ( )
inlinestatic

◆ pg_sigma_yz()

static pg_operator madness::pg_sigma_yz ( )
inlinestatic

◆ phase()

static double madness::phase ( long  i)
inlinestatic

◆ plot()

template<size_t NDIM>
void madness::plot ( const std::vector< Function< double, NDIM > > &  vf,
const std::string &  name,
const std::vector< std::string > &  header 
)

convenience to get plot_plane and plot_cubefile

References name().

Referenced by madness::TDHF::plot().

◆ plot_along() [1/2]

template<size_t NDIM>
void madness::plot_along ( World world,
trajectory< NDIM traj,
const Function< double, NDIM > &  function,
std::string  filename 
)

◆ plot_along() [2/2]

template<size_t NDIM>
void madness::plot_along ( World world,
trajectory< NDIM traj,
double(*)(const Vector< double, NDIM > &)  ff,
std::string  filename 
)

◆ plot_cubefile()

template<size_t NDIM>
std::enable_if< NDIM==3, void >::type madness::plot_cubefile ( World world,
const Function< double, NDIM > &  f,
std::string  filename,
std::vector< std::string >  molecular_info = std::vector<std::string>(),
int  npoints = 100,
double  zoom = 1.0 
)

◆ plot_line() [1/6]

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 
)

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

The ordinate is distance from lo

References f, madness::WorldGopInterface::fence(), filename, madness::World::gop, h(), lo, MADNESS_EXCEPTION, NDIM, plot_line_print_value(), madness::World::rank(), and sum.

◆ plot_line() [2/6]

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 
)

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

The ordinate is distance from lo

References f, madness::WorldGopInterface::fence(), filename, g, madness::World::gop, h(), lo, MADNESS_EXCEPTION, NDIM, plot_line_print_value(), madness::World::rank(), and sum.

◆ plot_line() [3/6]

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 a, f, madness::WorldGopInterface::fence(), filename, g, madness::World::gop, h(), lo, MADNESS_EXCEPTION, NDIM, plot_line_print_value(), madness::World::rank(), and sum.

◆ plot_line() [4/6]

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 a, b, f, madness::WorldGopInterface::fence(), filename, g, madness::World::gop, h(), lo, NDIM, plot_line_print_value(), madness::World::rank(), and sum.

◆ plot_line() [5/6]

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 std::vector< Function< T, NDIM > > &  vf 
)

◆ plot_line() [6/6]

template<typename opT , std::size_t NDIM>
void madness::plot_line ( World world,
const char *  filename,
int  npt,
const Vector< double, NDIM > &  lo,
const Vector< double, NDIM > &  hi,
const opT &  op 
)

◆ plot_line_print_value() [1/2]

static void madness::plot_line_print_value ( FILE *  f,
double  v 
)
inlinestatic

References f, and v.

◆ plot_line_print_value() [2/2]

static void madness::plot_line_print_value ( FILE *  f,
double_complex  v 
)
inlinestatic

◆ plot_plane() [1/6]

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

◆ plot_plane() [2/6]

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

References name(), and plot_plane().

◆ plot_plane() [3/6]

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

References name(), and plot_plane().

◆ plot_plane() [4/6]

template<size_t NDIM, typename opT >
void madness::plot_plane ( World world,
const opT &  op,
const std::string  name,
const PlotParameters  param 
)

◆ plot_plane() [5/6]

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

plot a 2-d slice of a given function and the according MRA structure

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]vfunctionthe function to plot
[in]namethe output name

References c, f, filename, madness::FunctionDefaults< NDIM >::get_cell_width(), lo, MADNESS_ASSERT, MADNESS_EXCEPTION, name(), NDIM, param, madness::World::rank(), scale(), and madness::World::size().

◆ plot_plane() [6/6]

template<size_t NDIM>
void madness::plot_plane ( World world,
const std::vector< Function< double, NDIM > > &  vfunction,
const std::string  name,
const std::string  inputfile = "input" 
)

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]vfunctionthe function to plot
[in]namethe output name

References f, filename, madness::FunctionDefaults< NDIM >::get_cell_width(), lo, MADNESS_ASSERT, MADNESS_EXCEPTION, name(), NDIM, position_stream_to_word(), print(), madness::World::rank(), scale(), and madness::World::size().

◆ plotdx()

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, d, dxprintvalue(), f, madness::WorldGopInterface::fence(), filename, function(), madness::World::gop, h(), MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, madness::Tensor< T >::ptr(), madness::World::rank(), madness::BaseTensor::size(), and T().

Referenced by madness::SCF::do_plots(), Plotter::dovolumeplot(), madness::Solver< T, NDIM >::initial_guess(), main(), madness::Solver< T, NDIM >::solve(), test_plot(), and testPeriodicCoulomb3d().

◆ plotpovray()

template<typename T >
static void madness::plotpovray ( const Function< T, 3 > &  function,
const char *  filename,
const Tensor< double > &  cell = FunctionDefaults<3>::get_cell(),
const std::vector< long > &  npt = std::vector<long>(3,201L) 
)
static

Writes a Povray DF3 format file with a cube of points on a uniform grid.

Collective operation but only process 0 writes the file. By convention Povray files end in ".df3" but this choice is up to the user. The dynamic range of function values is mapped onto [0,1] and values stored in 16-bit fixed precision.

References d, f, filename, function(), madness::detail::htons_x(), MADNESS_ASSERT, MADNESS_EXCEPTION, madness::Tensor< T >::max(), madness::Tensor< T >::min(), and madness::World::rank().

Referenced by main().

◆ plotvtk_begin()

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 f, madness::WorldGopInterface::fence(), filename, madness::World::gop, MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, and madness::World::rank().

Referenced by Plotter::dovolumeplot(), Plotter::dovolumeplot(), and testNavierStokes().

◆ plotvtk_data() [1/3]

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(), f, madness::WorldGopInterface::fence(), filename, function(), madness::World::gop, imag(), MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, madness::World::rank(), and real().

◆ plotvtk_data() [2/3]

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(), f, madness::WorldGopInterface::fence(), filename, function(), madness::World::gop, MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, and madness::World::rank().

◆ plotvtk_data() [3/3]

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 Plotter::dovolumeplot(), Plotter::dovolumeplot(), and testNavierStokes().

◆ plotvtk_end()

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 f, madness::WorldGopInterface::fence(), filename, madness::World::gop, MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, PROFILE_FUNC, and madness::World::rank().

◆ PM_q()

static double madness::PM_q ( const tensorT S,
const double *MADNESS_RESTRICT  Ci,
const double *MADNESS_RESTRICT  Cj,
int  lo,
int  nbf 
)
inlinestatic

◆ pop()

static double madness::pop ( std::vector< double > &  v)
static

◆ position_stream()

std::istream & madness::position_stream ( std::istream &  f,
const std::string &  tag,
bool  rewind = true 
)

◆ position_stream_to_word()

std::istream & madness::position_stream_to_word ( std::istream &  f,
const std::string &  tag,
const char  comment,
bool  rewind,
bool  silent 
)

position the input stream to tag, which must be a word (not part of a word)

Parameters
finput stream
tagthe word to look for
commenta comment character for (parts of) a line
rewindrewind to the beginning of the stream
silentthrows if not successful, but doesn't print error message
Returns
a stream

References errmsg(), f, and MADNESS_EXCEPTION.

Referenced by plot_plane(), madness::Molecule::position_stream_in_library(), and madness::QCCalculationParametersBase::read_internal().

◆ power() [1/2]

template<int D>
int madness::power ( int  base = 2)
inline

◆ power() [2/2]

template<int N, class T >
T madness::power ( T const  x)

◆ power< 0 >()

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

◆ power< 1 >()

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

◆ power< 10 >()

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

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

◆ power< 12 >()

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

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

◆ power< 2 >()

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

◆ power< 3 >()

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

◆ power< 4 >()

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

◆ power< 5 >()

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

◆ power< 6 >()

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

◆ power< 7 >()

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

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

◆ power< 8 >()

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

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

◆ power< 9 >()

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

References power< 3 >().

◆ print()

template<typename T , typename... Ts>
void madness::print ( const T t,
const Ts &...  ts 
)

Print items to std::cout (items separated by spaces) and terminate with a new line.

The first item is printed here so that it isn't preceded by a space.

Template Parameters
TType of the first item to be printed.
TsArgument pack type for the items to be printed.
Parameters
[in]tThe first item to be printed.
[in]tsThe remaining items to be printed in the argument pack.

References ENDL, print_helper(), and madness::detail::printmutex.

Referenced by madness::cartesian_grid< NDIM >::cartesian_grid(), madness::DependencyInterface::DependencyInterface(), DF::DF(), madness::dftgrid< NDIM >::dftgrid(), DipoleVector::DipoleVector(), EwaldNuclearPotentialFunctor::EwaldNuclearPotentialFunctor(), madness::GaussSlater::GaussSlater(), madness::GFit< T, NDIM >::GFit(), madness::GradientalGaussSlater::GradientalGaussSlater(), GridBuilder::GridBuilder(), madness::LinearSlater::LinearSlater(), MolecularNuclearChargeDensityFunctor::MolecularNuclearChargeDensityFunctor(), MolecularNuclearPotentialFunctor2::MolecularNuclearPotentialFunctor2(), madness::MP2::MP2(), NuclearVector::NuclearVector(), madness::poly4erfc::poly4erfc(), madness::Polynomial< N >::Polynomial(), madness::Slater::Slater(), TestBarrier::TestBarrier(), TestSystolicMatrixAlgorithm< T >::TestSystolicMatrixAlgorithm(), TimeBarrier::TimeBarrier(), madness::Zcis::Zcis(), B::~B(), madness::DependencyInterface::~DependencyInterface(), madness::FutureImpl< T >::~FutureImpl(), madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), madness::MP2::add_local_coupling(), madness::detail::RemoteCounterBase::add_ref(), madness::Znemo::analyze(), LProjector::analyze(), madness::TDHF::analyze(), apply(), apply_bsh(), madness::projector_irrep::apply_symmetry_operators(), apply_U_mix(), apply_U_ncf(), madness::MP2::asymmetry(), madness::GFit< T, NDIM >::bsh_fit(), madness::GFit< T, NDIM >::bsh_fit_ndim(), madness::GFit< T, NDIM >::BSHFit(), BSHOperator(), BSHOperatorPtr(), madness::Solver< T, NDIM >::build_fock_matrix(), check(), check(), madness::TDHF::check_consistency(), madness::NemoBase::check_convergence(), madness::MP2::check_core_valence_separation(), madness::Localizer::check_core_valence_separation(), check_err(), check_linear_dependence(), check_multiplication_table_c2v(), check_operator_multiplications_2d(), check_operator_multiplications_3d(), madness::LowRankFunction< T, NDIM, LDIM >::check_orthonormality(), madness::PNO::check_orthonormality(), check_small(), madness::Function< T, NDIM >::check_symmetry(), madness::QCCalculationParametersBase::check_type(), check_vector(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), compare_calc_and_mos(), madness::Zcis::compare_to_file(), madness::FunctionImpl< T, NDIM >::compress_spawn(), madness::Nemo::compute_all_cphf(), madness::OEP::compute_and_print_final_energies(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), madness::Znemo::compute_current_density(), madness::Znemo::compute_energy(), compute_energy(), compute_energy(), compute_energy(), compute_energy_simple(), compute_energy_with_U(), compute_frequencies(), madness::MP2::compute_gQf(), madness::Localizer::compute_localization_matrix(), madness::MP3::compute_mp3_cd(), madness::MP3::compute_mp3_cd(), madness::MP3::compute_mp3_ef(), madness::MP3::compute_mp3_ghij(), madness::MP3::compute_mp3_ghij(), madness::MP3::compute_mp3_ghij_fast(), madness::MP3::compute_mp3_klmn(), compute_R2f2_psi(), madness::SVDTensor< T >::compute_randomized_svd(), madness::SCF::compute_residual(), madness::Znemo::compute_residuals(), madness::Zcis::compute_residuals(), converge(), converge(), converge2s(), TestSystolicMatrixAlgorithm< T >::converged(), madness::GenTensor< T >::convert_inplace(), madness::PotentialManager::core_projection(), create_nuclear_correlation_factor(), madness::Solver< T, NDIM >::csqrt(), madness::Znemo::custom_guess(), madness::DependencyInterface::dec_debug(), madness::TensorTrain< T >::decompose(), madness::QCPropertyInterface::density(), madness::SCF::derivatives(), madness::detail::RemoteCounter::destroy(), madness::Localizer::determine_frozen_orbitals(), DF::DF_load_balance(), DF::diagonalize(), madness::SCF::dipole(), dipole_generator(), dnuclear_anchor_test(), madness::Cloud::do_load(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), madness::SCF::do_step_restriction(), MiniDFT::doit(), doit(), doplot(), eigenvector_test(), energy(), energy(), energy(), madness::MP2::enforce_core_valence_separation(), madness::CC2::enforce_core_valence_separation(), madness::TDHF::enforce_core_valence_separation(), GygiPot::ESP(), madness::XCfunctional::exc(), DF::exchange(), exchange_anchor_test(), exchange_anchor_test(), madness::GFit< T, NDIM >::F12Fit(), madness::GFit< T, NDIM >::F12sqFit(), madness::GFit< T, NDIM >::F2GFit(), madness::WorldGopInterface::fence_impl(), madness::GFit< T, NDIM >::FGFit(), fixphases(), fixphases(), TTT::fred(), from_json(), Mary::galahad(), gauss_legendre_test(), madness::GFit< T, NDIM >::GaussFit(), gen_ce(), generate_G_vectors(), generate_R_vectors(), madness::MP2::get_fock_matrix(), madness::randomgrid< NDIM >::get_grid(), madness::molecular_grid< NDIM >::get_grid(), madness::Znemo::get_initial_orbitals(), madness::QCCalculationParametersBase::get_parameter(), madness::MP2::get_residue(), madness::Nemo::gradient(), madness::Znemo::gradient(), ground_exchange(), madness::SCF::group_orbital_sets(), madness::BasisFunctions::guess_contracted_virtuals_from_file(), madness::MP2::guess_mp1_3(), madness::BasisFunctions::guess_virtuals_from_file(), madness::BasisFunctions::guess_virtuals_internal(), hartree_product(), madness::Znemo::hcore_guess(), DF::help(), madness::CC2::help(), madness::MP2::help(), madness::Nemo::help(), madness::OEP::help(), madness::PNO::help(), madness::SCF::help(), madness::TDHF::help(), madness::Zcis::help(), madness::Znemo::help(), madness::Nemo::hessian(), madness::DependencyInterface::inc_debug(), madness::MP2::increment(), madness::CCConvolutionOperator< T, NDIM >::init_op(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), initial_guess(), initial_loadbal(), madness::SCFProtocol::initialize(), data< T, NDIM >::initialize(), madness::CC2::initialize_pairs(), madness::CC2::initialize_singles(), inner(), madness::Znemo::iterate(), madness::OEP::iterate(), madness::Zcis::iterate(), iterate(), iterate(), iterate(), iterate(), DF::iterate(), iterate(), iterate(), iterate(), iterate_excite(), iterate_ground(), iterate_ground(), madness::CC2::iterate_lrcc2_pairs(), madness::PNO::iterate_pairs_internal(), madness::CC2::iterate_singles(), iterate_xy(), iterate_xy(), KAIN(), madness::Nemo::kinetic_energy_potential(), madness::LowRankFunction< T, NDIM, LDIM >::l2error(), QuasiNewton::line_search(), madness::QuasiNewton::line_search(), madness::detail::RemoteCounter::load_(), madness::LoadBalanceDeux< NDIM >::load_balance(), load_balance(), madness::Cloud::load_from_cache(), madness::MP2::load_function(), madness::Nemo::load_function(), load_function(), load_function(), madness::SCF::load_mos(), madness::CCPair::load_pair(), madness::ElectronPair::load_pair(), madness::OEP::load_restartdata(), loadbal(), loadbal(), loadbal(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), main(), main(), main(), madness::ThreadBase::main(), TestCalculationParameters::make_all_parameter_doubles(), TestCalculationParameters::make_all_parameter_singles(), madness::SCF::make_bsh_operators(), make_dimensions(), DF::make_fermi_potential(), DF::make_gaussian_potential(), DF::make_gaussian_potential(), GridBuilder::make_grid(), madness::Zcis::make_guess(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::MP2::make_KffKphi0(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), madness::Solver< T, NDIM >::make_nuclear_potential(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::MP2::make_Uphi0(), makeao(), molresponseExchange(), moments(), madness::MP3::mp3_energy_contribution(), madness::MP3::mp3_energy_contribution_macrotask_driver(), madness::MP3::mp3_test(), madness::QCPropertyInterface::multipole_moment(), madness::QCPropertyInterface::no_cusp_density(), madness::QCPropertyInterface::no_cusp_spindensity(), madness::CCPairFunction< T, NDIM >::norm2(), nuclear_anchor_test(), madness::QCPropertyInterface::nuclear_derivative(), madness::CCPairFunction< T, NDIM >::op_dec_to_dec(), LProjector::operator()(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::operator()(), MicroTask::operator()(), madness::BSHApply< T, NDIM >::operator()(), madness::ParametrizedExchange::operator()(), madness::TwoElectronInterface< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), BoysLocalization::operator()(), madness::SliceLowRankTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), operator>>(), operator>>(), SteepestDescent::optimize(), QuasiNewton::optimize(), madness::SteepestDescent::optimize(), madness::QuasiNewton::optimize(), madness::MolecularOptimizer::optimize_quasi_newton(), madness::Molecule::orient(), orth(), madness::LowRankFunction< T, NDIM, LDIM >::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), madness::LBDeuxPmap< NDIM >::owner(), SurfaceMoleculeInteraction::perturbed_molecular_pot(), Foo::ping(), Foo::ping_am(), madness::BandlimitedPropagator::plot(), plot_plane(), plot_symmetry_operators(), madness::PNO::pno_compress(), Foo::pong(), Foo::pong_am(), pounder(), preloadbal(), madness::XCOperator< T, NDIM >::prep_xc_args_response(), madness::MolecularOrbitals< T, NDIM >::pretty_print(), Metric::print(), ExactSpinor::print(), madness::LBDeuxPmap< NDIM >::print(), madness::MyPmap< D >::print(), madness::QCCalculationParametersBase::print(), madness::PairVectorMap::print(), madness::Timer::print(), MatrixOperator::print(), madness::projector_irrep::print_character_table(), madness::scf_data::print_data(), madness::WorldDCPmapInterface< keyT >::print_data_sizes(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::MolecularOrbitals< T, NDIM >::print_frozen_orbitals(), print_header1(), print_header2(), print_header3(), madness::Diamagnetic_potential_factor::print_info(), madness::Localizer::print_info(), madness::projector_irrep::print_info(), madness::MacroTask< taskT >::MacroTaskInternal::print_me(), madness::MacroTaskBase::print_me_as_table(), madness::MacroTask< taskT >::MacroTaskInternal::print_me_as_table(), DF::print_molecule(), Spinor::print_norms(), madness::F12Potentials::print_pair_energies(), DF::print_parameters(), madness::CC2::print_parameters(), madness::Molecule::print_parameters(), madness::MP2::print_parameters(), madness::Nemo::print_parameters(), madness::OEP::print_parameters(), madness::PNO::print_parameters(), madness::SCF::print_parameters(), madness::TDHF::print_parameters(), madness::Zcis::print_parameters(), madness::Znemo::print_parameters(), madness::DFParameters::print_params(), madness::InitParameters::print_params(), GroundStateCalculation::print_params(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), print_seq(), print_seq(), print_seq(), print_seq(), madness::FunctionImpl< T, NDIM >::print_size(), madness::Function< T, NDIM >::print_size(), madness::CCPairFunction< T, NDIM >::print_size(), madness::Cloud::print_size(), DF::print_sizes(), madness::FunctionImpl< T, NDIM >::print_stats(), madness::MacroTaskQ::print_taskq(), madness::Cloud::print_timings(), madness::LoadBalanceDeux< NDIM >::print_tree(), madness::TDHF::print_xfunctions(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project(), madness::MolecularOptimizer::projector_external_dof(), propagate(), propagate(), propagate(), madness::Nemo::purify_hessian(), madness::TensorTrain< T >::ranks(), Plotter::read(), GroundStateCalculation::read(), madness::InitParameters::read(), madness::Znemo::read_complex_guess(), madness::Molecule::read_core_file(), madness::Znemo::read_explicit_guess_functions(), madness::CorePotentialManager::read_file(), madness::FunctionImpl< T, NDIM >::read_grid(), madness::FunctionImpl< T, NDIM >::read_grid2(), madness::Zcis::read_guess(), madness::QCCalculationParametersBase::read_input_and_commandline_options(), madness::QCCalculationParametersBase::read_internal(), madness::Znemo::read_real_guess(), madness::Znemo::read_reference(), madness::Znemo::read_restartaodata(), madness::MolecularOrbitals< T, NDIM >::read_restartaodata(), read_test_data(), madness::InitParameters::readnw(), madness::Znemo::recompute_factors_and_potentials(), madness::MolecularOrbitals< T, NDIM >::recompute_irreps(), reconstruct_psi(), madness::FunctionImpl< T, NDIM >::recursive_apply(), madness::projector_irrep::reduce(), madness::DependencyInterface::register_callback(), madness::DependencyInterface::register_final_callback(), madness::detail::RemoteCounter::register_ptr_(), madness::detail::RemoteCounterBase::release(), madness::SCF::restart_aos(), madness::MacroTask< taskT >::MacroTaskInternal::run(), run(), TestTask::run(), run(), TestBarrier::run(), madness::MacroTaskQ::run_all(), run_all_calculations(), madness::MP2::save_function(), save_function(), madness::Nemo::save_function(), save_function(), save_function(), madness::Zcis::save_guess(), madness::Znemo::save_orbitals(), madness::OEP::save_restartdata(), DF::saveDF(), madness::OEP::selftest(), madness::FunctionNode< T, NDIM >::set_coeff(), madness::Molecule::GeometryParameters::set_derived_values(), madness::XCOperator< T, NDIM >::set_extra_truncation(), madness::Function< T, NDIM >::set_functor(), madness::projector_irrep::set_irrep(), madness::projector_irrep::set_ordering(), madness::SCF::set_protocol(), show_norms(), simple_example(), madness::GFit< T, NDIM >::SlaterFit(), madness::Solver< T, NDIM >::solve(), SVPESolver::solve(), madness::Nemo::solve(), madness::OEP::solve(), madness::SpectralPropagator::solve(), madness::PNO::solve(), DF::solve(), madness::SCF::solve(), solve(), madness::CC2::solve_cc2(), madness::TDHF::solve_cis(), madness::Nemo::solve_cphf(), madness::CC2::solve_mp2_coupled(), DF::solve_occupied(), madness::MP2::solve_residual_equations(), madness::QCPropertyInterface::spindensity(), squareit(), startup(), madness::SpectralPropagatorGaussLobatto::step(), madness::SpectralPropagator::step(), madness::Solver< T, NDIM >::step_restriction(), madness::archive::BufferOutputArchive::store(), madness::Cloud::store(), madness::detail::RemoteCounter::store_(), su_complex(), symmetrize(), madness::Molecule::symmetrize_and_identify_point_group(), madness::PNO::t_solve(), madness::IndexIterator::test(), madness::Znemo::test(), test(), madness::TDHF::test(), test(), test(), test0(), test0GaussLobatto(), test1(), test10(), test11(), test12(), test13(), test14(), test15(), test2(), test2(), test5(), test6(), test6a(), Test7(), test7(), test8(), test9(), test_2d_partitioning(), test_adaptive_tree(), test_add(), test_add(), test_addition(), test_apply(), test_apply_push_1d(), test_arithmetic(), test_asymmetric(), test_basic(), test_batch(), test_batch_1D(), test_bsh(), test_capitalization(), test_chin_chen(), test_combined_operators(), test_comment_lines(), test_compress(), madness::Znemo::test_compute_current_density(), test_consolidate(), test_construction_optimization(), test_constructor(), test_conv(), test_converged_function(), test_conversion(), test_convert(), test_convolution(), test_coulomb(), test_cross(), test_custom_worldobject(), test_deferred(), test_derived(), test_diff(), test_dnuclear(), test_dot(), test_empty_lines(), test_emul(), test_ethylene(), test_exchange(), test_exchange(), test_exchange(), test_florian(), test_fock(), test_full_rank_functor(), test_G_R_vectors(), test_gaussian_num_coeffs(), test_gconv(), test_general_transform(), test_hartree_product(), test_hermiticity(), test_hf_be(), test_hydro(), test_immediate(), test_inner(), test_inner(), test_inner(), test_inner(), test_integration(), test_io(), test_Kcommutator(), test_kinetic(), madness::Znemo::test_landau_wave_function(), test_lda(), test_local(), test_lowrank_function(), test_math(), test_matrix_mul_sparse(), madness::Diamagnetic_potential_factor::test_me(), test_modified(), test_molecular_grid(), test_multi(), test_multi_to_multi_op(), test_multiply(), test_ne_boys(), test_nemo(), test_norm(), test_not_allowed(), test_nuclear(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_op(), test_opdir(), test_operator_apply(), test_orthogonalization(), test_partial_inner(), test_partial_inner_3d(), test_partial_inner_6d(), test_partitioner(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_plot(), test_proj(), test_projector(), test_projector(), test_projector_outer(), test_Q12_projector(), test_qm(), test_reconstruct(), test_recursive_application(), test_reduce_rank(), test_rot(), test_same(), test_scalar_multiplication(), test_scalar_task(), test_slater_exchange(), test_sliced_addition(), test_sliced_assignment(), test_smooth_maxout(), test_spherical_box(), test_stuff(), test_swap_particles(), test_task1(), test_tight_diffuse(), test_trailing_characters(), test_transform(), test_trotter(), test_truncation(), test_twice(), test_type_conversion1(), test_type_conversion2(), test_type_conversion3(), test_type_conversion4(), test_type_conversion5(), test_type_conversion6(), test_type_conversion7(), test_type_conversion8(), test_U_el(), test_unaryop(), test_vector_composite(), test_vector_of_scalar_task(), test_xcfunctional(), test_XCOperator(), testbsh(), testgradG(), testNavierStokes(), madness::scf_data::to_json(), trotter(), trotter(), trotter(), madness::QCCalculationParametersBase::try_setting_user_defined_value(), madness::NuclearCorrelationFactor::U2X_spherical(), madness::NonlinearSolverND< NDIM >::update(), madness::XNonlinearSolver< T, C, Alloc >::update(), update(), MiniDFT::update(), madness::PNO::update_pno(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), madness::SCF::update_subspace(), madness::MP2::value(), madness::Nemo::value(), madness::gridbase::visualize(), madness::XCfunctional::vxc(), and walker2().

◆ print_centered()

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().

Referenced by main().

◆ print_error()

template<typename T , typename... Ts>
void madness::print_error ( const T t,
const Ts &...  ts 
)

Print items to std::cerr (items separated by spaces) and terminate with a new line.

The first item is printed here so that it isn't preceded by a space.

Template Parameters
TType of the first item to be printed.
TsArgument pack type for the items to be printed.
Parameters
[in]tThe first item to be printed.
[in]tsThe remaining items to be printed in the argument pack.

References ENDL, print_helper(), and madness::detail::printmutex.

Referenced by madness::RMI::RmiTask::RmiTask(), madness::RMI::RmiTask::exit(), madness::RMI::isend(), and madness::RMI::RmiTask::process_some().

◆ print_header1()

void madness::print_header1 ( const std::string &  s)

◆ print_header2()

void madness::print_header2 ( const std::string &  s)

◆ print_header3()

void madness::print_header3 ( const std::string &  s)

◆ print_helper() [1/2]

std::ostream & madness::print_helper ( std::ostream &  out)
inline

Helper function for print. Base case.

This gets called recursively when there are no items left to print.

Parameters
[in,out]outOutput stream.
Returns
The output stream (for chaining).

Referenced by print(), print_error(), and print_helper().

◆ print_helper() [2/2]

template<typename T , typename... Ts>
std::ostream & madness::print_helper ( std::ostream &  out,
const T t,
const Ts &...  ts 
)
inline

Helper function for print. Prints the first item (t) and recursively passes on the other items.

Template Parameters
TType of the item to print in this call.
TsArgument pack type for the remaining items.
Parameters
[in,out]outOutput stream.
[in]tThe item to print in this call.
[in]tsThe remaining items in the argument pack (they get recursively passed on).
Returns
The output stream (for chaining).

References print_helper().

◆ 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().

◆ print_meminfo()

template<typename String >
void madness::print_meminfo ( int  rank,
const String &  tag,
const std::string  filename_prefix = std::string("MEMORY"),
bool  verbose = false 
)

print aggregate memory stats to file filename_prefix.<rank> , tagged with tag

Parameters
[in]rankprocess rank
[in]tagrecord tag as any string type, e.g. const char[] , std::string , or std::wstring
[in]filename_prefixfile name prefix; the default value is "MEMORY"
[in]verboseif true, will produce verbose output; is only currently used if TCMalloc is used
Note
To make print_meminfo() usable must set the ENABLE_MEM_PROFILE CMake cache variable to ON; this makes print_meminfo() enabled by default. To disable/enable programmatically use print_meminfo_disable()/print_meminfo_enable() .
must set global locale properly with std::locale::global() if tag has nontrivial encoding
Warning
this does not fence, it is up to the user to ensure proper synchronization

References filename, print_meminfo_enabled(), print_meminfo_keep_ostream_open(), print_meminfo_ostream(), and madness::detail::Vm_cstr< char >().

Referenced by madness::SCF::apply_potential(), madness::SCF::initial_guess(), main(), MiniDFT::makeao(), and madness::SCF::solve().

◆ print_meminfo_disable()

void madness::print_meminfo_disable ( )

disables print_meminfo() profiling (i.e. calling it is a no-op)

References madness::detail::print_meminfo_flag_accessor().

◆ print_meminfo_enable()

void madness::print_meminfo_enable ( )

enables print_meminfo() profiling

Note
print_meminfo() profiling is on by default.

References madness::detail::print_meminfo_flag_accessor().

◆ print_meminfo_enabled()

bool madness::print_meminfo_enabled ( )
Returns
true if print_meminfo() will generate profiling data.

References madness::detail::print_meminfo_flag_accessor().

Referenced by print_meminfo().

◆ print_meminfo_keep_ostream_open() [1/2]

bool madness::print_meminfo_keep_ostream_open ( )
Returns
true if the stream used by print_meminfo() is open between calls

References madness::detail::print_meminfo_keepstreamopen_accessor().

Referenced by print_meminfo(), and print_meminfo_ostream().

◆ print_meminfo_keep_ostream_open() [2/2]

void madness::print_meminfo_keep_ostream_open ( bool  keep_open)
Parameters
[in]keep_openif true, the stream used by print_meminfo() will be kept open
Note
by default the stream is opened and closed every time

References madness::detail::print_meminfo_keepstreamopen_accessor().

◆ print_meminfo_ostream()

std::basic_ofstream< wchar_t > & madness::print_meminfo_ostream ( int  rank = -1,
const std::string  filename_prefix = std::string("") 
)
Parameters
[in]rankprocess rank; the default is -1
[in]filename_prefixfile name prefix; the default is empty string
Returns
open stream used by print_meminfo()
Exceptions
std::runtime_errorif:
  • print_meminfo_keep_ostream_open() returns false, or
  • called for the first time with default values of rank or filename_prefix , or
  • if this was previously called with different values of rank or filename_prefix

References filename, and print_meminfo_keep_ostream_open().

Referenced by print_meminfo().

◆ print_seq() [1/4]

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

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

Collective, no fence.

Template Parameters
AType of data 1.
Parameters
[in]worldThe World object.
[in]aData 1.

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

◆ print_seq() [2/4]

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.

Template Parameters
AType of data 1.
BType of data 2.
Parameters
[in]worldThe World object.
[in]aData 1.
[in]bData 2.

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

◆ print_seq() [3/4]

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.

Template Parameters
AType of data 1.
BType of data 2.
CType of data 3.
Parameters
[in]worldThe World object.
[in]aData 1.
[in]bData 2.
[in]cData 3.

References a, aa, b, c, cc, p(), print(), madness::World::rank(), and madness::World::size().

◆ print_seq() [4/4]

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.

Template Parameters
AType of data 1.
BType of data 2.
CType of data 3.
DType of data 4.
Parameters
[in]worldThe World object.
[in]aData 1.
[in]bData 2.
[in]cData 3.
[in]dData 4.

References a, aa, b, c, cc, d, p(), print(), madness::World::rank(), and madness::World::size().

◆ print_size()

template<typename T , std::size_t NDIM>
void madness::print_size ( World world,
const std::vector< Function< T, NDIM > > &  v,
const std::string &  msg = "vectorfunction" 
)

◆ print_stats()

void madness::print_stats ( World world)

◆ print_tree_jsonfile()

template<size_t NDIM>
std::enable_if< NDIM==3, void >::type madness::print_tree_jsonfile ( World world,
const Function< double, NDIM > &  f,
std::string  filename 
)

◆ printf_msg_energy_time()

void madness::printf_msg_energy_time ( const std::string  msg,
const double  energy,
const double  time 
)

References energy.

Referenced by madness::CC2::solve().

◆ project()

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 
)

◆ Q2()

tensorT madness::Q2 ( const tensorT s)

Given overlap matrix, return rotation with 2nd order error to orthonormalize the vectors.

References Q().

Referenced by madness::CCPairFunction< T, NDIM >::apply(), DF::orthogonalize_inplace(), orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), and test_projector_outer().

◆ Q3()

tensorT madness::Q3 ( const tensorT s)

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

References inner(), and Q().

◆ qm_1d_free_particle_propagator()

Convolution1D< double_complex > * madness::qm_1d_free_particle_propagator ( int  k,
double  bandlimit,
double  timestep,
double  width 
)

◆ qm_free_particle_propagator()

template<std::size_t NDIM>
SeparatedConvolution< double_complex, NDIM > madness::qm_free_particle_propagator ( World world,
int  k,
double  bandlimit,
double  timestep 
)

◆ qm_free_particle_propagatorPtr()

template<std::size_t NDIM>
SeparatedConvolution< double_complex, NDIM > * madness::qm_free_particle_propagatorPtr ( World world,
int  k,
double  bandlimit,
double  timestep 
)

◆ qr() [1/5]

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

◆ qr() [2/5]

template void madness::qr ( Tensor< double_complex > &  A,
Tensor< double_complex > &  R 
)

◆ qr() [3/5]

template void madness::qr ( Tensor< float > &  A,
Tensor< float > &  R 
)

◆ qr() [4/5]

template void madness::qr ( Tensor< float_complex > &  A,
Tensor< float_complex > &  R 
)

◆ qr() [5/5]

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, R, TENSOR_ASSERT, and transpose().

Referenced by madness::RandomizedMatrixDecomposition< T >::do_compute_range(), and test_qr().

◆ quiet()

bool madness::quiet ( )

Check if the MADNESS runtime was initialized for quiet operation.

Returns
true if madness::initialize was called with quiet=true .

Referenced by madness::ThreadPool::begin(), madness::WorldGopInterface::initial_max_reducebcast_msg_size(), initialize(), initialize(), initialize(), and initialize().

◆ r2()

static double madness::r2 ( const coord_3d x)
static

◆ RandomValue()

template<class T >
T madness::RandomValue ( )

Random value that wraps the default Fibonacci generator.

◆ RandomValue< double >() [1/2]

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

◆ RandomValue< double >() [2/2]

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

◆ RandomValue< double_complex >() [1/2]

Random double_complex.

References RandomValue< double >().

◆ RandomValue< double_complex >() [2/2]

Random double_complex.

References RandomValue< double >().

◆ RandomValue< float >() [1/2]

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

◆ RandomValue< float >() [2/2]

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

◆ RandomValue< float_complex >() [1/2]

Random float_complex.

References RandomValue< float >().

◆ RandomValue< float_complex >() [2/2]

Random float_complex.

References RandomValue< float >().

◆ RandomValue< int >() [1/2]

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

◆ RandomValue< int >() [2/2]

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

◆ RandomValue< long >() [1/2]

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

Random long.

References RandomValue< double >().

Referenced by make_dimensions(), and test_qr().

◆ RandomValue< long >() [2/2]

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

Random long.

References RandomValue< double >().

Referenced by make_dimensions(), and test_qr().

◆ RandomVector()

template<class T >
void madness::RandomVector ( int  n,
T t 
)

◆ RandomVector< double >() [1/2]

template<>
void madness::RandomVector< double > ( int  n,
double *  t 
)

◆ RandomVector< double >() [2/2]

template<>
void madness::RandomVector< double > ( int  n,
double *  t 
)

◆ RandomVector< double_complex >() [1/2]

template<>
void madness::RandomVector< double_complex > ( int  n,
double_complex t 
)

◆ RandomVector< double_complex >() [2/2]

template<>
void madness::RandomVector< double_complex > ( int  n,
double_complex t 
)

◆ RandomVector< float >() [1/2]

template<>
void madness::RandomVector< float > ( int  n,
float *  t 
)

◆ RandomVector< float >() [2/2]

template<>
void madness::RandomVector< float > ( int  n,
float *  t 
)

◆ RandomVector< float_complex >() [1/2]

template<>
void madness::RandomVector< float_complex > ( int  n,
float_complex t 
)

◆ RandomVector< float_complex >() [2/2]

template<>
void madness::RandomVector< float_complex > ( int  n,
float_complex t 
)

◆ rank_revealing_decompose()

template<typename T >
long madness::rank_revealing_decompose ( Tensor< T > &  A,
Tensor< T > &  U,
const double  thresh,
Tensor< typename Tensor< T >::scalar_type > &  s,
Tensor< T > &  scr 
)

decompose the input tensor A into U and V, skipping singular vectors of small singular values. One deep copy/allocation for U is performed

Parameters
[in,out]Athe input matrix, on exit the matrix VT (right sing. vectors)
[out]Ucontiguous new tensor holding the left sing. vectors
[in]threshthreshold for truncation of the singular vectors
[in]sscratch tensor for the singular values, dimension min(n,m)
[in]scrscratch tensor the dimension of the scratch tensor may be computed as long lwork=std::max(3*std::min(m,n)+std::max(m,n),5*std::min(m,n)) + n*m;

References _(), copy(), madness::Tensor< T >::flat(), m, MADNESS_ASSERT, madness::SRConf< T >::max_sigma(), R1, madness::BaseTensor::size(), svd_result(), and thresh.

Referenced by apply().

◆ read_atom()

static AtomCore madness::read_atom ( TiXmlElement *  e,
unsigned int  atn,
double  eprec 
)
static

◆ read_data() [1/2]

static bool madness::read_data ( )
static

read_data loads the precomputed Gauss-Legendre data

References data_is_read, f, filename, max_npt, points, and weights.

Referenced by gauss_legendre(), load_coeffs(), load_quadrature(), and madness::guessfactory::PolynomialFunctor::read_string().

◆ read_data() [2/2]

static bool madness::read_data ( int  k)
static

◆ read_orbital()

static bool madness::read_orbital ( TiXmlElement *  e,
AtomCore ac 
)
static

◆ read_potential()

static bool madness::read_potential ( TiXmlElement *  elem,
AtomCore ac,
double  eprec 
)
static

◆ read_twoscale()

static bool madness::read_twoscale ( int  kmax)
static

◆ readmat()

static Tensor< double > madness::readmat ( int  k,
FILE *  file 
)
static

References a, c, and k.

Referenced by read_twoscale().

◆ real() [1/5]

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

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

References copy().

◆ real() [2/5]

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 unary_op_coeffs().

◆ real() [3/5]

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

References func(), and unary_op_coeffs().

◆ real() [4/5]

template<typename T , std::size_t NDIM>
std::vector< Function< typename Tensor< T >::scalar_type, NDIM > > madness::real ( const std::vector< Function< T, NDIM > > &  v,
bool  fence = true 
)

return the real parts of the vector's function (if complex)

References NDIM, real(), and v.

◆ real() [5/5]

static double madness::real ( double  x)
inline

◆ reconstruct() [1/3]

template<typename T , std::size_t NDIM>
const std::vector< Function< T, NDIM > > & madness::reconstruct ( const std::vector< Function< T, NDIM > > &  v)

reconstruct a vector of functions

implies fence return v for chaining

References change_tree_state(), reconstructed, and v.

Referenced by abssq(), apply(), apply(), apply(), apply(), apply(), apply(), apply(), apply_potential(), madness::FunctionImpl< T, NDIM >::change_tree_state(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Solver< T, NDIM >::compute_rho(), cross(), div(), doit(), madness::Projector< T, NDIM >::get_vectors_for_outer_product(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), hamiltonian_matrix(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), madness::CC2::iterate_lrcc2_pairs(), madness::SCF::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), MiniDFT::kinetic_energy_matrix(), madness::SCF::load_mos(), Calculation::load_mos(), madness::Solver< T, NDIM >::load_orbitals(), madness::SCF::make_density(), madness::TDHF::make_mo_bra(), madness::TDHF::make_mo_ket(), Calculation::make_reference(), matrix_mul_sparse(), molresponseExchange(), moments(), mul(), mul(), mul(), mul(), mul_sparse(), mul_sparse(), nonstandard(), madness::Nuclear< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), Calculation::plot_p(), madness::MolecularOrbitals< T, NDIM >::post_process_mos(), madness::SCF::project(), refine_to_common_level(), madness::Solver< T, NDIM >::reproject(), rot(), test2(), madness::SCF::twoint(), and vector_to_PQ().

◆ reconstruct() [2/3]

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

Reconstruct a vector of functions.

References change_tree_state(), PROFILE_BLOCK, reconstructed, and v.

◆ reconstruct() [3/3]

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, PROFILE_BLOCK, and v.

◆ redirectio()

void madness::redirectio ( const World world,
bool  split = false 
)

redirects standard output and error to rank-specific files

Parameters
[in]worldthe World object that determines rank of this process
[in]splitif true, write standard output to log.<rank> and standard error to err.<rank>, otherwise write both standard output and error to log.<rank>. The default is false.

References bufsize, filename, MADNESS_EXCEPTION, madness::World::mpi, madness::WorldMpiInterface::rank(), and split().

Referenced by main(), and startup().

◆ reduce()

template<class T >
GenTensor< T > madness::reduce ( std::list< GenTensor< T > > &  addends,
double  eps,
bool  are_optimal = false 
)

add all the GenTensors of a given list

If there are many tensors to add it's beneficial to do a sorted addition and start with those tensors with low ranks

Parameters
[in]addendsa list with gentensors of same dimensions; will be destroyed upon return
[in]epsthe accuracy threshold
[in]are_optimalflag if the GenTensors in the list are already in SVD format (if TT_2D)
Returns
the sum GenTensor of the input GenTensors

References copy().

Referenced by madness::SeparatedConvolution< Q, NDIM >::apply2().

◆ reduce_rank()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::reduce_rank ( std::vector< Function< T, NDIM > >  v,
double  thresh = 0.0,
bool  fence = true 
)

reduces the tensor rank of the coefficient tensor (if applicable)

Returns
the vector for chaining

References thresh, and v.

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

◆ refine()

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

◆ refine_to_common_level()

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

◆ reset_papi_measurement()

void madness::reset_papi_measurement ( )
inline

◆ rot()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::rot ( const std::vector< Function< T, NDIM > > &  v,
bool  do_refine = false,
bool  fence = true 
)

shorthand rot operator

returns the cross product of nabla with a vector f

Parameters
[in]fthe vector of functions on which the rot operator works on
[in]refinerefinement before diff'ing makes the result more accurate
[in]fencefence after completion; currently always fences
Returns
the vector \frac{\partial}{\partial x_i} f TODO: add this to operator fusion

References apply(), d, madness::WorldGopInterface::fence(), madness::World::gop, grad(), MADNESS_ASSERT, NDIM, reconstruct(), refine(), and v.

◆ row_distributed_matrix()

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)
Returns
A new zero matrix with the requested dimensions and distribution

References m, and row_distributed_matrix_distribution().

◆ row_distributed_matrix_distribution()

static DistributedMatrixDistribution madness::row_distributed_matrix_distribution ( World world,
int64_t  n,
int64_t  m,
int64_t  rowtile 
)
inlinestatic

Generates an (n,m) matrix distribution 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)
Returns
An object encoding the dimension and distribution information

Referenced by row_distributed_matrix().

◆ rr_cholesky() [1/3]

template void madness::rr_cholesky ( Tensor< double > &  A,
typename Tensor< double >::scalar_type  tol,
Tensor< integer > &  piv,
int &  rank 
)

◆ rr_cholesky() [2/3]

template void madness::rr_cholesky ( Tensor< double_complex > &  A,
typename Tensor< double_complex >::scalar_type  tol,
Tensor< integer > &  piv,
int &  rank 
)

◆ rr_cholesky() [3/3]

template<typename T >
void madness::rr_cholesky ( Tensor< T > &  A,
typename Tensor< T >::scalar_type  tol,
Tensor< integer > &  piv,
int &  rank 
)

Compute the rank-revealing Cholesky factorization.

rank-revealing Cholesky factorization

Compute the rank-revealing Cholesky factorization of the symmetric positive definite matrix A

For memory efficiency A is modified inplace. Its upper triangle will hold the result and the lower triangle will be zeroed such that input = inner(transpose(output),output).

Parameters
[in]Athe positive-semidefinite matrix to be decomposed
[in]tollinear dependency threshold for discarding columns of A
[in]pivpivot vector, its 1-rank entries are the orthogonal vectors
[in]ranknumerical rank of A (wrt tol)

References mask_info(), pstrf_(), madness::Tensor< T >::ptr(), and TENSOR_ASSERT.

Referenced by madness::projector_irrep::apply_symmetry_operators(), madness::PNO::orthonormalize_cholesky(), orthonormalize_rrcd(), and test_rr_cholesky().

◆ rsquared()

static double madness::rsquared ( const coordT r)
static

◆ save()

template<class T , std::size_t NDIM>
void madness::save ( const Function< T, NDIM > &  f,
const std::string  name 
)

◆ save_function()

template<typename T , size_t NDIM>
void madness::save_function ( const std::vector< Function< T, NDIM > > &  f,
const std::string  name 
)

save a vector of functions

References f, name(), print(), and madness::World::rank().

Referenced by madness::Zcis::compare_to_file(), and madness::PNO::save_pnos().

◆ scalar_result_shared_ptr_vector()

template<typename T >
std::vector< std::shared_ptr< ScalarResult< T > > > madness::scalar_result_shared_ptr_vector ( World world,
std::size_t  n 
)

helper function to create a vector of ScalarResult, circumventing problems with the constructors

References MADNESS_EXCEPTION, madness::World::ptr_from_id(), and v.

◆ scale() [1/5]

response_space madness::scale ( response_space  a,
double  b 
)

Referenced by SVPESolver::SVPESolver(), madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), madness::Znemo::analyze(), madness::TDHF::apply_G(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, NDIM >::coeffs2values(), madness::Diamagnetic_potential_factor::compute_lz_commutator(), madness::Nemo::compute_nemo_potentials(), madness::Zcis::compute_potentials(), madness::SCF::compute_residual(), madness::F12Potentials::convolve_with_fU(), madness::FunctionImpl< T, NDIM >::do_binary_op(), madness::FunctionImpl< T, NDIM >::do_mul(), madness::FunctionImpl< T, NDIM >::err_box(), gauss_legendre_numeric(), madness::TDHF::get_tda_potential(), madness::Znemo::iterate(), madness::CC2::iterate_singles(), madness::Nemo::kinetic_energy_potential(), main(), madness::MP2::make_Uphi0(), madness::Solver< T, NDIM >::matrix_exponential(), madness::Localizer::matrix_exponential(), matrix_exponential(), moments(), madness::FunctionImpl< T, NDIM >::mul(), madness::EigSolver< T, NDIM >::multi_solve(), AnsatzBase::normalize(), madness::NemoBase::normalize(), madness::Zcis::normalize(), normalize(), madness::FunctionImpl< T, NDIM >::NS_fcube_for_mul(), madness::FunctionImpl< T, NDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), operator*(), operator*(), madness::TwoBodyFunctionSeparatedComponent< T, NDIM >::operator*=(), madness::response_space::operator*=(), madness::FunctionImpl< T, NDIM >::phi_for_mul(), plot_plane(), plot_plane(), plot_plane(), madness::FunctionImpl< T, NDIM >::print_plane_local(), q_c(), madness::Molecule::read(), MolecularEntity::read_file(), madness::Molecule::read_xyz(), madness::response_space::scale(), scale(), scale(), madness::Solver< T, NDIM >::solve(), madness::Nemo::solve_cphf(), squaremod_small(), testNavierStokes(), update(), MiniDFT::update(), update(), madness::PNO::update_pno(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, NDIM >::values2coeffs(), and madness::FunctionImpl< T, NDIM >::values2NScoeffs().

◆ scale() [2/5]

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, scale(), and v.

◆ scale() [3/5]

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, PROFILE_BLOCK, and v.

◆ scale() [4/5]

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, PROFILE_BLOCK, scale(), and v.

◆ scale() [5/5]

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, PROFILE_BLOCK, and v.

◆ scale_2d()

response_space madness::scale_2d ( World world,
const response_space a,
const Tensor< double > &  b 
)

◆ serialize_am_args() [1/2]

template<typename Archive >
void madness::serialize_am_args ( Archive &&  )
inline

Terminate argument serialization.

Referenced by new_am_arg(), and serialize_am_args().

◆ serialize_am_args() [2/2]

template<typename Archive , typename T , typename... argT>
void madness::serialize_am_args ( Archive &&  archive,
T &&  t,
argT &&...  args 
)
inline

Argument serialization.

References serialize_am_args().

◆ set_impl()

template<typename T , std::size_t NDIM>
void madness::set_impl ( std::vector< Function< T, NDIM > > &  v,
const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > >  vimpl 
)

◆ set_thread_tag() [1/2]

void madness::set_thread_tag ( int  tag)
inline

sets the thread tag for the thread invoking this function

Parameters
tagthread tag for the calling thread

References madness::detail::thread_tag_accessor().

◆ set_thread_tag() [2/2]

void madness::set_thread_tag ( ThreadTag  tag)
inline

sets the thread tag for the thread invoking this function

Parameters
tagthread tag for the calling thread

References madness::detail::thread_tag_accessor().

Referenced by madness::ThreadBase::main().

◆ set_thresh()

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

◆ sim_to_user()

template<std::size_t NDIM>
static void madness::sim_to_user ( const Vector< double, NDIM > &  xsim,
Vector< double, NDIM > &  xuser 
)
static

Convert simulation coords ([0,1]^ndim) to user coords (FunctionDefaults<NDIM>::get_cell())

References madness::FunctionDefaults< NDIM >::get_cell(), and NDIM.

◆ simpt2key()

template<typename T , std::size_t NDIM>
static Key< NDIM > madness::simpt2key ( const Vector< T, NDIM > &  pt,
Level  n 
)
inlinestatic

Returns the box at level n that contains the given point in simulation coordinates

Parameters
[in]ptpoint in simulation coordinates
[in]nthe level of the box

References NDIM.

Referenced by madness::Specialbox_op< T, NDIM >::check_special_points(), madness::NuclearCuspyBox_op< T, NDIM >::operator()(), and madness::FunctionImpl< T, NDIM >::project_refine_op().

◆ size_of()

template<typename T , std::size_t NDIM>
double madness::size_of ( const intermediateT< T, NDIM > &  im)

Returns the size of an intermediate.

Returns the size of an intermediate

Referenced by madness::CCConvolutionOperator< T, NDIM >::info().

◆ slater_functor()

static double madness::slater_functor ( const coord_3d x)
static

References r2().

◆ slater_radius()

double madness::slater_radius ( int  atomic_number)

collection of slater radii needed to calculate R1 and R2; The Journal of Chemical Physics 41, 3199 (1964); doi: 10.1063/1.1725697

Parameters
[in]atomic_numberatomic_number of atom
[out]slater radius corresponding to atomic_number

References MADNESS_EXCEPTION.

Referenced by main(), and make_atom_vec().

◆ SlaterF12Operator()

static SeparatedConvolution< double, 3 > madness::SlaterF12Operator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

References k, lo, mu, and OT_F12.

Referenced by madness::MP2::compute_gQf(), and madness::MP2::guess_mp1_3().

◆ SlaterF12OperatorPtr()

static SeparatedConvolution< double, 3 > * madness::SlaterF12OperatorPtr ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with (1 - exp(-mu*r))/(2 mu) in 3D.

includes the factor 1/(2 mu)

References k, lo, mu, and OT_F12.

Referenced by madness::F12Potentials::F12Potentials(), test_Kcommutator(), and test_lowrank_function().

◆ SlaterF12sqOperator()

static SeparatedConvolution< double, 3 > madness::SlaterF12sqOperator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

References k, lo, mu, and OT_F212.

◆ SlaterF12sqOperatorPtr()

static SeparatedConvolution< double, 3 > * madness::SlaterF12sqOperatorPtr ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

References k, lo, mu, and OT_F212.

◆ SlaterOperator()

template<std::size_t NDIM = 3>
static SeparatedConvolution< double, NDIM > madness::SlaterOperator ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r) in 3D.

References k, lo, mu, and OT_SLATER.

Referenced by madness::F12Potentials::F12Potentials().

◆ SlaterOperatorPtr()

static SeparatedConvolution< double, 3 > * madness::SlaterOperatorPtr ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r) in 3D Note that the 1/(2mu) factor of SlaterF12Operator is not included, this is just the exponential function

References k, lo, mu, and OT_SLATER.

Referenced by test_Kcommutator(), and test_lowrank_function().

◆ SlaterOperatorPtr_ND()

template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * madness::SlaterOperatorPtr_ND ( World world,
double  mu,
double  lo,
double  eps,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution with exp(-mu*r) in 3D Note that the 1/(2mu) factor of SlaterF12Operator is not included, this is just the exponential function

References k, lo, mu, and OT_SLATER.

◆ smoothed_density()

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.

References madness::constants::pi.

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

◆ smoothed_potential()

double madness::smoothed_potential ( double  r)

◆ smoothing_parameter()

double madness::smoothing_parameter ( double  Z,
double  eprec 
)

◆ SmoothingOperator()

template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > madness::SmoothingOperator ( World world,
double  eps,
const BoundaryConditions< NDIM > &  bc = FunctionDefaults<NDIM>::get_bc(),
int  k = FunctionDefaults<NDIM>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution a normalized Gaussian (aka a widened delta function)

References L, NDIM, and pow().

◆ SmoothingOperator3D()

static SeparatedConvolution< double, 3 > madness::SmoothingOperator3D ( World world,
double  eps,
const BoundaryConditions< 3 > &  bc = FunctionDefaults<3>::get_bc(),
int  k = FunctionDefaults<3>::get_k() 
)
inlinestatic

Factory function generating separated kernel for convolution a normalized Gaussian (aka a widened delta function)

References L, and pow().

Referenced by dostuff(), and madness::Nemo::kinetic_energy_potential().

◆ SPEC() [1/15]

madness::SPEC ( double  ,
double_complex  ,
double_complex   
)

◆ SPEC() [2/15]

madness::SPEC ( double  ,
float_complex  ,
float_complex   
)

◆ SPEC() [3/15]

madness::SPEC ( float  ,
double  ,
double   
)

◆ SPEC() [4/15]

madness::SPEC ( float  ,
double_complex  ,
double_complex   
)

◆ SPEC() [5/15]

madness::SPEC ( float  ,
float_complex  ,
float_complex   
)

◆ SPEC() [6/15]

madness::SPEC ( float_complex  ,
double_complex  ,
double_complex   
)

◆ SPEC() [7/15]

madness::SPEC ( int  ,
double  ,
double   
)

◆ SPEC() [8/15]

madness::SPEC ( int  ,
double_complex  ,
double_complex   
)

◆ SPEC() [9/15]

madness::SPEC ( int  ,
float  ,
float   
)

◆ SPEC() [10/15]

madness::SPEC ( int  ,
float_complex  ,
float_complex   
)

◆ SPEC() [11/15]

madness::SPEC ( int  ,
long  ,
long   
)

◆ SPEC() [12/15]

madness::SPEC ( long  ,
double  ,
double   
)

◆ SPEC() [13/15]

madness::SPEC ( long  ,
double_complex  ,
double_complex   
)

◆ SPEC() [14/15]

madness::SPEC ( long  ,
float  ,
float   
)

◆ SPEC() [15/15]

madness::SPEC ( long  ,
float_complex  ,
float_complex   
)

◆ square() [1/2]

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

◆ square() [2/2]

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.

References v.

◆ standard() [1/2]

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 change_tree_state(), compressed, PROFILE_BLOCK, and v.

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

◆ standard() [2/2]

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, PROFILE_BLOCK, and v.

◆ START_TIMER()

static void madness::START_TIMER ( World world)
static

◆ startup()

void madness::startup ( World world,
int  argc,
char **  argv,
bool  doprint = false,
bool  make_stdcout_nice_to_reals = true 
)

◆ stringify()

template<typename T >
static std::string madness::stringify ( T  arg)
static

◆ sub() [1/3]

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 
)

◆ sub() [2/3]

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, MADNESS_ASSERT, NDIM, PROFILE_BLOCK, R, sub(), T(), and TENSOR_RESULT_TYPE.

◆ sub() [3/3]

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, MADNESS_ASSERT, NDIM, PROFILE_BLOCK, R, sub(), T(), and TENSOR_RESULT_TYPE.

◆ sum()

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

◆ svd() [1/11]

template<>
void madness::svd ( char  jobu,
char  jobvt,
integer  m,
integer  n,
complex_real4 A,
integer  lda,
real4 S,
complex_real4 U,
integer  ldu,
complex_real4 VT,
integer  ldvt 
)

References cgesvd_(), LINALG_ASSERT, and m.

◆ svd() [2/11]

template<>
void madness::svd ( char  jobu,
char  jobvt,
integer  m,
integer  n,
complex_real8 A,
integer  lda,
real8 S,
complex_real8 U,
integer  ldu,
complex_real8 VT,
integer  ldvt 
)

References LINALG_ASSERT, m, and zgesvd_().

◆ svd() [3/11]

template<>
void madness::svd ( char  jobu,
char  jobvt,
integer  m,
integer  n,
real4 A,
integer  lda,
real4 S,
real4 U,
integer  ldu,
real4 VT,
integer  ldvt 
)

References LINALG_ASSERT, m, and sgesvd_().

◆ svd() [4/11]

template<>
void madness::svd ( char  jobu,
char  jobvt,
integer  m,
integer  n,
real8 A,
integer  lda,
real8 S,
real8 U,
integer  ldu,
real8 VT,
integer  ldvt 
)

References dgesvd_(), LINALG_ASSERT, and m.

◆ svd() [5/11]

template<typename T >
void madness::svd ( char  jobu,
char  jobvt,
integer  m,
integer  n,
T A,
integer  lda,
typename detail::real_type< T >::type S,
T U,
integer  ldu,
T VT,
integer  ldvt 
)

Compute the SVD via LAPACK.

◆ svd() [6/11]

template void madness::svd ( const Tensor< double > &  a,
Tensor< double > &  U,
Tensor< Tensor< double >::scalar_type > &  s,
Tensor< double > &  VT 
)

◆ svd() [7/11]

template void madness::svd ( const Tensor< double_complex > &  a,
Tensor< double_complex > &  U,
Tensor< Tensor< double_complex >::scalar_type > &  s,
Tensor< double_complex > &  VT 
)

◆ svd() [8/11]

template void madness::svd ( const Tensor< float > &  a,
Tensor< float > &  U,
Tensor< Tensor< float >::scalar_type > &  s,
Tensor< float > &  VT 
)

◆ svd() [9/11]

template void madness::svd ( const Tensor< float_complex > &  a,
Tensor< float_complex > &  U,
Tensor< Tensor< float_complex >::scalar_type > &  s,
Tensor< float_complex > &  VT 
)

◆ svd() [10/11]

template<typename T >
std::tuple< Tensor< T >, Tensor< typename Tensor< T >::scalar_type >, Tensor< T > > madness::svd ( const Tensor< T > &  A)

SVD - MATLAB syntax.

call as auto [U,s,VT] = svd(A); with A=U*S*VT

References svd().

◆ svd() [11/11]

template<typename T >
void madness::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.

Computes singular value decomposition of matrix.

Returns via arguments U, s, VT where

A = U * diag(s) * VT for A real A = U * diag(s) * VH for A complex

or

UT * A * V = diag(s) for A real UH * A * V = diag(s) for A complex

If A is [m,n] and r=min(m,n) then we have U[m,r], s[r], and VT[r,n]

On failure, throws TensorException with value set to Lapack's info.

References a, copy(), gesvd_(), m, mask_info(), max, madness::Tensor< T >::ptr(), and TENSOR_ASSERT.

Referenced by madness::SVDTensor< T >::compute_svd(), madness::SVDTensor< T >::compute_svd_from_range(), DF::diagonalize(), madness::SCF::initial_guess(), madness::ConvolutionData1D< Q >::make_approx(), madness::RandomizedMatrixDecomposition< T >::make_SVD_decaying_matrix(), ortho3(), ortho5(), madness::SVDTensor< T >::recompute_from_range(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::TensorTrain< T >::splitdim(), svd(), test_constructor(), test_stuff(), test_svd(), and madness::Localizer::undo_rotation().

◆ svd_result() [1/5]

template void madness::svd_result ( Tensor< double > &  a,
Tensor< double > &  U,
Tensor< Tensor< double >::scalar_type > &  s,
Tensor< double > &  VT,
Tensor< double > &  work 
)

◆ svd_result() [2/5]

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 
)

◆ svd_result() [3/5]

template void madness::svd_result ( Tensor< float > &  a,
Tensor< float > &  U,
Tensor< Tensor< float >::scalar_type > &  s,
Tensor< float > &  VT,
Tensor< float > &  work 
)

◆ svd_result() [4/5]

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 
)

◆ svd_result() [5/5]

template<typename T >
void madness::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

note that S and VT are swapped in the calling list for c/fortran consistency!

Parameters
[in,out]aa (m,n) matrix to be svd'ed; upon return will hold VT the first min(m,n) rows of VT, stored rowwise
[in,out]Uleft singular vectors, stored columnwise
[in,out]sthe singular values
[in,out]VTnot referenced
[in,out]workwork array; optimial length lwork: lwork = max<integer>(3*min(m,n)+max(m,n),5*min(m,n)-4)*32;

References a, gesvd_(), m, mask_info(), madness::Tensor< T >::ptr(), madness::BaseTensor::size(), and TENSOR_ASSERT.

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

◆ swap() [1/2]

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.

References madness::RemoteReference< T >::swap().

◆ swap() [2/2]

template<typename T , std::size_t N>
void madness::swap ( Vector< T, N > &  l,
Vector< T, N > &  r 
)

Swap the contents of two Vectors.

Template Parameters
TThe type of data stored in the Vectors.
NThe size of the Vectors.
Parameters
[in,out]lOne Vector.
[in,out]rThe other Vector.

References madness::Vector< T, N >::swap().

Referenced by random_perm().

◆ swap_particles()

template<typename T , std::size_t NDIM>
std::enable_if_t< NDIM%2==0, Function< T, NDIM > > madness::swap_particles ( const Function< T, NDIM > &  f)

swap particles 1 and 2

param[in] f a function of 2 particles f(1,2) return the input function with particles swapped g(1,2) = f(2,1)

References d, f, mapdim(), and NDIM.

Referenced by madness::MP2::add_local_coupling(), madness::MP2::asymmetry(), madness::CC2::compute_local_coupling(), madness::MP2::K(), and madness::TwoBodyFunctionPureComponent< T, NDIM >::swap_particles_inplace().

◆ syev() [1/4]

template void madness::syev ( const Tensor< double > &  A,
Tensor< double > &  V,
Tensor< Tensor< double >::scalar_type > &  e 
)

◆ syev() [2/4]

template void madness::syev ( const Tensor< double_complex > &  A,
Tensor< double_complex > &  V,
Tensor< Tensor< double_complex >::scalar_type > &  e 
)

◆ syev() [3/4]

template<typename T >
std::tuple< Tensor< typename Tensor< T >::scalar_type >, Tensor< T > > madness::syev ( const Tensor< T > &  A)

Solves symmetric or Hermitian eigenvalue problem - MATLAB syntax.

call as auto [eval, evec] = syev(A);

References e(), syev(), and V().

◆ syev() [4/4]

template<typename T >
void madness::syev ( const Tensor< T > &  A,
Tensor< T > &  V,
Tensor< typename Tensor< T >::scalar_type > &  e 
)

Real-symmetric or complex-Hermitian eigenproblem.

Solves symmetric or Hermitian eigenvalue problem.

A is a real symmetric or complex Hermitian matrix. Return V and e where V is a matrix whose columns are the eigenvectors and e is a vector containing the corresponding eigenvalues. If the LAPACK routine fails, it raises a TensorException with value=infor. The input matrix is unchanged. The eigenvalues are sorted into ascending order. s/dsyev are used for real symmetric matrices; c/zheev are used for complex Hermitian.

The results will satisfy A*V(_,i) = V(_,i)*e(i).

References e(), mask_info(), max, madness::Tensor< T >::ptr(), syev_(), TENSOR_ASSERT, transpose(), and V().

Referenced by madness::projector_irrep::apply_symmetry_operators(), madness::PNO::canonicalize(), madness::OEP::compute_and_print_final_energies(), compute_frequencies(), madness::OEP::compute_ocep_correction(), madness::Solver< T, NDIM >::csqrt(), madness::Localizer::determine_frozen_orbitals(), fixphases(), madness::Solver< T, NDIM >::initial_guess(), madness::Zcis::make_guess(), madness::TDHF::make_guess_from_initial_diagonalization(), QuasiNewton::new_search_direction(), madness::QuasiNewton::new_search_direction(), madness::MolecularOptimizer::new_search_direction2(), madness::MolecularOptimizer::optimize_quasi_newton(), madness::Molecule::orient(), orth(), ortho3(), ortho5(), orthonormalize_canonical(), orthonormalize_symmetric(), madness::PNO::pno_compress(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), projector_external_dof(), madness::MolecularOptimizer::projector_external_dof(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::Solver< T, NDIM >::solve(), madness::OEP::solve(), syev(), and test_syev().

◆ sygv() [1/3]

template void madness::sygv ( const Tensor< double > &  A,
const Tensor< double > &  B,
int  itype,
Tensor< double > &  V,
Tensor< Tensor< double >::scalar_type > &  e 
)

◆ sygv() [2/3]

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 
)

◆ sygv() [3/3]

template<typename T >
void madness::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.

Solves symmetric or Hermitian generalized eigenvalue problem.

This from the LAPACK documentation

S/DSYGV computes all the eigenvalues, and optionally, the eigenvectors
of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.  Here A and B
are assumed to be symmetric and B is also positive definite.

C/ZHEGV computes all the eigenvalues, and optionally, the eigenvectors
of a complex generalized Hermitian-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B
are assumed to be Hermitian and B is also positive definite.

ITYPE   (input) INTEGER
Specifies the problem type to be solved:
= 1:  A*x = (lambda)*B*x
= 2:  A*B*x = (lambda)*x
= 3:  B*A*x = (lambda)*x

References b, e(), mask_info(), max, madness::Tensor< T >::ptr(), sygv_(), TENSOR_ASSERT, transpose(), and V().

Referenced by madness::Znemo::canonicalize(), diag_and_transform(), DF::diagonalize(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), MiniDFT::doit(), doit(), madness::Solver< T, NDIM >::initial_guess(), initial_guess(), main(), main(), madness::Zcis::orthonormalize(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), sygvp(), and test_sygv().

◆ sygvp()

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 
)

◆ symbol_to_atomic_number()

unsigned int madness::symbol_to_atomic_number ( const std::string &  symbol)

◆ symmetrize()

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]symmetrypossibilities 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 f, madness::Function< T, NDIM >::get_impl(), MADNESS_ASSERT, MADNESS_EXCEPTION, madness::Function< T, NDIM >::mapdim(), NDIM, and print().

Referenced by test_adaptive_tree().

◆ tensor_abs()

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

References abs(), BINARY_OPTIMIZED_ITERATOR, c, and Q().

◆ tensor_real2complex()

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

◆ TENSOR_RESULT_TYPE() [1/3]

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

Computes the scalar/inner product between two functions.

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

inner function with right signature for the nonlinear solver this is needed for the KAIN solvers and other functions

References f, g, inner(), and MADNESS_ASSERT.

◆ TENSOR_RESULT_TYPE() [2/3]

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

Computes the scalar/inner product between an MRA function and an external functor.

Currently this defaults to inner_adaptive, which might be more expensive than inner_ext since it loops over all leaf nodes. If you feel inner_ext is more efficient you need to call it directly

Parameters
[in]fMRA function
[in]gfunctor
Returns
inner(f,g)

References PROFILE_FUNC.

◆ TENSOR_RESULT_TYPE() [3/3]

template<typename T , typename opT , std::size_t NDIM>
madness::TENSOR_RESULT_TYPE ( T  ,
typename opT::value_type   
) const &

Computes the scalar/inner product between an MRA function and an external functor.

Currently this defaults to inner_adaptive, which might be more expensive than inner_ext since it loops over all leaf nodes. If you feel inner_ext is more efficient you need to call it directly

Parameters
[in]gfunctor
[in]fMRA function
Returns
inner(f,g)

References f, g, and inner().

◆ tensor_ximag()

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

References BINARY_OPTIMIZED_ITERATOR, c, imag(), and Q().

◆ tensor_xreal()

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

References BINARY_OPTIMIZED_ITERATOR, c, Q(), and real().

◆ test_1d_functor()

static double madness::test_1d_functor ( const coord_1d x)
static

◆ test_autoc()

bool madness::test_autoc ( )

References autocorr_filename, and checksum_file().

Referenced by read_data().

◆ test_cholesky()

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

◆ test_exchange()

template<typename T >
int madness::test_exchange ( World world)

◆ test_gelss()

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

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

◆ test_gesv()

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

◆ test_inverse()

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

Example and test code for interface to LAPACK SVD interfae.

References inner(), inverse(), madness::Tensor< T >::normf(), and madness::BaseTensor::size().

◆ test_qr()

template<typename T >
double madness::test_qr ( )

◆ test_rnlp()

bool madness::test_rnlp ( )

References a, abs(), e(), exact, g, max, and pi.

Referenced by test_op().

◆ test_rr_cholesky()

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

◆ test_svd()

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 T().

◆ test_syev()

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

◆ test_sygv()

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

◆ test_tensor_lapack()

bool madness::test_tensor_lapack ( )

Test the Tensor-LAPACK interface ... currently always returns true!

Dunno.

Runs the tensor test code, returns true on success

References e().

Referenced by main().

◆ test_two_scale_coefficients()

bool madness::test_two_scale_coefficients ( )

Test the two scale coefficients for orthogonality

References e(), inner(), k, kmax, and two_scale_hg().

Referenced by startup().

◆ testf()

static double madness::testf ( int  n,
double  x 
)
static

test function for gauss_legendre_test

References sum.

Referenced by gauss_legendre_test().

◆ time_transform()

static void madness::time_transform ( World world,
int &  mflopslo,
int &  mflopshi 
)
static

◆ to_conjugate_response_matrix()

auto madness::to_conjugate_response_matrix ( const X_space x) -> response_matrix

References b.

◆ to_conjugate_X_space()

auto madness::to_conjugate_X_space ( const response_matrix x) -> X_space

response_matrix [x,y] -> Xspace X.x=y X.y=conjugate(x)

Parameters
x
Returns
X_space

References b, madness::World::size(), and xi.

◆ to_flattened_vector()

auto madness::to_flattened_vector ( const X_space x) -> vector_real_function_3d

Flattens all response functions into a single vector of functions.

Parameters
x
Returns

References b, and to_response_matrix().

Referenced by madness::X_space::component_norm2s().

◆ to_json()

void madness::to_json ( nlohmann::json &  j)

◆ to_response_matrix()

auto madness::to_response_matrix ( const X_space x) -> response_matrix

@ Converts Xspace object to response_matrix object

Parameters
x
Returns
response_matrix

References b.

Referenced by ground_exchange(), madness::X_space::norm2s(), to_flattened_vector(), madness::X_space::truncate(), and madness::X_space::truncate().

◆ to_response_vector()

auto madness::to_response_vector ( const vector_real_function_3d vec) -> vector_real_function_3d

@phi -> [phi conjugate(phi)]

Parameters
vec
Returns
vector_real_function_3d

References copy(), and vec().

◆ to_X_space()

auto madness::to_X_space ( const response_matrix x) -> X_space

References b, and madness::World::size().

Referenced by molresponseExchange().

◆ transform() [1/8]

template<typename R , typename Q >
GenTensor< TENSOR_RESULT_TYPE(R, Q)> madness::transform ( const GenTensor< R > &  t,
const Tensor< Q > &  c 
)

Often used to transform all dimensions from one basis to another

result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c(i',i) c(j',j) c(k',k) ...

The input dimensions of t must all be the same and agree with the first dimension of c . The dimensions of c may differ in size.

◆ transform() [2/8]

template<typename R , typename Q >
SVDTensor< TENSOR_RESULT_TYPE(R, Q)> madness::transform ( const SVDTensor< R > &  t,
const Tensor< Q > &  c 
)

◆ transform() [3/8]

template<class T , class Q >
TensorTrain< TENSOR_RESULT_TYPE(T, Q)> madness::transform ( const TensorTrain< T > &  t,
const Tensor< Q > &  c 
)

transform each dimension with the same operator matrix

result(i,j,k...) <– sum(i',j', k',...) t(i',j',k',...) c(i',i) c(j',j) c(k',k) ... TODO: merge this with general_transform

References c, copy(), madness::TensorTrain< T >::core, d, madness::BaseTensor::dims(), inner(), inner_result(), madness::BaseTensor::ndim(), Q(), r2(), T(), TENSOR_RESULT_TYPE, and madness::TensorTrain< T >::zero_rank.

◆ transform() [4/8]

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 
)

◆ transform() [5/8]

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 
)

this version of transform uses Function::vtransform and screens using both elements of c and v

References c, compress(), L, MADNESS_ASSERT, NDIM, PROFILE_BLOCK, R, TENSOR_RESULT_TYPE, and v.

◆ transform() [6/8]

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 
)

◆ transform() [7/8]

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(), madness::WorldGopInterface::fence(), madness::World::gop, m, MADNESS_ASSERT, PROFILE_BLOCK, R, T(), TENSOR_RESULT_TYPE, and v.

Referenced by madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), apply_BSH(), madness::GTHPseudopotential< Q >::apply_potential(), madness::projector_irrep::apply_symmetry_operators(), madness::Zcis::canonicalize(), madness::TDHF::canonicalize(), madness::Znemo::canonicalize(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, NDIM >::coeffs2values(), madness::Nemo::compute_cphf_parallel_term(), madness::OEP::compute_energy_weighted_density_local(), madness::CC2::compute_local_coupling(), madness::SCF::compute_residual(), diag_and_transform(), madness::SCF::diag_fock_matrix(), DF::diagonalize(), madness::FunctionImpl< T, NDIM >::do_binary_op(), madness::FunctionImpl< T, NDIM >::do_mul(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), MiniDFT::doit(), doit(), madness::FunctionImpl< T, NDIM >::filter(), fixphases(), madness::Convolution1D< Q >::get_rnlp(), madness::TDHF::get_tda_potential(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), madness::MP2::guess_mp1_3(), madness::Znemo::hcore_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), initial_guess(), inner(), inner(), madness::OEP::iterate(), Calculation::load_mos(), madness::Localizer::localize(), madness::Nemo::localize(), main(), main(), mix(), mix(), madness::Convolution1D< Q >::mod_nonstandard(), madness::FunctionImpl< T, NDIM >::mul(), madness::Convolution1D< Q >::nonstandard(), madness::FunctionImpl< T, NDIM >::NScoeffs2values(), madness::Projector< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), orth(), DF::orthogonalize_inplace(), orthonormalize(), madness::NemoBase::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), orthonormalize_canonical(), orthonormalize_cd(), orthonormalize_rrcd(), orthonormalize_symmetric(), madness::FunctionImpl< T, NDIM >::parent_to_child(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::InitParameters::readnw(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::SCF::restart_aos(), madness::Znemo::rotate_subspace(), madness::SCF::rotate_subspace(), madness::Nemo::rotate_subspace(), madness::SCF::rotate_subspace(), madness::Localizer::separate_core_valence(), madness::Nemo::solve(), madness::SCF::solve(), madness::Nemo::solve_cphf(), Test7(), test_transform(), madness::Znemo::potentials::transform(), madness::PNO::transform_pairs(), madness::FunctionImpl< T, NDIM >::unfilter(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, NDIM >::values2coeffs(), and madness::FunctionImpl< T, NDIM >::values2NScoeffs().

◆ transform() [8/8]

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(), madness::WorldGopInterface::fence(), gaxpy(), madness::World::gop, m, MADNESS_ASSERT, PROFILE_BLOCK, R, T(), TENSOR_RESULT_TYPE, and v.

◆ transform_dir() [1/2]

template<typename R , typename Q >
GenTensor< TENSOR_RESULT_TYPE(R, Q)> madness::transform_dir ( const GenTensor< R > &  t,
const Tensor< Q > &  c,
const int  axis 
)
transform_dir(t,c,1) = r(i,j,k,...) = sum(j') t(i,j',k,...) * c(j',j)
GenTensor< TENSOR_RESULT_TYPE(R, Q)> transform_dir(const GenTensor< R > &t, const Tensor< Q > &c, const int axis)
Definition lowranktensor.h:1099
Parameters
[in]tTensor to transform (size of dim to be transformed must match size of first dim of c )
[in]cMatrix used for the transformation
[in]axisDimension (or axis) to be transformed
Returns
Returns a new, contiguous tensor template <typename R, typename Q>

Referenced by madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push_op(), madness::Derivative< T, NDIM >::do_diff2b(), madness::Derivative< T, NDIM >::do_diff2i(), and madness::SRConf< T >::transform_dir().

◆ transform_dir() [2/2]

template<typename R , typename Q >
SVDTensor< TENSOR_RESULT_TYPE(R, Q)> madness::transform_dir ( const SVDTensor< R > &  t,
const Tensor< Q > &  c,
const int  axis 
)

◆ transform_reconstructed()

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

all trees are in reconstructed state, final trees have to be summed down if no fence is present

References c, change_tree_state(), madness::WorldGopInterface::fence(), get_impl(), madness::World::gop, m, MADNESS_CHECK, MADNESS_CHECK_THROW, PROFILE_BLOCK, R, reconstructed, redundant_after_merge, T(), TENSOR_RESULT_TYPE, and v.

Referenced by madness::CCPairFunction< T, NDIM >::collect_same_types(), and test_transform().

◆ transpose()

response_space madness::transpose ( response_space f)

References f, g, m, and MADNESS_ASSERT.

Referenced by madness::Convolution1D< Q >::Convolution1D(), madness::FunctionCommonData< T, NDIM >::_init_quadrature(), madness::FunctionCommonData< T, NDIM >::_init_twoscale(), madness::SCF::analyze_vectors(), madness::PNO::compute_cispd_correction_es(), madness::PNO::compute_cispd_correction_gs(), madness::PNO::compute_cispd_fluctuation_matrix(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), madness::F12Potentials::compute_f12_correction(), madness::PNO::compute_fluctuation_matrix(), madness::F12Potentials::compute_fQg_integrals(), madness::F12Potentials::compute_fQU_integrals(), madness::PNO::compute_projected_mp2_energies(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::SVDTensor< T >::compute_svd(), madness::GenTensor< T >::convert_inplace(), DF::diagonalize(), MiniDFT::doit(), gelss(), geqp3(), gesv(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), ggev(), madness::Nemo::hessian(), madness::Derivative< T, NDIM >::initCoefficients(), madness::SCF::initial_guess(), initial_guess(), madness::Localizer::localize(), madness::Nemo::localize(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), madness::TDHF::make_cis_matrix(), madness::SCF::make_fock_matrix(), madness::AtomicBasisSet::modify_dmat_psp(), my_conj_transpose(), my_conj_transpose(), madness::TwoBodyFunctionPureComponent< T, NDIM >::name(), madness::TwoBodyFunctionSeparatedComponent< T, NDIM >::name(), madness::CCPairFunction< T, NDIM >::name(), BoysLocalization::operator()(), orgqr(), ortho5(), orthonormalize_cd(), madness::PNO::orthonormalize_cholesky(), orthonormalize_rrcd(), orthonormalize_symmetric(), projector_external_dof(), madness::MolecularOptimizer::projector_external_dof(), qr(), madness::Derivative< T, NDIM >::read_from_file(), madness::Convolution1D< Q >::rnlij(), madness::SCF::solve(), syev(), sygv(), test_lowrank_function(), test_rr_cholesky(), test_syev(), transform(), and madness::Localizer::undo_rotation().

◆ transposeResponseMatrix()

auto madness::transposeResponseMatrix ( const response_matrix x) -> response_matrix

References b, transposeResponseMatrix(), and xi.

Referenced by transposeResponseMatrix().

◆ truncate() [1/4]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::truncate ( std::vector< Function< T, NDIM > >  v,
double  tol = 0.0,
bool  fence = true 
)

Truncates a vector of functions.

Returns
the truncated vector for chaining

References truncate(), and v.

◆ truncate() [2/4]

void madness::truncate ( World world,
response_space v,
double  tol,
bool  fence 
)

References MADNESS_ASSERT, truncate(), and v.

Referenced by DipoleVector::DipoleVector(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl(), madness::F12Potentials::F12Potentials(), NuclearVector::NuclearVector(), SVPESolver::SVPESolver(), madness::CCPairFunction< T, NDIM >::apply(), KPeriodicBSHOperator::apply(), apply_bsh(), madness::MP2::apply_exchange_vector(), apply_potential(), madness::Diamagnetic_potential_factor::apply_potential(), madness::GTHPseudopotential< Q >::apply_potential(), madness::SCF::apply_potential(), madness::F12Potentials::apply_regularized_potential(), madness::projector_irrep::apply_symmetry_operators(), madness::NuclearCorrelationFactor::apply_U(), apply_U_ncf(), madness::XCOperator< T, NDIM >::apply_xc_kernel(), Calculation::calc_optimal_coeffs(), madness::Nemo::compute_all_cphf(), madness::PNO::compute_CIS_potentials(), madness::OEP::compute_coulomb_potential(), madness::Nemo::compute_cphf_parallel_term(), madness::Znemo::compute_current_density(), compute_energy(), madness::Nemo::compute_energy_regularized(), madness::OEP::compute_exchange_potential(), madness::Nemo::compute_fock_matrix(), madness::F12Potentials::compute_fQg_integrals(), madness::F12Potentials::compute_fQU_integrals(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), madness::Nemo::compute_nemo_potentials(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::Coulomb< T, NDIM >::compute_potential(), madness::Coulomb< T, NDIM >::compute_potential(), madness::Znemo::compute_potentials(), madness::Zcis::compute_potentials(), madness::SCF::compute_residual(), madness::Znemo::compute_residuals(), madness::Zcis::compute_residuals(), Calculation::compute_residuals(), madness::PNO::compute_V_aj_i(), madness::Znemo::compute_vmat(), madness::PNO::compute_Vreg_aj_i(), madness::XCOperator< T, NDIM >::compute_xc_energy(), madness::F12Potentials::compute_xyab_integrals(), madness::F12Potentials::convolve_with_fg(), madness::F12Potentials::convolve_with_fU(), madness::F12Potentials::convolve_with_local_U(), madness::F12Potentials::convolve_with_nonlocal_U(), madness::F12Potentials::convolve_with_U(), madness::F12Potentials::convolve_with_U(), madness::SCF::diag_fock_matrix(), MiniDFT::doit(), doit(), DF::exchange(), madness::HartreeFock< T, NDIM >::get_coulomb_potential(), madness::TDHF::get_tda_potential(), madness::BasisFunctions::guess_contracted_virtuals_from_file(), madness::MP2::guess_mp1_3(), madness::Znemo::hcore_guess(), madness::Nemo::hessian(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess(), madness::PNO::initialize_pairs(), madness::CCPairFunction< T, NDIM >::inner_internal(), madness::Znemo::iterate(), madness::OEP::iterate(), iterate(), madness::Zcis::iterate(), DF::iterate(), madness::CC2::iterate_singles(), madness::TDHF::iterate_vectors(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_large_memory(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_small_memory(), Calculation::load_mos(), madness::Localizer::localize(), madness::Nemo::localize(), main(), main(), madness::Znemo::make_bra(), madness::MP2::make_chi(), madness::Nemo::make_cphf_constant_term(), madness::MP2::make_fKphi0(), madness::Zcis::make_guess(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::MP2::make_KffKphi0(), madness::Nemo::make_laplacian_density(), madness::TDHF::make_mo_bra(), madness::TDHF::make_mo_ket(), Calculation::make_reference(), GygiPot::make_surfcharge(), madness::MP2::make_Uphi0(), Calculation::make_Upsi(), AnsatzBase::make_vbra(), MiniDFT::makeao(), makeao_slow(), molresponseExchange(), madness::EigSolver< T, NDIM >::multi_solve(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::Coulomb< T, NDIM >::MacroTaskCoulomb::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::LocalPotentialOperator< T, NDIM >::operator()(), madness::BSHApply< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), madness::LowRankFunction< T, NDIM, LDIM >::optimize(), madness::LowRankFunction< T, NDIM, LDIM >::orthonormalize(), orthonormalize(), madness::NemoBase::orthonormalize(), orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), SurfaceMoleculeInteraction::perturbed_molecular_pot(), madness::XCOperator< T, NDIM >::prep_xc_args(), madness::XCOperator< T, NDIM >::prep_xc_args_response(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project(), madness::SCF::project(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::SCF::project_ao_basis_only(), madness::projector_irrep::project_on_irreps(), GroundStateCalculation::read(), madness::Znemo::read_real_guess(), madness::OEP::recompute_HF(), madness::LowRankFunction< T, NDIM, LDIM >::reorthonormalize(), madness::Solver< T, NDIM >::reproject(), madness::SCF::restart_aos(), schrodinger2dirac(), SVPESolver::solve(), madness::Nemo::solve(), madness::SCF::solve(), madness::MP2::solve_coupled_equations(), madness::Nemo::solve_cphf(), madness::MP2::solve_residual_equations(), test(), madness::PNO::transform_pairs(), madness::X_space::truncate(), madness::X_space::truncate(), truncate(), truncate(), madness::PNO::truncate_pairs(), madness::SCF::twoint(), update(), MiniDFT::update(), update(), madness::PNO::update_pno(), madness::Nemo::value(), and vector_to_PQ().

◆ truncate() [3/4]

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 
)

Truncates a vector of functions.

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

◆ truncate() [4/4]

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, PROFILE_BLOCK, and v.

◆ try_two_locks()

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().

◆ tt_identity()

template<typename T >
TensorTrain< T > madness::tt_identity ( const long  ndim,
const long  k 
)

compute the n-D identity operator with k elements per dimension

References madness::TensorTrain< T >::get_core(), and k.

◆ two_scale_coefficients()

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 cache, copy(), k, kmax, loaded, and read_twoscale().

Referenced by two_scale_hg().

◆ two_scale_hg()

bool madness::two_scale_hg ( int  k,
Tensor< double > *  hg 
)

◆ type() [1/3]

std::string madness::type ( const EnergyType n)
inline

◆ type() [2/3]

std::string madness::type ( const GuessType n)
inline

◆ type() [3/3]

std::string madness::type ( const PairType n)
inline

◆ TYPEINFO() [1/6]

madness::TYPEINFO ( ,
int  ,
false  ,
true  ,
int  ,
double   
)

◆ TYPEINFO() [2/6]

madness::TYPEINFO ( ,
long  ,
false  ,
true  ,
long  ,
double   
)

◆ TYPEINFO() [3/6]

madness::TYPEINFO ( ,
float  ,
false  ,
true  ,
float  ,
float   
)

◆ TYPEINFO() [4/6]

madness::TYPEINFO ( ,
double  ,
false  ,
true  ,
double  ,
double   
)

◆ TYPEINFO() [5/6]

madness::TYPEINFO ( ,
float_complex  ,
true  ,
true  ,
float  ,
float   
)

◆ TYPEINFO() [6/6]

madness::TYPEINFO ( ,
double_complex  ,
true  ,
true  ,
double  ,
double   
)

◆ unary_op()

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 
)

◆ unary_op_coeffs()

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 func(), op(), madness::Function< T, NDIM >::reconstruct(), and madness::Function< T, NDIM >::unary_op_coeffs().

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

◆ unique_fileid()

std::string madness::unique_fileid ( )

creates a unique filename, using PBS ID if available

References RandomValue< int >().

Referenced by test_Kcommutator(), and test_lowrank_function().

◆ unitfunctor()

template<std::size_t NDIM>
static double madness::unitfunctor ( const Vector< double, NDIM > &  x)
static

◆ unitvec()

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

Construct a unit-Vector that has the same direction as r.

Template Parameters
TThe type of data stored in the Vector.
NThe size of the Vector.
Parameters
[in]rThe Vector.
[in]epsA precision. If the norm of r is less than eps, the zero vector is returned.
Returns
The desired unit-Vector (unless r is numerically the zero Vector).

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

Referenced by madness::NuclearCorrelationFactor::U1_dot_U1_functor::operator()().

◆ user_to_sim()

template<std::size_t NDIM>
static void madness::user_to_sim ( const Vector< double, NDIM > &  xuser,
Vector< double, NDIM > &  xsim 
)
inlinestatic

◆ vec()

template<typename T , typename... Ts>
Vector< T, sizeof...(Ts)+1 > madness::vec ( T  t,
Ts...  ts 
)
inline

Factory function for creating a madness::Vector.

Variadic templates are used to create factories that mimic

inline madness::Vector<T, N> vec(T t1, ..., T tN) {
std::Vector<T, N> ret;
ret[0] = t1;
...
ret[N-1] = tN;
return ret;
}
A simple, fixed dimension vector.
Definition vector.h:64
auto T(World &world, response_space &f) -> response_space
Definition global_functions.cc:34
Vector< T, sizeof...(Ts)+1 > vec(T t, Ts... ts)
Factory function for creating a madness::Vector.
Definition vector.h:711
#define N
Definition testconv.cc:37

This function counts the number of arguments passed in through the argument pack, creates a std::array of the appropriate size, forwards the arguments to the std::array's constructor, and passes the std::array to madness::Vector.

Deprecated:
This function has been replaced by the list-initialization constructor and assignment operator. Rather than
Vector<double, 3> v = vec(1.4, 2.5, 4.0);
static const double v
Definition hatom_sf_dirac.cc:20

use

Vector<double, 3> v{ 1.4, 2.5, 4.0 };

or

Vector<double, 3> v = { 1.4, 2.5, 4.0 };
Note
The first argument is separated from the pack to prevent 0-size arrays and also so that the caller doesn't have to explicitly specify T. It is assumed that all arguments are of type T or are convertible to type T.
Template Parameters
TThe data type for the array.
TsThe argument pack; that is, the list of arguments. The size of the resulting Vector is directly determined from the size of the argument pack.
Parameters
[in]tThe first argument.
[in]tsThe rest of the arguments.
Returns
The Vector with the arguments put into it.

References T().

Referenced by A(), A2(), KPeriodicBSHOperator::apply(), apply_periodic_bsh(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::check_dependency(), ConstantSphere::check_pts(), InhomoConstantSphere::check_pts(), CosineSphere::check_pts(), Y20Sphere::check_pts(), madness::Localizer::determine_frozen_orbitals(), Ebar(), main(), madness::FunctionSpace< T, NDIM >::norm(), madness::VectorOfFunctionsSpace< T, VDIM, FDIM >::norm(), madness::VectorSpace< T, NDIM >::norm(), madness::SRConf< T >::normf(), Pbar(), PbarA(), madness::FunctionSpace< T, NDIM >::scale(), madness::VectorOfFunctionsSpace< T, VDIM, FDIM >::scale(), madness::VectorSpace< T, NDIM >::scale(), madness::CC_vecfunction::serialize(), Tbar(), madness::FunctionImpl< T, NDIM >::tnorm(), and to_response_vector().

◆ vector_factory() [1/8]

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

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

References v.

Referenced by madness::guessfactory::PolynomialFunctor::read_string().

◆ vector_factory() [2/8]

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.

References v.

◆ vector_factory() [3/8]

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.

References v.

◆ vector_factory() [4/8]

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.

References v.

◆ vector_factory() [5/8]

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.

References v.

◆ vector_factory() [6/8]

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.

References v.

◆ vector_factory() [7/8]

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,
const T v6 
)
inline

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

References v.

◆ vector_factory() [8/8]

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,
const T v6,
const T v7 
)
inline

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

References v.

◆ verify_tree()

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

References v.

Referenced by refine_to_common_level().

◆ vmulXX()

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 L, R, and TENSOR_RESULT_TYPE.

Referenced by matrix_mul_sparse(), mul(), mul(), mul_sparse(), and mul_sparse().

◆ wall_time()

double madness::wall_time ( )

Returns the wall time in seconds relative to an arbitrary origin.

As accurate and lightweight as we can get it, but may not be any better than the gettime of day system call.

Returns
The wall time (in seconds).

References e(), first_call, and initialized().

Referenced by madness::Znemo::timer::timer(), madness::Cloud::cloudtimer::~cloudtimer(), madness::SRConf< T >::add_SVD(), apply(), chin_chen(), chin_chen(), madness::WorldProfile::clear(), madness::Nemo::compute_all_cphf(), compute_energy(), compute_energy(), madness::SVDTensor< T >::compute_randomized_svd(), converge(), converge(), converge2s(), cpu_frequency(), cycle_count(), doit(), doplot(), madness::Znemo::timer::end(), molresponse::end_timer(), molresponse::end_timer(), DF::end_timer(), END_TIMER(), END_TIMER(), END_TIMER(), madness::Solver< T, NDIM >::END_TIMER(), END_TIMER(), madness::MP2::END_TIMER(), GygiPot::ESP(), madness::FunctionImpl< T, NDIM >::finalize_apply(), DF::get_times(), madness::Nemo::hessian(), madness::MP2::increment(), madness::SCFProtocol::initialize(), madness::timer::interrupt(), madness::Znemo::iterate(), madness::OEP::iterate(), iterate(), madness::Zcis::iterate(), iterate(), madness::CC2::iterate_lrcc2_pairs(), madness::PNO::iterate_pairs_internal(), main(), main(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), madness::MP2::make_pair(), MPI_Wtime(), ortho3(), ortho5(), madness::WorldProfile::print(), madness::FunctionImpl< T, NDIM >::print_size(), madness::CCPairFunction< T, NDIM >::print_size(), print_stats(), print_stats(), print_stats(), propagate(), propagate(), madness::timer::resume(), madness::MacroTask< taskT >::MacroTaskInternal::run(), madness::MacroTaskQ::run_all(), madness::CC2::solve(), SVPESolver::solve(), madness::Nemo::solve(), madness::SCF::solve(), solve(), madness::CC2::solve_cc2(), madness::MP2::solve_coupled_equations(), madness::CC2::solve_mp2_coupled(), madness::MP2::solve_residual_equations(), madness::CCTimer::start(), madness::MyTimer::start(), madness::profiling::TaskEvent::start(), molresponse::start_timer(), DF::start_timer(), START_TIMER(), START_TIMER(), START_TIMER(), madness::Solver< T, NDIM >::START_TIMER(), START_TIMER(), madness::MP2::START_TIMER(), madness::CCTimer::stop(), madness::MyTimer::stop(), madness::profiling::TaskEvent::stop(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::PoolTaskInterface::submit(), madness::Znemo::timer::tag(), test(), madness::TDHF::test(), test2(), test_adaptive_tree(), test_florian(), test_modified(), test_stuff(), madness::PNO::update_pno(), and madness::CCTimer::update_time().

◆ world_mem_info()

WorldMemInfo * madness::world_mem_info ( )

Returns pointer to internal structure.

References stats.

Referenced by print_stats().

◆ write_molecules_to_file()

void madness::write_molecules_to_file ( const Molecule molecule,
const std::string &  geo_file 
)

◆ x_rks_s__()

int madness::x_rks_s__ ( const double *  r__,
double *  f,
double *  dfdra 
)

◆ x_uks_s__()

int madness::x_uks_s__ ( double *  ra,
double *  rb,
double *  f,
double *  dfdra,
double *  dfdrb 
)

References c_b2, f, and pow().

Referenced by madness::XCfunctional::exc(), and madness::XCfunctional::vxc().

◆ xf()

static double madness::xf ( const coord_3d x)
static

◆ xterm_debug()

void madness::xterm_debug ( const char *  path,
const char *  display 
)
Todo:
Brief description needed.
Todo:
Detailed description needed.
Parameters
pathDescription.
displayDescription.

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

◆ xterm_debug_breakpoint()

void madness::xterm_debug_breakpoint ( )

◆ zero_functions() [1/2]

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.

◆ zero_functions() [2/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::zero_functions ( World world,
int  n,
bool  fence = true 
)

Generates a vector of zero functions (reconstructed)

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

◆ zero_functions_compressed()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::zero_functions_compressed ( World world,
int  n,
bool  fence = true 
)

Generates a vector of zero functions (compressed)

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

Variable Documentation

◆ ___

const std::vector<Slice> madness::___ = vector_factory(_,_,_,_,_,_)
static

◆ _c

Tensor<double> madness::_c
static

Referenced by autoc().

◆ _cread

Tensor<double> madness::_cread
static

Referenced by autoc(), load_coeffs(), and read_data().

◆ acut1e_6

const double madness::acut1e_6 = 0.25

◆ atomic_data

const AtomicData madness::atomic_data[NUMBER_OF_ATOMS_IN_TABLE]
static

Atomic weights are taken from IUPAC 2005 (M. E. Wieser, “Atomic weights of the elements 2005 (IUPAC Technical Report),” Pure and Applied Chemistry, vol. 78, no. 11.) Negative masses refer to the longest-living isotope. Note that the masses refer to isotopic averaging, not to the specified isotope!

Referenced by atomic_number_to_symbol(), get_atomic_data(), and symbol_to_atomic_number().

◆ autocorr_filename

const char* madness::autocorr_filename = "autocorr"
static

Referenced by load_coeffs(), read_data(), and test_autoc().

◆ binder

ThreadBinder madness::binder

◆ c_b14

const double madness::c_b14 = 1.333333333333333333333333333333

Referenced by c_uks_vwn5__().

◆ c_b2

const double madness::c_b2 = 0.333333333333333333333333333333333

Referenced by x_rks_s__(), and x_uks_s__().

◆ c_b7

const double madness::c_b7 = 0.333333333333333333333333333333

Referenced by c_rks_vwn5__(), and c_uks_vwn5__().

◆ cache

class madness::twoscale_cache_class madness::cache[kmax+1]
static

◆ cutoff_radius

double madness::cutoff_radius = 5.0
static

◆ data_is_read

bool madness::data_is_read = false
static

Referenced by load_quadrature(), and read_data().

◆ default_jdim

const long madness::default_jdim = 5551212
static

◆ default_random_generator

Random madness::default_random_generator

◆ dir

const string madness::dir = "coredata/"
static

◆ DYNAMIC_TAG_BASE

const Tag madness::DYNAMIC_TAG_BASE = 1024
static
Todo:
Brief description needed.

◆ f

const Function< T, NDIM > & madness::f
Initial value:
{
return inner(f,g)
double(* f)(const coord_3d &)
Definition derivatives.cc:54
std::complex< double > inner(const Fcwf &psi, const Fcwf &phi)
Definition fcwf.cc:275
double g(const coord_1d &r)
Definition testgconv.cc:49

Referenced by madness::CubicInterpolationTable< T >::CubicInterpolationTable(), DipoleVector::DipoleVector(), abs(), abs_square(), DirichletCondIntOp::action(), madness::FutureImpl< T >::add_to_assignments(), madness::LoadBalanceDeux< NDIM >::add_tree(), madness::WorldObject< Derived >::am_arg(), madness::WorldTaskQueue::am_arg(), LProjector::analyze(), ExactSpinor::angular(), apply(), apply(), apply(), apply(), madness::FunctionImpl< T, NDIM >::apply(), apply(), apply(), apply(), apply(), apply(), apply(), apply(), apply_1d_realspace_push(), madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push(), madness::MP2::apply_exchange(), madness::Solver< T, NDIM >::apply_hf_exchange(), apply_mask(), apply_only(), apply_periodic_bsh(), apply_periodic_bsh(), madness::guessfactory::apply_polynomial_exop(), madness::guessfactory::apply_polynomial_exop(), madness::FunctionImpl< T, NDIM >::apply_source_driven(), madness::SeparatedConvolution< Q, NDIM >::apply_transformation(), madness::SeparatedConvolution< Q, NDIM >::apply_transformation2(), madness::SeparatedConvolution< Q, NDIM >::apply_transformation3(), madness::guessfactory::apply_trigonometric_exop(), madness::guessfactory::apply_trigonometric_exop(), madness::MP2::asymmetry(), c_rks_vwn5__(), c_uks_vwn5__(), change_tree_state(), madness::Specialbox_op< T, NDIM >::check_special_points(), madness::guessfactory::compute_centroid(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), compute_energy(), madness::max_of_x_1_smooth::compute_factor(), compute_fock_matrix(), madness::MP2::compute_gQf(), madness::MP2::compute_gQf_cc2interface(), conj(), convert(), copy(), copy(), cross(), madness::CubicInterpolationTable< T >::cubic_fit(), madness::smooth< T, NDIM >::cut_oscillations(), madness::MP2::debug_cc2(), madness::FunctionSpace< T, NDIM >::destroy(), madness::VectorOfFunctionsSpace< T, VDIM, FDIM >::destroy(), madness::FunctionImpl< T, NDIM >::diff(), diff(), dipole_generator(), madness::Function< T, NDIM >::dirac_convolution(), madness::CCPairFunction< T, NDIM >::dirac_convolution_decomposed(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), madness::FunctionImpl< T, NDIM >::do_diff1(), madness::DerivativeBase< T, NDIM >::do_diff1(), madness::FunctionImpl< T, NDIM >::do_dirac_convolution(), do_response_orbital_vtk_plots(), Plotter::dolineplot(), Plotter::dolineplot(), Plotter::doplot1(), Plotter::dovolumeplot(), Plotter::dovolumeplot(), dxprintvalue(), dxprintvalue(), madness::CubicInterpolationTable< T >::err(), errsq(), madness::XCfunctional::exc(), expL(), madness::FunctionFactory< T, NDIM >::f(), fcube(), fcube(), fcube(), madness::FunctionImpl< T, NDIM >::fcube(), madness::FunctionImpl< T, NDIM >::fcube(), madness::DistributedMatrix< T >::fill(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_failure_handler(), madness::DerivativeBase< T, NDIM >::find_neighbor(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_success_handler(), madness::FunctionImpl< T, NDIM >::forward_do_diff1(), madness::DerivativeBase< T, NDIM >::forward_do_diff1(), madness::FunctionFactory< T, NDIM >::functor(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), madness::smooth< T, NDIM >::gaussian_smoothing(), madness::Function< T, NDIM >::gaxpy_ext(), madness::FunctionImpl< T, NDIM >::gaxpy_ext(), madness::FunctionImpl< T, NDIM >::gaxpy_ext_node(), madness::FunctionImpl< T, NDIM >::gaxpy_ext_recursive(), madness::FunctionImpl< T, NDIM >::gaxpy_oop_reconstructed(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::get_func(), get_impl(), madness::MP2::get_residue(), get_size(), madness::Projector< T, NDIM >::get_vectors_for_outer_product(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), grad(), grad_ble_one(), grad_ble_two(), grad_bpsline_two(), grad_bspline_one(), grad_bspline_three(), madness::Solver< T, NDIM >::gram_schmidt(), madness::PNO::guess_virtuals(), madness::BasisFunctions::guess_with_exop(), madness::CC_vecfunction::hash(), madness::Znemo::hcore_guess(), inner(), inner(), inner(), inner(), inner(), inner(), inner(), madness::Function< T, NDIM >::inner_adaptive(), madness::FunctionImpl< T, NDIM >::inner_adaptive_local(), madness::FunctionImpl< T, NDIM >::inner_adaptive_recursive(), madness::Function< T, NDIM >::inner_ext(), madness::FunctionImpl< T, NDIM >::inner_ext_local(), madness::Function< T, NDIM >::inner_ext_local(), madness::FunctionImpl< T, NDIM >::inner_ext_node(), madness::FunctionImpl< T, NDIM >::inner_ext_recursive(), innerXX(), innerXX(), madness::CC_vecfunction::insert(), madness::CCIntermediatePotentials::insert(), madness::MP2::iterate(), madness::Zcis::iterate(), iterate(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), laplacian(), line_plot(), madness::archive::ArchiveLoadImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::shared_ptr< const FunctionImpl< T, NDIM > > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::shared_ptr< FunctionImpl< T, NDIM > > >::load(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< archiveT >, CCPairFunction< T, NDIM > >::load(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< archiveT >, Function< T, NDIM > >::load(), load(), load(), load_balance(), madness::LoadBalanceDeux< NDIM >::load_balance(), EmbeddedDirichlet::load_balance(), madness::MP2::load_function(), madness::Nemo::load_function(), load_function(), main(), main(), madness::smooth< T, NDIM >::make_explog(), madness::smooth< T, NDIM >::make_plots(), madness::Nemo::make_plots(), madness::Function< T, NDIM >::map_and_mirror(), map_and_mirror(), madness::FunctionImpl< T, NDIM >::map_and_mirror(), map_tensor(), madness::Function< T, NDIM >::mapdim(), mapdim(), madness::FunctionImpl< T, NDIM >::mapdim(), matrix_dot(), matrix_dot(), matrix_inner(), matrix_inner(), matrix_inner(), matrix_inner_old(), matrix_mul_sparse(), madness::smooth< T, NDIM >::merge_functions(), madness::smooth< T, NDIM >::merge_functions(), madness::Function< T, NDIM >::mirror(), mirror(), madness::FunctionImpl< T, NDIM >::mirror(), mul(), mul(), madness::Function< T, NDIM >::mul_on_demand(), multiply(), multiply(), madness::FunctionImpl< T, NDIM >::multiply(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast2(), N(), madness::ContractedGaussianShell::normalize(), op(), madness::CCIntermediatePotentials::operator()(), madness::CCIntermediatePotentials::operator()(), LProjector::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::pg_operator::operator()(), madness::DerivativeBase< T, NDIM >::operator()(), madness::munging_operator::operator()(), madness::xc_lda_potential::operator()(), madness::ElectronCuspyBox_op< T, NDIM >::operator()(), madness::NuclearCuspyBox_op< T, NDIM >::operator()(), madness::merging_operator::operator()(), madness::SeparatedConvolution< Q, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::GenericConvolution1D< Q, opT >::Shmoo::operator()(), madness::response_space::operator*(), operator*(), operator*(), operator+(), operator+(), operator-(), operator-(), operator<<(), madness::Function< T, NDIM >::operator=(), madness::LowRankFunction< T, NDIM, LDIM >::operator=(), optimize_coeffs(), madness::TDHF::oscillator_strength_length(), madness::TDHF::oscillator_strength_velocity(), madness::FunctionImpl< T, NDIM >::parent_to_child_NS(), partial_mul(), madness::CompositeFactory< T, NDIM, MDIM >::particle1(), madness::CompositeFactory< T, NDIM, MDIM >::particle1(), madness::CompositeFactory< T, NDIM, MDIM >::particle2(), madness::CompositeFactory< T, NDIM, MDIM >::particle2(), madness::XCfunctional::plot(), plot(), madness::CC2::plot(), plot_along(), plot_along(), plot_cubefile(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line_print_value(), plot_line_print_value(), Calculation::plot_p(), plot_plane(), plot_plane(), plot_plane(), plot_symmetry_operators(), Calculation::plot_z(), plotdx(), plotpovray(), plotvtk_begin(), plotvtk_data(), plotvtk_data(), plotvtk_end(), madness::DQueue< T >::pop_front(), position_stream(), madness::Molecule::position_stream_in_library(), position_stream_to_word(), madness::trajectory< NDIM >::print_psdot(), print_tree_jsonfile(), madness::TDHF::print_xfunctions(), printfunc(), madness::CCPairFunction< T, NDIM >::project_out(), madness::FunctionImpl< T, NDIM >::project_out2(), madness::CCPairFunction< T, NDIM >::project_out_decomposed(), madness::CCPairFunction< T, NDIM >::project_out_op_decomposed(), ExactSpinor::psivalue(), madness::response_space::push_back(), madness::DQueue< T >::push_front_with_lock(), InputParameters::read(), madness::DFParameters::read(), madness::Molecule::read(), madness::BasisFunctions::read_basis_from_file(), madness::BasisFunctions::read_contracted_basis_from_file(), read_data(), madness::DFParameters::read_file(), madness::ElectronicStructureParams::read_file(), madness::Molecule::read_file(), CalculationParameters::read_file(), madness::Derivative< T, NDIM >::read_from_file(), madness::QCCalculationParametersBase::read_input(), madness::QCCalculationParametersBase::read_internal(), madness::Molecule::read_structure_from_library(), madness::Molecule::read_xyz(), refine(), residual(), save(), save(), madness::MP2::save_function(), save_function(), madness::Nemo::save_function(), madness::FunctionImpl< T, NDIM >::scale_oop(), madness::DQueue< T >::scan(), madness::detail::DistCache< keyT >::set_cache_value(), madness::Molecule::GeometryParameters::set_derived_values(), madness::Function< T, NDIM >::set_impl(), Calculation::set_protocol(), madness::SCF::set_protocol(), madness::ConditionVariable::signal(), madness::Nemo::smoothen(), madness::SCF::solve(), square(), madness::archive::ArchiveStoreImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< archiveT >, CCPairFunction< T, NDIM > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< archiveT >, Function< T, NDIM > >::store(), sum(), swap_particles(), symmetrize(), madness::TDHF::symmetrize(), T(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), madness::Random::test(), test(), Test5(), Test6(), test6(), Test6a(), madness::smooth< T, NDIM >::test_1d(), test_add(), test_apply(), test_apply_push_1d(), test_basic(), test_bsh(), test_constructor(), test_conv(), test_conversion(), test_coulomb(), test_cross(), test_diff(), test_dot(), test_exchange(), test_fock(), test_gconv(), test_inner(), test_inner(), test_integration(), test_io(), test_kinetic(), madness::Znemo::test_landau_wave_function(), test_math(), test_matrix_mul_sparse(), test_multi_to_multi_op(), test_multiply(), test_op(), test_opdir(), test_orthogonalization(), test_partial_inner_3d(), test_partial_inner_6d(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), madness::Solver< T, NDIM >::test_periodicity(), test_plot(), test_proj(), test_projector(), test_projector(), test_Q12_projector(), test_qm(), test_rot(), test_scalar_multiplication(), test_swap_particles(), test_transform(), test_unaryop(), test_xc2(), test_xcfunctional(), testNavierStokes(), transpose(), madness::Function< T, NDIM >::unaryop(), madness::MutexFair::unlock(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2(), madness::XCfunctional::vxc(), write_molecules_to_file(), x_rks_s__(), and x_uks_s__().

◆ filename

const char* madness::filename = "gaussleg"
static

Referenced by madness::AtomicBasisSet::AtomicBasisSet(), madness::archive::BinaryFstreamInputArchive::BinaryFstreamInputArchive(), madness::archive::BinaryFstreamOutputArchive::BinaryFstreamOutputArchive(), madness::CorePotentialManager::CorePotentialManager(), inputfile::inputfile(), madness::MacroTask< taskT >::io_redirect::io_redirect(), MolecularEntity::MolecularEntity(), madness::archive::ParallelInputArchive< localarchiveT >::ParallelInputArchive(), madness::archive::ParallelInputArchive< localarchiveT >::ParallelInputArchive(), madness::archive::ParallelOutputArchive< localarchiveT >::ParallelOutputArchive(), madness::archive::ParallelOutputArchive< localarchiveT >::ParallelOutputArchive(), madness::Solver< T, NDIM >::Solver(), madness::archive::TextFstreamInputArchive::TextFstreamInputArchive(), madness::archive::TextFstreamOutputArchive::TextFstreamOutputArchive(), checksum_file(), cubefile_header(), madness::FunctionImpl< T, NDIM >::do_print_grid(), madness::FunctionImpl< T, NDIM >::do_print_plane(), do_response_orbital_vtk_plots(), draw_circle(), draw_line(), madness::archive::BaseParallelArchive< Archive >::exists(), madness::QCCalculationParametersBase::file_exists(), get_charge_from_file(), madness::Solver< T, NDIM >::init(), load(), Calculation::load_mos(), madness::GTHPseudopotential< Q >::load_pseudo_from_file(), load_quadrature(), madness::CC_vecfunction::load_restartdata(), main(), main(), DF::make_density_lineplots(), madness::archive::BinaryFstreamInputArchive::open(), madness::archive::BinaryFstreamOutputArchive::open(), madness::archive::TextFstreamInputArchive::open(), madness::archive::TextFstreamOutputArchive::open(), madness::archive::BaseParallelArchive< Archive >::open(), plot(), Spinor::plot(), plot_along(), plot_along(), plot_cubefile(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line(), Calculation::plot_p(), plot_plane(), plot_plane(), plot_plane(), Calculation::plot_z(), plotdx(), plotpovray(), plotvtk_begin(), plotvtk_data(), plotvtk_data(), plotvtk_end(), madness::MolecularOrbitals< T, NDIM >::print_cubefiles(), madness::FunctionImpl< T, NDIM >::print_grid(), print_meminfo(), print_meminfo_ostream(), madness::FunctionImpl< T, NDIM >::print_plane(), print_tree_jsonfile(), InputParameters::read(), madness::InitParameters::read(), madness::BasisFunctions::read_basis_from_file(), madness::BasisFunctions::read_basis_from_file(), madness::F12Potentials::read_cabs_from_file(), madness::BasisFunctions::read_contracted_basis_from_file(), madness::BasisFunctions::read_contracted_basis_from_file(), madness::Molecule::read_core_file(), read_data(), madness::Znemo::read_explicit_guess_functions(), madness::DFParameters::read_file(), madness::ElectronicStructureParams::read_file(), madness::Molecule::read_file(), MolecularEntity::read_file(), CalculationParameters::read_file(), madness::AtomicBasisSet::read_file(), madness::CorePotentialManager::read_file(), madness::Derivative< T, NDIM >::read_from_file(), madness::QCCalculationParametersBase::read_input(), madness::AtomicBasisSet::read_nw_file(), madness::MolecularOrbitals< T, NDIM >::read_restartdata(), madness::Molecule::read_xyz(), madness::InitParameters::readnw(), redirectio(), madness::archive::BaseParallelArchive< Archive >::remove(), madness::commandlineparser::remove_extension(), save(), madness::MolecularOrbitals< T, NDIM >::save_restartdata(), madness::CC_vecfunction::save_restartdata(), madness::Derivative< T, NDIM >::set_ble1(), madness::Derivative< T, NDIM >::set_ble2(), madness::Derivative< T, NDIM >::set_bspline1(), madness::Derivative< T, NDIM >::set_bspline2(), madness::Derivative< T, NDIM >::set_bspline3(), solve(), madness::TDHF::solve_cis(), test_adaptive_tree(), test_smooth_maxout(), testNavierStokes(), madness::gridbase::visualize(), and write_test_input().

◆ g

NDIM const opT & madness::g
Initial value:
{
#define PROFILE_FUNC
Definition worldprofile.h:209

Referenced by ExactSpinor::angular(), apply_bsh(), apply_periodic_bsh(), compute_energy(), madness::MP2::compute_gQf(), madness::MP3::compute_mp3_ghij(), madness::MP3::compute_mp3_ghij(), madness::MP3::compute_mp3_ghij_fast(), cross(), madness::Znemo::custom_guess(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), Plotter::dolineplot(), Plotter::dovolumeplot(), madness::TwoElectronFactory< T, NDIM >::gamma(), madness::FunctionImpl< T, NDIM >::gaxpy_inplace_reconstructed(), madness::FunctionImpl< T, NDIM >::gaxpy_oop_reconstructed(), madness::SDFCircle::grad_sdf(), madness::SDFSphere::grad_sdf(), Fred::gradient(), Test2::gradient(), CoreFittingTarget::gradient(), data< T, NDIM >::initialize(), inner(), inner(), inner(), inner(), inner(), innerXX(), innerXX(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), Fred::make_g(), matrix_dot(), matrix_dot(), matrix_inner(), matrix_inner(), matrix_inner(), matrix_inner_old(), matrix_mul_sparse(), multiply(), multiply(), madness::FunctionImpl< T, NDIM >::multiply(), QuasiNewton::new_search_direction(), madness::QuasiNewton::new_search_direction(), madness::MolecularOptimizer::new_search_direction2(), BoysLocalization::operator()(), madness::response_space::operator+=(), MySteepestDescent::optimize(), SteepestDescent::optimize(), QuasiNewton::optimize(), madness::SteepestDescent::optimize(), madness::QuasiNewton::optimize(), madness::FunctionImpl< T, NDIM >::partial_inner(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), partial_mul(), plot_line(), plot_line(), plot_line(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project(), madness::FunctionImpl< T, NDIM >::project_out2(), ExactSpinor::psivalue(), madness::AtomicBasisSet::read_file(), madness::Zcis::read_guess(), madness::AtomicBasisSet::read_nw_file(), madness::Zcis::save_guess(), madness::GaussSlater::Spp_div_S(), madness::GradientalGaussSlater::Spp_div_S(), madness::GradientalGaussSlater::Sr_div_S(), madness::GradientalGaussSlater::Srr_div_S(), madness::GradientalGaussSlater::Srrr_div_S(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), madness::Gnuplot::test(), test(), Test6(), test_coulomb(), test_gconv(), test_io(), test_rnlp(), test_U_el(), test_unaryop(), testgradG(), transpose(), and Fred::value_and_gradient().

◆ has_freestanding_default_serialize_v

template<typename T , typename Archive >
constexpr bool madness::has_freestanding_default_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
default_serialize(ar, t);

◆ has_freestanding_default_serialize_with_size_v

template<typename T , typename Archive >
constexpr bool madness::has_freestanding_default_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_with_size_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
default_serialize(ar, &t, 1u);

◆ has_freestanding_serialize_v

template<typename T , typename Archive >
constexpr bool madness::has_freestanding_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
serialize(ar, t);

◆ has_freestanding_serialize_with_size_v

template<typename T , typename Archive >
constexpr bool madness::has_freestanding_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_size_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
serialize(ar, &t, 1u);

◆ has_freestanding_serialize_with_version_v

template<typename T , typename Archive >
constexpr bool madness::has_freestanding_serialize_with_version_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_version_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
serialize(ar, t, 0u);
static double u(double r, double c)
Definition he.cc:20

◆ has_member_serialize_v

template<typename T , typename Archive >
constexpr bool madness::has_member_serialize_v = madness::meta::is_detected_v<madness::has_member_serialize_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
t.serialize(ar);

◆ has_member_serialize_with_version_v

template<typename T , typename Archive >
constexpr bool madness::has_member_serialize_with_version_v = madness::meta::is_detected_v<madness::has_member_serialize_with_version_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
t.serialize(ar, 0u);

◆ has_nonmember_load_and_store_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_load_and_store_v = has_nonmember_load_v<T, Archive> && has_nonmember_store_v<T, Archive>
inlineconstexpr

◆ has_nonmember_load_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_load_v = madness::meta::is_detected_v<madness::has_nonmember_load_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
static void load(const A &ar, const U &t)
Load an object.
Definition archive.h:678

◆ has_nonmember_serialize_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_serialize_v = madness::meta::is_detected_v<madness::has_nonmember_serialize_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
static void serialize(const Archive &ar, T &t)
Serializes the type.
Definition archive.h:560

◆ has_nonmember_store_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_store_v = madness::meta::is_detected_v<madness::has_nonmember_store_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
static std::enable_if_t< is_output_archive_v< A > &&!std::is_function< U >::value &&(has_member_serialize_v< U, A >||has_nonmember_serialize_v< U, A >||has_freestanding_serialize_v< U, A >||has_freestanding_default_serialize_v< U, A >), void > store(const A &ar, const U &t)
Definition archive.h:621

◆ has_nonmember_wrap_load_and_store_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_wrap_load_and_store_v = has_nonmember_wrap_load_v<T, Archive> && has_nonmember_wrap_store_v<T, Archive>
inlineconstexpr

◆ has_nonmember_wrap_load_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_wrap_load_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_load_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
static const Archive & wrap_load(const Archive &ar, const T &t)
Load an object sandwiched between its preamble and postamble.
Definition archive.h:747

◆ has_nonmember_wrap_store_v

template<typename T , typename Archive >
constexpr bool madness::has_nonmember_wrap_store_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_store_t,T,Archive>
inlineconstexpr

true if this is well-formed:

// T t; Archive ar;
static const Archive & wrap_store(const Archive &ar, const T &t)
Store an object sandwiched between its preamble and postamble.
Definition archive.h:733

◆ is_always_serializable

template<typename T >
constexpr bool madness::is_always_serializable
constexpr
Initial value:
=
std::is_arithmetic<T>::value ||
std::is_same<std::nullptr_t, typename std::remove_cv<T>::type>::value ||
is_any_function_pointer_v<T> ||
std::is_function<T>::value

◆ is_any_function_pointer_v

template<typename T >
constexpr bool madness::is_any_function_pointer_v = is_any_function_pointer<T>::value
constexpr

◆ is_archive_v

template<typename T >
constexpr bool madness::is_archive_v = meta::is_detected_v<is_archive_defined_t,T>
inlineconstexpr

◆ is_default_serializable_v

template<typename Archive , typename T >
constexpr bool madness::is_default_serializable_v = is_default_serializable<Archive, T>::value
inlineconstexpr

Referenced by test_in().

◆ is_default_serializable_v< Archive, const T >

template<typename Archive , typename T >
constexpr bool madness::is_default_serializable_v< Archive, const T > = is_default_serializable_v<Archive, T>
inlineconstexpr

◆ is_function_pointer_v

template<typename T >
constexpr bool madness::is_function_pointer_v = is_function_pointer<T>::value
constexpr

◆ is_input_archive_v

template<typename T >
constexpr bool madness::is_input_archive_v = meta::is_detected_v<is_input_archive_defined_t, T>
inlineconstexpr

◆ is_iostreammable_v

template<typename T >
constexpr bool madness::is_iostreammable_v = is_istreammable_v<T> && is_ostreammable_v<T>
constexpr

providing automatic support for serializing to/from std streams requires bidirectional streammability

◆ is_istreammable_v

template<typename T >
constexpr bool madness::is_istreammable_v = is_istreammable<T>::value
constexpr

Shortcut for is_istreammable<T>::value.

Referenced by test_in().

◆ is_ostreammable_v

template<typename T >
constexpr bool madness::is_ostreammable_v = is_ostreammable<T>::value
constexpr

Shortcut for is_ostreammable<T>::value.

Referenced by test_in().

◆ is_output_archive_v

template<typename T >
constexpr bool madness::is_output_archive_v = meta::is_detected_v<is_output_archive_defined_t, T>
inlineconstexpr

◆ is_serializable_v

template<typename Archive , typename T >
constexpr bool madness::is_serializable_v
inlineconstexpr
Initial value:
= is_archive_v<Archive> && (is_default_serializable_v<Archive, T> ||
is_user_serializable_v<Archive,T>)

Evaluates to true if can serialize an object of type T to an object of type Archive, using either user-provided methods or, if T is default-serializable to Archive, using default method for this Archive

Template Parameters
Archive
T

◆ is_serializable_v< Archive, const T >

template<typename Archive , typename T >
constexpr bool madness::is_serializable_v< Archive, const T > = is_serializable_v<Archive, T>
inlineconstexpr

◆ is_text_archive_v

template<typename Archive >
constexpr const bool madness::is_text_archive_v = is_text_archive<Archive>::value
constexpr

is_text_archive_v is a shorthand for is_text_archive<A>::value

Template Parameters
Archivean archive type

◆ is_trivially_copyable_v

template<typename T >
constexpr bool madness::is_trivially_copyable_v = is_trivially_copyable<T>::value
inlineconstexpr

◆ is_trivially_serializable_v

template<typename T >
constexpr bool madness::is_trivially_serializable_v = is_trivially_serializable<T>::value
inlineconstexpr

◆ is_user_serializable_v

template<typename Archive , typename T >
constexpr bool madness::is_user_serializable_v
inlineconstexpr
Initial value:
= is_archive_v<Archive> && (has_member_serialize_v<T, Archive> ||
has_nonmember_serialize_v<T, Archive> ||
((has_nonmember_load_v<T, Archive> || has_nonmember_wrap_load_v<T, Archive>) && is_input_archive_v<Archive> && !has_freestanding_default_serialize_v<T, Archive>) ||
((has_nonmember_store_v<T, Archive> || has_nonmember_wrap_store_v<T, Archive>) && is_output_archive_v<Archive> && !has_freestanding_default_serialize_v<T, Archive>))

Evaluates to true if can serialize an object of type T to an object of type Archive using user-provided methods

Template Parameters
Archive
T

◆ is_user_serializable_v< Archive, const T >

template<typename Archive , typename T >
constexpr bool madness::is_user_serializable_v< Archive, const T > = is_user_serializable_v<Archive, T>
inlineconstexpr

◆ kcur

int madness::kcur = -1
static

Referenced by autoc().

◆ kmax

const int madness::kmax = 60
static

◆ kmax_autoc

const int madness::kmax_autoc = 30
static

Referenced by load_coeffs().

◆ kread

int madness::kread = -1
static

Referenced by autoc(), load_coeffs(), and read_data().

◆ loaded

bool madness::loaded = 0
static

◆ mask_factor

double madness::mask_factor = 5.0
static

◆ max_npt

const int madness::max_npt = 64
static

◆ MAXK

const int madness::MAXK = 30
static

◆ MAXLEVEL

const int madness::MAXLEVEL = 8*sizeof(Translation)-2
static

◆ nn1

double madness::nn1[100]
static

◆ NUMBER_OF_ATOMS_IN_TABLE

const unsigned int madness::NUMBER_OF_ATOMS_IN_TABLE = 110
static

◆ NUMEVENTS

const int madness::NUMEVENTS = 0

Referenced by print_stats().

◆ phi_norms

double madness::phi_norms[100]
static

◆ points

Tensor<double> madness::points[max_npt+1]
static

◆ print_timings

bool madness::print_timings = false
static

◆ reduction_alg

std::string madness::reduction_alg ="divide_conquer"
static

◆ rmi_task_is_running

std::atomic<bool> madness::rmi_task_is_running = false
static

◆ sss

std::vector<double> madness::sss
static

Referenced by END_TIMER(), and START_TIMER().

◆ tensor_type_names

const char* madness::tensor_type_names[]
extern

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

◆ threadcounter

AtomicInt madness::threadcounter
static

◆ ttt

std::vector<double> madness::ttt
static

◆ twoscale_filename

const char* madness::twoscale_filename = "coeffs"
static

Referenced by load_coeffs(), and read_twoscale().

◆ weights

Tensor<double> madness::weights[max_npt+1]
static