MADNESS 0.10.1

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  mTxmq_detail
namespace  operators
namespace  population
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
class  array_of_bools
 syntactic sugar for std::array<bool, N> More...
struct  asymptotic_density
struct  asymptotic_slater
struct  asymptotic_slater_kernel
class  Atom
struct  atom_information
 Needed information about atom to compute asymptotic correction. More...
class  atomic_attraction
class  atomic_shared_ptr
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
class  BatchTransport
 Point-to-point transfer of serialized function batches between universe ranks. More...
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  BoxSurfaceDisplacementRange
class  BoxSurfaceDisplacementValidator
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
class  CC2Results
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  CCPairBuilder
 build an MP2 or CC2 or LRCC2 etc pair, possibly including the lo-rank parts More...
class  CCPairFunction
 a 6D function, either in full or low rank form, possibly including an 2-particle function More...
struct  CCParameters
class  CCPotentials
 Class which calculates all types of CC2 Potentials. More...
struct  CCSize
 print accumulated size of all functions More...
struct  CCTimer
 Timer Structure. More...
struct  charactertable
struct  CISData
 POD for CIS excitation. More...
class  CISResults
class  Cloud
 cloud class More...
class  CloudOwnerPmap
 Process map for the cloud's batch container. 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
struct  composite_product_op_NS
 Adaptive sum-of-products operator over a vector of composite_terms. More...
struct  composite_term
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  ConvergenceResults
 holds convergence results of the calculation 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...
class  CoreOrbitalDerivativeFunctor
 Functor for evaluating the derivative of a core orbital for a given atom in a molecule. More...
class  CoreOrbitalFunctor
 Functor for evaluating a core orbital of a specific atom in a molecule. More...
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  DFConvergenceMetrics
struct  DFParameters
class  DFT
class  DFTCoulombOp
class  DFTCoulombPeriodicOp
class  dftgrid
class  DFTNuclearChargeDensityOp
class  DFTNuclearPotentialOp
struct  DiagnosticEntry
class  DiagnosticMatrix
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  DispersionCorrection
 interface class to simple-dftd3, Grimme's D3 empirical dispersion correction 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  ExchangeBatchLRU
 Bounded cache of fetched exchange batches, keyed by cloud record key. More...
struct  ExchangeCommutator
struct  ExchTaskProfile
 One task's record for the exchange profiler. More...
class  F12Parameters
class  F12Potentials
 Class that provides all necessary F12 Potentials and Integrals. More...
class  FermiNuclearDensityFunctor
 Functor representing the Fermi nuclear density distribution for a given atom. More...
struct  FinalizeNodeRec
 One coefficient node in transit during the exchange finalize. More...
class  FinalizeReducer
 Receiving end of the exchange finalize, living in the world the transfer rides on. 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  GaussianNuclearDensityPotentialFunctor
 Functor for evaluating the Coulomb potential of all nuclei of a molecule; nuclei are represented by primitive spherical (l=0) Gaussians. More...
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...
struct  hartree_leaf_op_vec
 returns true if the sum of hartree products is a leaf node (compute combined 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  io_redirect
 RAII class to redirect cout to a file or to /dev/null. More...
struct  io_redirect_cout
 class to temporarily redirect output to cout 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< 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
struct  is_scalar_result< madness::ScalarResult< T > >
struct  is_scalar_result< madness::ScalarResultImpl< T > >
struct  is_scalar_result_impl
struct  is_scalar_result_ptr
struct  is_scalar_result_ptr< std::shared_ptr< madness::ScalarResultImpl< T > > >
struct  is_scalar_result_ptr_vector
struct  is_scalar_result_ptr_vector< std::vector< std::shared_ptr< typename madness::ScalarResultImpl< T > > > >
struct  is_scalar_result_vector
struct  is_scalar_result_vector< std::vector< 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_tuple
struct  is_tuple< std::tuple< T... > >
struct  is_vector
struct  is_vector< std::vector< Q > >
struct  IsSupported
struct  IsSupported< TypeData, ReturnType, true >
struct  KahanAccumulator
struct  KahanAccumulator< Complex, std::enable_if_t<!std::is_floating_point_v< Complex > > >
 implements Kahan summation for complex numbers More...
struct  KahanAccumulator< Real, std::enable_if_t< std::is_floating_point_v< Real > > >
 implements Kahan summation for real numbers More...
class  KernelRange
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...
class  LatticeRange
 Denotes lattice summation over range [-N, N]; N=0 is equivalent to including the simulation cell only. More...
struct  LBCost
struct  lbcost
class  LBDeuxPmap
class  LBNodeDeux
class  Leaf_op
struct  leaf_op
class  Leaf_op_other
struct  LeafOpBase
struct  LeafOpRef
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  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  MacroTaskComputeCorrelationEnergy
class  MacroTaskConstantPart
struct  MacroTaskInfo
class  MacroTaskIntermediate
class  MacroTaskIteratePair
class  MacroTaskOperationBase
class  MacroTaskPartitioner
 partition one (two) vectors into 1D (2D) batches. More...
class  MacroTaskQ
class  MacroTaskQFactory
 Factory for the MacroTaskQ. More...
class  MacroTaskSinglesPotentialEx
class  MacroTaskSinglesPotentialGs
class  MadnessException
 Base class for exceptions thrown in MADNESS. More...
struct  max_of_x_1_smooth
class  MemoryMeasurer
 measure the memory usage of all FunctionImpl objects of all worlds More...
struct  merging_operator
class  MetaDataResults
 holds metadata of the calculation More...
class  molecular_grid
 given a molecule, return a suitable grid More...
class  MolecularCorePotentialFunctor
 Functor for evaluating the molecular core potential at a given point in space. More...
class  MolecularEnergy
class  MolecularOptimizationParameters
struct  MolecularOptimizationTargetInterface
class  MolecularOptimizer
 Molecular optimizer derived from the QuasiNewton optimizer. More...
class  MolecularOrbitals
class  MolecularPotentialFunctor
 Functor for evaluating the nuclear attraction potential of a molecule at a given point. More...
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
struct  nemo_u1_functors
 the cuspy half of the nemo tau decomposition, supplied pointwise More...
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  NuclearDensityFunctor
 Default functor for evaluating nuclear density at a given point in space. More...
class  OEP
class  OEP_Parameters
class  OEPResults
struct  op_leaf_op
class  Operator
 A generic operator: takes in one T and produces another T. More...
struct  OperatorInfo
class  OptimizationResults
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...
class  PCMParameters
 input parameters for the polarizable continuum model – the pcm data group 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
 Manages molecular potentials and core projections for quantum chemistry calculations. More...
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  PropertyResults
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  RamanResults
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  RestartCapabilities
struct  RestartPlan
 the decision: one source, one starting rung, one reason More...
struct  RestartSources
struct  RestartSummary
class  ResultsBase
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  SAPFunctor
 Functor for evaluating a smoothed atomic potential, supporting open and periodic boundary conditions. More...
class  ScalarResult
class  ScalarResultImpl
 helper class for returning the result of a task, which is not a madness Function, but a simple scalar More...
struct  ScalingFunctionFunctor
 this FunctionFunctorInterface evaluates Legendre scaling functions More...
struct  ScalingFunctionFunctor< 1 >
struct  ScalingFunctionFunctor< NDIM, std::enable_if_t< std::greater{}(NDIM, 1)> >
class  SCF
class  scf_data
class  SCFOperatorBase
class  SCFProtocol
 struct for running a protocol of subsequently tightening precision More...
class  SCFResults
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
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...
struct  StandardDisplacementsReach
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
struct  TDHFParameters
 the TDHF parameter class More...
class  Tensor
 A tensor is a multidimensional 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  ThreadBindingException
 Thrown by check_thread_binding() when the CPU binding cannot support the thread pool. More...
struct  ThreadBindingInfo
 Description of the CPU affinity of the calling process. More...
class  ThreadPool
 A singleton pool of threads for dynamic execution of tasks. More...
class  ThreadPoolThread
 ThreadPool thread object. More...
class  Timer
struct  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  type_name
 A utility to get the name of a type as a string from chatGPT. More...
struct  type_name< Function< double, 1 > >
struct  type_name< Function< double, 2 > >
struct  type_name< Function< double, 3 > >
struct  type_name< Function< double, 4 > >
struct  type_name< Function< double, 5 > >
struct  type_name< Function< double, 6 > >
struct  type_name< std::vector< Function< double, 1 > > >
struct  type_name< std::vector< Function< double, 2 > > >
struct  type_name< std::vector< Function< double, 3 > > >
struct  type_name< std::vector< Function< double, 4 > > >
struct  type_name< std::vector< Function< double, 5 > > >
struct  type_name< std::vector< Function< double, 6 > > >
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  VibrationalResults
class  VLocalFunctor
class  WignerSeitzPotentialFunctor
 Functor for evaluating the Wigner-Seitz potential in a simulation cell. More...
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  WorldDCNodeReplicatedPmap
class  WorldDCPmapInterface
 Interface to be provided by any process map. More...
class  WorldDCRedistributeInterface
class  WorldDCSingleOwnerPmap
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. 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  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
class  ZnemoResults

Typedefs

typedef void(* am_handlerT) (const AmArg &)
 Type of AM handler functions.
using batch_bytesT = std::vector<unsigned char>
using batch_keyT = madness::archive::ContainerRecordOutputArchive::keyT
typedef SeparatedConvolution< double_complex, 1 > complex_convolution_1d
typedef std::shared_ptr< complex_convolution_1d > complex_convolution_1d_ptr
typedef SeparatedConvolution< double_complex, 2 > complex_convolution_2d
typedef std::shared_ptr< complex_convolution_2d > complex_convolution_2d_ptr
typedef SeparatedConvolution< double_complex, 3 > complex_convolution_3d
typedef std::shared_ptr< complex_convolution_3d > complex_convolution_3d_ptr
typedef SeparatedConvolution< double_complex, 4 > complex_convolution_4d
typedef std::shared_ptr< complex_convolution_4d > complex_convolution_4d_ptr
typedef SeparatedConvolution< double_complex, 5 > complex_convolution_5d
typedef std::shared_ptr< complex_convolution_5d > complex_convolution_5d_ptr
typedef SeparatedConvolution< double_complex, 6 > complex_convolution_6d
typedef std::shared_ptr< complex_convolution_6d > complex_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 Tensor< double_complex > complex_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_functionT > cvecfuncT
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, vecfuncT > pairvecfuncT
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< operatorT> poperatorT
typedef SeparatedConvolution< double, 1 > real_convolution_1d
typedef std::shared_ptr< real_convolution_1d > real_convolution_1d_ptr
typedef SeparatedConvolution< double, 2 > real_convolution_2d
typedef std::shared_ptr< real_convolution_2d > real_convolution_2d_ptr
typedef SeparatedConvolution< double, 3 > real_convolution_3d
typedef std::shared_ptr< real_convolution_3d > real_convolution_3d_ptr
typedef SeparatedConvolution< double, 4 > real_convolution_4d
typedef std::shared_ptr< real_convolution_4d > real_convolution_4d_ptr
typedef SeparatedConvolution< double, 5 > real_convolution_5d
typedef std::shared_ptr< real_convolution_5d > real_convolution_5d_ptr
typedef SeparatedConvolution< double, 6 > real_convolution_6d
typedef std::shared_ptr< real_convolution_6d > real_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 void(* rmi_handlerT) (void *buf, size_t nbyte)
 This is the generic low-level interface for a message handler.
typedef Mutex SCALABLE_MUTEX_TYPE
using SCFResultsTuple
typedef Mutex SPINLOCK_TYPE
typedef tbb::split Split
 Dummy class, a la Intel TBB, used to distinguish splitting constructor.
typedef std::vector< pairvecfuncT > subspaceT
typedef Tensor< double_complex > tensor_complex
typedef Tensor< double > tensor_real
typedef Tensor< double > tensorT
typedef int64_t Translation
typedef vector< functionT > vecfuncT
typedef std::vector< std::complex< double > > vector_complex
typedef std::vector< complex_function_1d > vector_complex_function_1d
typedef std::vector< complex_function_2d > vector_complex_function_2d
typedef std::vector< complex_function_3d > vector_complex_function_3d
typedef std::vector< complex_function_4d > vector_complex_function_4d
typedef std::vector< complex_function_5d > vector_complex_function_5d
typedef std::vector< complex_function_6d > vector_complex_function_6d
typedef 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_1d > vector_real_function_1d
typedef std::vector< real_function_2d > vector_real_function_2d
typedef std::vector< real_function_3d > vector_real_function_3d
typedef std::vector< real_function_4d > vector_real_function_4d
typedef std::vector< real_function_5d > vector_real_function_5d
typedef std::vector< real_function_6d > vector_real_function_6d

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 class  DerivMethod { abgv , bspline , ble }
 which first derivative the div_* variants use More...
enum class  DFConvergenceCriterion { bsh_residual , energy_density_residual }
enum class  DFStopReason { converged_bsh , converged_combined , max_iterations }
enum  DistributionType { Distributed , RankReplicated , NodeReplicated }
 some introspection of how data is distributed More...
enum  EnergyType { PROJECTED_ENERGYTYPE , HYLLERAAS_ENERGYTYPE , UNKNOWN_ENERGYTYPE }
enum  ExchangeBatchDim { EXCHANGE_BATCH_VF = 0 , EXCHANGE_BATCH_BRA = 1 , EXCHANGE_BATCH_KET = 2 }
 which of the three exchange operand vectors a stored batch belongs to More...
enum class  ExtraDomainPolicy { Discard , Keep , Translate }
enum  FuncType {
  UNDEFINED , HOLE , PARTICLE , MIXED ,
  RESPONSE
}
enum class  GeometryMatch { same , displaced , different_composition }
 how the requested geometry relates to the one in an archive More...
enum  GuessType {
  PARTIAL_WAVE_GUESSTYPE , FROM_FILE_GUESSTYPE , PREDEFINED_GUESSTYPE , SCF_GUESSTYPE ,
  EXOP_GUESSTYPE , EMPTY_GUESSTYPE , PSI4_GUESSTYPE , UNKNOWN_GUESSTYPE
}
enum class  LatticeImages { all , exclude_home , home_only }
 Which lattice translations a lattice-summed 1D kernel includes. More...
enum  OpType {
  OT_UNDEFINED , OT_ONE , OT_G12 , OT_SLATER ,
  OT_GAUSS , OT_F12 , OT_FG12 , OT_F212 ,
  OT_F2G12 , OT_BSH , OT_INVRSQ , 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 class  Representation : int { unknown = 0 , mo = 1 , nemo = 2 , znemo = 3 }
enum class  RestartMode {
  automatic , none , iterate , read_only ,
  ao , nwchem
}
enum class  RestartSource : int { initial_guess = 0 , restartdata = 1 , restartao = 2 , nwchem = 3 }
 where the initial orbitals will come from 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

virtual ~LLRVDomainMask ()
static const Slice _ (0,-1, 1)
static const Slice _reverse (-1, 0,-1)
 Entire tensor.
template<std::size_t NDIM>
Function< double, NDIM > abs (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, NDIM > abs (const Function< Q, NDIM > &func)
template<typename T, std::size_t NDIM>
Function< T, NDIM > abs (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the abs of f - global comm only if not reconstructed.
template<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)
static long abs (long a)
template<typename Q, int NDIM>
Function< typename TensorTypeData< Q >::scalar_type, NDIM > abs_square (const Function< Q, NDIM > &func)
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<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<std::size_t NDIM>
Function< double, NDIM > abssq (const Function< double_complex, NDIM > &z, bool fence=true)
 Returns a new function that is the square of the absolute value of the input.
template<typename 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), NDIM > add (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator+ but with optional fence and no automatic compression.
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 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< 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 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)
AmArg * alloc_am_arg (std::size_t nbyte)
 Allocates a new AmArg with nbytes of user data ... delete with free_am_arg.
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
template<typename T, std::size_t NDIM>
Function< T, NDIM > 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).
template<typename opT, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIM > apply (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator in non-standard form.
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>
std::vector< CCPairFunction< T, NDIM > > apply (const ProjectorBase &projector, const CCPairFunction< T, NDIM > &argument)
 application of the projector might return a vector of ccpairfunctions, e.g. Q12 f12 |ij> = f12 |ij > + |ab>
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, NDIM > apply (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, NDIM > apply (const SeparatedConvolution< T, NDIM > &G, const std::vector< CCPairFunction< T, NDIM > > &argument)
template<typename T, std::size_t NDIM>
CCPairFunction< T, NDIM > apply (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, 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 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>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIM > apply_1d_realspace_push (const opT &op, const Function< R, NDIM > &f, int axis, bool fence=true)
template<typename opT, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(typename opT::opT, R), NDIM > apply_only (const opT &op, const Function< R, NDIM > &f, bool fence=true)
 Apply operator ONLY in non-standard form - required other steps missing !!
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).
static std::vector< madness::Tensor< double > > assemble_nemo_ddens (const std::vector< madness::Tensor< double > > &t, const long np, const bool beta)
static madness::Tensor< double > assemble_nemo_tau (const std::vector< madness::Tensor< double > > &t, const long np, const bool beta)
 assemble the regularized alpha/beta tau pointwise, or return NULL
CalcType assign_calctype (const std::string name)
 Assigns enum to string.
std::vector< ProcessID > assign_cost_aware (const std::vector< double > &cost, int nranks)
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::vector< ProcessID > assign_round_robin (std::size_t nfunc, int nranks)
 owner[j] = j % nranks. For redistribute_to_batches.
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 ()
template<typename L, typename R, typename opT, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIM > binary_op (const Function< L, NDIM > &left, const Function< R, NDIM > &right, const opT &op, bool fence=true)
 Generate new function = op(left,right) where op acts on the function values.
template<typename tupleT, typename tupleR, typename opT, std::size_t I = 0>
static void binary_tuple_loop (tupleT &tuple1, tupleR &tuple2, opT &op)
 loop over the tuple elements of both tuples and execute the operation op on each element pair
template<class F, class... Args>
constexpr decltype(auto) blocking_invoke (F &&f, Args &&... args) noexcept(std::is_nothrow_invocable_v< F, Args... >)
template<class R, class F, class... Args>
constexpr R blocking_invoke_r (F &&f, Args &&... args) noexcept(std::is_nothrow_invocable_v< F, Args... >)
static size_t bsh_tile_size (size_t nmo, size_t nranks)
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > BSHOperator (World &world, double mu, double lo, double eps, const std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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>
Tensor< T > canonical_orthonormalization_matrix (World &world, const Tensor< T > ovlp, double lindep=1e-12)
 compute the transformation matrix for canonical orthonormalization (see e.g. Szabo/Ostlund)
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 > &, const TensorArgs &targs)
 change representation to targ.tt
template<typename T, std::size_t NDIM>
const Function< T, NDIM > & change_tree_state (const Function< T, NDIM > &f, const TreeState finalstate, bool fence=true)
 change tree state of a function
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)
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
void check_thread_binding (const SafeMPI::Intracomm &comm, int nthread_app)
 Throw if the CPU binding cannot accommodate the thread pool.
template<typename tupleT, std::size_t I>
constexpr bool check_tuple_is_valid_task_result ()
 given a tuple check recursively if all elements are valid task results
unsigned long checksum_file (const char *filename)
 Simple checksum for ASCII characters in file.
static double chi_of (const double *sx, const double *sy, const double *sz, const double *tx, const double *ty, const double *tz, const long i)
 contract two zeta vectors at grid point i: chi_st = zeta_s . zeta_t
static double chi_of (const double *sx, const double *sy, const double *sz, const long i)
 contract a zeta vector with itself: chi_ss = |zeta_s|^2 >= 0
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.
std::string clean_archive_filename (std::string name)
template<typename T, std::size_t NDIM>
void clear_halo (const std::vector< Function< T, NDIM > > &v)
 Discards the neighbor halos staged on v.
template<typename T, std::size_t NDIM>
void coalesced_gaxpy (World &transport_world, FinalizeReducer< T, NDIM > &reducer, std::vector< Function< T, NDIM > > &dest_vec, std::vector< Function< T, NDIM > > &src_vec, const T beta, const std::size_t chunk_entries)
 Accumulate src_vec into dest_vec in bulk, one message per destination rank per chunk.
template<typename T>
DistributedMatrix< T > column_distributed_matrix (World &world, int64_t n, int64_t m, int64_t coltile=0)
 Generates an (n,m) matrix distributed by columns (row dimension is not distributed).
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).
GeometryMatch compare_geometry (const Molecule &archive, const Molecule &requested, const double tol=1.e-6)
template<typename T, std::size_t NDIM>
T composite_inner (World &world, std::vector< composite_term< T, NDIM > > terms, Function< T, NDIM > bra, const LeafOpBase< T, NDIM > &leaf_op, double target_precision=0.0, int oversampling=1)
 Overload taking a polymorphic LeafOpBase for fine-grained refinement control.
template<typename T, std::size_t NDIM>
T composite_inner (World &world, std::vector< composite_term< T, NDIM > > terms, Function< T, NDIM > bra, double target_precision=0.0, int oversampling=1)
template<typename T, std::size_t NDIM, typename leaf_opT>
T composite_inner_apply (World &world, const FunctionImpl< T, NDIM > *like, const leaf_opT &leaf_op, std::vector< composite_term< T, NDIM > > &terms, Function< T, NDIM > &bra_function, double target_precision, int oversampling)
template<typename T, std::size_t NDIM>
Function< T, NDIM > composite_product (World &world, std::vector< composite_term< T, NDIM > > terms, const LeafOpBase< T, NDIM > &leaf_op, double target_precision=0.0, int oversampling=1, bool fence=true)
template<typename T, std::size_t NDIM>
Function< T, NDIM > composite_product (World &world, std::vector< composite_term< T, NDIM > > terms, double target_precision=0.0, int oversampling=1, bool fence=true)
template<typename T, std::size_t NDIM, typename leaf_opT>
void composite_product_apply (FunctionImpl< T, NDIM > *result, const leaf_opT &leaf_op, std::vector< composite_term< T, NDIM > > &terms, double target_precision, int oversampling, bool fence)
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>
DistributedMatrix< T > concatenate_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< T > concatenate_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< T > concatenate_rows (const DistributedMatrix< T > &a, const DistributedMatrix< T > &b, const DistributedMatrix< T > &c, const DistributedMatrix< T > &d)
 Generates a column-distributed matrix with rows of a, b, c, and d contatenated in order.
template std::vector< double > condition_number (const Tensor< double > &A)
template std::vector< double > condition_number (const Tensor< double_complex > &A)
template<typename T>
std::vector< double > condition_number (const Tensor< T > &A)
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, NDIM > conj (const Function< T, NDIM > &f, bool fence=true)
 Return the complex conjugate of the input function with the same distribution and optional fence.
template<class T>
Tensor< T > conj (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate of the input tensor (complex types only).
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< T > conj_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, NDIM > convert (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< Q > convert (const GenTensor< T > &other)
 type conversion implies a deep copy
template<class Q, class T>
Tensor< Q > convert (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< T > copy (const DistributedMatrix< T > &A)
 Deep copy of content.
template<typename T, std::size_t NDIM>
Function< T, NDIM > copy (const Function< T, NDIM > &f, bool fence=true)
 Create a new copy of the function with the same distribution and optional fence.
template<typename T, std::size_t NDIM>
Function< T, NDIM > 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.
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< T > copy (const Tensor< T > &t)
 Returns a new contiguous tensor that is a deep copy of the input.
template<typename T, std::size_t NDIM>
Function< T, NDIM > copy (World &world, const Function< T, NDIM > &f, bool fence=true)
 Create a new copy of function f living in world (might differ from f.world).
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)
AmArg * copy_am_arg (const AmArg &arg)
template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > copy_n (World &world, const Function< T, NDIM > &v, const unsigned int n, bool fence=true)
 Returns a vector of n deep copies of a function.
static SeparatedConvolution< double, 3 > CoulombOperator (World &world, double lo, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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.
std::string cpu_list_to_string (const std::vector< int > &cpus)
 Render a list of cpu ids in compact form, e.g. {0,1,2,3,8} -> "0-3,8".
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< NuclearCorrelationFactor > create_nuclear_correlation_factor (World &world, const Molecule &molecule, const std::shared_ptr< PotentialManager > pm, const std::pair< std::string, double > &ncf)
std::shared_ptr< NuclearCorrelationFactor > 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
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>
constexpr 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 > >... >
bool df_convergence_criterion_from_string (const std::string &keyword, DFConvergenceCriterion &criterion)
const char * df_convergence_criterion_name (const DFConvergenceCriterion criterion)
bool df_iteration_converged (const DFConvergenceCriterion criterion, const DFConvergenceMetrics &m)
std::string_view df_stop_message (const DFStopReason reason)
template<typename T, std::size_t LDIM>
 DiagnosticMatrix (World &, std::vector< Function< T, LDIM > >) -> DiagnosticMatrix< T, 2 *LDIM >
template<typename T, std::size_t LDIM>
 DiagnosticMatrix (World &, std::vector< Function< T, LDIM > >, bool) -> DiagnosticMatrix< T, 2 *LDIM >
template<size_t NDIM>
Key< NDIM > displacement (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_new (World &world, const Tensor< double > &C, 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)
 Distributed optimization for the "new" localization method.
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, NDIM > div (const std::vector< Function< T, NDIM > > &v, bool do_refine=false, bool fence=true)
 shorthand div operator, with the default (ABGV) derivative
template<typename T, std::size_t NDIM>
Function< T, NDIM > div_abgv (const std::vector< Function< T, NDIM > > &v, bool do_refine=false, bool fence=true)
 div with the ABGV derivative
template<typename T, std::size_t NDIM>
Function< T, NDIM > div_ble (const std::vector< Function< T, NDIM > > &v, bool do_refine=false, bool fence=true)
 div with the BLE smoothing first derivative
template<typename T, std::size_t NDIM>
Function< T, NDIM > div_bspline (const std::vector< Function< T, NDIM > > &v, bool do_refine=false, bool fence=true)
 div with the b-spline smoothing first derivative
template<typename T, std::size_t NDIM>
Function< T, NDIM > div_deriv (const std::vector< Function< T, NDIM > > &v, const DerivMethod method, bool do_refine=false, bool fence=true)
 shorthand div operator, with a choice of first derivative
double dmask (double d) const
 Derivative of characteristic function with respect to the normal distance.
template<typename funcT>
funcT::returnT do_adq (double lo, double hi, const funcT &func, int n, const double *x, const double *w)
template<typename T, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(T, R), NDIM > dot (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true, bool do_make_redundant=true)
 Multiplies and sums two vectors of functions r = \sum_i a[i] * b[i]; see dot_sparse for screening.
template<typename T, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(T, R), NDIM > dot_sparse (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, double tol, bool fence=true, bool do_make_redundant=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.
double dsurface (double d) const
 Value of d(surface)/ddistance.
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)
static bool enforce_in_volume (Level n, const Translation &l)
template<typename T, std::size_t NDIM>
bool ensure_tree_state_respecting_fence (const std::vector< Function< T, NDIM > > &v, const TreeState state, bool fence)
 ensure v has the requested tree state, change the tree state of v if necessary and no fence is given
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.
bool exch_force_general_path ()
 Send a symmetric application down the general (bra, ket, vf) path? Read once per process.
bool exch_task_profile_enabled ()
 Is per-task exchange profiling on? Read once per process.
void exch_write_cost_matrix (const long call_index, const long k, const long M, const std::vector< double > &cost)
 Write the measured per-task cost matrix of one application, for offline inspection.
void exch_write_task_profile (const ExchTaskProfile &p)
 Append one record to exch_taskprof.r<rank>.jsonl.
template<typename T>
int exchange_anchor_test (World &world, Exchange< T, 3 > &K, const double thresh)
 anchor test for the exchange operator – partially hardwired
long exchange_batch_record_key (const long salt, const int dim, const Batch_1D &r)
 Deterministic cloud record key for one stored batch: (salt, dimension, range).
template<typename T, std::size_t NDIM>
long exchange_batch_salt (const std::vector< Function< T, NDIM > > &ket)
 Per-invocation salt for the exchange batch record keys, from the ket identities.
std::map< std::pair< long, long >, long > exchange_row_owner_assign (const long ncolumn, const long nrow, const long nworker)
 Owner of every task in the asymmetric grid: all tasks of a column go to one worker.
std::vector< std::pair< Batch_1D, Batch_1D > > exchange_row_owner_grid (const std::size_t ncolumn, const std::size_t nrow, const long nsubworld)
 The asymmetric task grid: every (column, row) pair over two independent splits.
std::vector< Batch_1D > exchange_row_owner_split (const std::size_t n, const long nsubworld)
 Batch boundaries for the asymmetric row/column split: one batch per rank.
template<typename T, std::size_t NDIM>
bool exchange_same_operands (const std::vector< Function< T, NDIM > > &a, const std::vector< Function< T, NDIM > > &b)
 Are these the same functions, so that one stored record can serve both operand roles?
std::map< std::pair< long, long >, long > exchange_sym_cost_aware_assign (const long n, const long M, const std::vector< double > &cost)
 Cost-aware owner assignment for the symmetric algorithm's triangular task matrix.
long exchange_sym_owner_nbatch (const std::size_t n, const long nsubworld, const long granularity_level)
 Number of batches M for the owner-pinned symmetric exchange algorithm.
std::vector< Batch_1D > exchange_sym_owner_split (const std::size_t n, const long nsubworld, const long granularity_level)
 Split a vector of length n into M = exchange_sym_owner_nbatch(...) contiguous batches.
std::map< std::pair< long, long >, long > exchange_sym_round_robin_assign (const long n, const long M)
 Round-robin owner assignment for the symmetric algorithm's triangular task matrix.
long exchange_sym_tri (const long i, const long j)
 Triangular index of a batch pair, collapsing (i,j) and (j,i): a*(a+1)/2 + b.
static SeparatedConvolution< double, 3 > F2GOperator (World &world, double mu, double lo, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 R>
Tensor< std::complex< R > > & fast_transform (const Tensor< std::complex< R > > &t, const Tensor< R > &c, Tensor< std::complex< R > > &result, Tensor< std::complex< R > > &workspace)
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< T > fcube (const Key< NDIM > &, T(*f)(const Vector< double, NDIM > &), const Tensor< double > &)
template<typename T, std::size_t NDIM>
Tensor< T > fcube (const Key< NDIM > &key, const FunctionFunctorInterface< T, NDIM > &f, const Tensor< double > &qx)
template<typename T, std::size_t NDIM>
void fcube (const Key< NDIM > &key, const FunctionFunctorInterface< T, NDIM > &f, const Tensor< double > &qx, Tensor< T > &fval)
 forward declaration
static SeparatedConvolution< double, 3 > FGOperator (World &world, double mu, double lo, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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().
std::optional< std::size_t > first_rung_tighter_than (const std::vector< double > &protocol, const double achieved)
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.
std::string format_thresh (const double t)
 format a threshold compactly for a log line ("1e-06", not "0.000001")
void free_am_arg (AmArg *arg)
 Frees an AmArg allocated with alloc_am_arg.
template<typename T, std::size_t NDIM>
Derivative< T, NDIM > free_space_derivative (World &world, int axis, int k=FunctionDefaults< NDIM >::get_k())
 Convenience function returning derivative operator with free-space boundary conditions.
template<typename T = long>
DistributionType from_string (std::string type)
std::shared_ptr< FunctionFunctorInterface< double, 3 > > func (new opT(g))
template<typename T, std::size_t NDIM>
std::vector< double > function_costs (World &world, const std::vector< Function< T, NDIM > > &v)
template<typename Q, int NDIM>
Function< std::complex< Q >, NDIM > function_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, NDIM > GaussOperator (World &world, double mu, double lo=0.0, double eps=0.0, const std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), 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 std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), 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>
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), NDIM > gaxpy_oop (TENSOR_RESULT_TYPE(L, R) alpha, const Function< L, NDIM > &left, TENSOR_RESULT_TYPE(L, R) beta, const Function< R, NDIM > &right, bool fence=true)
 Returns new function alpha*left + beta*right optional fence and no automatic compression.
template<typename T, std::size_t NDIM>
Function< T, NDIM > 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.
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<class R>
Tensor< std::complex< R > > & general_fast_transform (const Tensor< std::complex< R > > &t, const Tensor< R > *c, Tensor< std::complex< R > > &result, Tensor< std::complex< R > > &workspace)
 Optimized general_fast_transform for complex tensor * real matrices.
template<class T, class Q>
Tensor< TENSOR_RESULT_TYPE(T, Q)> & general_fast_transform (const Tensor< T > &t, const Tensor< Q > *c, Tensor< TENSOR_RESULT_TYPE(T, Q)> &result, Tensor< TENSOR_RESULT_TYPE(T, Q)> &workspace)
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 AtomicData & get_atomic_data (unsigned int atomic_number)
double get_charge_from_file (const std::string filename, unsigned int atype)
std::string get_hostname ()
template<class T, class F>
void get_if_exists (const nlohmann::json &j, const std::string &key, std::optional< T > &opt, F &&from_json_fn)
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>
long get_memory_usage ()
std::string get_mra_data_dir ()
const long long * get_papi_measurement ()
double get_rss_usage_in_GB ()
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 (const std::vector< Function< T, NDIM > > &v)
template<typename T, std::size_t NDIM>
double get_size (World &world, const std::vector< Function< T, NDIM > > &v)
template<typename T, std::size_t NDIM>
double get_size_local (const Function< T, NDIM > &f)
 return the size of a function for each rank
template<typename T, std::size_t NDIM>
double get_size_local (World &world, const std::vector< Function< T, NDIM > > &v)
 return the size of a vector of functions for each rank
ThreadBindingInfo get_thread_binding_info ()
 Query the CPU affinity mask and NUMA placement of the calling process.
template<typename T, std::size_t NDIM>
TreeState get_tree_state (const Function< T, NDIM > &f)
 get tree state of a function
template<typename T, std::size_t NDIM>
TreeState get_tree_state (const std::vector< Function< T, NDIM > > &v)
 get tree state of a vector of functions
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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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.
std::vector< double > grid ({0.00000000000000e+00, 7.74564534039568e-10, 2.47256327461087e-08, 1.86997862087340e-07, 7.83531011839395e-07, 2.37369448442132e-06, 5.85385578447464e-06, 1.25192693640128e-05, 2.41120079015646e-05, 4.28530598081574e-05, 7.14571735608571e-05, 1.13129528705579e-04, 1.71543841230856e-04, 2.50802052874775e-04, 3.55376294767219e-04, 4.90034340610786e-04, 6.59750258771429e-04, 8.69602422403842e-04, 1.12466142949409e-03, 1.42987080942386e-03, 1.78992364014940e-03, 2.20913836324745e-03, 2.69133715810767e-03, 3.23973021906902e-03, 3.85680917042725e-03, 4.54425265659531e-03, 5.30284686331574e-03, 6.13242336803442e-03, 7.03181629276860e-03, 7.99884025229928e-03, 9.03029006708050e-03, 1.01219626578657e-02, 1.12687009724886e-02, 1.24644592296948e-02, 1.37023882155871e-02, 1.49749388498821e-02, 1.62739817657269e-02, 1.75909402310371e-02, 1.89169333923840e-02, 2.02429265537309e-02, 2.15598850190411e-02, 2.28589279348859e-02, 2.41314785691809e-02, 2.53694075550732e-02, 2.65651658122794e-02, 2.77119041269022e-02, 2.88035767176875e-02, 2.98350265324687e-02, 3.08020504919994e-02, 3.17014434167336e-02, 3.25310199214522e-02, 3.32896141281727e-02, 3.39770576143407e-02, 3.45941365656990e-02, 3.51425296266603e-02, 3.56247284215205e-02, 3.60439431446186e-02, 3.64039959753441e-02, 3.67092053552739e-02, 3.69642643623641e-02, 3.71741165259965e-02, 3.73438324441572e-02, 3.74784904900007e-02, 3.75830647318932e-02, 3.76623229435371e-02, 3.77207372560624e-02, 3.77624096112071e-02, 3.77910137249598e-02, 3.78097547768664e-02, 3.78213475154040e-02, 3.78280129289835e-02, 3.78314930902835e-02, 3.78330832537561e-02, 3.78336797869059e-02, 3.78338420591352e-02, 3.78338660102034e-02, 3.78338692887670e-02, 3.78339467173722e-02, 3.78344713082705e-02, 3.78363997704733e-02, 3.78415404238543e-02, 3.78527910300104e-02, 3.78743388654655e-02, 3.79118156730933e-02, 3.79724014263881e-02, 3.80648723179728e-02, 3.81995899976738e-02, 3.83884307919462e-02, 3.86446553881524e-02, 3.89827212156132e-02, 3.94180414519212e-02, 3.99666961805422e-02, 4.06451026796855e-02, 4.14696530921280e-02, 4.24563287754274e-02, 4.36203014320401e-02, 4.49755316463183e-02, 4.65343756946706e-02, 4.83072114386611e-02, 5.03020937588608e-02, 5.25244493483274e-02, 5.49768197749344e-02, 5.76586605651183e-02, 6.05662026884007e-02, 6.36923812686800e-02, 6.70268346561297e-02, 7.05559752077735e-02, 7.42631312932333e-02, 7.81287582138778e-02, 8.21307139477169e-02, 8.62445939566306e-02, 9.04441177619647e-02, 9.47015586503668e-02, 9.89882067501835e-02, 1.03274854850000e-01, 1.07532295738402e-01, 1.11731819543736e-01, 1.15845699552650e-01, 1.19847655286489e-01, 1.23713282207134e-01, 1.27420438292594e-01, 1.30949578844237e-01, 1.34284032231687e-01, 1.37410210811966e-01, 1.40317752935249e-01, 1.42999593725433e-01, 1.45451964152040e-01, 1.47674319741506e-01, 1.49669202061706e-01, 1.51442037805696e-01, 1.53000881854049e-01, 1.54356112068327e-01, 1.55520084724940e-01, 1.56506760408239e-01, 1.57331310820682e-01, 1.58009717319825e-01, 1.58558372048446e-01, 1.58993692284754e-01, 1.59331758112215e-01, 1.59587982708421e-01, 1.59776823502693e-01, 1.59911541182394e-01, 1.60004012073979e-01, 1.60064597827274e-01, 1.60102074634902e-01, 1.60123622470357e-01, 1.60134873076513e-01, 1.60140013729894e-01, 1.60141942192096e-01, 1.60142466782995e-01, 1.60142544211600e-01, 1.60142551561710e-01, 1.60142701413062e-01, 1.60143716679379e-01, 1.60147448926215e-01, 1.60157397883103e-01, 1.60179171729209e-01, 1.60220874304751e-01, 1.60293404996033e-01, 1.60410659555492e-01, 1.60589622976194e-01, 1.60850348663762e-01, 1.61215821451274e-01, 1.61711705392906e-01, 1.62365980655838e-01, 1.63208477113433e-01, 1.64270315334478e-01, 1.65583268477170e-01, 1.67179061053879e-01, 1.69088622564332e-01, 1.71341315543301e-01, 1.73964158589697e-01, 1.76981065407121e-01, 1.80412120776561e-01, 1.84272913700736e-01, 1.88573946723051e-01, 1.93320138663612e-01, 1.98510435776210e-01, 2.04137543672572e-01, 2.10187789353851e-01, 2.16641119414426e-01, 2.23471237026998e-01, 2.30645876773227e-01, 2.38127212845837e-01, 2.45872392711143e-01, 2.53834185077787e-01, 2.61961728055316e-01, 2.70201360784824e-01, 2.78497519653254e-01, 2.86793678521684e-01, 2.95033311251191e-01, 3.03160854228721e-01, 3.11122646595364e-01, 3.18867826460670e-01, 3.26349162533280e-01, 3.33523802279509e-01, 3.40353919892081e-01, 3.46807249952656e-01, 3.52857495633936e-01, 3.58484603530297e-01, 3.63674900642895e-01, 3.68421092583456e-01, 3.72722125605771e-01, 3.76582918529946e-01, 3.80013973899386e-01, 3.83030880716811e-01, 3.85653723763206e-01, 3.87906416742175e-01, 3.89815978252628e-01, 3.91411770829337e-01, 3.92724723972029e-01, 3.93786562193074e-01, 3.94629058650669e-01, 3.95283333913601e-01, 3.95779217855233e-01, 3.96144690642745e-01, 3.96405416330313e-01, 3.96584379751016e-01, 3.96701634310474e-01, 3.96774165001756e-01, 3.96815867577298e-01, 3.96837641423404e-01, 3.96847590380292e-01, 3.96851322627128e-01, 3.96852337893446e-01, 3.96852487744797e-01, 3.96852501080501e-01, 3.96852763595511e-01, 3.96854542175721e-01, 3.96861080460548e-01, 3.96878509402610e-01, 3.96916653612757e-01, 3.96989709691015e-01, 3.97116771576032e-01, 3.97322182348883e-01, 3.97635696933973e-01, 3.98092445611658e-01, 3.98732694042811e-01, 3.99601401444597e-01, 4.00747584484612e-01, 4.02223500212562e-01, 4.04083666765013e-01, 4.06383745508240e-01, 4.09179312589000e-01, 4.12524551422180e-01, 4.16470900356858e-01, 4.21065691550599e-01, 4.26350817893211e-01, 4.32361464629548e-01, 4.39124941137697e-01, 4.46659646152579e-01, 4.54974196640938e-01, 4.64066746612100e-01, 4.73924517493193e-01, 4.84523556430928e-01, 4.95828733144949e-01, 5.07793979903267e-01, 5.20362772980513e-01, 5.33468847761119e-01, 5.47037133628609e-01, 5.60984889100643e-01, 5.75223012480244e-01, 5.89657498736383e-01, 6.04191009524582e-01, 6.18724520312781e-01, 6.33159006568921e-01, 6.47397129948521e-01, 6.61344885420555e-01, 6.74913171288045e-01, 6.88019246068651e-01, 7.00588039145897e-01, 7.12553285904216e-01, 7.23858462618236e-01, 7.34457501555971e-01, 7.44315272437064e-01, 7.53407822408226e-01, 7.61722372896585e-01, 7.69257077911467e-01, 7.76020554419616e-01, 7.82031201155953e-01, 7.87316327498565e-01, 7.91911118692306e-01, 7.95857467626984e-01, 7.99202706460164e-01, 8.01998273540924e-01, 8.04298352284151e-01, 8.06158518836602e-01, 8.07634434564552e-01, 8.08780617604567e-01, 8.09649325006353e-01, 8.10289573437506e-01, 8.10746322115191e-01, 8.11059836700281e-01, 8.11265247473132e-01, 8.11392309358149e-01, 8.11465365436407e-01, 8.11503509646554e-01, 8.11520938588616e-01, 8.11527476873443e-01, 8.11529255453653e-01, 8.11529517968663e-01, 8.11529541176345e-01, 8.11529996288764e-01, 8.11533079746512e-01, 8.11544414925490e-01, 8.11574630828117e-01, 8.11640760013437e-01, 8.11767414594025e-01, 8.11987697014585e-01, 8.12343809961018e-01, 8.12887338428862e-01, 8.13679186466493e-01, 8.14789161138720e-01, 8.16295206552722e-01, 8.18282301065180e-01, 8.20841040761609e-01, 8.24065941688939e-01, 8.28053501868532e-01, 8.32900071579870e-01, 8.38699586575474e-01, 8.45541223590310e-01, 8.53507040609252e-01, 8.62669665762836e-01, 8.73090098389325e-01, 8.84815683732401e-01, 8.97878318988171e-01, 9.12292943068421e-01, 9.28056355648415e-01, 9.45146402996031e-01, 9.63521558948635e-01, 9.83120919457849e-01, 1.00386461862596e+00, 1.02565466339202e+00, 1.04837617327936e+00, 1.07189900117812e+00, 1.09607970128622e+00, 1.12076380133619e+00, 1.14578832833438e+00, 1.17098453044675e+00, 1.19618073255911e+00, 1.22120525955731e+00, 1.24588935960728e+00, 1.27007005971537e+00, 1.29359288761414e+00, 1.31631439750148e+00, 1.33810444226754e+00, 1.35884814143565e+00, 1.37844750194486e+00, 1.39682265789747e+00, 1.41391270524508e+00, 1.42967611782508e+00, 1.44409074190533e+00, 1.45715337716110e+00, 1.46887896250417e+00, 1.47929939513066e+00, 1.48846202028425e+00, 1.49642783730319e+00, 1.50326947431802e+00, 1.50906898931363e+00, 1.51391555902497e+00, 1.51790311920456e+00, 1.52112802013189e+00, 1.52368675982832e+00, 1.52567385434078e+00, 1.52717989975478e+00, 1.52828987442701e+00, 1.52908172246464e+00, 1.52962525093248e+00, 1.52998136387891e+00, 1.53020164629947e+00, 1.53032830088006e+00, 1.53039443006538e+00, 1.53042464596801e+00, 1.53043598114699e+00, 1.53043906460474e+00, 1.53043951971715e+00, 1.53043956057345e+00, 1.53044036881866e+00, 1.53044584480621e+00, 1.53046597522602e+00, 1.53051963638178e+00, 1.53063707680903e+00, 1.53086200575658e+00, 1.53125321066044e+00, 1.53188564029607e+00, 1.53285090571065e+00, 1.53425716788373e+00, 1.53622839887814e+00, 1.53890302152796e+00, 1.54243195096192e+00, 1.54697607896990e+00, 1.55270325889653e+00, 1.55978486392298e+00, 1.56839200485204e+00, 1.57869150446938e+00, 1.59084173390576e+00, 1.60498842193063e+00, 1.62126055060600e+00, 1.63976645013905e+00, 1.66059020209859e+00, 1.68378845349035e+00, 1.70938773469079e+00, 1.73738236216545e+00, 1.76773299256309e+00, 1.80036587856233e+00, 1.83517285918360e+00, 1.87201209863831e+00, 1.91070956866812e+00, 1.95106125024279e+00, 1.99283601194713e+00, 2.03577910489527e+00, 2.07961619803354e+00, 2.12405786366203e+00, 2.16880441129773e+00, 2.21355095893343e+00, 2.25799262456193e+00, 2.30182971770019e+00, 2.34477281064834e+00, 2.38654757235268e+00, 2.42689925392735e+00, 2.46559672395716e+00, 2.50243596341186e+00, 2.53724294403314e+00, 2.56987583003238e+00, 2.60022646043001e+00, 2.62822108790467e+00, 2.65382036910512e+00, 2.67701862049687e+00, 2.69784237245642e+00, 2.71634827198947e+00, 2.73262040066483e+00, 2.74676708868971e+00, 2.75891731812608e+00, 2.76921681774343e+00, 2.77782395867248e+00, 2.78490556369893e+00, 2.79063274362556e+00, 2.79517687163354e+00, 2.79870580106750e+00, 2.80138042371732e+00, 2.80335165471173e+00, 2.80475791688482e+00, 2.80572318229939e+00, 2.80635561193503e+00, 2.80674681683888e+00, 2.80697174578644e+00, 2.80708918621368e+00, 2.80714284736945e+00, 2.80716297778926e+00, 2.80716845377681e+00, 2.80716926202201e+00, 2.80716933652781e+00, 2.80717083214942e+00, 2.80718096521951e+00, 2.80721821566121e+00, 2.80731751323041e+00, 2.80753483148951e+00, 2.80795105244894e+00, 2.80867495963022e+00, 2.80984524239094e+00, 2.81163142287735e+00, 2.81423364814557e+00, 2.81788132295423e+00, 2.82283059256804e+00, 2.82936071868432e+00, 2.83776942436573e+00, 2.84836731472069e+00, 2.86147150815776e+00, 2.87739863756603e+00, 2.89645740105067e+00, 2.91894085730732e+00, 2.94511867090741e+00, 2.97522951738903e+00, 3.00947385695645e+00, 3.04800727879293e+00, 3.09093460564947e+00, 3.13830493080142e+00, 3.19010773712238e+00, 3.24627022150018e+00, 3.30665591781433e+00, 3.37106467900872e+00, 3.43923404429894e+00, 3.51084198217487e+00, 3.58551096454407e+00, 3.66281329305810e+00, 3.74227756629515e+00, 3.82339614690749e+00, 3.90563346187864e+00, 3.98843494737088e+00, 4.07123643286313e+00, 4.15347374783428e+00, 4.23459232844661e+00, 4.31405660168366e+00, 4.39135893019769e+00, 4.46602791256689e+00, 4.53763585044283e+00, 4.60580521573305e+00, 4.67021397692744e+00, 4.73059967324159e+00, 4.78676215761938e+00, 4.83856496394034e+00, 4.88593528909229e+00, 4.92886261594884e+00, 4.96739603778531e+00, 5.00164037735273e+00, 5.03175122383435e+00, 5.05792903743445e+00, 5.08041249369110e+00, 5.09947125717573e+00, 5.11539838658400e+00, 5.12850258002107e+00, 5.13910047037603e+00, 5.14750917605745e+00, 5.15403930217373e+00, 5.15898857178754e+00, 5.16263624659620e+00, 5.16523847186442e+00, 5.16702465235083e+00, 5.16819493511155e+00, 5.16891884229283e+00, 5.16933506325225e+00, 5.16955238151135e+00, 5.16965167908056e+00, 5.16968892952225e+00, 5.16969906259234e+00, 5.16970055821395e+00, 5.16970070074519e+00, 5.16970361247163e+00, 5.16972333987315e+00, 5.16979586028538e+00, 5.16998917613145e+00, 5.17041225862441e+00, 5.17122257158139e+00, 5.17263189841936e+00, 5.17491024424232e+00, 5.17838764046389e+00, 5.18345374010175e+00, 5.19055515605250e+00, 5.20019056052898e+00, 5.21290362959218e+00, 5.22927398050981e+00, 5.24990630974935e+00, 5.27541799408998e+00, 5.30642546508522e+00, 5.34352970658452e+00, 5.38730125510908e+00, 5.43826510271255e+00, 5.49688591095665e+00, 5.56355394250644e+00, 5.63857210361471e+00, 5.72214446673726e+00, 5.81436660831299e+00, 5.91521805324665e+00, 6.02455706599185e+00, 6.14211796971732e+00, 6.26751111140535e+00, 6.40022552357701e+00, 6.53963426446189e+00, 6.68500234967725e+00, 6.83549712169932e+00, 6.99020084039182e+00, 7.14812522029963e+00, 7.30822758986854e+00, 7.46942830557509e+00, 7.63062902128164e+00, 7.79073139085055e+00, 7.94865577075836e+00, 8.10335948945085e+00, 8.25385426147293e+00, 8.39922234668829e+00, 8.53863108757317e+00, 8.67134549974483e+00, 8.79673864143286e+00, 8.91429954515833e+00, 9.02363855790353e+00, 9.12449000283719e+00, 9.21671214441292e+00, 9.30028450753547e+00, 9.37530266864374e+00, 9.44197070019353e+00, 9.50059150843763e+00, 9.55155535604110e+00, 9.59532690456566e+00, 9.63243114606496e+00, 9.66343861706020e+00, 9.68895030140082e+00, 9.70958263064037e+00, 9.72595298155800e+00, 9.73866605062120e+00, 9.74830145509768e+00, 9.75540287104843e+00, 9.76046897068629e+00, 9.76394636690786e+00, 9.76622471273082e+00, 9.76763403956879e+00, 9.76844435252577e+00, 9.76886743501873e+00, 9.76906075086480e+00, 9.76913327127703e+00, 9.76915299867855e+00, 9.76915591040499e+00, 9.76915619860098e+00, 9.76916219846504e+00, 9.76920284848150e+00, 9.76935228306099e+00, 9.76975062707579e+00, 9.77062242513200e+00, 9.77229214503906e+00, 9.77519618483832e+00, 9.77989091339106e+00, 9.78705638895934e+00, 9.79749552527532e+00, 9.81212860682633e+00, 9.83198319082184e+00, 9.85817956879146e+00, 9.89191209222870e+00, 9.93442679048652e+00, 9.98699582179647e+00, 1.00508893966709e+01, 1.01273458942923e+01, 1.02175409544910e+01, 1.03225563687840e+01, 1.04433496124935e+01, 1.05807248555829e+01, 1.07353062625751e+01, 1.09075143424092e+01, 1.10975460386012e+01, 1.13053591604470e+01, 1.15306616495989e+01, 1.17729060559758e+01, 1.20312894658455e+01, 1.23047589865396e+01, 1.25920227503353e+01, 1.28915662583656e+01, 1.32016737478116e+01, 1.35204541357752e+01, 1.38458709746296e+01, 1.41757757494884e+01, 1.45079437615262e+01, 1.48401117735640e+01, 1.51700165484228e+01, 1.54954333872772e+01, 1.58142137752408e+01, 1.61243212646868e+01, 1.64238647727170e+01, 1.67111285365127e+01, 1.69845980572069e+01, 1.72429814670766e+01, 1.74852258734535e+01, 1.77105283626053e+01, 1.79183414844512e+01, 1.81083731806431e+01, 1.82805812604773e+01, 1.84351626674695e+01, 1.85725379105589e+01, 1.86933311542684e+01, 1.87983465685614e+01, 1.88885416287600e+01, 1.89649981263815e+01, 1.90288917012559e+01, 1.90814607325659e+01, 1.91239754308237e+01, 1.91577079542609e+01, 1.91839043322306e+01, 1.92037589162261e+01, 1.92183919977771e+01, 1.92288311340931e+01, 1.92359966096613e+01, 1.92406913382141e+01, 1.92435953780133e+01, 1.92452650979204e+01, 1.92461368959766e+01, 1.92465352399914e+01, 1.92466846745709e+01, 1.92467253245873e+01, 1.92467313244514e+01, 1.92467319433609e+01, 1.92467450814034e+01, 1.92468340936939e+01, 1.92471613140832e+01, 1.92480335772770e+01, 1.92499425738442e+01, 1.92535987985263e+01, 1.92599578423078e+01, 1.92702379990799e+01, 1.92859284083041e+01, 1.93087872289342e+01, 1.93408296294082e+01, 1.93843056757497e+01, 1.94416684964889e+01, 1.95155333909890e+01, 1.96086288188291e+01, 1.97237404546042e+01, 1.98636497079429e+01, 2.00310682866674e+01, 2.02285705167748e+01, 2.04585252224186e+01, 2.07230290096769e+01, 2.10238427883022e+01, 2.13623333059298e+01, 2.17394213608060e+01, 2.21555382047478e+01, 2.26105914517851e+01, 2.31039415749319e+01, 2.36343898099582e+01, 2.42001779979100e+01, 2.47990005951181e+01, 2.54280287686536e+01, 2.60839461849717e+01, 2.67629957981511e+01, 2.74610366597973e+01, 2.81736095129742e+01, 2.88960097044501e+01, 2.96233657592419e+01, 3.03507218140337e+01, 3.10731220055095e+01, 3.17856948586865e+01, 3.24837357203327e+01, 3.31627853335120e+01, 3.38187027498302e+01, 3.44477309233657e+01, 3.50465535205737e+01, 3.56123417085256e+01, 3.61427899435518e+01, 3.66361400666986e+01, 3.70911933137359e+01, 3.75073101576777e+01, 3.78843982125540e+01, 3.82228887301816e+01, 3.85237025088068e+01, 3.87882062960652e+01, 3.90181610017090e+01, 3.92156632318163e+01, 3.93830818105409e+01, 3.95229910638796e+01, 3.96381026996546e+01, 3.97311981274948e+01, 3.98050630219949e+01, 3.98624258427341e+01, 3.99059018890755e+01, 3.99379442895496e+01, 3.99608031101797e+01, 3.99764935194039e+01, 3.99867736761760e+01, 3.99931327199574e+01, 3.99967889446395e+01, 3.99986979412068e+01, 3.99995702044006e+01, 3.99998974247898e+01, 3.99999864370804e+01, 3.99999995751228e+01})
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.
bool has_data (const PropertyResults &p)
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<class T>
Tensor< T > identity_matrix (long n)
 Returns the identity matrix of the specified size.
template<std::size_t NDIM>
Function< double, NDIM > imag (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, NDIM > imag (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.
World & initialize (int &argc, char **&argv, bool quiet)
World & initialize (int &argc, char **&argv, const MPI_Comm &comm, int nthread, bool quiet)
World & initialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm, bool quiet)
World & initialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm, int nthread, bool quiet=false)
World & initialize (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, NDIM > 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)
template<typename T, std::size_t NDIM>
CCPairFunction< T, NDIM > 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)
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, NDIM > 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))
template<typename T, std::size_t NDIM>
T inner (const LowRankFunction< T, NDIM > &a, const LowRankFunction< T, NDIM > &b)
 compute the inner product to 2 LowRankFunctions
template<typename T, std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIM > 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))
template<typename T, std::size_t NDIM, std::size_t PDIM>
Function< T, NDIM-PDIM > 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))
template<typename T, std::size_t NDIM, std::size_t PDIM>
LowRankFunction< T, NDIM > 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))
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>
constexpr T inner (const Vector< T, N > &l, const Vector< T, N > &r)
 compute the inner product two Vectors.
return f inner (g)
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), NDIM > innerXX (const Function< T, LDIM > &f, const Function< R, KDIM > &g, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2, int task=0)
 Computes the partial scalar/inner product between two functions, returns a low-dim function.
template<std::size_t NDIM, typename T, std::size_t LDIM, typename R, std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > 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< T > interleave_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_complex > inverse (const Tensor< double_complex > &A)
template<typename T>
Tensor< T > inverse (const Tensor< T > &a_in)
 invert general square matrix A
template<std::size_t N, std::size_t M>
constexpr std::enable_if_t< N >=M, std::array< std::size_t, N-M > > iota_array (std::array< std::size_t, M > values_to_skip_sorted)
template<typename T, std::size_t NDIM>
bool is_collected (const std::vector< CCPairFunction< T, NDIM > > &other)
bool is_madness_thread ()
bool is_main_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)
template<typename T>
Tensor< T > KAIN (const Tensor< T > &Q, double rcond=1e-12)
 Solves non-linear equation using KAIN (returns coefficients to compute next vector).
template<std::size_t NDIM>
double lattice_finite_reach (const std::array< LatticeRange, NDIM > &lattice_ranges, const Tensor< double > &cell_width)
 Convolutions in separated form (including Gaussian).
template<std::size_t NDIM>
array_of_bools< NDIM > lattice_sum ()
template<std::size_t NDIM>
std::array< LatticeRange, NDIM > lattice_sum_range ()
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.
 LLRVDomainMask (double epsilon)
 Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask characteristic 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
template<typename T, std::size_t NDIM>
void load_balance (World &world, std::vector< Function< T, NDIM > > &vf)
void load_coeffs (World &world, const char *dir)
 Collective routine to load and cache twoscale & autocorrelation 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)
template<template< typename, std::size_t > class Functor, typename T, std::size_t... Is, typename... FunctorArgs, typename... CallArgs>
auto loop_N (std::index_sequence< Is... >, std::tuple< FunctorArgs... > &&functor_args, CallArgs &&... call_args) -> std::array< decltype(Functor< T, 1 >(std::forward< FunctorArgs >(std::get< FunctorArgs >(functor_args))...)(std::forward< CallArgs >(call_args)...)), sizeof...(Is)>
template<template< typename, std::size_t > class Functor, typename... Ts, typename... FunctorArgs, typename... CallArgs>
auto loop_types (std::tuple< FunctorArgs... > &&functor_args, CallArgs &&... call_args)
std::string lowercase (const std::string &s)
long lowest_rank_on_host_of_rank (const std::map< std::string, std::vector< long > > ranks_per_host1, int rank)
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
RestartPlan make_restart_plan (World &world, const RestartMode mode, const CalculationParameters &param, const Molecule &requested, const Representation wanted, const RestartCapabilities &can, const std::string &ncf="")
template<typename T, std::size_t NDIM>
Function< T, NDIM > map_and_mirror (const Function< T, NDIM > &f, const std::vector< long > &map, const std::vector< long > &mirror, bool fence=true)
 This is replaced with mirror(map(f)), optional fence.
template<typename T, std::size_t NDIM>
Function< T, NDIM > mapdim (const Function< T, NDIM > &f, const std::vector< long > &map, bool fence=true)
 Generate a new function by reordering dimensions ... optional fence.
double mask (double d) const
 Value of characteristic function at normal distance d from the surface.
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< T > matrix_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 dot product of two function vectors - q(i,j) = dot(f[i],g[j]).
template<typename T, typename R, std::size_t NDIM>
Tensor< TENSOR_RESULT_TYPE(T, R) > matrix_dot_old (World &world, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< R, NDIM > > &g, bool sym=false)
 Computes the matrix dot product of two function vectors - q(i,j) = dot(f[i],g[j]).
template<typename T, std::size_t NDIM>
DistributedMatrix< T > matrix_inner (const DistributedMatrixDistribution &d, const std::vector< Function< T, NDIM > > &f, const std::vector< Function< T, NDIM > > &g, bool sym=false)
template<typename T, 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, NDIM > mirror (const Function< T, NDIM > &f, const std::vector< long > &mirrormap, bool fence=true)
 Generate a new function by mirroring within the dimensions .. optional fence.
template<>
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<>
void mTxmq (long dimi, long dimj, long dimk, double *MADNESS_RESTRICT c, const double *a, const double *b, long ldb)
 Explicit template specializations for homogeneous types (implemented in mTxmq.cc).
template<>
void mTxmq (long dimi, long dimj, long dimk, double *MADNESS_RESTRICT c, const double *a, const double *b, long ldb)
 Explicit template specializations for homogeneous types (implemented in mTxmq.cc).
template<>
void mTxmq (long dimi, long dimj, long dimk, float *MADNESS_RESTRICT c, const float *a, const float *b, long ldb)
template<>
void mTxmq (long dimi, long dimj, long dimk, float *MADNESS_RESTRICT c, const float *a, const float *b, long ldb)
template<>
void mTxmq (long dimi, long dimj, long dimk, std::complex< double > *MADNESS_RESTRICT c, const std::complex< double > *a, const std::complex< double > *b, long ldb)
template<>
void mTxmq (long dimi, long dimj, long dimk, std::complex< double > *MADNESS_RESTRICT c, const std::complex< double > *a, const std::complex< double > *b, long ldb)
template<>
void mTxmq (long dimi, long dimj, long dimk, std::complex< float > *MADNESS_RESTRICT c, const std::complex< float > *a, const std::complex< float > *b, long ldb)
template<>
void mTxmq (long dimi, long dimj, long dimk, std::complex< float > *MADNESS_RESTRICT c, const std::complex< float > *a, const std::complex< float > *b, long ldb)
template<typename T>
void mTxmq (long dimi, long dimj, long dimk, std::complex< T > *MADNESS_RESTRICT c, const std::complex< T > *a, const T *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)
 Generic template definitions for any other unspecialized types.
void mTxmq_init ()
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)
 Reference implementation for verification / fallback.
template<typename T>
void mTxmq_scratch_clear ()
 Free every thread's mTxmq scratch buffers. Call only at a quiescent point.
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), NDIM > mul (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true, bool do_make_redundant=true)
 Same as operator* but with optional fence; see mul_sparse to screen.
template<typename Q, typename T, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIM > mul (const Function< T, NDIM > &f, const Q alpha, bool fence=true)
 Returns new function equal to f(x)*alpha with optional fence.
template<typename Q, typename T, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(Q, T), NDIM > mul (const Q alpha, const Function< T, NDIM > &f, bool fence=true)
 Returns new function equal to alpha*f(x) with optional fence.
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 std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, bool fence=true, bool do_make_redundant=true)
 Multiplies two vectors of functions q[i] = a[i] * b[i]; see mul_sparse to screen.
template<typename L, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIM > mul_sparse (const Function< L, NDIM > &left, const Function< R, NDIM > &right, double tol, bool fence=true, bool do_make_redundant=true)
 Sparse multiplication; the scalar interface redirects to the vector one in vmra.h.
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, bool do_make_redundant=true)
template<typename T, typename R, std::size_t NDIM>
std::vector< Function< TENSOR_RESULT_TYPE(T, R), NDIM > > mul_sparse (World &world, const std::vector< Function< T, NDIM > > &a, const std::vector< Function< R, NDIM > > &b, double tol, bool fence=true, bool do_make_redundant=true)
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, NDIM > multiop_values (const opT &op, const std::vector< Function< T, NDIM > > &vf)
template<typename T, std::size_t NDIM, std::size_t LDIM>
Function< T, NDIM > multiply (const Function< T, NDIM > f, const Function< T, LDIM > g, const int particle, const bool fence=true)
 multiply a high-dimensional function with a low-dimensional function
template<typename 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_complex > my_conj_transpose (Tensor< double_complex > a)
STATIC Tensor< float > my_conj_transpose (Tensor< float > a)
STATIC Tensor< float_complex > my_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)
bool nearlyEqual (double a, double b, double epsilon=1e-9)
template<typename... argT>
AmArg * new_am_arg (const argT &... args)
 Convenience template for serializing arguments into a new AmArg.
template<std::size_t NDIM>
array_of_bools< NDIM > no_lattice_sum ()
template<std::size_t NDIM>
std::array< LatticeRange, NDIM > no_lattice_sum_range ()
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>
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>
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 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 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), NDIM > operator* (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Multiplies two functions with the new result being of type TensorResultType<L,R>.
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), NDIM > operator* (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), NDIM > operator* (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>
constexpr Vector< T, N > operator* (T l, Vector< U, N > r)
 Scale a Vector.
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator* (Vector< T, N > l, const Vector< U, N > &r)
 Multiply (element-wise) two Vectors.
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator* (Vector< T, N > l, U r)
 Scale a Vector.
template<typename T, std::size_t NDIM>
std::vector< CCPairFunction< T, NDIM > > operator+ (const CCPairFunction< T, NDIM > c1, const CCPairFunction< T, NDIM > &c2)
template<typename L, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(L, R), NDIM > operator+ (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Adds two functions with the new result being of type TensorResultType<L,R>.
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 Real1, typename Real2>
auto operator+ (KahanAccumulator< Real1 > v1, KahanAccumulator< Real2 > v2)
template<typename Real1, typename Real2>
auto operator+ (KahanAccumulator< Real1 > v1, Real2 v2)
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 Real1, typename Real2>
auto operator+ (Real2 v2, KahanAccumulator< Real1 > v1)
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator+ (Vector< T, N > l, const Vector< U, N > &r)
 Add (element-wise) two Vectors.
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator+ (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), NDIM > operator- (const Function< L, NDIM > &left, const Function< R, NDIM > &right)
 Subtracts two functions with the new result being of type TensorResultType<L,R>.
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 Real1, typename Real2>
auto operator- (KahanAccumulator< Real1 > v1, KahanAccumulator< Real2 > v2)
template<typename Real1, typename Real2>
auto operator- (KahanAccumulator< Real1 > v1, Real2 v2)
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 Real1, typename Real2>
auto operator- (Real2 v2, KahanAccumulator< Real1 > v1)
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator- (Vector< T, N > l, const Vector< U, N > &r)
 Subtract (element-wise) two Vectors.
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator- (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)
template<typename T, std::size_t N, typename U>
constexpr Vector< T, N > operator/ (Vector< T, N > l, const Vector< U, N > &r)
 Divide (element-wise) two Vectors.
bool operator< (const uniqueidT &a, const uniqueidT &b)
 Ordering operator.
template<typename Char, typename Real>
std::basic_ostream< Char > & operator<< (std::basic_ostream< Char > &os, const KahanAccumulator< Real > &v)
std::ostream & operator<< (std::ostream &os, const DistributedID &did)
 Overload redirect to std::ostream to be discoverable via ADL.
template<typename T = long>
std::ostream & operator<< (std::ostream &os, const DistributionType type)
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 = double>
std::ostream & operator<< (std::ostream &os, const typename MacroTaskInfo::StoragePolicy sp)
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 QCCalculationParametersBase &p1, const QCCalculationParametersBase &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 Tensor< T > &ovlp, double lindep=1e-12)
template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_canonical (const std::vector< Function< T, NDIM > > &v, double lindep=1e-12)
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, const Tensor< T > &ovlp, double lindep=1e-12)
 symmetric orthonormalization (see e.g. Szabo/Ostlund)
template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > orthonormalize_symmetric (const std::vector< Function< T, NDIM > > &v, double lindep=1e-12)
template<typename T>
Tensor< T > orthonormalize_symmetric_matrix (Tensor< T > ovlp)
 return a matrix that orthonormalizes the vectors v_ortho = transform(world,v,result);
template<class T>
GenTensor< T > outer (const GenTensor< T > &left, const GenTensor< T > &right, const TensorArgs)
 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< T > outer (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< T > outer (const Tensor< T > &left, const Tensor< T > &right, const TensorArgs)
 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,...).
template<typename T, std::size_t NDIM>
Tensor< T > pair_energy_weights (World &world, const std::vector< Function< T, NDIM/2 > > &observer, const Function< T, NDIM/2 > &phi_i_bra, const Function< T, NDIM/2 > &phi_j_bra, const std::vector< Function< T, NDIM/2 > > &occ_ket, const std::vector< Function< T, NDIM/2 > > &occ_bra, const SeparatedConvolution< T, NDIM/2 > &g12)
template Tensor< double > pair_energy_weights< double, 6 > (World &, const std::vector< Function< double, 3 > > &, const Function< double, 3 > &, const Function< double, 3 > &, const std::vector< Function< double, 3 > > &, const std::vector< Function< double, 3 > > &, const SeparatedConvolution< double, 3 > &)
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
std::optional< RestartMetadata > peek_restartdata (World &world, const std::string &filename)
std::optional< RestartSummary > peek_restartdata_summary (World &world, const std::string &filename)
template<typename T, std::size_t NDIM>
Derivative< T, NDIM > periodic_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, NDIM > PeriodicBSHOp (World &world, double mu, long k, double lo, double eps, Tensor< double > L)
static SeparatedConvolution< double_complex, 3 > PeriodicBSHOperator3D (World &world, Vector< double, 3 > bloch_k, double mu, double lo, double eps, const std::array< KernelRange, 3 > &kernel_ranges=std::array< KernelRange, 3 >(), const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 > bloch_k, double mu, double lo, double eps, const std::array< KernelRange, 3 > &kernel_ranges=std::array< KernelRange, 3 >(), const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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, NDIM > PeriodicCoulombOp (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 > bloch_k, double lo, double eps, const std::array< KernelRange, 3 > &kernel_ranges=std::array< KernelRange, 3 >(), const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), int k=FunctionDefaults< 3 >::get_k())
static SeparatedConvolution< double_complex, 3 > * PeriodicHFExchangeOperatorPtr (World &world, Vector< double, 3 > bloch_k, double lo, double eps, const std::array< KernelRange, 3 > &kernel_ranges=std::array< KernelRange, 3 >(), const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), int k=FunctionDefaults< 3 >::get_k())
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)
RestartPlan plan_restart (const RestartMode mode, const RestartSources &disk, const RestartCapabilities &can, const std::vector< double > &protocol, const double user_dconv, const Molecule &requested, const Representation wanted, const double eprec=0.0, const std::string &xc="", const std::string &ncf="", const std::size_t nmo_alpha=0)
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, const Vector< double, NDIM > origin=Vector< double, NDIM >(0.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.
template<std::size_t NDIM>
void plot_line (World &world, const std::vector< Function< double, NDIM > > &vf, const std::string filename, const PlotParameters param, int axis)
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)
static void position_stream_at_coordinates (std::istream &f)
 position the stream at the head of the block holding the coordinates
std::istream & position_stream_to_word (std::istream &f, const std::string &tag, const char comment, bool rewind, bool silent, bool first_word_only)
 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)
std::vector< int > primary_ranks_per_host (World &world, const std::map< std::string, std::vector< long > > &ranks_per_host1)
template<typename T, typename... Ts>
void print (const T &t, 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, 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)
void print_memory_usage (const World &world)
 check memory usage using getrusage
void print_mtxmq_profile ()
 Print call profile and shape statistics for mTxmq (automatically called at exit).
template<typename T, std::size_t NDIM>
void print_pair_energy_report (const DiagnosticMatrix< T, NDIM > &dm, const std::vector< std::string > &pieces, const std::vector< double > &signs, const std::string &title)
template void print_pair_energy_report< double, 6 > (const DiagnosticMatrix< double, 6 > &, const std::vector< std::string > &, const std::vector< double > &, const std::string &)
template<typename T, std::size_t NDIM>
void print_pair_energy_report_RI (const DiagnosticMatrix< T, NDIM > &dm, const std::vector< std::string > &pieces, const std::vector< double > &signs, const Tensor< T > &W, double factor, const std::string &title)
template void print_pair_energy_report_RI< double, 6 > (const DiagnosticMatrix< double, 6 > &, const std::vector< std::string > &, const std::vector< double > &, const Tensor< double > &, double, const std::string &)
template<typename T, std::size_t NDIM>
void print_pair_energy_table_RI (const DiagnosticMatrix< T, NDIM > &dm, const std::vector< std::string > &pieces, const std::vector< std::string > &labels, const std::vector< double > &energy6d, const Tensor< T > &W, double factor, const std::string &title)
template void print_pair_energy_table_RI< double, 6 > (const DiagnosticMatrix< double, 6 > &, const std::vector< std::string > &, const std::vector< std::string > &, const std::vector< double > &, const Tensor< double > &, double, const std::string &)
bool print_restartdata_info (World &world, const std::string &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<typename T, size_t NDIM>
void print_tree_jsonfile (World &world, const Function< T, NDIM > &f, std::string filename)
void printf_msg_energy_time (const std::string msg, const double energy, const double time)
static double process_cpu_time ()
 Returns the CPU time consumed by this process, in seconds.
template<typename T, std::size_t NDIM>
Function< T, NDIM > project (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, NDIM > qm_free_particle_propagator (World &world, int k, double bandlimit, double timestep)
template<std::size_t NDIM>
SeparatedConvolution< double_complex, NDIM > * qm_free_particle_propagatorPtr (World &world, int k, double bandlimit, double timestep)
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)
std::map< long, std::pair< std::string, double > > rank_to_host_and_rss_map (World &universe)
 return a mapping rank to hostname, return value on rank 0 only
std::map< std::string, std::vector< long > > ranks_per_host (World &universe)
 for each host, return a list of its ranks
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)
template<typename Archive>
unsigned int read_df_restart_version (const Archive &ar)
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, NDIM > real (const Function< double, NDIM > &z, bool fence=true)
 Returns a new function that is the real part of the input.
template<std::size_t NDIM>
Function< double, NDIM > real (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, NDIM > real (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.
void redirectio (const World &world, bool split=false)
 redirects standard output and error to rank-specific files
template<typename T, std::size_t NDIM>
void redistribute_to_batches (World &world, std::vector< Function< T, NDIM > > &v, const std::vector< ProcessID > &owner, std::size_t cap_bytes=0, bool rotate=true)
template<class T>
GenTensor< T > reduce (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
Representation representation_from_int (const int i)
 map a stored int back to a Representation, tolerating values we do not know
void require_supported_df_restart (const unsigned int version)
 Throws unless version is a DF restart format this build can read.
void reset_mtxmq_profile ()
 Reset profiling statistics counters.
void reset_papi_measurement ()
RestartMode restart_mode_from_string (const std::string &s)
std::vector< std::string > restart_mode_names ()
 the six spellings accepted by the restart keyval, for allowed_values
std::string restartdata_basename (std::string name)
bool restartdata_exists (const std::string &filename)
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< T > row_distributed_matrix (World &world, int64_t n, int64_t m, int64_t rowtile=0)
 Generates an (n,m) matrix distributed by rows (column dimension is not distributed).
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)
bool same_displacement_shell (double a, double b)
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< ScalarResult< T > > scalar_result_vector (World &world, std::size_t n)
 helper function to create a vector of ScalarResultImpl, circumventing problems with the constructors
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 std::vector< Q > &factors, bool fence=true)
 Scales inplace a vector of functions by distinct values.
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<class T, class F>
void set_if_exists (nlohmann::json &j, const std::string &key, const std::optional< T > &opt, F &&to_json_fn)
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< NDIM > simpt2key (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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), int k=FunctionDefaults< 3 >::get_k())
static SeparatedConvolution< double, 3 > * SlaterF12OperatorPtr (World &world, double mu, double lo, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), int k=FunctionDefaults< 3 >::get_k())
 Factory function generating separated kernel for convolution with (1 - exp(-mu*r))/(2 mu) in 3D.
template<std::size_t NDIM>
static SeparatedConvolution< double, NDIM > * SlaterF12OperatorPtr_ND (World &world, double mu, double lo, double eps, const std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), int k=FunctionDefaults< NDIM >::get_k())
 Factory function generating separated kernel for convolution with (1 - exp(-mu*r))/(2 mu) in ND.
static SeparatedConvolution< double, 3 > SlaterF12sqOperator (World &world, double mu, double lo, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), int k=FunctionDefaults< 3 >::get_k())
static SeparatedConvolution< double, 3 > * SlaterF12sqOperatorPtr (World &world, double mu, double lo, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), int k=FunctionDefaults< 3 >::get_k())
template<std::size_t NDIM = 3>
static SeparatedConvolution< double, NDIM > SlaterOperator (World &world, double mu, double lo, double eps, const std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), 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 std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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 std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), int k=FunctionDefaults< NDIM >::get_k())
double smoothed_density (double rs)
 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, NDIM > SmoothingOperator (World &world, double eps, const std::array< LatticeRange, NDIM > &lattice_ranges=FunctionDefaults< NDIM >::get_bc().lattice_range(), int k=FunctionDefaults< NDIM >::get_k())
static SeparatedConvolution< double, 3 > SmoothingOperator3D (World &world, double eps, const std::array< LatticeRange, 3 > &lattice_ranges=FunctionDefaults< 3 >::get_bc().lattice_range(), 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, NDIM > square (const Function< T, NDIM > &f, bool fence=true)
 Create a new function that is the square of f - global comm only if not reconstructed.
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 stage_halo (World &world, const std::vector< std::shared_ptr< Derivative< T, NDIM > > > &grad, const std::vector< Function< T, NDIM > > &v, bool fence=true)
 Pre-stages the neighbor coefficients that differentiating v with each of grad will need.
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.
static void START_TIMER (World &world)
void startup (World &world, int argc, char **argv, bool doprint=false, bool make_stdcout_nice_to_reals=true)
 initialize the internal state of the MADmra library
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), NDIM > sub (const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
 Same as operator- but with optional fence and no automatic compression.
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, std::size_t NDIM>
Function< T, NDIM > sum (World &world, const std::vector< Function< T, NDIM > > &f, bool fence=true)
 Returns new function — q = sum_i f[i].
double surface (double d) const
 Value of surface function at distance d normal to surface.
RestartSources survey_restart_sources (World &world, const std::string &prefix, const bool nwfile_named)
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 R, std::size_t MDIM>
void swap (Function< R, MDIM > &f1, Function< R, MDIM > &f2)
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>
constexpr 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, NDIM > symmetrize (const Function< T, NDIM > &f, const std::string symmetry, bool fence=true)
 symmetrize a function
template<typename Q>
Tensor< Q > tensor_abs (const Tensor< std::complex< Q > > &c)
template<class T>
Tensor< T > tensor_in (const nlohmann::json &j)
template<class T>
nlohmann::json tensor_out (const Tensor< T > &t)
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< Q > tensor_ximag (const Tensor< std::complex< Q > > &c)
template<typename Q>
Tensor< Q > tensor_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_rnlij_rangelimited (const bool log_errors)
bool test_rnlp (const bool log_errors)
bool test_rnlp_rangelimited (const bool log_errors)
bool test_rnlp_rangelimited_erf (const bool log_errors)
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 thread_purge ()
void threadpool_wait_policy (WaitPolicy policy, int sleep_duration_in_microseconds=0)
static void time_transform (World &world, int &mflopslo, int &mflopshi)
template<typename T = long>
std::string to_string (const DistributionType type)
std::string to_string (const Representation r)
std::string to_string (const RestartMode m)
std::string to_string (const RestartSource s)
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, double tol, 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 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 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< T > transpose (const Tensor< T > &t)
 Returns a new deep copy of the transpose of the input tensor.
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.
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.
bool try_two_locks (const Mutex &m1, const Mutex &m2)
 Attempt to acquire two locks without blocking holding either one.
template<typename T>
TensorTrain< T > tt_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, NDIM > unary_op (const Function< Q, NDIM > &func, const opT &op, bool fence=true)
 Out of place application of unary operation to function values with optional fence.
template<typename Q, typename opT, std::size_t NDIM>
Function< typename opT::resultT, NDIM > unary_op_coeffs (const Function< Q, NDIM > &func, const opT &op, bool fence=true)
 Out of place application of unary operation to scaling function coefficients with optional fence.
template<typename tupleT, typename opT, std::size_t I = 0>
static void unary_tuple_loop (tupleT &tuple, opT &op)
 loop over a tuple and apply unary operator op to each element
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>
constexpr Vector< T, N > unitvec (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 dcT>
DistributionType validate_distribution_type (const dcT &dc)
 check distribution type of WorldContainer – global communication
template<typename T, typename... Ts>
constexpr Vector< T, sizeof...(Ts)+1 > vec (T t, Ts... ts)
 Factory function for creating a madness::Vector.
template<typename T>
std::vector< T > vector_factory (const T &v0)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6)
 Returns a std::vector<T> initialized from the arguments.
template<typename T>
std::vector< T > vector_factory (const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, 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.
WorldMemInfo * world_mem_info ()
 Returns pointer to internal structure.
template<typename Archive>
void write_df_restart_version (const Archive &ar)
 Writes the current DF restart format version as the first datum in the archive.
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, bool fence=true)
 Generates a vector of zero functions (reconstructed).
template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > zero_functions_auto_tree_state (World &world, int n, bool fence=true)
 Generates a vector of zero functions, either compressed or reconstructed, depending on tensor type.
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).
template<typename T, std::size_t NDIM>
std::vector< Function< T, NDIM > > zero_functions_tree_state (World &world, int n, const TreeState state, bool fence=true)
 Generates a vector of zero functions with a given tree state.
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
static constexpr double BSH_TIGHT_THRESH = 1.0e-7
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]
template<typename T>
int CubicInterpolationTable< T >::min_npts_per_task_default = 1024
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.
constexpr unsigned int DF_RESTART_VERSION = 1
static const string dir = "coredata/"
template<std::size_t NDIM>
const int DomainMaskSDFFunctor< NDIM >::DMASK = 3
template<std::size_t NDIM>
const int DomainMaskSDFFunctor< NDIM >::DSURFACE = 5
template<std::size_t NDIM>
const int DomainMaskSDFFunctor< NDIM >::MASK = 1
template<std::size_t NDIM>
const int DomainMaskSDFFunctor< NDIM >::MASK_COMPLEMENT = 2
template<std::size_t NDIM>
const int DomainMaskSDFFunctor< NDIM >::SURFACE = 4
static const Tag DYNAMIC_TAG_BASE = 1024
NDIM & f
static const char * filename = "gaussleg"
static constexpr long FUNCTION_ARCHIVE_MAGIC = 7776770
template<typename T, std::size_t NDIM>
const FunctionCommonData< T, NDIM > * FunctionCommonData< T, NDIM >::data [MAXK] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
template<std::size_t NDIM>
bool FunctionDefaults< NDIM >::apply_randomize = false
template<std::size_t NDIM>
bool FunctionDefaults< NDIM >::autorefine = true
template<std::size_t NDIM>
std::optional< BoundaryConditions< NDIM > > FunctionDefaults< NDIM >::bc
template<std::size_t NDIM>
Tensor< double > FunctionDefaults< NDIM >::cell = FunctionDefaults<NDIM>::make_default_cell()
template<std::size_t NDIM>
double FunctionDefaults< NDIM >::cell_geometric_mean_width = 1.
template<std::size_t NDIM>
double FunctionDefaults< NDIM >::cell_min_width = 1.
template<std::size_t NDIM>
double FunctionDefaults< NDIM >::cell_volume = 1.
template<std::size_t NDIM>
Tensor< double > FunctionDefaults< NDIM >::cell_width = FunctionDefaults<NDIM>::make_default_cell_width()
template<std::size_t NDIM>
bool FunctionDefaults< NDIM >::debug = false
template<std::size_t NDIM>
int FunctionDefaults< NDIM >::initial_level = 2
template<std::size_t NDIM>
int FunctionDefaults< NDIM >::k = 6
template<std::size_t NDIM>
int FunctionDefaults< NDIM >::max_refine_level = 30
template<std::size_t NDIM>
std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > FunctionDefaults< NDIM >::pmap
template<std::size_t NDIM>
int FunctionDefaults< NDIM >::pmap_nproc {-1}
template<std::size_t NDIM>
bool FunctionDefaults< NDIM >::project_randomize = false
template<std::size_t NDIM>
Tensor< double > FunctionDefaults< NDIM >::rcell_width = FunctionDefaults<NDIM>::make_default_cell_width()
template<std::size_t NDIM>
bool FunctionDefaults< NDIM >::refine = true
template<std::size_t NDIM>
int FunctionDefaults< NDIM >::special_level = 3
template<std::size_t NDIM>
double FunctionDefaults< NDIM >::thresh = 1e-4
template<std::size_t NDIM>
int FunctionDefaults< NDIM >::truncate_mode = 0
template<std::size_t NDIM>
bool FunctionDefaults< NDIM >::truncate_on_project = true
template<std::size_t NDIM>
TensorType FunctionDefaults< NDIM >::tt = TT_FULL
const Future< void > Future< void >::value = Future<void>()
NDIM const Function< R, NDIM > & g
template<>
ConcurrentHashMap< hashT, std::shared_ptr< GaussianConvolution1D< double > > > GaussianConvolution1DCache< double >::map = {}
template<>
ConcurrentHashMap< hashT, std::shared_ptr< GaussianConvolution1D< double_complex > > > GaussianConvolution1DCache< double_complex >::map = {}
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>
template<typename T>
constexpr bool is_valid_task_result_v
 check if type is a valid task result: it must be a WorldObject and must implement gaxpy
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 constexpr double MUL_SCREENING_SAFETY = 0.1
static double nn1 [100]
static constexpr double NORM_TREE_UNCOMPUTED = 1e300
static constexpr const char * not_found_msg = "position_stream: failed to locate the requested tag"
 message thrown when a tag cannot be found
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
std::vector< CubicInterpolationTable< double > > SAPCharges
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]
template<>
volatile std::list< detail::PendingMsg > WorldObject< MacroTaskQ >::pending = std::list<detail::PendingMsg>()
template<>
Spinlock WorldObject< MacroTaskQ >::pending_mutex (0)
template<>
volatile std::list< detail::PendingMsg > WorldObject< WorldContainerImpl< long, std::vector< unsignedchar >, madness::Hash< long > > >::pending = std::list<detail::PendingMsg>()
template<>
Spinlock WorldObject< WorldContainerImpl< long, std::vector< unsignedchar >, madness::Hash< long > > >::pending_mutex (0)

Detailed Description

Namespace for all elements and tools of MADNESS.

declare all functions in namespace madness, from ranks_and_hosts.cpp

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

Everything here works on overlap matrices alone, so the same functions serve MRA orbitals (overlaps by quadrature) and Gaussian-basis orbitals (analytic overlaps). The inputs, for the occupied orbitals phi_i of one spin:

  • phi_i orthonormal, <phi_i|phi_j> = delta_ij, with occupations n_i
  • a basis chi_mu centred on the atoms; S = <chi|chi>, X = <chi|phi>
  • the atom each basis function sits on S and X must refer to the same functions chi (e.g. both from the same projection into MRA).

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.

◆ batch_bytesT

using madness::batch_bytesT = std::vector<unsigned char>

the serialized batch travels by value through a Future, so it must be archive-serializable: a plain vector is, a shared_ptr is not

◆ batch_keyT

◆ 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

typedef std::shared_ptr< FunctionFunctorInterface<double_complex,1> > madness::complex_functor_1d

◆ complex_functor_2d

typedef std::shared_ptr< FunctionFunctorInterface<double_complex,2> > madness::complex_functor_2d

◆ complex_functor_3d

typedef std::shared_ptr< FunctionFunctorInterface<double_complex,3> > madness::complex_functor_3d

◆ complex_functor_4d

typedef std::shared_ptr< FunctionFunctorInterface<double_complex,4> > madness::complex_functor_4d

◆ complex_functor_5d

typedef std::shared_ptr< FunctionFunctorInterface<double_complex,5> > madness::complex_functor_5d

◆ complex_functor_6d

typedef std::shared_ptr< FunctionFunctorInterface<double_complex,6> > madness::complex_functor_6d

◆ 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 = 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 = typename future_to_ref< T >::type

◆ has_freestanding_default_serialize_t

template<typename T, typename Archive>
using madness::has_freestanding_default_serialize_t = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = typename is_output_archive<std::remove_reference_t<std::remove_cv_t<T>>>::type

◆ json

using madness::json = 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 = typename remove_fcvr<T>::type

◆ remove_future_t

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

C++11 version of REMFUTURE.

◆ 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

◆ SCFResultsTuple

Initial value:
holds convergence results of the calculation
Definition Results.h:108
Definition Results.h:151
Definition Results.h:363
Definition Results.h:426

◆ 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 

◆ DerivMethod

enum class madness::DerivMethod
strong

which first derivative the div_* variants use

abgv is the default ABGV operator; bspline and ble are the smoothing first derivatives, cf. Derivative::set_bspline1() and set_ble1() and the grad_bspline_one() / grad_ble_one() gradients.

Enumerator
abgv 
bspline 
ble 

◆ DFConvergenceCriterion

Enumerator
bsh_residual 
energy_density_residual 

◆ DFStopReason

enum class madness::DFStopReason
strong

Why the SCF loop stopped. The message text is separate from the print, so a unit test can assert the exact wording.

Enumerator
converged_bsh 
converged_combined 
max_iterations 

◆ DistributionType

some introspection of how data is distributed

Enumerator
Distributed 

no replication of the container, the container is distributed over the world

RankReplicated 

replicate the container over all world ranks

NodeReplicated 

even if there are several ranks per node

replicate the container over all hosts (compute nodes), once per node,

◆ EnergyType

Enumerator
PROJECTED_ENERGYTYPE 
HYLLERAAS_ENERGYTYPE 
UNKNOWN_ENERGYTYPE 

◆ ExchangeBatchDim

which of the three exchange operand vectors a stored batch belongs to

Enumerator
EXCHANGE_BATCH_VF 
EXCHANGE_BATCH_BRA 
EXCHANGE_BATCH_KET 

◆ ExtraDomainPolicy

enum class madness::ExtraDomainPolicy
strong
Enumerator
Discard 
Keep 
Translate 

◆ FuncType

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

Enumerator
UNDEFINED 
HOLE 
PARTICLE 
MIXED 
RESPONSE 

◆ GeometryMatch

enum class madness::GeometryMatch
strong

how the requested geometry relates to the one in an archive

Enumerator
same 

same atoms at the same places

displaced 

same atoms, moved – e.g. a geometry optimization step

different_composition 

different atoms altogether

◆ GuessType

Enumerator
PARTIAL_WAVE_GUESSTYPE 
FROM_FILE_GUESSTYPE 
PREDEFINED_GUESSTYPE 
SCF_GUESSTYPE 
EXOP_GUESSTYPE 
EMPTY_GUESSTYPE 
PSI4_GUESSTYPE 
UNKNOWN_GUESSTYPE 

◆ LatticeImages

enum class madness::LatticeImages
strong

Which lattice translations a lattice-summed 1D kernel includes.

A lattice-summed kernel sums its 1D factors over the images R = -maxR..maxR. The rest-of-crystal operator needs the sum with the single lattice vector L = 0 removed, and that is not "exclude R = 0 on every axis" – it is a sum over the nonzero patterns of the periodic axes, in which each axis sums either the images only or the home cell only. See OperatorInfo::images_only.

Enumerator
all 

R = -maxR..maxR, the ordinary lattice sum.

exclude_home 

R != 0 only.

home_only 

R = 0 only; still lattice_summed(), so the displacements stay on the non-periodic domain.

◆ 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_INVRSQ 

exp(-r)/r

OT_SIZE 

1/r^2

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_ 

◆ Representation

enum class madness::Representation : int
strong

what the functions in a restartdata archive actually ARE

moldft stores psi; nemo stores the regularized F = psi/R; znemo the complex variant. Both engines write the same filename with the same version tag, so without this the two are indistinguishable and loading one as the other is silently wrong.

The numeric values are part of the archive format: they are written as an int. Add new members at the end and NEVER renumber an existing one, or archives already on disk change meaning.

Enumerator
unknown 

not recorded; a version-4 archive, which predates the field

mo 

moldft orbitals psi

nemo 

nemo's regularized orbitals F = psi/R

znemo 

complex regularized orbitals

◆ RestartMode

enum class madness::RestartMode
strong

what the user asked for with the restart keyval

automatic is spelled "auto" in input files – auto is a C++ keyword.

Enumerator
automatic 

look at what is on disk and choose (the default)

none 

ignore everything on disk, start from the initial guess

iterate 

read restartdata and keep iterating

read_only 

read restartdata and do not iterate, whatever its precision; requires the archive to be for the requested geometry

ao 

read the AO projections (restartaodata) and iterate

nwchem 

read an NWChem movecs file and iterate

◆ RestartSource

enum class madness::RestartSource : int
strong

where the initial orbitals will come from

Enumerator
initial_guess 

atomic guess, i.e. no restart at all

restartdata 

<prefix>.restartdata, MRA orbitals

restartao 

<prefix>.restartaodata, AO expansion coefficients

nwchem 

an NWChem movecs file

◆ 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, empty leaves may be present

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

◆ ~LLRVDomainMask()

virtual madness::~LLRVDomainMask ( )
virtual

◆ _()

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

Referenced by madness::MacroTaskOperationBase::MacroTaskOperationBase(), madness::MacroTaskOperationBase::MacroTaskOperationBase(), madness::SliceLowRankTensor< T >::SliceLowRankTensor(), madness::FunctionCommonData< T, NDIM >::_init_twoscale(), madness::SCF::analyze_vectors(), madness::SeparatedConvolution< double, 3 >::apply2_lowdim(), madness::projector_irrep::apply_symmetry_operators(), canonical_orthonormalization_matrix(), madness::Znemo::canonicalize(), madness::MolecularOrbitals< T, NDIM >::compute_center(), madness::SCF::compute_residual(), madness::SVDTensor< T >::compute_svd(), madness::SVDTensor< T >::concatenate(), concatenate_columns(), concatenate_rows(), madness::DistributedMatrix< T >::concatenate_rows, madness::TensorTrain< T >::copy, madness::TensorTrain< T >::decompose(), diag_and_transform(), DF::diagonalize(), madness::FunctionImpl< T, LDIM >::dirac_convolution_op(), madness::RandomizedMatrixDecomposition< T >::do_compute_range(), madness::FunctionImpl< T, LDIM >::do_dot_localX(), madness::FunctionImpl< T, LDIM >::do_inner_localX(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::do_partitioning(), madness::FunctionImpl< T, LDIM >::do_project_out(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), MiniDFT::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::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::DistributedMatrix< T >::interleave_rows, madness::SCF::kain_solve(), madness::Localizer::localize_boys(), madness::Localizer::localize_cholesky(), madness::Localizer::localize_new(), main(), main(), madness::TDHF::make_cis_matrix(), madness::TwoElectronInterface< T, NDIM >::make_coeff(), madness::FunctionDefaults< 1 >::make_default_cell(), madness::FunctionDefaults< 1 >::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< double, 3 >::make_tt_representation(), madness::SRConf< T >::make_vector_with_weights(), madness::population::matrix_power(), madness::SRConf< T >::normalize(), madness::FunctionImpl< T, LDIM >::NS_fcube_for_mul(), madness::FunctionImpl< T, LDIM >::NScoeffs2values(), BoysLocalization::operator()(), madness::FunctionImpl< T, NDIM >::do_map_and_mirror::operator()(), madness::FunctionImpl< T, NDIM >::do_mirror::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::GenTensor< T >::operator+(), madness::GenTensor< T >::operator+=(), madness::SliceLowRankTensor< T >::operator+=(), madness::GenTensor< T >::operator-=(), madness::SliceLowRankTensor< T >::operator-=(), orth(), ortho3(), ortho5(), madness::SCF::pad_virtuals_from_guess(), madness::PNO::pno_compress(), madness::Localizer::prepare_new_basis(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project_stable(), madness::MolecularOptimizer::projector_external_dof(), projector_external_dof(), rank_revealing_decompose(), madness::FunctionDefaults< 1 >::recompute_cell_info(), madness::LowRankFunction< T, NDIM, LDIM >::rr_cholesky_matrix_and_reorder(), madness::FunctionDefaults< 1 >::set_cubic_cell(), madness::SCF::solve(), 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::Subspace< T, NDIM >::update_subspace(), madness::SubspaceK< T, NDIM >::update_subspace(), and madness::FunctionImpl< T, LDIM >::vtransform().

◆ _reverse()

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

Entire tensor.

◆ abs() [1/5]

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

◆ abs() [2/5]

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

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

◆ abs() [3/5]

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

◆ abs() [4/5]

◆ abs() [5/5]

long std::abs ( long a)
static

◆ 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< 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, madness::Function< T, NDIM >::fence(), and unary_op().

◆ abs_square() [3/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.

◆ 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/4]

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 )

◆ add() [2/4]

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, and TENSOR_RESULT_TYPE.

◆ add() [3/4]

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() [4/4]

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

References a, b, and MADNESS_RESTRICT.

Referenced by main().

◆ aligned_add() [2/3]

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

References a, b, and MADNESS_RESTRICT.

◆ aligned_add() [3/3]

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

References a, b, MADNESS_RESTRICT, and Q().

◆ aligned_axpy() [1/4]

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

◆ 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

◆ 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

◆ aligned_axpy() [4/4]

template<typename T, typename Q>
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 )

References a, b, and MADNESS_RESTRICT.

Referenced by main().

◆ aligned_sub() [2/3]

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

References a, b, and MADNESS_RESTRICT.

◆ aligned_sub() [3/3]

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

References a, b, MADNESS_RESTRICT, and Q().

◆ aligned_zero()

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

References a.

Referenced by madness::Tensor< double >::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().

◆ append()

◆ apply() [1/14]

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 D, and f.

◆ apply() [2/14]

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

◆ apply() [3/14]

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

◆ apply() [4/14]

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

application of the projector might return a vector of ccpairfunctions, e.g. Q12 f12 |ij> = f12 |ij > + |ab>

References apply().

◆ apply() [5/14]

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 op-decomposed function and a decomposed function

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

◆ apply() [6/14]

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/14]

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(), G, 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(), madness::CCPairFunction< T, NDIM >::norm2(), print(), and madness::CCPairFunction< T, NDIM >::world().

◆ apply() [8/14]

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

◆ apply() [9/14]

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

Referenced by madness::DFTNuclearChargeDensityOp< T, NDIM >::DFTNuclearChargeDensityOp(), NuclearChargeDensityOp< T, NDIM >::NuclearChargeDensityOp(), madness::Solver< T, NDIM >::Solver(), Fcwf::apply(), Fcwf::apply(), apply(), apply(), apply(), apply(), apply(), madness::CCPairFunction< T, NDIM >::apply(), apply_BSH(), apply_bsh(), apply_BSH_new(), madness::SCF::apply_bsh_plain(), madness::SCF::apply_bsh_tiled(), madness::MP2::apply_exchange_vector(), madness::SCF::apply_explicit_occupations(), 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(), madness::CCPotentials::apply_KffK(), madness::ExchangeCommutator::apply_KffK_lowrank_split_alpha(), madness::ExchangeCommutator::apply_KffK_lowrank_three_range(), apply_periodic_bsh(), apply_potential(), madness::Diamagnetic_potential_factor::apply_potential(), madness::Solver< T, NDIM >::apply_potential(), madness::F12Potentials::apply_regularized_potential(), apply_T(), madness::XCOperator< T, NDIM >::apply_tau_term(), bind_operators(), madness::HartreeFock< T, NDIM >::calculate_coulomb_energy(), madness::HartreeFock< T, NDIM >::calculate_exchange_energy(), 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(), compute_energy(), madness::Znemo::compute_energy(), 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::Zcis::compute_residuals(), madness::Znemo::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(), differentiate(), div_deriv(), 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_ao_eigenvectors(), DF::iterate(), iterate(), iterate(), iterate(), iterate(), madness::CC2::iterate_singles(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_small_memory(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::SCF::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(), madness::Solver< T, NDIM >::make_kinetic_matrix(), make_kinetic_matrix(), make_kinetic_matrix(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), madness::TDHF::make_perturbed_fock_matrix(), Calculation::make_reference(), madness::EigSolver< T, NDIM >::multi_solve(), madness::HartreeFockExchangeOp< T, NDIM >::op_o(), madness::HartreeFockCoulombOp< T, NDIM >::op_r(), madness::BSHApply< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::DerivativeOperator< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::XCOperator< T, NDIM >::operator()(), MicroTask< T, NDIM >::operator()(), MyDerivativeOperator< T, NDIM >::operator()(), madness::TDHF::oscillator_strength_velocity(), madness::DFTCoulombOp< T, NDIM >::prepare_op(), madness::DFTCoulombPeriodicOp< T, NDIM >::prepare_op(), rot(), run_tests(), madness::XCOperator< T, NDIM >::set_tau(), madness::EigSolver< T, NDIM >::solve(), madness::SCF::solve(), madness::Solver< T, NDIM >::solve(), madness::Nemo::solve_cphf(), DF::solve_occupied(), madness::SCF::solve_virtuals(), test(), madness::smooth< T, NDIM >::test_1d(), test_diagnose_GQKffK(), test_diagnose_GQUe(), test_diagnose_GUe(), 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(), test_recursive_apply(), test_Vphi_ij_u(), testbsh(), testNavierStokes(), testPeriodicCoulomb3d(), trotter(), madness::SCF::twoint(), MiniDFT::update(), madness::PNO::update_pno(), and madness::XCOperator< T, NDIM >::weak_xc_terms().

◆ apply() [10/14]

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

◆ apply() [11/14]

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 B, copy(), madness::Tensor< T >::cycledim(), d, madness::BaseTensor::dim(), madness::BaseTensor::dims(), FunctionDefaults< NDIM >::k, FunctionDefaults< NDIM >::thresh, madness::TensorTrain< T >::get_core(), inner_result(), 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(), and TENSOR_RESULT_TYPE.

◆ apply() [12/14]

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

◆ apply() [13/14]

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() [14/14]

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

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

References apply_only(), f, madness::WorldGopInterface::fence(), madness::World::gop, MADNESS_ASSERT, make_nonstandard(), NDIM, nonstandard_after_apply, op(), PROFILE_BLOCK, R, reconstruct(), standard(), and TENSOR_RESULT_TYPE.

◆ 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, madness::Function< T, NDIM >::fence(), NDIM, op(), R, and TENSOR_RESULT_TYPE.

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

◆ assemble_nemo_ddens()

std::vector< madness::Tensor< double > > madness::assemble_nemo_ddens ( const std::vector< madness::Tensor< double > > & t,
const long np,
const bool beta )
static

\‍[ \nabla\rho_s = R^2(\nabla n_s - 2\mathbf U_1 n_s) = 2R^2(\mathbf G_s - \mathbf U_1 n_s) \‍]

Smooth pieces from MRA, U1 from its functor – neither differentiated numerically nor projected, whereas the alternative takes zeta = grad(log rho), a numerical derivative of a function with a kink at every nucleus, and forms sigma = rho^2 (zeta.zeta).

Measured on LiH/TPSS: the two agree to 4-5 digits outside 1e-3 bohr, but inside that the zeta form errs by 30-70 %, with the Kato ratio |grad rho|/(2 Z rho) swinging 0.73 to 1.31 where the split form holds 1.00-1.08. At Li that drives z = tau_W/tau to 1.72 and fires the von Weizsaecker floor at the nucleus. The split form is used whenever the regularized pieces are present; the empty return below means only that they are not.

|U1|^2 must come from U1_dot_U1_functor, not from summing the squares of the components: the vector's direction is smoothed over eprec and vanishes at r = 0, which destroys the diagonal, while the scalar functor keeps (S'/S)^2 exact.

References beta, d, madness::XCfunctional::enum_Ga_x, madness::XCfunctional::enum_Gb_x, madness::XCfunctional::enum_na, madness::XCfunctional::enum_nb, madness::XCfunctional::enum_nemo_R2, madness::XCfunctional::enum_u1_x, madness::XCfunctional::enum_u1_y, madness::XCfunctional::enum_u1_z, madness::XCfunctional::enum_u1sq, g, MADNESS_EXCEPTION, MADNESS_RESTRICT, np, r2(), and u().

◆ assemble_nemo_tau()

madness::Tensor< double > madness::assemble_nemo_tau ( const std::vector< madness::Tensor< double > > & t,
const long np,
const bool beta )
static

assemble the regularized alpha/beta tau pointwise, or return NULL

With psi = R F the product rule gives

\‍[ \tau_\sigma = \tfrac12 R^2\left(\sum_i w_i|\nabla F_i|^2
       - 2\,\mathbf U_1\!\cdot\!\mathbf G_\sigma + |\mathbf U_1|^2 n_\sigma\right) \‍]

with $ \mathbf G_\sigma=\sum_i w_iF_i\nabla F_i $. Everything but U1 is smooth and arrives as an MRA function; U1 arrives as values from its functor (nemo_u1_functors), so no product involving it is ever projected onto a tree. That is the whole point: the projected form rings across a box wherever the tree is coarser than U1's eprec-scale structure, and the ringing does not converge away.

Returns an empty Tensor when the nemo pieces are absent, which is the moldft path – there tau is computed directly from the physical orbitals and lives in enum_taua/b.

References beta, madness::XCfunctional::enum_Ga_x, madness::XCfunctional::enum_Ga_y, madness::XCfunctional::enum_Ga_z, madness::XCfunctional::enum_Gb_x, madness::XCfunctional::enum_Gb_y, madness::XCfunctional::enum_Gb_z, madness::XCfunctional::enum_gradfa, madness::XCfunctional::enum_gradfb, madness::XCfunctional::enum_na, madness::XCfunctional::enum_nb, madness::XCfunctional::enum_nemo_R2, madness::XCfunctional::enum_u1_x, madness::XCfunctional::enum_u1_y, madness::XCfunctional::enum_u1_z, madness::XCfunctional::enum_u1sq, MADNESS_EXCEPTION, MADNESS_RESTRICT, np, madness::Tensor< T >::ptr(), and r2().

◆ 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_cost_aware()

std::vector< ProcessID > madness::assign_cost_aware ( const std::vector< double > & cost,
int nranks )
inline

Cost-balanced assignment: descending cost, each function to the least-loaded rank (LPT greedy). Deterministic for a replicated cost[] (stable sort, index tie-break), so owner[] agrees across ranks. For redistribute_to_batches.

Parameters
[in]costper-function cost proxy (>= 0), identical on every rank

References a, b, FunctionDefaults< NDIM >::k, load(), MADNESS_CHECK, and nfunc.

Referenced by madness::SCF::apply_bsh_macrotask(), test_assignment_factories(), and test_redistribute_to_batches().

◆ 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]

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

◆ assign_round_robin()

std::vector< ProcessID > madness::assign_round_robin ( std::size_t nfunc,
int nranks )
inline

owner[j] = j % nranks. For redistribute_to_batches.

References MADNESS_CHECK, and nfunc.

Referenced by test_assignment_factories(), and test_redistribute_to_batches().

◆ atomic_number_to_symbol()

◆ 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, FunctionDefaults< NDIM >::k, kcur, and kread.

◆ bandlimited_propagator_plot()

void madness::bandlimited_propagator_plot ( )

References madness::BandlimitedPropagator::plot().

Referenced by main().

◆ begin_papi_measurement()

void madness::begin_papi_measurement ( )
inline

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

◆ binary_tuple_loop()

template<typename tupleT, typename tupleR, typename opT, std::size_t I = 0>
void madness::binary_tuple_loop ( tupleT & tuple1,
tupleR & tuple2,
opT & op )
static

loop over the tuple elements of both tuples and execute the operation op on each element pair

References binary_tuple_loop(), I, and op().

Referenced by binary_tuple_loop(), and madness::MacroTask< taskT >::MacroTaskInternal::run().

◆ blocking_invoke()

template<class F, class... Args>
decltype(auto) madness::blocking_invoke ( F && f,
Args &&... args )
constexprnoexcept

References f, and thread_purge().

◆ blocking_invoke_r()

template<class R, class F, class... Args>
R madness::blocking_invoke_r ( F && f,
Args &&... args )
constexprnoexcept

References f, R, and thread_purge().

◆ bsh_tile_size()

size_t madness::bsh_tile_size ( size_t nmo,
size_t nranks )
static

~10 orbitals per rank in flight; nmo (one chunk) for small systems. Shared by the tiled BSH apply and the residual transform.

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

◆ BSHOperator()

template<std::size_t NDIM>
SeparatedConvolution< double, NDIM > madness::BSHOperator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
int k = FunctionDefaults<NDIM>::get_k() )
inlinestatic

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

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, MADNESS_EXCEPTION, mu, OT_BSH, print(), and madness::World::rank().

Referenced by apply_bsh(), madness::CCPotentials::apply_KffK(), apply_U_mix(), apply_U_ncf(), apply_V(), madness::CCPotentials::apply_Vreg(), compute_energy(), compute_energy(), madness::MP2::compute_gQf(), compute_R2f2_psi(), compute_update(), converge(), madness::CCPotentials::fock_residue_6d(), madness::CCPotentials::fock_residue_6d_macrotask(), madness::MP2::guess_mp1_3(), iterate(), iterate(), iterate(), madness::CC2::iterate_pair(), madness::CCPotentials::iterate_pair_macrotask(), main(), madness::CCPotentials::make_constant_part_cispd(), madness::CCPotentials::make_constant_part_cispd_Qt(), madness::CCPotentials::make_constant_part_macrotask(), madness::MP2::make_Uphi0(), madness::MP2::multiply_with_0th_order_Hamiltonian(), MicroTask< T, NDIM >::operator()(), reconstruct_psi(), madness::MP2::solve_coupled_equations(), madness::MP2::solve_residual_equations(), test_adaptive_tree(), test_bsh(), test_compress(), test_convolution(), test_diagnose_GQKffK(), test_diagnose_GQUe(), test_diagnose_GUe(), test_diagnose_Ue(), test_operator_apply(), test_recursive_application(), test_recursive_apply(), test_U_el(), testbsh(), testNavierStokes(), madness::CC2::update_constant_part_adc2(), and madness::CC2::update_constant_part_cispd().

◆ BSHOperator3D()

SeparatedConvolution< double, 3 > madness::BSHOperator3D ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

◆ BSHOperatorPtr()

template<std::size_t NDIM>
SeparatedConvolution< double, NDIM > * madness::BSHOperatorPtr ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
int k = FunctionDefaults<NDIM>::get_k() )
inlinestatic

◆ BSHOperatorPtr3D()

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

◆ canonical_orthonormalization_matrix()

template<typename T, std::size_t NDIM>
Tensor< T > madness::canonical_orthonormalization_matrix ( World & world,
const Tensor< T > ovlp,
double lindep = 1e-12 )

compute the transformation matrix for canonical orthonormalization (see e.g. Szabo/Ostlund)

Parameters
[in]overlapmatrix
[in]lindeplinear dependency threshold relative to largest eigenvalue
Returns
the transformation matrix, i.e. the matrix U in the canonical orthonormalization, such that transform(world,v,U) gives the orthonormalized vector

References _(), madness::BaseTensor::dim(), e(), MADNESS_ASSERT, print(), madness::World::rank(), and syev().

Referenced by orthonormalize_canonical().

◆ CCConvolutionOperatorPtr()

◆ change_tensor_type()

◆ change_tree_state() [1/2]

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

◆ change_tree_state() [2/2]

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/4]

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

References arg().

◆ check_for_inf() [2/4]

template<typename T>
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() [3/4]

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

References arg().

◆ check_for_inf() [4/4]

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

References arg().

◆ 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< 3 >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), and madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update().

◆ check_thread_binding()

void madness::check_thread_binding ( const SafeMPI::Intracomm & comm,
int nthread_app )

Throw if the CPU binding cannot accommodate the thread pool.

Two conditions are checked, both of which make the calculation pathologically slow:

  • this rank runs more threads than there are hardware threads in its affinity mask (the classic "`--bind-to core` clogs the hwthreads" failure), and
  • all ranks sharing this host together request more threads than there are hardware threads available to them (over-subscription that --bind-to none does not cure).

In addition a non-fatal warning is issued if a rank's affinity mask straddles several NUMA domains while several ranks share the host, since that costs memory locality.

The check is collective over comm and must be called after the thread pool has been created. It is a no-op on platforms without an affinity API, and can be disabled with MAD_CHECK_BINDING=OFF.

The verdict is agreed on collectively, so either every rank throws or none does – no rank is left waiting in a collective for a rank that has bailed out. The offending rank has already written the full diagnostic to both stdout and stderr by the time it throws, and carries that same text in what(); the remaining ranks throw a one-line message pointing at it, so the diagnostic is not repeated once per rank.

Parameters
[in]commthe communicator MADNESS was initialized with
[in]nthread_appnumber of application threads per rank, i.e. the thread pool plus the main thread (the MPI communication thread is deliberately not counted, see the implementation)
Exceptions
ThreadBindingExceptionif the binding over-subscribes the hardware

References SafeMPI::Intracomm::Allreduce(), SafeMPI::Intracomm::Barrier(), cpu_list_to_string(), exception_break(), SafeMPI::Intracomm::Get_rank(), SafeMPI::Intracomm::Get_size(), get_thread_binding_info(), MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE, MPI_INT, MPI_MAX, MPI_MIN, MPI_SUM, MPI_UNSIGNED_CHAR, quiet(), SafeMPI::Intracomm::SHARED_SPLIT_TYPE, and SafeMPI::Intracomm::Split_type().

Referenced by madness::World::initialize.

◆ check_tuple_is_valid_task_result()

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

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

◆ chi_of() [1/2]

double madness::chi_of ( const double * sx,
const double * sy,
const double * sz,
const double * tx,
const double * ty,
const double * tz,
const long i )
inlinestatic

contract two zeta vectors at grid point i: chi_st = zeta_s . zeta_t

chi is the reduced density gradient in the logarithmic representation, sigma_st = rho_s rho_t chi_st. It used to be carried as its own multiwavelet function (dot(grad(ln rho_s), grad(ln rho_t)) projected and truncated), but a separately represented product is not pointwise consistent with the zeta components it came from: near the nuclear cusp the projection error in |grad ln rho|^2 is O(1), so chi_aa – a sum of squares – came out negative, sigma_aa/sigma_bb were clamped to their positivity floor while sigma_ab kept its (now unbounded) value, and the total sigma_aa + 2 sigma_ab + sigma_bb went negative. Measured against libxc alone: with the diagonals on the floor and sigma_ab swept, exc stays finite and independent of sigma_ab while vsigma of GGA_C_PBE and MGGA_C_TPSS turns NaN exactly when the total crosses zero. The exchange kernels never fail, so this corrupts the potential and not the energy, and it hits plain gga as hard as meta-gga. libxc's own two-sided clamp |sigma_ab| <= (sigma_aa + sigma_bb)/2 keeps the total non-negative while the diagonals are physical, which is why a floored diagonal is a precondition.

Contracting the zeta components here instead makes the sigma matrix the exact Gram matrix of the gradients at every grid point, so non-negativity of the diagonals, Cauchy-Schwarz, and non-negativity of the total all hold by construction rather than up to projection error. It is also cheaper: three multiwavelet products per spin pair disappear from prep_xc_args.

The pointers are deliberately not MADNESS_RESTRICT: with no beta electrons the three beta components all point at the same zero-filled scratch tensor.

◆ chi_of() [2/2]

double madness::chi_of ( const double * sx,
const double * sy,
const double * sz,
const long i )
inlinestatic

contract a zeta vector with itself: chi_ss = |zeta_s|^2 >= 0

◆ 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 A(), mask_info(), potrf_(), and TENSOR_ASSERT.

Referenced by orthonormalize_cd(), and test_cholesky().

◆ clean_archive_filename()

std::string madness::clean_archive_filename ( std::string name)
inline

Clean archive name by stripping 5-digit rank suffix (.00000) if present, and appending .restartdata if only the base prefix was specified.

References name().

Referenced by madness::DFParameters::read(), and madness::InitParameters::read().

◆ clear_halo()

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

Discards the neighbor halos staged on v.

Requires a quiescent window: it frees tables the derivative may still be reading.

References f, and v.

Referenced by differentiate(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), and madness::SCF::kinetic_energy_matrix().

◆ coalesced_gaxpy()

template<typename T, std::size_t NDIM>
void madness::coalesced_gaxpy ( World & transport_world,
FinalizeReducer< T, NDIM > & reducer,
std::vector< Function< T, NDIM > > & dest_vec,
std::vector< Function< T, NDIM > > & src_vec,
const T beta,
const std::size_t chunk_entries )

Accumulate src_vec into dest_vec in bulk, one message per destination rank per chunk.

Replaces one active message per source tree node. The two vectors may live in different worlds – subworld or node into universe, or subworld into node – so routing uses the destination process map while the transfer rides transport_world, which must be the destination's world. Completion is the caller's own fence.

Warning
Collective on transport_world: every rank must call it once per finalize. The fence below is a readiness barrier, so that no chunk can arrive at a rank that has not yet repointed its reducer. A rank whose src_vec is empty still has to reach it – do not add an early return for having nothing to send.

References madness::FinalizeReducer< T, NDIM >::accumulate_chunk(), b, beta, f, madness::WorldGopInterface::fence(), get_impl(), madness::World::gop, madness::FinalizeReducer< T, NDIM >::set_targets(), and madness::WorldObject< Derived >::task().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::finalize_stage1(), and madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::finalize_stage2().

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

Referenced by distributed_localize_new(), distributed_localize_PM(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::SCF::kinetic_energy_matrix(), madness::Localizer::localize_boys(), madness::Localizer::localize_cholesky(), madness::Localizer::localize_new(), and main().

◆ column_distributed_matrix_distribution()

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

◆ compare_geometry()

GeometryMatch madness::compare_geometry ( const Molecule & archive,
const Molecule & requested,
const double tol = 1.e-6 )
inline

compare two molecules, atom by atom and in order

Order matters: the orbitals in an archive are expanded about the atoms in the order the archive's molecule lists them, so a permuted molecule is not the same molecule as far as restart is concerned.

References a, std::abs(), b, different_composition, displaced, madness::Molecule::get_atom(), madness::Molecule::get_atomic_number(), madness::Molecule::natom(), and same.

Referenced by madness::SCF::load_mos(), and plan_restart().

◆ composite_inner() [1/2]

template<typename T, std::size_t NDIM>
T madness::composite_inner ( World & world,
std::vector< composite_term< T, NDIM > > terms,
Function< T, NDIM > bra,
const LeafOpBase< T, NDIM > & leaf_op,
double target_precision = 0.0,
int oversampling = 1 )

◆ composite_inner() [2/2]

template<typename T, std::size_t NDIM>
T madness::composite_inner ( World & world,
std::vector< composite_term< T, NDIM > > terms,
Function< T, NDIM > bra,
double target_precision = 0.0,
int oversampling = 1 )

compute <bra | Σ_t (ket_t · factor1_t · factor2_t)> adaptively

bra may be on-demand (e.g., an ERI functor) or a regular tree-resident NDIM Function. Per-term extra is not allowed in inner mode (route extras through the bra instead).

References composite_inner_apply(), madness::Function< T, NDIM >::get_impl(), madness::Function< T, NDIM >::is_initialized(), madness::Function< T, NDIM >::is_on_demand(), MADNESS_CHECK_THROW, and madness::Function< T, NDIM >::world().

Referenced by run_tests().

◆ composite_inner_apply()

template<typename T, std::size_t NDIM, typename leaf_opT>
T madness::composite_inner_apply ( World & world,
const FunctionImpl< T, NDIM > * like,
const leaf_opT & leaf_op,
std::vector< composite_term< T, NDIM > > & terms,
Function< T, NDIM > & bra_function,
double target_precision,
int oversampling )

◆ composite_product() [1/2]

template<typename T, std::size_t NDIM>
Function< T, NDIM > madness::composite_product ( World & world,
std::vector< composite_term< T, NDIM > > terms,
const LeafOpBase< T, NDIM > & leaf_op,
double target_precision = 0.0,
int oversampling = 1,
bool fence = true )

Overload taking a polymorphic LeafOpBase for fine-grained tree-structure control.

The caller-provided leaf_op lets you drive a cuspy box (ElectronCuspyBox_op, NuclearCuspyBox_op), a custom Specialbox_op, or a screening operator through the composite product's per-key refinement decisions.

Lifetime: leaf_op must outlive this call.

References composite_product_apply(), madness::FunctionFactory< T, NDIM >::empty(), madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::get_impl(), MADNESS_ASSERT, madness::Function< T, NDIM >::set_impl(), and madness::Function< T, NDIM >::world().

◆ composite_product() [2/2]

template<typename T, std::size_t NDIM>
Function< T, NDIM > madness::composite_product ( World & world,
std::vector< composite_term< T, NDIM > > terms,
double target_precision = 0.0,
int oversampling = 1,
bool fence = true )

build result = Σ_t (ket_t · factor1_t(1) · factor2_t(2) · extra_t(1,2)) adaptively

Each term's ket is either an explicit NDIM Function (term.ket) or a sum of hartree products ket_t(1,2) = Σ_k p1[k](1) ⊗ p2[k](2). factor1 / factor2 are optional single LDIM factors; extra is an optional NDIM factor (typically an on-demand ERI).

Subsumes:

  • multiply(f,g,particle) : one term, factor1 or factor2
  • make_Vphi(...) : sum of three terms with shared ket
  • make_Vphi_ij_u(...) : one term, factor1=i, factor2=j

Inputs are brought into redundant state internally; the result is reconstructed. target_precision: error threshold; 0 → use the result's thresh. oversampling: additional quadrature points for pointwise_multiplier.

References composite_product_apply(), madness::FunctionFactory< T, NDIM >::empty(), madness::Function< T, NDIM >::fence(), madness::Function< T, NDIM >::get_impl(), MADNESS_ASSERT, madness::Function< T, NDIM >::set_impl(), and madness::Function< T, NDIM >::world().

Referenced by run_tests().

◆ composite_product_apply()

◆ compress() [1/2]

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/2]

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(), madness::GTHPseudopotential< Q >::apply_potential(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_diagonal_batch_in_symmetric_matrix(), madness::NemoBase::compute_gradient(), 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::Solver< T, NDIM >::compute_rho(), cross(), DF::exchange(), gaxpy_oop(), madness::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess_ao_eigenvectors(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::SCF::kinetic_energy_matrix(), madness::Nemo::make_density(), madness::SCF::make_density(), madness::SCF::make_density(), MiniDFT::make_density(), Calculation::make_reference(), matrix_dot(), matrix_dot_old(), matrix_inner_old(), MiniDFT::orthogonalize(), orthogonalize(), madness::projector_irrep::project_on_irreps(), q_c(), rot(), madness::SCF::solve_virtuals(), sub(), sum(), test(), test2(), test_dot(), test_inner(), test_math(), test_orthonormalize_canonical(), test_orthonormalize_symmetric(), test_rot(), madness::TDHF::transform(), transform(), transform(), transform(), madness::Zcis::transform(), madness::PNO::transform_pairs(), truncate(), madness::PNO::truncate_pairs(), madness::SCF::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), and madness::SubspaceK< T, NDIM >::update_subspace().

◆ 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_new(), and 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.

◆ condition_number() [1/3]

template std::vector< double > madness::condition_number ( const Tensor< double > & A)

◆ condition_number() [2/3]

template std::vector< double > madness::condition_number ( const Tensor< double_complex > & A)

◆ condition_number() [3/3]

template<typename T>
std::vector< double > madness::condition_number ( const Tensor< T > & A)

convenience function for the condition number of a matrix

returns the condition number, the largest and smallest singular values

References syev().

◆ conditional_conj()

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

For real types return value, for complex return conjugate.

References op(), and Q().

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

◆ conj() [1/4]

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

◆ convert() [2/3]

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

◆ 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 convert(), 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, madness::Function< T, NDIM >::fence(), 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 >::fence(), FunctionDefaults< NDIM >::pmap, madness::Function< T, NDIM >::get_impl(), PROFILE_FUNC, madness::Function< T, NDIM >::set_impl(), VERIFY_TREE, and madness::Function< T, NDIM >::verify_tree().

Referenced by madness::ConvolutionData1D< Q >::ConvolutionData1D(), madness::DFTNuclearPotentialOp< T, NDIM >::DFTNuclearPotentialOp(), madness::DiagnosticMatrix< T, NDIM >::DiagnosticMatrix(), madness::DistributedMatrix< double >::DistributedMatrix(), madness::SeparatedConvolution< double, 3 >::SeparatedConvolution(), madness::SeparatedConvolution< double, 3 >::SeparatedConvolution(), madness::Solver< T, NDIM >::Solver(), abs(), abs_square(), madness::FunctionNode< T, NDIM >::accumulate(), ComplexFuncIdentOp::action(), RealFuncIdentOp::action(), madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), apply(), madness::SeparatedConvolution< double, 3 >::apply(), madness::SeparatedConvolution< double, 3 >::apply2(), madness::SeparatedConvolution< double, 3 >::apply2_lowdim(), madness::MP2::apply_exchange(), madness::MP2::apply_exchange_vector(), madness::TDHF::apply_excitation_operators(), madness::CCPotentials::apply_f12_coupling(), madness::CCPotentials::apply_Kfxy(), madness::SCF::apply_potential(), madness::Solver< T, NDIM >::apply_potential(), madness::CCPotentials::apply_projector(), madness::projector_irrep::apply_symmetry_operators(), madness::CCPotentials::apply_transformed_Ue(), apply_U_mix(), apply_U_ncf(), madness::CCPotentials::apply_Ue(), apply_V(), applyexpLt(), madness::FunctionImpl< T, LDIM >::binaryXXa(), bind_function_ops(), bind_function_type(), madness::DiagnosticMatrix< T, NDIM >::build_Gab_bra(), madness::SCF::canonicalize_virtuals(), madness::Localizer::check_core_valence_separation(), madness::TwoBodyFunctionPureComponent< T, NDIM >::clone(), madness::TwoBodyFunctionSeparatedComponent< T, NDIM >::clone(), madness::CCPairFunction< T, NDIM >::collect_same_types(), madness::DispersionCorrection::compute(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), compute_energy(), compute_energy(), madness::MP2::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(), compute_reduced_mass(), madness::MolecularOptimizer::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::composite_product_op_NS< T, NDIM, opT, LDIM >::continue_recursion(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::continue_recursion(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), convert(), madness::CCFunction< T, NDIM >::copy, copy(), copy(), copy(), copy(), madness::LowRankFunction< T, NDIM, LDIM >::copy, madness::TensorTrain< T >::copy, madness::SCF::copy_data(), copy_n(), madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), cplxfunc0(), cplxfunc2(), madness::CCPairFunction< T, NDIM >::dec_to_pure(), madness::TensorTrain< T >::decompose(), diag_and_transform(), DF::diagonalize(), madness::FunctionImpl< T, LDIM >::dirac_convolution_op(), distributed_localize_PM(), dnuclear_anchor_test(), madness::Derivative< double, 1 >::do_diff2b(), madness::SCF::do_plots(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), MiniDFT::doit(), madness::CC2::enforce_core_valence_separation(), fixphases(), madness::CCPotentials::fock_residue_6d(), madness::CCPotentials::fock_residue_6d_macrotask(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_node(), madness::FunctionImpl< T, LDIM >::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< double_complex >::get_rnlp(), madness::MolecularOrbitals< T, NDIM >::get_subset(), ggev(), GMRES(), madness::DispersionCorrection::gradient(), madness::MP2::guess_mp1_3(), madness::BasisFunctions::guess_with_exop(), madness::DispersionCorrection::hessian(), madness::SCF::initial_guess_from_nwchem(), madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive(), madness::FunctionImpl< T, LDIM >::inner_ext_recursive(), madness::CCPairFunction< T, NDIM >::inner_internal(), inverse(), madness::MP2::iterate(), madness::OEP::iterate(), madness::CC2::iterate_pair(), madness::CCPotentials::iterate_pair_macrotask(), madness::CC2::iterate_singles(), madness::MP2::JK1phi0_on_demand(), madness::MP2::JK2phi0_on_demand(), madness::MolecularOrbitals< T, NDIM >::load_mos(), loadbal(), madness::Localizer::localize_boys(), madness::Localizer::localize_cholesky(), madness::Localizer::localize_new(), main(), main(), madness::CCPotentials::make_6D_pair(), madness::SeparatedConvolution< double, 3 >::make_coeff_for_operator(), madness::CCPotentials::make_constant_part_macrotask(), 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::SCF::make_lda_potential(), madness::Solver< T, NDIM >::make_lda_potential(), make_lda_potential(), MiniDFT::make_lda_potential(), madness::TDHF::make_mo_ket(), madness::Solver< T, NDIM >::make_nuclear_potential_impl(), madness::CCPotentials::make_pair_ex(), madness::CCPotentials::make_pair_lrcc2(), make_potential(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), SurfaceMoleculeInteraction::make_surfcharge(), madness::MP2::make_Uphi0(), madness::XCOperator< T, NDIM >::make_xc_potential_impl(), madness::CCPairFunction< T, NDIM >::make_xy_u(), madness::TwoElectronInterface< T, NDIM >::map_coeff(), map_tensor(), madness::population::matrix_power(), madness::Convolution1D< double_complex >::mod_nonstandard(), madness::FunctionImpl< T, LDIM >::mul(), multiply_by_V(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::FunctionImpl< T, LDIM >::mulXXa(), madness::FunctionImpl< T, LDIM >::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(), BoysLocalization::operator()(), madness::BinaryOpStructure< NDIM >::operator()(), madness::BSHApply< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::divide_add_interpolate::operator()(), madness::FunctionImpl< T, NDIM >::add_op::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::FunctionImpl< T, NDIM >::do_keep_sum_coeffs::operator()(), madness::FunctionImpl< T, NDIM >::do_map_and_mirror::operator()(), madness::FunctionImpl< T, NDIM >::do_mapdim::operator()(), madness::FunctionImpl< T, NDIM >::do_truncate_NS_leafs::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::pg_operator::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::XCOperator< T, NDIM >::expme::operator()(), madness::XCOperator< T, NDIM >::logme::operator()(), myunaryop_square< T, NDIM >::operator()(), test_multiop< T, NDIM >::operator()(), TupleTask::operator()(), operator*(), operator*(), madness::DistributedMatrix< double >::operator+(), madness::FunctionNode< T, NDIM >::operator=(), orth(), ortho5(), orthonormalize(), madness::Znemo::orthonormalize(), outer(), madness::FunctionImpl< T, LDIM >::partial_inner_contract(), madness::MP2::phi0_on_demand(), plot_cubefile(), madness::XCOperator< T, NDIM >::prep_xc_args(), print_pair_energy_table_RI(), print_tree_jsonfile(), madness::projector_irrep::project_on_irreps(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project_stable(), propagate(), madness::Nemo::purify_hessian(), rank_revealing_decompose(), madness::InitParameters::read(), Plotter::read(), real(), realfunc0(), realfunc2(), madness::FunctionDefaults< 1 >::recompute_cell_info(), madness::SVDTensor< T >::recompute_from_range(), madness::FunctionNode< T, NDIM >::recompute_snorm_and_dnorm(), reconstruct_psi(), madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map(), reduce(), madness::DiagnosticMatrix< T, NDIM >::ref_GQab(), madness::FunctionImpl< T, LDIM >::refine_op(), residual(), run_tests(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::sd_norm_extra(), madness::OEP::selftest(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::set_bra_and_ket(), madness::FunctionDefaults< 1 >::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::XCOperator< T, NDIM >::set_tau(), madness::Displacements< NDIM >::set_width(), madness::apply_kernel_helper::slater_apply(), madness::smooth< T, NDIM >::smooth_density(), madness::CC2::solve(), madness::Nemo::solve(), madness::OEP::solve(), madness::SCF::solve(), solve(), madness::Nemo::solve_cphf(), madness::CC2::solve_lrcc2(), madness::Zcis::split(), square(), madness::archive::ArchiveStoreImpl< Archive, GenTensor< T > >::store(), madness::archive::ArchiveStoreImpl< Archive, Tensor< T > >::store(), svd(), tensor_to_numpy(), madness::CCPotentials::test(), test(), test2(), Test5(), Test7(), test_adaptive_tree(), test_add(), test_addition(), test_asymmetric(), test_broaden_resets_norms(), test_bsh(), test_chin_chen(), test_cholesky(), test_compress(), test_compress_clears_snorm(), test_consolidate_vs_direct(), test_constructor(), test_conversion(), test_convolution(), test_copy_function_from_other_world(), test_coulomb(), test_ctor_orthonormalization(), test_diagnose_GQKffK(), test_diagnose_GQUe(), test_dot_sparse(), test_gconv(), test_gradient(), test_hermiticity(), test_hessian(), test_meta_gga(), test_meta_gga_one_orbital_energy(), test_multiply(), test_node_replicated_function(), test_norm_tree_states(), test_norms_preserve_tree_state(), test_operand_state(), test_partial_inner_3d(), test_projector(), test_qr(), test_recursive_application(), test_replication_policy(), test_rr_cholesky(), test_scalar_multiplication(), test_scale_inplace_norms(), test_scale_preserves_broaden_marker(), test_scaled_redundant_operand(), 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_Vphi_ij_u(), test_with_function(), test_with_function_vector(), test_xc2(), transform(), transform_dir(), transform_dir(), transpose(), trotter(), madness::TensorTrain< T >::truncate(), two_scale_coefficients(), madness::Localizer::undo_reordering(), madness::Localizer::undo_rotation(), madness::NonlinearSolverND< 3 >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::MolecularOrbitals< T, NDIM >::update_mos_and_eps(), CoreFittingTarget::value(), madness::MolecularEnergy::value(), madness::FunctionImpl< T, LDIM >::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>
Function< T, NDIM > madness::copy ( World & world,
const Function< T, NDIM > & f,
bool fence = true )

◆ 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(), FunctionDefaults< NDIM >::pmap, madness::World::gop, PROFILE_BLOCK, and v.

◆ copy_2d_patch()

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

◆ copy_am_arg()

◆ copy_n()

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

Returns a vector of n deep copies of a function.

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

◆ CoulombOperator()

◆ CoulombOperatorPtr()

SeparatedConvolution< double, 3 > * madness::CoulombOperatorPtr ( World & world,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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_list_to_string()

std::string madness::cpu_list_to_string ( const std::vector< int > & cpus)

Render a list of cpu ids in compact form, e.g. {0,1,2,3,8} -> "0-3,8".

Referenced by check_thread_binding().

◆ cpu_relax()

◆ cpu_time()

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::CCTimer::CCTimer(), madness::test_output::test_output(), madness::Znemo::timer::timer(), madness::WorldProfileObj::WorldProfileObj(), madness::WorldProfileObj::~WorldProfileObj(), madness::SeparatedConvolution< double, 3 >::apply(), madness::SeparatedConvolution< double, 3 >::apply2(), madness::SeparatedConvolution< double, 3 >::apply2_lowdim(), madness::ThreadPool::await(), madness::test_output::checkpoint(), madness::WorldProfile::clear(), 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, LDIM >::do_apply_kernel3(), madness::test_output::end(), madness::Znemo::timer::end(), END_TIMER(), END_TIMER(), END_TIMER(), END_TIMER(), madness::MP2::END_TIMER(), madness::Solver< T, NDIM >::END_TIMER(), DF::end_timer(), madness::MacroTaskQ::execute_tasks(), DF::get_times(), madness::World::initialize, madness::CCPairFunction< T, NDIM >::inner, 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::Cloud::replicate(), madness::MacroTaskQ::replicate_inputs(), madness::Cloud::replicate_per_node(), madness::timer::resume(), madness::MacroTask< taskT >::MacroTaskInternal::run(), madness::population::PopulationAnalysis::run(), madness::MacroTaskQ::run_all(), madness::CCTimer::start(), madness::MyTimer::start(), madness::MP2::START_TIMER(), madness::Solver< T, NDIM >::START_TIMER(), START_TIMER(), START_TIMER(), START_TIMER(), START_TIMER(), DF::start_timer(), madness::CCTimer::stop(), madness::MyTimer::stop(), madness::Znemo::timer::tag(), test9(), test_bsh(), test_lowrank_function(), test_multi(), test_partial_inner(), test_simple(), test_time(), test_with_function(), test_with_function_vector(), 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(), nuclear_anchor_test(), and test_XCOperator_matrix().

◆ 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, in redundant state TODO: add this to operator fusion

References compress(), d, ensure_tree_state_respecting_fence(), f, madness::WorldGopInterface::fence(), g, madness::World::gop, MADNESS_ASSERT, make_redundant(), mul(), NDIM, R, redundant, 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 )
constexpr

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

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 filename, and molecule.

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

◆ cycle_count()

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>
auto madness::decay_types ( std::tuple< Ts... > const & ) ->std::tuple< std::remove_cv_t< std::remove_reference_t< Ts > >... >
constexpr

◆ df_convergence_criterion_from_string()

bool madness::df_convergence_criterion_from_string ( const std::string & keyword,
DFConvergenceCriterion & criterion )
inline

Map an input keyword onto the criterion. Returns false for an unknown keyword instead of throwing. MADNESS_EXCEPTION stores the const char* it is given and does not copy it. A message built here from the keyword dangles after the throw. The caller prints the keyword, then throws.

References bsh_residual, and energy_density_residual.

Referenced by madness::DFParameters::read().

◆ df_convergence_criterion_name()

const char * madness::df_convergence_criterion_name ( const DFConvergenceCriterion criterion)
inline

◆ df_iteration_converged()

bool madness::df_iteration_converged ( const DFConvergenceCriterion criterion,
const DFConvergenceMetrics & m )
inline

◆ df_stop_message()

std::string_view madness::df_stop_message ( const DFStopReason reason)
inline

◆ DiagnosticMatrix() [1/2]

template<typename T, std::size_t LDIM>
madness::DiagnosticMatrix ( World & ,
std::vector< Function< T, LDIM > >  )->DiagnosticMatrix< T, 2 *LDIM >

◆ DiagnosticMatrix() [2/2]

template<typename T, std::size_t LDIM>
madness::DiagnosticMatrix ( World & ,
std::vector< Function< T, LDIM > > ,
bool  )->DiagnosticMatrix< T, 2 *LDIM >

◆ displacement()

◆ distance() [1/5]

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

References a, and b.

◆ distance() [2/5]

◆ distance() [3/5]

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

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

◆ distributed_localize_new()

DistributedMatrix< double > madness::distributed_localize_new ( World & world,
const Tensor< double > & C,
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 )

Distributed optimization for the "new" localization method.

The "new" objective is Pipek-Mezey in an orthonormal basis, so it is optimized with the same systolic Jacobi sweeps as distributed_localize_PM. C is the replicated (nmo x nao) coefficient matrix already transformed to the orthonormal atomic-eigenfunction basis; at_to_bf/at_nbf hold the per-atom 1s / 2s2p / rest blocks built by Localizer::prepare_new_basis.

References madness::WorldTaskQueue::add(), at_nbf, at_to_bf, column_distributed_matrix(), concatenate_rows(), madness::DistributedMatrix< T >::copy_from_replicated(), madness::DistributedMatrix< T >::extract_columns(), madness::WorldTaskQueue::fence(), madness::DistributedMatrix< T >::fill_identity(), FunctionDefaults< NDIM >::thresh, and madness::World::taskq.

Referenced by madness::Localizer::localize_new_systolic().

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

◆ div_abgv()

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

div with the ABGV derivative

References abgv, div_deriv(), and v.

Referenced by div().

◆ div_ble()

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

div with the BLE smoothing first derivative

References ble, div_deriv(), and v.

◆ div_bspline()

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

div with the b-spline smoothing first derivative

References bspline, div_deriv(), and v.

◆ div_deriv()

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

shorthand div operator, with a choice of first derivative

returns the dot product of nabla with a vector f

Parameters
[in]vthe vector of functions on which the div operator works on
[in]methodwhich first derivative to use
[in]do_refinerefinement before diff'ing makes the result more accurate
[in]fencefence after completion; currently always fences
Returns
the divergence \sum_i \frac{\partial}{\partial x_i} v_i TODO: add this to operator fusion

References apply(), ble, bspline, madness::WorldGopInterface::fence(), FunctionDefaults< NDIM >::refine, madness::World::gop, grad(), gradient_operator(), MADNESS_ASSERT, NDIM, reconstruct(), sum, and v.

Referenced by div_abgv(), div_ble(), div_bspline(), and madness::XCOperator< T, NDIM >::div_dft_deriv().

◆ dmask()

double madness::dmask ( double d) const

Derivative of characteristic function with respect to the normal distance.

Parameters
[in]dThe signed distance
Returns
The derivative

References d, and epsilon.

Referenced by dsurface().

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

◆ 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,
bool do_make_redundant = true )

◆ dot_sparse()

template<typename T, typename R, std::size_t NDIM>
Function< TENSOR_RESULT_TYPE(T, R), NDIM > madness::dot_sparse ( World & world,
const std::vector< Function< T, NDIM > > & a,
const std::vector< Function< R, NDIM > > & b,
double tol,
bool fence = true,
bool do_make_redundant = 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, c, and MADNESS_RESTRICT.

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::Molecule::nuclear_attraction_potential_derivative(), and Vderiv::operator()().

◆ dsurface()

double madness::dsurface ( double d) const

Value of d(surface)/ddistance.

Parameters
[in]dThe signed distance
Returns
The derivative of the surface function

References d, dmask(), epsilon, and mask.

◆ dxprintvalue() [1/2]

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

References dxprintvalue(), and f.

Referenced by dxprintvalue(), dxprintvalue(), and plotdx().

◆ dxprintvalue() [2/2]

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

References dxprintvalue(), and f.

◆ end_papi_measurement()

void madness::end_papi_measurement ( )
inline

◆ END_TIMER()

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

◆ enforce_bc()

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

◆ enforce_in_volume()

bool madness::enforce_in_volume ( Level n,
const Translation & l )
inlinestatic

◆ ensure_tree_state_respecting_fence()

template<typename T, std::size_t NDIM>
bool madness::ensure_tree_state_respecting_fence ( const std::vector< Function< T, NDIM > > & v,
const TreeState state,
bool fence )

ensure v has the requested tree state, change the tree state of v if necessary and no fence is given

References change_tree_state(), get_tree_state(), ok(), print(), and v.

Referenced by cross(), gaxpy(), gaxpy_oop(), gaxpy_oop(), inner(), inner(), matrix_inner(), mul(), mul_sparse(), and mul_sparse().

◆ 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::COMM_WORLD.

Referenced by madness::DispersionCorrection::DispersionCorrection(), madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), EmbeddedDirichlet::EmbeddedDirichlet(), madness::SCF::SCF(), madness::DependencyInterface::~DependencyInterface(), madness::CCPotentials::apply_transformed_Ue(), madness::CCPotentials::apply_Ue(), madness::WorldGopInterface::barrier(), madness::Localizer::check_core_valence_separation(), madness::PNO::check_orthonormality(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::CCConvolutionOperator< T, NDIM >::clear_intermediates(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::DependencyInterface::dec(), madness::DependencyInterface::dec_debug(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::diagnose_error(), doit(), madness::DispersionCorrection::evaluate(), madness::DependencyInterface::inc(), madness::DependencyInterface::inc_debug(), madness::CC2::iterate_pair(), madness::LowRankFunction< T, NDIM, LDIM >::l2error(), Calculation::load_mos(), madness::ThreadBase::main(), main(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::MP2::make_Uphi0(), madness::CCPotentials::make_xy_ff_ab(), 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 >::Vphi_ij_u_op_NS< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()(), madness::hartree_convolute_leaf_op< T, NDIM, LDIM, opT >::operator()(), madness::hartree_leaf_op< T, NDIM >::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_G_R_vectors(), test_gaussian_num_coeffs(), test_integration(), madness::Diamagnetic_potential_factor::test_lz_commutator(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_qr(), test_tuple(), madness::Znemo::test_U_potentials(), madness::Diamagnetic_potential_factor::test_vector_potentials(), testNavierStokes(), madness::FunctionImpl< T, NDIM >::truncate_reconstructed_op(), and madness::CCConvolutionOperator< T, NDIM >::update_elements().

◆ error() [2/2]

template<typename T>
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::COMM_WORLD, and FunctionCommonData< T, NDIM >::data.

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

Referenced by check_thread_binding().

◆ exch_force_general_path()

bool madness::exch_force_general_path ( )
inline

Send a symmetric application down the general (bra, ket, vf) path? Read once per process.

A symmetric application computes the same numbers either way – the general path just does the whole rectangle where the symmetric one does a triangle and reuses each intermediate twice. So with this set, moldft becomes a differential test of the general path on data whose answer is already known, which is otherwise reachable only from nemo and molresponse. Debug only.

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_macrotask_efficient().

◆ exch_task_profile_enabled()

bool madness::exch_task_profile_enabled ( )
inline

◆ exch_write_cost_matrix()

void madness::exch_write_cost_matrix ( const long call_index,
const long k,
const long M,
const std::vector< double > & cost )
inline

Write the measured per-task cost matrix of one application, for offline inspection.

Behind the same flag as the rest of the profiler. One file per application per rank 0: Ccall<NNN>_k<K>.csv, holding i,j,cost over the lower-triangular batch grid, with the call index, wavelet order and batch count in a leading comment so a reader needs no other context. This is the matrix the next application's placement is derived from, so dumping it is how a straggler can be traced back to the cost that put it there.

References FunctionDefaults< NDIM >::k, and name().

Referenced by madness::Exchange< double, 3 >::set_macro_task_info().

◆ exch_write_task_profile()

void madness::exch_write_task_profile ( const ExchTaskProfile & p)
inline

Append one record to exch_taskprof.r<rank>.jsonl.

The stream stays open for the life of the process: one file per rank appended across every application, which bounds the file count at the rank count however many iterations run, and avoids a per-task open/close – expensive metadata traffic on a parallel filesystem.

References p().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::operator()().

◆ exchange_anchor_test()

◆ exchange_batch_record_key()

long madness::exchange_batch_record_key ( const long salt,
const int dim,
const Batch_1D & r )
inline

◆ exchange_batch_salt()

template<typename T, std::size_t NDIM>
long madness::exchange_batch_salt ( const std::vector< Function< T, NDIM > > & ket)
inline

Per-invocation salt for the exchange batch record keys, from the ket identities.

Taken from the ket vector because that one is available in full on both sides — where the batches are stored and where a task fetches them — so both derive the same record keys without anyone communicating a manifest. Function implementation ids are handed out in collective creation order, so the salt is identical on every rank and changes when the operator is applied to freshly built functions.

Warning
It keys on identity, not on content: two applications over the same function objects produce the same salt, so a cache keyed by it must not outlive an in-place mutation of those functions.

References f, FunctionDefaults< NDIM >::k, hash_combine(), and hash_value().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_macrotask_efficient().

◆ exchange_row_owner_assign()

std::map< std::pair< long, long >, long > madness::exchange_row_owner_assign ( const long ncolumn,
const long nrow,
const long nworker )
inline

Owner of every task in the asymmetric grid: all tasks of a column go to one worker.

The column operand is the one that stays put, so putting a whole column on one worker means the batch it holds is never fetched, and that worker computes the complete result for those columns – there is no cross-rank reduction of results beyond the final gather. Handing columns out in order is balanced by construction, the grid being a full rectangle, so no cost model is needed here. Keyed by batch index, like exchange_sym_round_robin_assign.

References c.

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::prepare_owner_assignment(), and test_row_owner_assignment().

◆ exchange_row_owner_grid()

std::vector< std::pair< Batch_1D, Batch_1D > > madness::exchange_row_owner_grid ( const std::size_t ncolumn,
const std::size_t nrow,
const long nsubworld )
inline

The asymmetric task grid: every (column, row) pair over two independent splits.

The column dimension is the operand that stays put – vf, whose batch the running rank holds – and the row dimension is the one that rotates, carrying bra and ket, which share this range because the operator sums over pairs. There is no symmetry to exploit, so the grid is the full rectangle rather than a triangle, and the two dimensions are split independently: bra and ket have the same length as each other but need not match vf's.

References c, and exchange_row_owner_split().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::do_partitioning(), and test_row_owner_grid().

◆ exchange_row_owner_split()

std::vector< Batch_1D > madness::exchange_row_owner_split ( const std::size_t n,
const long nsubworld )
inline

Batch boundaries for the asymmetric row/column split: one batch per rank.

Deliberately the same boundaries as exchange_sym_owner_split at granularity 1, so batches stored for one dimension align with the partition. Named apart because "sym" reads wrong in the asymmetric path, and because granularity is not a knob here – the column-to-rank assignment relies on there being exactly one batch per rank.

References exchange_sym_owner_split().

Referenced by exchange_row_owner_grid(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::store_batches(), test_row_owner_grid(), and test_row_owner_split().

◆ exchange_same_operands()

template<typename T, std::size_t NDIM>
bool madness::exchange_same_operands ( const std::vector< Function< T, NDIM > > & a,
const std::vector< Function< T, NDIM > > & b )
inline

Are these the same functions, so that one stored record can serve both operand roles?

Compares identity, not value: Function is a shallow handle, so equal implementation pointers mean the coefficients are literally shared and storing them twice would duplicate the largest thing the cloud holds. HF exchange passes the same vector as all three operands, and nemo passes the same one as ket and vf, so this is the common case rather than a corner.

References a, b, and get_impl().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_macrotask_efficient(), and test_weighted_bra_exchange().

◆ exchange_sym_cost_aware_assign()

std::map< std::pair< long, long >, long > madness::exchange_sym_cost_aware_assign ( const long n,
const long M,
const std::vector< double > & cost )
inline

Cost-aware owner assignment for the symmetric algorithm's triangular task matrix.

Same ownership and eligibility as exchange_sym_round_robin_assign, so the fetch-free invariant is preserved, but it balances per-worker total COST instead of task COUNT. Screening makes the tasks strongly inhomogeneous for large molecules, and that is what a count-based assignment cannot see. cost is indexed by exchange_sym_tri and holds a relative per-task cost, in practice the previous call's measured wall time; entries past its end count as zero, so an empty or short vector degrades to cost-blind. Greedy largest-cost-first onto the less loaded eligible worker, then a bounded local search that relieves the hottest worker.

Returns
map (i,j) -> owner. Deterministic given the same cost.

References C(), c, exchange_sym_tri(), load(), and p().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::prepare_owner_assignment(), and test_owner_assignment().

◆ exchange_sym_owner_nbatch()

long madness::exchange_sym_owner_nbatch ( const std::size_t n,
const long nsubworld,
const long granularity_level )
inline

Number of batches M for the owner-pinned symmetric exchange algorithm.

M = granularity_level * nsubworld, so the level is directly the number of batches per rank and every level is selectable regardless of nsubworld parity. Clamped to [1, n]: there cannot be more batches than orbitals, and a caller that hits the clamp is in the small-problem regime where batches stop being one-per-rank.

Batch k is owned by rank (k mod nsubworld), so away from the clamp every rank owns exactly granularity_level batches.

Referenced by exchange_sym_owner_split(), and test_batch_split().

◆ exchange_sym_owner_split()

std::vector< Batch_1D > madness::exchange_sym_owner_split ( const std::size_t n,
const long nsubworld,
const long granularity_level )
inline

Split a vector of length n into M = exchange_sym_owner_nbatch(...) contiguous batches.

Sizes differ by at most 1; the first (n mod M) batches get the extra element, which avoids a runt batch of 1. Single source of truth for the symmetric owner-pinned batch boundaries — the task grid, the cloud batch storage and the owner assignment all derive from it, so they align by construction. Depends only on (n, nsubworld, granularity_level).

References b, and exchange_sym_owner_nbatch().

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::do_partitioning(), exchange_row_owner_split(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::prepare_owner_assignment(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::store_batches(), test_batch_split(), and test_row_owner_split().

◆ exchange_sym_round_robin_assign()

std::map< std::pair< long, long >, long > madness::exchange_sym_round_robin_assign ( const long n,
const long M )
inline

Round-robin owner assignment for the symmetric algorithm's triangular task matrix.

Pure function of (n, M): n workers (= nsubworld), M batches, batch k owned by (k mod n). Task (i,j) with 0 <= j <= i < M is eligible for worker t iff i==j: (i mod n)==t – a diagonal task has a single owner i!=j: (i mod n)==t or (j mod n)==t – the worker owns at least one operand Eligibility is what makes the assignment fetch-free: a task always lands on a worker that already stores one of its two batches. Phase 1 round-robins eligible tasks across workers; phase 2 then rebalances off-diagonal tasks (diagonals never move) toward a task-count spread of 1.

Phase 2 is best effort, not a guarantee: it can only move a task to a worker the task is eligible for, so it stops early when the hottest worker holds nothing the coldest ones may take. The residual spread is 2 rather than 1 for some (n, M) — measured over n <= 128 and 1 to 3 batches per rank, never worse than 2.

Returns
map (i,j) -> owner. Deterministic, so every rank computes the same assignment without communicating.

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

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::prepare_owner_assignment(), and test_owner_assignment().

◆ exchange_sym_tri()

long madness::exchange_sym_tri ( const long i,
const long j )
inline

Triangular index of a batch pair, collapsing (i,j) and (j,i): a*(a+1)/2 + b.

The indexing convention of the per-task cost vector, shared by whoever records a measured cost and by exchange_sym_cost_aware_assign, which consumes it.

References a, and b.

Referenced by exchange_sym_cost_aware_assign(), and madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::operator()().

◆ F2GOperator()

SeparatedConvolution< double, 3 > madness::F2GOperator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_F2G12.

◆ F2GOperatorPtr()

SeparatedConvolution< double, 3 > * madness::F2GOperatorPtr ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_F2G12.

◆ fast_transform()

template<class R>
Tensor< std::complex< R > > & madness::fast_transform ( const Tensor< std::complex< R > > & t,
const Tensor< R > & c,
Tensor< std::complex< R > > & result,
Tensor< std::complex< R > > & workspace )

Optimized fast_transform for complex tensor * real matrix. Transforms the real and imaginary parts across all dimensions in real space, unpacking once on entry and repacking once into result on exit.

Allocates nothing: the two caller-supplied complex tensors hold 2*sz reals each, which is exactly the four real buffers of length sz that the split needs. The initial assignment is chosen so that the ndim swaps below leave the live buffer in the workspace, letting the final repack into result run without aliasing its own source.

References c, madness::BaseTensor::iscontiguous(), MADNESS_CHECK, mTxmq(), madness::BaseTensor::ndim(), madness::Tensor< T >::ptr(), R, and madness::BaseTensor::size().

◆ fast_transpose()

◆ fcube() [1/3]

◆ 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]

◆ FGOperator()

SeparatedConvolution< double, 3 > madness::FGOperator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_FG12.

◆ FGOperatorPtr()

SeparatedConvolution< double, 3 > * madness::FGOperatorPtr ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_FG12.

◆ finalize()

◆ first_rung_tighter_than()

std::optional< std::size_t > madness::first_rung_tighter_than ( const std::vector< double > & protocol,
const double achieved )
inline

index of the first protocol rung that is tighter than an achieved precision

nullopt means the ladder holds nothing tighter, i.e. the archive already covers every rung. The 0.999 slack absorbs the round trip of a threshold through an archive; without it a run converged to 1e-6 can fail to recognize the 1e-6 rung as covered.

Referenced by plan_restart().

◆ flatten()

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

References append().

Referenced by madness::PNO::t_solve().

◆ foreach_child() [1/2]

template<std::size_t NDIM, typename objT>
void madness::foreach_child ( const Key< NDIM > & parent,
objT * obj,
void(objT::* memfun )(const Key< NDIM > &) )
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().

◆ format_thresh()

std::string madness::format_thresh ( const double t)
inline

format a threshold compactly for a log line ("1e-06", not "0.000001")

Referenced by plan_restart().

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

◆ from_string()

template<typename T = long>
DistributionType madness::from_string ( std::string type)

◆ func()

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

References g.

Referenced by madness::LinAlgException::LinAlgException(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TaskFn< fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T, arg8T, arg9T >::TaskFn(), madness::TensorException::TensorException(), abs(), abs_square(), adq(), adq1(), madness::PotentialManager::core_projector_derivative(), madness::SCF::derivatives(), do_adq(), madness::FunctionImpl< T, LDIM >::err_box(), madness::FunctionImpl< T, LDIM >::errsq_local(), madness::WorldAmInterface::handler(), imag(), inner_adaptive(), madness::RMI::isend(), madness::RMI::RmiTask::isend(), make_func(), madness::FunctionImpl< T, LDIM >::make_Vphi(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::EigSolverOp< T, NDIM >::op_o(), madness::EigSolverOp< T, NDIM >::op_r(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), madness::RMI::RmiTask::process_some(), real(), madness::CCPair::serialize(), madness::NuclearCorrelationFactor::square_times_V_derivative(), unary_op(), unary_op_coeffs(), madness::FunctionImpl< T, LDIM >::unaryXX(), madness::FunctionImpl< T, LDIM >::unaryXXa(), and madness::FunctionImpl< T, LDIM >::unaryXXvalues().

◆ function_costs()

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

Global coefficient count per function – one reduction, identical on every rank, so safe for a deterministic assignment. A proxy for convolution cost; does not predict result-tree refinement.

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

Referenced by madness::SCF::apply_bsh_macrotask(), and test_redistribute_to_batches().

◆ function_real2complex()

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

◆ functor_r2()

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

◆ functor_x()

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

◆ functor_y()

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

Referenced by madness::FunctionImpl< T, NDIM >::compress_spawn(), Node::do_sum_spawn(), madness::FunctionImpl< Q, NDIM >::gaxpy_oop_reconstructed(), madness::FunctionImpl< Q, NDIM >::local_leaf_keys(), madness::FunctionImpl< Q, NDIM >::print_plane(), test10(), test5(), test9(), and madness::FunctionImpl< T, NDIM >::truncate_spawn().

◆ 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::SpectralPropagator::SpectralPropagator(), madness::FunctionCommonData< T, NDIM >::_init_quadrature(), adq(), gauss_legendre_test(), readin(), and test_meta_gga_one_orbital_energy().

◆ 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(), FunctionDefaults< NDIM >::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>
SeparatedConvolution< double, NDIM > madness::GaussOperator ( World & world,
double mu,
double lo = 0.0,
double eps = 0.0,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_GAUSS.

Referenced by run_tests(), and test_Vphi_ij_u().

◆ GaussOperatorPtr()

template<std::size_t NDIM>
SeparatedConvolution< double, NDIM > * madness::GaussOperatorPtr ( World & world,
double mu,
double lo = 0.0,
double eps = 0.0,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
int k = FunctionDefaults<NDIM>::get_k() )
inlinestatic

◆ gaxpy() [1/4]

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

◆ gaxpy() [2/4]

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, gaxpy(), and Q().

◆ gaxpy() [3/4]

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 >::fence(), madness::Function< T, NDIM >::gaxpy(), L, NDIM, PROFILE_FUNC, R, and TENSOR_RESULT_TYPE.

◆ gaxpy() [4/4]

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 )

◆ 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(), compressed, ensure_tree_state_respecting_fence(), gaxpy_oop(), print(), Q(), R, 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 )

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

Returns new function alpha*left + beta*right optional fence and no automatic compression.

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

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

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

◆ geev() [1/2]

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

References e(), and V().

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

References a, and b.

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

References a, and b.

◆ 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_fast_transform() [1/2]

template<class R>
Tensor< std::complex< R > > & madness::general_fast_transform ( const Tensor< std::complex< R > > & t,
const Tensor< R > * c,
Tensor< std::complex< R > > & result,
Tensor< std::complex< R > > & workspace )

Optimized general_fast_transform for complex tensor * real matrices.

References c, d, madness::BaseTensor::iscontiguous(), MADNESS_CHECK, mTxmq(), madness::BaseTensor::ndim(), madness::Tensor< T >::ptr(), R, and madness::BaseTensor::size().

◆ general_fast_transform() [2/2]

template<class T, class Q>
Tensor< TENSOR_RESULT_TYPE(T, Q)> & madness::general_fast_transform ( const Tensor< T > & t,
const Tensor< Q > * c,
Tensor< TENSOR_RESULT_TYPE(T, Q)> & result,
Tensor< TENSOR_RESULT_TYPE(T, Q)> & workspace )

Separated transform with a distinct matrix per dimension, reusing caller buffers.

Computes, with no internal allocation, result(i,j,...) <– sum(i',j',...) t(i',j',...) c[0](i',i) c[1](j',j) ... like general_transform, but the caller supplies result and workspace so they can be reused across many calls. Both must be contiguous and at least as large as the biggest intermediate the contraction produces. That is t.size() when no axis expands, but an expanding matrix (c[d].dim(1) > c[d].dim(0), e.g. coeffs2values with npt > k) can grow it larger, so size to the running maximum, not t.size(). c[d] may be rectangular; c[d].dim(0) must equal dim d of t. t, result and workspace must be distinct: the contraction ping-pongs between result and workspace and mTxmq cannot alias its source and destination. No communication; safe on any worker thread as long as result and workspace are not shared between concurrent calls.

Instantiate only where TENSOR_RESULT_TYPE(T,Q) == T (the matrix type Q does not promote the result). This covers every (T,double) the eval path needs; it excludes real-tensor x complex-matrix pairs like (double,double_complex), which lower to a mixed-type cblas gemm that MKL is missing.

References c, d, Future< void >::value, madness::BaseTensor::iscontiguous(), MADNESS_CHECK, mTxmq(), madness::BaseTensor::ndim(), madness::Tensor< T >::ptr(), Q(), R, madness::BaseTensor::size(), and TENSOR_RESULT_TYPE.

Referenced by madness::FunctionImpl< T, NDIM >::eval_cube().

◆ 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) ...
int FunctionDefaults< NDIM >::k
Definition mraimpl.h:3878
static const double c
Definition relops.cc:10

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

Referenced by madness::SeparatedConvolution< double, 3 >::apply_transformation2(), madness::SeparatedConvolution< double, 3 >::apply_transformation3(), madness::FunctionImpl< T, NDIM >::downsample(), madness::FunctionImpl< T, LDIM >::fcube_for_mul(), madness::FunctionImpl< T, LDIM >::fcube_for_mul(), madness::GenTensor< T >::general_transform, madness::FunctionImpl< T, LDIM >::NS_fcube_for_mul(), madness::SeparatedConvolution< double, 3 >::partial_upsample(), test_general_transform(), madness::FunctionImpl< T, NDIM >::upsample(), and madness::SeparatedConvolution< double, 3 >::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 )

References a, and b.

◆ gesv() [2/3]

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

References a, and b.

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

◆ get_charge_from_file()

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

◆ get_hostname()

◆ get_if_exists()

template<class T, class F>
void madness::get_if_exists ( const nlohmann::json & j,
const std::string & key,
std::optional< T > & opt,
F && from_json_fn )
inline

◆ get_impl()

◆ get_index_of_first_vector_argument()

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

◆ get_index_of_second_vector_argument()

template<typename tupleT, std::size_t I>
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>

References get_index_of_first_vector_argument().

Referenced by madness::Batch_1D::copy_batch(), and madness::MacroTaskPartitioner::partition_tasks().

◆ get_memory_usage()

long madness::get_memory_usage ( )

Referenced by print_memory_usage().

◆ get_mra_data_dir()

◆ get_papi_measurement()

const long long * madness::get_papi_measurement ( )
inline

Referenced by print_stats().

◆ get_rss_usage_in_GB()

◆ get_size() [1/3]

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

References d, and f.

◆ get_size() [2/3]

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

References d, and v.

◆ get_size() [3/3]

◆ get_size_local() [1/2]

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

return the size of a function for each rank

References f, and get_size_local().

◆ get_size_local() [2/2]

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

return the size of a vector of functions for each rank

References d, and v.

Referenced by madness::CCSize::add_helper(), madness::CCSize::add_helper(), and get_size_local().

◆ get_thread_binding_info()

ThreadBindingInfo madness::get_thread_binding_info ( )

Query the CPU affinity mask and NUMA placement of the calling process.

Referenced by check_thread_binding().

◆ get_tree_state() [1/2]

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

get tree state of a function

there is a corresponding function in vmra.h

Parameters
[in]ffunction
Returns
TreeState::unknown if the function is not initialized

References f, and unknown.

Referenced by change_tree_state(), ensure_tree_state_respecting_fence(), gaxpy(), mul_sparse(), test_conversion(), test_operand_state(), test_redistribute_to_batches(), and test_tree_state().

◆ get_tree_state() [2/2]

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

get tree state of a vector of functions

Returns
TreeState::unknown if the vector is empty or if the functions have different tree states

References f, unknown, and v.

◆ ggev() [1/2]

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

References e(), and V().

◆ 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(), 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 )

shorthand gradient operator

returns the differentiated function f in all NDIM directions

Parameters
[in]fthe function on which the grad operator works on
[in]refinerefinement before diff'ing makes the result more accurate
[in]fencefence after completion; if reconstruction is needed always fence
Returns
the vector \frac{\partial}{\partial x_i} f

References apply(), f, madness::WorldGopInterface::fence(), FunctionDefaults< NDIM >::refine, madness::World::gop, grad(), gradient_operator(), and NDIM.

Referenced by madness::scf_data::add_gradient(), madness::Nemo::analyze(), bind_operators(), madness::Znemo::compute_current_density(), compute_energy(), madness::OEP::compute_exchange_energy_vir(), compute_fock_matrix(), madness::NemoBase::compute_gradient(), madness::NemoBase::compute_kinetic_energy1(), madness::NemoBase::compute_kinetic_energy1a(), madness::Znemo::compute_kinetic_momentum(), madness::OEP::compute_Pauli_kinetic_density(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), differentiate(), div_deriv(), grad(), grad_ble_one(), grad_ble_two(), grad_bpsline_two(), grad_bspline_one(), grad_bspline_three(), madness::Nemo::gradient(), madness::Znemo::gradient(), madness::Nemo::make_sigma(), madness::XCOperator< T, NDIM >::prep_xc_args(), madness::XCOperator< T, NDIM >::prep_xc_args_response(), rot(), stage_halo(), test_clear(), test_equivalence(), test_no_halo_no_allocation(), test_rot(), test_single_function(), and madness::Diamagnetic_potential_factor::test_vector_potentials().

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

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

std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > madness::GradBSHOperator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

◆ GradCoulombOperator()

std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > madness::GradCoulombOperator ( World & world,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

◆ gradient_operator()

◆ GradSlaterOperator()

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(), FunctionDefaults< NDIM >::bc, FunctionDefaults< NDIM >::k, madness::GaussianConvolution1DCache< Q >::get(), madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::FunctionDefaults< NDIM >::get_k(), lattice_finite_reach(), lo, mu, madness::Tensor< T >::normf(), madness::constants::pi, pi, and madness::GFit< T, NDIM >::SlaterFit().

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

◆ grid()

std::vector< double > madness::grid ( {0.00000000000000e+00, 7.74564534039568e-10, 2.47256327461087e-08, 1.86997862087340e-07, 7.83531011839395e-07, 2.37369448442132e-06, 5.85385578447464e-06, 1.25192693640128e-05, 2.41120079015646e-05, 4.28530598081574e-05, 7.14571735608571e-05, 1.13129528705579e-04, 1.71543841230856e-04, 2.50802052874775e-04, 3.55376294767219e-04, 4.90034340610786e-04, 6.59750258771429e-04, 8.69602422403842e-04, 1.12466142949409e-03, 1.42987080942386e-03, 1.78992364014940e-03, 2.20913836324745e-03, 2.69133715810767e-03, 3.23973021906902e-03, 3.85680917042725e-03, 4.54425265659531e-03, 5.30284686331574e-03, 6.13242336803442e-03, 7.03181629276860e-03, 7.99884025229928e-03, 9.03029006708050e-03, 1.01219626578657e-02, 1.12687009724886e-02, 1.24644592296948e-02, 1.37023882155871e-02, 1.49749388498821e-02, 1.62739817657269e-02, 1.75909402310371e-02, 1.89169333923840e-02, 2.02429265537309e-02, 2.15598850190411e-02, 2.28589279348859e-02, 2.41314785691809e-02, 2.53694075550732e-02, 2.65651658122794e-02, 2.77119041269022e-02, 2.88035767176875e-02, 2.98350265324687e-02, 3.08020504919994e-02, 3.17014434167336e-02, 3.25310199214522e-02, 3.32896141281727e-02, 3.39770576143407e-02, 3.45941365656990e-02, 3.51425296266603e-02, 3.56247284215205e-02, 3.60439431446186e-02, 3.64039959753441e-02, 3.67092053552739e-02, 3.69642643623641e-02, 3.71741165259965e-02, 3.73438324441572e-02, 3.74784904900007e-02, 3.75830647318932e-02, 3.76623229435371e-02, 3.77207372560624e-02, 3.77624096112071e-02, 3.77910137249598e-02, 3.78097547768664e-02, 3.78213475154040e-02, 3.78280129289835e-02, 3.78314930902835e-02, 3.78330832537561e-02, 3.78336797869059e-02, 3.78338420591352e-02, 3.78338660102034e-02, 3.78338692887670e-02, 3.78339467173722e-02, 3.78344713082705e-02, 3.78363997704733e-02, 3.78415404238543e-02, 3.78527910300104e-02, 3.78743388654655e-02, 3.79118156730933e-02, 3.79724014263881e-02, 3.80648723179728e-02, 3.81995899976738e-02, 3.83884307919462e-02, 3.86446553881524e-02, 3.89827212156132e-02, 3.94180414519212e-02, 3.99666961805422e-02, 4.06451026796855e-02, 4.14696530921280e-02, 4.24563287754274e-02, 4.36203014320401e-02, 4.49755316463183e-02, 4.65343756946706e-02, 4.83072114386611e-02, 5.03020937588608e-02, 5.25244493483274e-02, 5.49768197749344e-02, 5.76586605651183e-02, 6.05662026884007e-02, 6.36923812686800e-02, 6.70268346561297e-02, 7.05559752077735e-02, 7.42631312932333e-02, 7.81287582138778e-02, 8.21307139477169e-02, 8.62445939566306e-02, 9.04441177619647e-02, 9.47015586503668e-02, 9.89882067501835e-02, 1.03274854850000e-01, 1.07532295738402e-01, 1.11731819543736e-01, 1.15845699552650e-01, 1.19847655286489e-01, 1.23713282207134e-01, 1.27420438292594e-01, 1.30949578844237e-01, 1.34284032231687e-01, 1.37410210811966e-01, 1.40317752935249e-01, 1.42999593725433e-01, 1.45451964152040e-01, 1.47674319741506e-01, 1.49669202061706e-01, 1.51442037805696e-01, 1.53000881854049e-01, 1.54356112068327e-01, 1.55520084724940e-01, 1.56506760408239e-01, 1.57331310820682e-01, 1.58009717319825e-01, 1.58558372048446e-01, 1.58993692284754e-01, 1.59331758112215e-01, 1.59587982708421e-01, 1.59776823502693e-01, 1.59911541182394e-01, 1.60004012073979e-01, 1.60064597827274e-01, 1.60102074634902e-01, 1.60123622470357e-01, 1.60134873076513e-01, 1.60140013729894e-01, 1.60141942192096e-01, 1.60142466782995e-01, 1.60142544211600e-01, 1.60142551561710e-01, 1.60142701413062e-01, 1.60143716679379e-01, 1.60147448926215e-01, 1.60157397883103e-01, 1.60179171729209e-01, 1.60220874304751e-01, 1.60293404996033e-01, 1.60410659555492e-01, 1.60589622976194e-01, 1.60850348663762e-01, 1.61215821451274e-01, 1.61711705392906e-01, 1.62365980655838e-01, 1.63208477113433e-01, 1.64270315334478e-01, 1.65583268477170e-01, 1.67179061053879e-01, 1.69088622564332e-01, 1.71341315543301e-01, 1.73964158589697e-01, 1.76981065407121e-01, 1.80412120776561e-01, 1.84272913700736e-01, 1.88573946723051e-01, 1.93320138663612e-01, 1.98510435776210e-01, 2.04137543672572e-01, 2.10187789353851e-01, 2.16641119414426e-01, 2.23471237026998e-01, 2.30645876773227e-01, 2.38127212845837e-01, 2.45872392711143e-01, 2.53834185077787e-01, 2.61961728055316e-01, 2.70201360784824e-01, 2.78497519653254e-01, 2.86793678521684e-01, 2.95033311251191e-01, 3.03160854228721e-01, 3.11122646595364e-01, 3.18867826460670e-01, 3.26349162533280e-01, 3.33523802279509e-01, 3.40353919892081e-01, 3.46807249952656e-01, 3.52857495633936e-01, 3.58484603530297e-01, 3.63674900642895e-01, 3.68421092583456e-01, 3.72722125605771e-01, 3.76582918529946e-01, 3.80013973899386e-01, 3.83030880716811e-01, 3.85653723763206e-01, 3.87906416742175e-01, 3.89815978252628e-01, 3.91411770829337e-01, 3.92724723972029e-01, 3.93786562193074e-01, 3.94629058650669e-01, 3.95283333913601e-01, 3.95779217855233e-01, 3.96144690642745e-01, 3.96405416330313e-01, 3.96584379751016e-01, 3.96701634310474e-01, 3.96774165001756e-01, 3.96815867577298e-01, 3.96837641423404e-01, 3.96847590380292e-01, 3.96851322627128e-01, 3.96852337893446e-01, 3.96852487744797e-01, 3.96852501080501e-01, 3.96852763595511e-01, 3.96854542175721e-01, 3.96861080460548e-01, 3.96878509402610e-01, 3.96916653612757e-01, 3.96989709691015e-01, 3.97116771576032e-01, 3.97322182348883e-01, 3.97635696933973e-01, 3.98092445611658e-01, 3.98732694042811e-01, 3.99601401444597e-01, 4.00747584484612e-01, 4.02223500212562e-01, 4.04083666765013e-01, 4.06383745508240e-01, 4.09179312589000e-01, 4.12524551422180e-01, 4.16470900356858e-01, 4.21065691550599e-01, 4.26350817893211e-01, 4.32361464629548e-01, 4.39124941137697e-01, 4.46659646152579e-01, 4.54974196640938e-01, 4.64066746612100e-01, 4.73924517493193e-01, 4.84523556430928e-01, 4.95828733144949e-01, 5.07793979903267e-01, 5.20362772980513e-01, 5.33468847761119e-01, 5.47037133628609e-01, 5.60984889100643e-01, 5.75223012480244e-01, 5.89657498736383e-01, 6.04191009524582e-01, 6.18724520312781e-01, 6.33159006568921e-01, 6.47397129948521e-01, 6.61344885420555e-01, 6.74913171288045e-01, 6.88019246068651e-01, 7.00588039145897e-01, 7.12553285904216e-01, 7.23858462618236e-01, 7.34457501555971e-01, 7.44315272437064e-01, 7.53407822408226e-01, 7.61722372896585e-01, 7.69257077911467e-01, 7.76020554419616e-01, 7.82031201155953e-01, 7.87316327498565e-01, 7.91911118692306e-01, 7.95857467626984e-01, 7.99202706460164e-01, 8.01998273540924e-01, 8.04298352284151e-01, 8.06158518836602e-01, 8.07634434564552e-01, 8.08780617604567e-01, 8.09649325006353e-01, 8.10289573437506e-01, 8.10746322115191e-01, 8.11059836700281e-01, 8.11265247473132e-01, 8.11392309358149e-01, 8.11465365436407e-01, 8.11503509646554e-01, 8.11520938588616e-01, 8.11527476873443e-01, 8.11529255453653e-01, 8.11529517968663e-01, 8.11529541176345e-01, 8.11529996288764e-01, 8.11533079746512e-01, 8.11544414925490e-01, 8.11574630828117e-01, 8.11640760013437e-01, 8.11767414594025e-01, 8.11987697014585e-01, 8.12343809961018e-01, 8.12887338428862e-01, 8.13679186466493e-01, 8.14789161138720e-01, 8.16295206552722e-01, 8.18282301065180e-01, 8.20841040761609e-01, 8.24065941688939e-01, 8.28053501868532e-01, 8.32900071579870e-01, 8.38699586575474e-01, 8.45541223590310e-01, 8.53507040609252e-01, 8.62669665762836e-01, 8.73090098389325e-01, 8.84815683732401e-01, 8.97878318988171e-01, 9.12292943068421e-01, 9.28056355648415e-01, 9.45146402996031e-01, 9.63521558948635e-01, 9.83120919457849e-01, 1.00386461862596e+00, 1.02565466339202e+00, 1.04837617327936e+00, 1.07189900117812e+00, 1.09607970128622e+00, 1.12076380133619e+00, 1.14578832833438e+00, 1.17098453044675e+00, 1.19618073255911e+00, 1.22120525955731e+00, 1.24588935960728e+00, 1.27007005971537e+00, 1.29359288761414e+00, 1.31631439750148e+00, 1.33810444226754e+00, 1.35884814143565e+00, 1.37844750194486e+00, 1.39682265789747e+00, 1.41391270524508e+00, 1.42967611782508e+00, 1.44409074190533e+00, 1.45715337716110e+00, 1.46887896250417e+00, 1.47929939513066e+00, 1.48846202028425e+00, 1.49642783730319e+00, 1.50326947431802e+00, 1.50906898931363e+00, 1.51391555902497e+00, 1.51790311920456e+00, 1.52112802013189e+00, 1.52368675982832e+00, 1.52567385434078e+00, 1.52717989975478e+00, 1.52828987442701e+00, 1.52908172246464e+00, 1.52962525093248e+00, 1.52998136387891e+00, 1.53020164629947e+00, 1.53032830088006e+00, 1.53039443006538e+00, 1.53042464596801e+00, 1.53043598114699e+00, 1.53043906460474e+00, 1.53043951971715e+00, 1.53043956057345e+00, 1.53044036881866e+00, 1.53044584480621e+00, 1.53046597522602e+00, 1.53051963638178e+00, 1.53063707680903e+00, 1.53086200575658e+00, 1.53125321066044e+00, 1.53188564029607e+00, 1.53285090571065e+00, 1.53425716788373e+00, 1.53622839887814e+00, 1.53890302152796e+00, 1.54243195096192e+00, 1.54697607896990e+00, 1.55270325889653e+00, 1.55978486392298e+00, 1.56839200485204e+00, 1.57869150446938e+00, 1.59084173390576e+00, 1.60498842193063e+00, 1.62126055060600e+00, 1.63976645013905e+00, 1.66059020209859e+00, 1.68378845349035e+00, 1.70938773469079e+00, 1.73738236216545e+00, 1.76773299256309e+00, 1.80036587856233e+00, 1.83517285918360e+00, 1.87201209863831e+00, 1.91070956866812e+00, 1.95106125024279e+00, 1.99283601194713e+00, 2.03577910489527e+00, 2.07961619803354e+00, 2.12405786366203e+00, 2.16880441129773e+00, 2.21355095893343e+00, 2.25799262456193e+00, 2.30182971770019e+00, 2.34477281064834e+00, 2.38654757235268e+00, 2.42689925392735e+00, 2.46559672395716e+00, 2.50243596341186e+00, 2.53724294403314e+00, 2.56987583003238e+00, 2.60022646043001e+00, 2.62822108790467e+00, 2.65382036910512e+00, 2.67701862049687e+00, 2.69784237245642e+00, 2.71634827198947e+00, 2.73262040066483e+00, 2.74676708868971e+00, 2.75891731812608e+00, 2.76921681774343e+00, 2.77782395867248e+00, 2.78490556369893e+00, 2.79063274362556e+00, 2.79517687163354e+00, 2.79870580106750e+00, 2.80138042371732e+00, 2.80335165471173e+00, 2.80475791688482e+00, 2.80572318229939e+00, 2.80635561193503e+00, 2.80674681683888e+00, 2.80697174578644e+00, 2.80708918621368e+00, 2.80714284736945e+00, 2.80716297778926e+00, 2.80716845377681e+00, 2.80716926202201e+00, 2.80716933652781e+00, 2.80717083214942e+00, 2.80718096521951e+00, 2.80721821566121e+00, 2.80731751323041e+00, 2.80753483148951e+00, 2.80795105244894e+00, 2.80867495963022e+00, 2.80984524239094e+00, 2.81163142287735e+00, 2.81423364814557e+00, 2.81788132295423e+00, 2.82283059256804e+00, 2.82936071868432e+00, 2.83776942436573e+00, 2.84836731472069e+00, 2.86147150815776e+00, 2.87739863756603e+00, 2.89645740105067e+00, 2.91894085730732e+00, 2.94511867090741e+00, 2.97522951738903e+00, 3.00947385695645e+00, 3.04800727879293e+00, 3.09093460564947e+00, 3.13830493080142e+00, 3.19010773712238e+00, 3.24627022150018e+00, 3.30665591781433e+00, 3.37106467900872e+00, 3.43923404429894e+00, 3.51084198217487e+00, 3.58551096454407e+00, 3.66281329305810e+00, 3.74227756629515e+00, 3.82339614690749e+00, 3.90563346187864e+00, 3.98843494737088e+00, 4.07123643286313e+00, 4.15347374783428e+00, 4.23459232844661e+00, 4.31405660168366e+00, 4.39135893019769e+00, 4.46602791256689e+00, 4.53763585044283e+00, 4.60580521573305e+00, 4.67021397692744e+00, 4.73059967324159e+00, 4.78676215761938e+00, 4.83856496394034e+00, 4.88593528909229e+00, 4.92886261594884e+00, 4.96739603778531e+00, 5.00164037735273e+00, 5.03175122383435e+00, 5.05792903743445e+00, 5.08041249369110e+00, 5.09947125717573e+00, 5.11539838658400e+00, 5.12850258002107e+00, 5.13910047037603e+00, 5.14750917605745e+00, 5.15403930217373e+00, 5.15898857178754e+00, 5.16263624659620e+00, 5.16523847186442e+00, 5.16702465235083e+00, 5.16819493511155e+00, 5.16891884229283e+00, 5.16933506325225e+00, 5.16955238151135e+00, 5.16965167908056e+00, 5.16968892952225e+00, 5.16969906259234e+00, 5.16970055821395e+00, 5.16970070074519e+00, 5.16970361247163e+00, 5.16972333987315e+00, 5.16979586028538e+00, 5.16998917613145e+00, 5.17041225862441e+00, 5.17122257158139e+00, 5.17263189841936e+00, 5.17491024424232e+00, 5.17838764046389e+00, 5.18345374010175e+00, 5.19055515605250e+00, 5.20019056052898e+00, 5.21290362959218e+00, 5.22927398050981e+00, 5.24990630974935e+00, 5.27541799408998e+00, 5.30642546508522e+00, 5.34352970658452e+00, 5.38730125510908e+00, 5.43826510271255e+00, 5.49688591095665e+00, 5.56355394250644e+00, 5.63857210361471e+00, 5.72214446673726e+00, 5.81436660831299e+00, 5.91521805324665e+00, 6.02455706599185e+00, 6.14211796971732e+00, 6.26751111140535e+00, 6.40022552357701e+00, 6.53963426446189e+00, 6.68500234967725e+00, 6.83549712169932e+00, 6.99020084039182e+00, 7.14812522029963e+00, 7.30822758986854e+00, 7.46942830557509e+00, 7.63062902128164e+00, 7.79073139085055e+00, 7.94865577075836e+00, 8.10335948945085e+00, 8.25385426147293e+00, 8.39922234668829e+00, 8.53863108757317e+00, 8.67134549974483e+00, 8.79673864143286e+00, 8.91429954515833e+00, 9.02363855790353e+00, 9.12449000283719e+00, 9.21671214441292e+00, 9.30028450753547e+00, 9.37530266864374e+00, 9.44197070019353e+00, 9.50059150843763e+00, 9.55155535604110e+00, 9.59532690456566e+00, 9.63243114606496e+00, 9.66343861706020e+00, 9.68895030140082e+00, 9.70958263064037e+00, 9.72595298155800e+00, 9.73866605062120e+00, 9.74830145509768e+00, 9.75540287104843e+00, 9.76046897068629e+00, 9.76394636690786e+00, 9.76622471273082e+00, 9.76763403956879e+00, 9.76844435252577e+00, 9.76886743501873e+00, 9.76906075086480e+00, 9.76913327127703e+00, 9.76915299867855e+00, 9.76915591040499e+00, 9.76915619860098e+00, 9.76916219846504e+00, 9.76920284848150e+00, 9.76935228306099e+00, 9.76975062707579e+00, 9.77062242513200e+00, 9.77229214503906e+00, 9.77519618483832e+00, 9.77989091339106e+00, 9.78705638895934e+00, 9.79749552527532e+00, 9.81212860682633e+00, 9.83198319082184e+00, 9.85817956879146e+00, 9.89191209222870e+00, 9.93442679048652e+00, 9.98699582179647e+00, 1.00508893966709e+01, 1.01273458942923e+01, 1.02175409544910e+01, 1.03225563687840e+01, 1.04433496124935e+01, 1.05807248555829e+01, 1.07353062625751e+01, 1.09075143424092e+01, 1.10975460386012e+01, 1.13053591604470e+01, 1.15306616495989e+01, 1.17729060559758e+01, 1.20312894658455e+01, 1.23047589865396e+01, 1.25920227503353e+01, 1.28915662583656e+01, 1.32016737478116e+01, 1.35204541357752e+01, 1.38458709746296e+01, 1.41757757494884e+01, 1.45079437615262e+01, 1.48401117735640e+01, 1.51700165484228e+01, 1.54954333872772e+01, 1.58142137752408e+01, 1.61243212646868e+01, 1.64238647727170e+01, 1.67111285365127e+01, 1.69845980572069e+01, 1.72429814670766e+01, 1.74852258734535e+01, 1.77105283626053e+01, 1.79183414844512e+01, 1.81083731806431e+01, 1.82805812604773e+01, 1.84351626674695e+01, 1.85725379105589e+01, 1.86933311542684e+01, 1.87983465685614e+01, 1.88885416287600e+01, 1.89649981263815e+01, 1.90288917012559e+01, 1.90814607325659e+01, 1.91239754308237e+01, 1.91577079542609e+01, 1.91839043322306e+01, 1.92037589162261e+01, 1.92183919977771e+01, 1.92288311340931e+01, 1.92359966096613e+01, 1.92406913382141e+01, 1.92435953780133e+01, 1.92452650979204e+01, 1.92461368959766e+01, 1.92465352399914e+01, 1.92466846745709e+01, 1.92467253245873e+01, 1.92467313244514e+01, 1.92467319433609e+01, 1.92467450814034e+01, 1.92468340936939e+01, 1.92471613140832e+01, 1.92480335772770e+01, 1.92499425738442e+01, 1.92535987985263e+01, 1.92599578423078e+01, 1.92702379990799e+01, 1.92859284083041e+01, 1.93087872289342e+01, 1.93408296294082e+01, 1.93843056757497e+01, 1.94416684964889e+01, 1.95155333909890e+01, 1.96086288188291e+01, 1.97237404546042e+01, 1.98636497079429e+01, 2.00310682866674e+01, 2.02285705167748e+01, 2.04585252224186e+01, 2.07230290096769e+01, 2.10238427883022e+01, 2.13623333059298e+01, 2.17394213608060e+01, 2.21555382047478e+01, 2.26105914517851e+01, 2.31039415749319e+01, 2.36343898099582e+01, 2.42001779979100e+01, 2.47990005951181e+01, 2.54280287686536e+01, 2.60839461849717e+01, 2.67629957981511e+01, 2.74610366597973e+01, 2.81736095129742e+01, 2.88960097044501e+01, 2.96233657592419e+01, 3.03507218140337e+01, 3.10731220055095e+01, 3.17856948586865e+01, 3.24837357203327e+01, 3.31627853335120e+01, 3.38187027498302e+01, 3.44477309233657e+01, 3.50465535205737e+01, 3.56123417085256e+01, 3.61427899435518e+01, 3.66361400666986e+01, 3.70911933137359e+01, 3.75073101576777e+01, 3.78843982125540e+01, 3.82228887301816e+01, 3.85237025088068e+01, 3.87882062960652e+01, 3.90181610017090e+01, 3.92156632318163e+01, 3.93830818105409e+01, 3.95229910638796e+01, 3.96381026996546e+01, 3.97311981274948e+01, 3.98050630219949e+01, 3.98624258427341e+01, 3.99059018890755e+01, 3.99379442895496e+01, 3.99608031101797e+01, 3.99764935194039e+01, 3.99867736761760e+01, 3.99931327199574e+01, 3.99967889446395e+01, 3.99986979412068e+01, 3.99995702044006e+01, 3.99998974247898e+01, 3.99999864370804e+01, 3.99999995751228e+01} )

◆ 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]

◆ hartree_product() [3/3]

◆ has_data()

◆ hash_combine()

◆ 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

References hash_range().

◆ 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
Note
May use heavily optimized hashword when n * sizeof(T) is multiple of sizeof(uint32_t) and presumably correctly aligned.

References hashlittle(), and hashword().

◆ 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]

◆ 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

References hashlittle(), 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
Note
Use heavily optimized hashword when sizeof(T) is multiple of sizeof(uint32_t) and presumably correctly aligned.

References Future< void >::value, hashword(), 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 madness::Function< T, NDIM >::fence(), and madness::Function< T, NDIM >::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(), NDIM, 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]

◆ 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 bind_world(), initialize(), initialize(), initialize(), initialize(), main(), main(), main(), test_G_R_vectors(), test_gaussian_num_coeffs(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), and testNavierStokes().

◆ 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< DerivativeBase< T, NDIM > >::~WorldObject(), madness::WorldObjectBase::~WorldObjectBase(), madness::archive::archive_initialize_type_names(), madness::FunctionDefaults< 1 >::get_pmap(), and wall_time().

◆ inner() [1/20]

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 )

◆ inner() [2/20]

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 )

References c, f, and madness::CCPairFunction< T, NDIM >::LDIM.

Referenced by madness::Znemo::analyze(), madness::SCF::analyze_vectors(), madness::Solver< T, NDIM >::apply_hf_exchange3(), madness::Solver< T, NDIM >::apply_hf_exchange4(), madness::ExchangeCommutator::apply_KffK_lowrank_split_alpha(), madness::ExchangeCommutator::apply_KffK_lowrank_three_range(), madness::CCPotentials::apply_Kfxy(), madness::SCF::apply_potential(), madness::Solver< T, NDIM >::apply_potential(), madness::CCPotentials::apply_s2b_operation(), madness::projector_irrep::apply_symmetry_operators(), madness::CCPotentials::apply_transformed_Ue(), madness::CCPotentials::apply_Ue(), madness::Diamagnetic_potential_factor::bare_diamagnetic_potential(), bend(), bind_function_ops(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::build_taylor_y(), 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::Solver< T, NDIM >::calculate_kinetic_energy(), madness::SCF::canonicalize_virtuals(), madness::RandomizedMatrixDecomposition< T >::check_range(), madness::SRConf< T >::check_vector_orthonormality(), madness::OEP::compute_and_print_final_energies(), madness::CCPotentials::compute_cc2_excitation_energy(), madness::MolecularOrbitals< T, NDIM >::compute_center(), madness::guessfactory::compute_centroids(), madness::CCPotentials::compute_cis_expectation_value(), 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(), compute_energy(), compute_energy(), compute_energy(), compute_energy(), compute_energy(), madness::MP2::compute_energy(), madness::OEP::compute_energy(), madness::Znemo::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(), madness::CCPotentials::compute_pair_correlation_energy(), compute_R2f2_psi(), compute_reduced_mass(), madness::MolecularOptimizer::compute_reduced_mass(), madness::Zcis::compute_residuals(), madness::Znemo::compute_residuals(), madness::SVDTensor< T >::compute_svd_from_range(), madness::Diamagnetic_potential_factor::compute_U2(), compute_update(), converge(), converge(), converge2s(), convg(), 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< double, 1 >::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(), energy(), energy(), energy(), energy(), exact_extra(), exact_pair_sum(), exact_u(), exact_uc(), exact_ucd(), exact_ud(), exact_Vphi(), f12_lambda(), madness::Diamagnetic_potential_factor::factor_with_phase(), fixphases(), madness::TensorTrain< T >::fusedim(), g(), g1(), gauss_a(), gauss_b(), gauss_c(), gauss_d(), gauss_v1(), gauss_v2(), gd(), gd1(), general_transform(), general_transform(), madness::SRConf< T >::general_transform(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), madness::Solver< T, NDIM >::gram_schmidt(), gt(), gt1(), madness::MP2::guess_mp1_3(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::harmonic_basis(), madness::Nemo::hessian(), madness::QuasiNewton::hessian_update_bfgs(), QuasiNewton::hessian_update_bfgs(), madness::QuasiNewton::hessian_update_sr1(), QuasiNewton::hessian_update_sr1(), madness::population::iao_population(), madness::SCF::initial_guess_from_nwchem(), data< T, NDIM >::initialize(), Fcwf::inner(), inner(), inner(), madness::CCPairFunction< T, NDIM >::inner_internal(), is_aligned(), is_centered_normal(), DF::iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), madness::Zcis::iterate(), madness::Znemo::iterate(), iterate_excite(), iterate_ground(), iterate_ground(), madness::CC2::iterate_singles(), madness::TDHF::iterate_vectors(), 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(), make_ri_basis(), madness::RandomizedMatrixDecomposition< T >::make_SVD_decaying_matrix(), madness::MP2::make_Uphi0(), madness::TDHF::make_virtuals(), madness::CCPotentials::make_xy_op_u(), madness::CCPairFunction< T, NDIM >::make_xy_u(), madness::EigSolver< T, NDIM >::matrix_element(), madness::Localizer::matrix_exponential(), madness::Solver< T, NDIM >::matrix_exponential(), matrix_exponential(), madness::population::matrix_power(), madness::AtomicBasisSet::modify_dmat_psp(), moments(), madness::MP3::mp3_test(), madness::EigSolver< T, NDIM >::multi_solve(), madness::QuasiNewton::new_search_direction(), QuasiNewton::new_search_direction(), madness::MolecularOptimizer::new_search_direction2(), Fcwf::norm2(), madness::LRFunctorF12< T, NDIM, LDIM >::norm2(), madness::FunctionImpl< T, LDIM >::NScoeffs2values(), nuclear_anchor_test(), gaussian::operator()(), HO_function< NDIM >::operator()(), madness::BSHApply< T, NDIM >::operator()(), madness::Coulomb< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::ExchangeAlgorithm< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::harmonic_potential_boxed::operator()(), madness::LocalPotentialOperator< T, NDIM >::operator()(), madness::LRFunctorF12< T, NDIM, LDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::R_times_arg_div_R::operator()(), madness::RandomizedMatrixDecomposition< T >::Y_former::operator()(), madness::spherical_box< NDIM >::operator()(), MicroTask1::operator()(), MicroTask2::operator()(), MicroTaskPartitioner::operator()(), MicroTaskPriority::operator()(), slater::operator()(), madness::MolecularOptimizer::optimize_conjugate_gradients(), madness::MolecularOptimizer::optimize_quasi_newton(), ortho3(), ortho5(), MiniDFT::orthogonalize(), orthogonalize(), madness::Zcis::orthonormalize(), madness::Zcis::orthonormalize(), orthonormalize_symmetric(), orthonormalize_symmetric_matrix(), madness::TDHF::oscillator_strength_length(), madness::TDHF::oscillator_strength_velocity(), madness::CCPotentials::overlap(), madness::FunctionImpl< T, LDIM >::partial_inner_contract(), madness::PNO::pno_compress(), madness::Localizer::prepare_new_basis(), print_info(), print_info(), madness::EigSolver< T, NDIM >::print_matrix_elements(), print_stats(), print_stats(), madness::CCPairFunction< T, NDIM >::project_out_decomposed(), madness::DiagnosticMatrix< T, NDIM >::project_xy(), madness::DiagnosticMatrix< T, NDIM >::project_xy(), madness::population::projection_population(), madness::MolecularOptimizer::projector_external_dof(), 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(), madness::DiagnosticMatrix< T, NDIM >::ref_GQab(), DF::rele(), madness::MolecularOptimizer::remove_external_dof(), remove_external_dof(), madness::Convolution1D< double_complex >::rnlij(), madness::Molecule::rotate(), run_full_closed_shell(), run_full_open_shell(), run_static_closed_shell(), run_static_open_shell(), run_tests(), s_func(), madness::OEP::selftest(), madness::Localizer::separate_core_valence(), 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_diagnosis(), test_adaptive_grid_projection(), test_adaptive_project(), test_adaptive_tree(), test_add(), test_apply(), test_arithmetic(), test_cholesky(), test_combined_operators(), madness::Znemo::test_compute_current_density(), test_consolidate(), test_construction(), test_converged_function(), test_convergence(), test_conversion(), test_convolution(), test_coulomb(), test_direct_projection(), madness::Diamagnetic_potential_factor::test_factor(), test_gelss(), test_gesv(), test_hartree_product(), test_he_potential(), test_inner(), test_inner(), test_inner(), test_integration(), test_inverse(), test_kinetic(), madness::Znemo::test_landau_wave_function(), test_load_store(), test_lowrank_function(), test_meta_gga(), test_modified(), test_multiply(), test_multiply_with_f12(), test_norm(), test_numerics(), 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_recursive_apply(), test_redistribute_to_batches(), test_remove_lindep(), test_rr_cholesky(), test_scalar_multiplication(), madness::Diamagnetic_potential_factor::test_scalar_potentials(), madness::CCPotentials::test_singles_potential(), test_slater_exchange(), test_sum_down(), 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_Vphi_ij_u(), test_with_function(), test_with_function_vector(), 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< 3 >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::PNO::update_pno(), madness::FunctionImpl< T, LDIM >::values2NScoeffs(), and madness::LowRankFunctionFactory< T, NDIM, LDIM >::Yformer().

◆ inner() [3/20]

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/20]

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/20]

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

◆ inner() [6/20]

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

◆ inner() [7/20]

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

◆ inner() [8/20]

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/20]

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

compute the inner product to 2 LowRankFunctions

References a, b, and matrix_inner().

◆ inner() [10/20]

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, innerXX(), madness::particle< PDIM >::is_first(), madness::particle< PDIM >::is_last(), NDIM, madness::particle< PDIM >::particle1(), and reconstructed.

◆ inner() [11/20]

template<typename T, std::size_t NDIM, std::size_t PDIM>
Function< T, NDIM-PDIM > 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, inner(), NDIM, and madness::particle< PDIM >::particle1().

◆ inner() [12/20]

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/20]

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, madness::particle< PDIM >::particle1(), and transform().

◆ inner() [14/20]

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

inner product for std::valarray

◆ inner() [15/20]

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 )

◆ inner() [16/20]

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 )

◆ inner() [17/20]

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

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.

◆ inner() [18/20]

return f madness::inner ( g )

References f, and g.

◆ inner() [19/20]

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 )

Computes the inner product of a function with a function vector - q(i) = inner(f,g[i]).

works in reconstructed or compressed state, state is chosen based on TensorType

References compressed, ensure_tree_state_respecting_fence(), f, madness::WorldGopInterface::fence(), madness::WorldTaskQueue::fence(), g, madness::World::gop, PROFILE_BLOCK, madness::Tensor< T >::ptr(), R, redundant, madness::WorldGopInterface::sum(), madness::World::taskq, TENSOR_RESULT_TYPE, TT_FULL, and v.

◆ inner() [20/20]

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

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

works in reconstructed or compressed state, state is chosen based on TensorType

References compressed, ensure_tree_state_respecting_fence(), f, madness::WorldGopInterface::fence(), madness::WorldTaskQueue::fence(), g, madness::World::gop, m, MADNESS_CHECK, PROFILE_BLOCK, madness::Tensor< T >::ptr(), R, redundant, madness::WorldGopInterface::sum(), madness::World::taskq, TENSOR_RESULT_TYPE, TT_FULL, and v.

◆ inner_adaptive()

return f madness::inner_adaptive ( func )

References f, and 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, innerXX(), 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]

◆ iota_array()

template<std::size_t N, std::size_t M>
std::enable_if_t< N >=M, std::array< std::size_t, N-M > > madness::iota_array ( std::array< std::size_t, M > values_to_skip_sorted)
constexpr

References N.

◆ 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 used to execute MADNESS tasks; this is true for the main thread but only true for a non-main thread if the Pthreads backend is used and the thread is part of the ThreadPool

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

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

◆ is_main_thread()

bool madness::is_main_thread ( )
inline
Returns
true if this is called from the main thread

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

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

◆ 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 A(), b, c, e(), gelss(), L, m, and Q().

Referenced by check_linear_dependence(), madness::SCF::kain_solve(), main(), madness::NonlinearSolverND< 3 >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::Subspace< T, NDIM >::update_subspace(), and madness::SubspaceK< T, NDIM >::update_subspace().

◆ lattice_finite_reach()

template<std::size_t NDIM>
double madness::lattice_finite_reach ( const std::array< LatticeRange, NDIM > & lattice_ranges,
const Tensor< double > & cell_width )
inline

Convolutions in separated form (including Gaussian).

The largest distance a kernel must represent along the axes that are not summed over an infinite lattice: within the cell, plus N cells along an axis summed over N images. This is the accuracy range of the finite axes for GFit::truncate_mixed_expansion.

References d, FunctionDefaults< NDIM >::cell_width, NDIM, and w().

Referenced by BSHOperatorPtr3D(), GradBSHOperator(), GradBSHOperator_Joel(), GradCoulombOperator(), GradSlaterOperator(), and madness::SeparatedConvolution< double, 3 >::make_coeff_for_operator().

◆ lattice_sum()

template<std::size_t NDIM>
array_of_bools< NDIM > madness::lattice_sum ( )

◆ lattice_sum_range()

template<std::size_t NDIM>
std::array< LatticeRange, NDIM > madness::lattice_sum_range ( )

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

◆ LLRVDomainMask()

madness::LLRVDomainMask ( double epsilon)

Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask characteristic functions.

See X. Li, J. Lowengrub, A. Rätz, and A. Voight, ``Solving PDEs in Complex Geometries: A Diffuse Domain Approach,'' Commun. Math. Sci., 7, p81-107, 2009.

Given a signed distance, this class implements in the domain mask and surface functions from the above reference. For the domain mask,

\‍[ \varphi(d) = \frac{1}{2}\left( 1 - \tanh\left(
                     \frac{3d}{\varepsilon} \right) \right) \‍]

where $d$ is the signed distance. The normalized surface function is

\‍[ B(\varphi) = \frac{36}{\varepsilon} \varphi^2 (1-\varphi)^2. \‍]

The constant $36/\varepsilon$ is chosen to fulfill

\‍[ \int_{-\infty}^\infty B(s) \, ds = 1 \‍]

This class assumes the domain mask is uniformly 0 or 1 outside signed distances $ |8 \epsilon| $ since the switching function becomes 0/1 to machine precision at these levels. Specifically, for this function the parameter $ \epsilon $ is an effective measure of the full width of the surface layer since

\‍[ \int_{-\epsilon/2}^{\epsilon/2} B(s) \, ds \doteq 0.987 \‍]

and

\‍[ \int_{-\epsilon}^{\epsilon} B(s) \, ds \doteq 0.999963 \‍]

*/ class LLRVDomainMask : public DomainMaskInterface { private: LLRVDomainMask() : epsilon(0.0) {} ///< Forbidden

protected: const double epsilon; ///< The width of the transition region

public: /** Constructor for the domain mask

\param[in] epsilon The effective width of the surface 

References epsilon.

Referenced by EmbeddedDirichlet::EmbeddedDirichlet(), and main().

◆ load()

◆ load_balance() [1/2]

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(), madness::CC2::solve_mp2_coupled(), and madness::MP2::solve_residual_equations().

◆ load_balance() [2/2]

◆ load_coeffs()

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

Collective routine to load and cache twoscale & autocorrelation coefficients.

Only process rank 0 will access the files.

References _cread, autocorr_filename, madness::WorldGopInterface::broadcast(), cache, dir, FunctionDefaults< NDIM >::k, g0(), g1(), madness::World::gop, kmax, kmax_autoc, kread, loaded, madness::World::rank(), read_data(), read_twoscale(), and twoscale_filename.

Referenced by startup().

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

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

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

◆ lookup_id()

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

◆ lookup_name()

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

References name().

Referenced by lookup_func().

◆ loop_N()

template<template< typename, std::size_t > class Functor, typename T, std::size_t... Is, typename... FunctorArgs, typename... CallArgs>
auto madness::loop_N ( std::index_sequence< Is... > ,
std::tuple< FunctorArgs... > && functor_args,
CallArgs &&... call_args )->std::array< decltype(Functor< T, 1 >(std::forward< FunctorArgs >(std::get< FunctorArgs >(functor_args))...)(std::forward< CallArgs >(call_args)...)), sizeof...(Is)>

next two structs loop over type and dimension loop over N=1..6 and apply Functor<T,N> to functor_args..., then call the resulting functor with call_args... returns array of results Functor must be a template with two parameters: type and integer functor_args is a tuple of arguments to be forwarded to Functor<T,N> call_args are arguments to be forwarded to the resulting functor Example:

template<typename T, std::size_t N>
struct MyFunctor {
MyFunctor(int a, double b) : a_(a), b_(b) {}
T operator()(const std::string& s) { return T(a_ * N, b_ * N, s); }
int a_;
double b_;
};
...
loop_types<MyFunctor, double, float, double_complex, float_complex>(std::tuple<int,double>(1,2.0),std::string("hello"));
results is std::array
std::complex< double > double_complex
Definition cfft.h:14
static const double b
Definition nonlinschro.cc:119
static const double a
Definition nonlinschro.cc:118
std::complex< float > float_complex
Definition ran.h:40
#define N
Definition testconv.cc:37

Referenced by loop_types().

◆ loop_types()

template<template< typename, std::size_t > class Functor, typename... Ts, typename... FunctorArgs, typename... CallArgs>
auto madness::loop_types ( std::tuple< FunctorArgs... > && functor_args,
CallArgs &&... call_args )

◆ lowercase()

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

◆ lowest_rank_on_host_of_rank()

long madness::lowest_rank_on_host_of_rank ( const std::map< std::string, std::vector< long > > ranks_per_host1,
int rank )

◆ lq() [1/3]

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

References L.

◆ lq() [2/3]

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

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

References R.

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

References R.

◆ 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 A(), FunctionDefaults< NDIM >::k, geqrf_(), m, mask_info(), orgqr_(), madness::Tensor< T >::ptr(), R, madness::BaseTensor::size(), and TENSOR_ASSERT.

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

◆ main()

◆ make_atom_vec()

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

Creates vector of atom_information for the given molecule

Parameters
[in]moleculethe molecule
[out]the vector containing the atom_information for each atom in the molecule

References madness::atom_information< NDIM >::charge, madness::atom_information< NDIM >::coord, molecule, madness::atom_information< NDIM >::R1, madness::atom_information< NDIM >::R2, and slater_radius().

Referenced by madness::ACParameters< NDIM >::initialize().

◆ make_exp()

◆ make_func()

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>
double madness::make_radius ( const Vector< double, NDIM > & x)
static

◆ 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(), cross(), matrix_mul_sparse(), mul(), mul(), mul_sparse(), mul_sparse(), partial_mul(), and test_cross().

◆ make_restart_plan()

RestartPlan madness::make_restart_plan ( World & world,
const RestartMode mode,
const CalculationParameters & param,
const Molecule & requested,
const Representation wanted,
const RestartCapabilities & can,
const std::string & ncf = "" )
inline

survey the disk and decide, identically on every rank

Agreement between ranks is the point. Ranks that disagree about where the orbitals come from diverge on collective Function construction and hang – a hang is a far worse failure than a wrong answer, because it leaves nothing to debug. Two things secure it:

  • every input to plan_restart() is already rank-invariant – the existence tests are broadcast by survey_restart_sources(), the header is broadcast by the parallel archive, and the parameters and molecule are replicated – so all ranks run the decision and any throw from an explicitly requested but missing source is collective rather than a rank-0 abort into a hang;
  • the result is then broadcast anyway, so the "identical inputs, identical output" argument does not have to stay true for correctness.
Parameters
[in]canwhich sources the asking engine can read; see RestartCapabilities
[in]ncfthe nuclear correlation factor this run uses (SCF::restart_ncf); empty for an engine that has none

References madness::WorldGopInterface::broadcast_serializable(), madness::Molecule::GeometryParameters::eprec(), madness::World::gop, madness::RestartSources::meta, param, madness::Molecule::parameters, plan_restart(), print(), madness::RestartPlan::print_to_string(), madness::World::rank(), survey_restart_sources(), madness::RestartPlan::warn, and madness::RestartPlan::why.

Referenced by madness::MolecularEnergy::value(), and madness::Nemo::value().

◆ 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 >::fence(), GaussianConvolution1DCache< double >::map, 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:2520

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

◆ mask()

◆ mask1()

double madness::mask1 ( double x)
inline

Referenced by mask3().

◆ mask3()

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

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

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

◆ mask_functor_box()

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

References r2().

◆ mask_info()

void madness::mask_info ( integer & info)
static

◆ mask_munging()

template<std::size_t NDIM>
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 A(), 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 dot product of two function vectors - q(i,j) = dot(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(), and TENSOR_RESULT_TYPE.

◆ matrix_dot_old()

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

Computes the matrix dot product of two function vectors - q(i,j) = dot(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(), and TENSOR_RESULT_TYPE.

Referenced by test_dot().

◆ 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 A(), 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::DiagnosticMatrix< T, NDIM >::DiagnosticMatrix(), 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::TDHF::canonicalize(), madness::Zcis::canonicalize(), madness::SCF::canonicalize_virtuals(), 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(), compute_fock_matrix(), madness::Nemo::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(), doit(), MiniDFT::doit(), exchange_anchor_test(), exchange_anchor_test(), fixphases(), madness::ExchangeCommutator::fk_provider(), hamiltonian_matrix(), madness::Znemo::hcore_guess(), initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess_ao_eigenvectors(), madness::CCPairFunction< T, NDIM >::inner_internal(), madness::OEP::iterate(), madness::Znemo::iterate(), madness::PNO::iterate_pairs_internal(), madness::ExchangeCommutator::kf_provider(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::SCF::kinetic_energy_matrix(), MiniDFT::kinetic_energy_matrix(), Calculation::load_mos(), madness::Localizer::localize_boys(), main(), main(), madness::TDHF::make_cis_matrix(), madness::SCF::make_fock_matrix(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::Solver< T, NDIM >::make_kinetic_matrix(), make_kinetic_matrix(), make_kinetic_matrix(), matrix_inner(), matrix_inner(), BoysLocalization::operator()(), madness::Coulomb< T, NDIM >::operator()(), madness::DerivativeOperator< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::ExchangeAlgorithm< T, NDIM >::operator()(), madness::LocalPotentialOperator< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::XCOperator< T, NDIM >::operator()(), orth(), DF::orthogonalize_inplace(), madness::NemoBase::orthonormalize(), orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), orthonormalize_canonical(), orthonormalize_cd(), madness::PNO::orthonormalize_cholesky(), orthonormalize_rrcd(), orthonormalize_symmetric(), pair_energy_weights(), madness::Localizer::prepare_new_basis(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::DiagnosticMatrix< T, NDIM >::ref_GQab(), madness::SCF::restart_aos(), madness::population::PopulationAnalysis::run(), madness::SCF::save_mos(), madness::MolecularOrbitals< T, NDIM >::save_restartaodata(), madness::Nemo::solve(), madness::SCF::solve(), madness::Solver< T, NDIM >::solve(), test_ctor_orthonormalization(), test_GQUe(), test_GUe(), test_inner(), test_inner(), test_orthogonalization(), test_orthonormalize_canonical(), test_orthonormalize_symmetric(), test_project_ab(), 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 compressed, ensure_tree_state_respecting_fence(), f, madness::WorldGopInterface::fence(), g, get_impl(), madness::World::gop, madness::FunctionImpl< T, NDIM >::inner_local(), madness::Tensor< T >::ptr(), R, redundant, madness::WorldGopInterface::sum(), TENSOR_RESULT_TYPE, TT_FULL, and v.

◆ 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(), 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
toltarget absolute accuracy of each product; see mul_sparse for the semantics, including the internal safety margin and tol=0
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, make_redundant(), PROFILE_BLOCK, same, and vmulXX().

Referenced by test_matrix_mul_sparse().

◆ 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 >::fence(), madness::Function< T, NDIM >::mirror(), and PROFILE_FUNC.

Referenced by 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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, and p().

◆ mTxm() [2/3]

template<typename T, typename Q, typename S>
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, MADNESS_RESTRICT, mTxm_reference(), and Q().

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

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

Referenced by inner_result().

◆ mTxm_reference()

template<typename T, typename Q, typename S>
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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, and Q().

Referenced by mTxm().

◆ mTxmq() [1/11]

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

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

◆ mTxmq() [2/11]

◆ mTxmq() [3/11]

◆ mTxmq() [4/11]

template<>
void madness::mTxmq ( long dimi,
long dimj,
long dimk,
float *MADNESS_RESTRICT c,
const float * a,
const float * b,
long ldb )

◆ mTxmq() [5/11]

template<>
void madness::mTxmq ( long dimi,
long dimj,
long dimk,
float *MADNESS_RESTRICT c,
const float * a,
const float * b,
long ldb )

◆ mTxmq() [6/11]

template<>
void madness::mTxmq ( long dimi,
long dimj,
long dimk,
std::complex< double > *MADNESS_RESTRICT c,
const std::complex< double > * a,
const std::complex< double > * b,
long ldb )

◆ mTxmq() [7/11]

template<>
void madness::mTxmq ( long dimi,
long dimj,
long dimk,
std::complex< double > *MADNESS_RESTRICT c,
const std::complex< double > * a,
const std::complex< double > * b,
long ldb )

◆ mTxmq() [8/11]

template<>
void madness::mTxmq ( long dimi,
long dimj,
long dimk,
std::complex< float > *MADNESS_RESTRICT c,
const std::complex< float > * a,
const std::complex< float > * b,
long ldb )

◆ mTxmq() [9/11]

template<>
void madness::mTxmq ( long dimi,
long dimj,
long dimk,
std::complex< float > *MADNESS_RESTRICT c,
const std::complex< float > * a,
const std::complex< float > * b,
long ldb )

◆ mTxmq() [10/11]

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

Mixed precision: complex matrix multiplied by real matrix Decomposes into 2 real mTxmq calls over per-thread scratch (see mTxmq_detail::scratch), so steady-state calls allocate nothing.

References a, b, c, MADNESS_CHECK, MADNESS_RESTRICT, mTxmq(), and madness::mTxmq_detail::scratch().

◆ mTxmq() [11/11]

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 )

Generic template definitions for any other unspecialized types.

Base generic template function matching MADNESS signature: Matrix = Matrix transpose * matrix

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

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

◆ mTxmq_init()

void madness::mTxmq_init ( )

Initialize libxsmm and pre-dispatch JIT kernels for the small matrix domain Calling this is optional; initialization will happen lazily on first call if omitted.

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

Reference implementation for verification / fallback.

References a, b, c, FunctionDefaults< NDIM >::k, MADNESS_CHECK, and MADNESS_RESTRICT.

Referenced by mTxmq(), mTxmq(), test_shape_c(), test_shape_mixed(), and test_shape_real().

◆ mTxmq_scratch_clear()

template<typename T>
void madness::mTxmq_scratch_clear ( )

Free every thread's mTxmq scratch buffers. Call only at a quiescent point.

References madness::mTxmq_detail::scratch_pool().

◆ 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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, q(), and sum().

◆ mTxmT() [2/3]

template<typename T, typename Q, typename S>
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, MADNESS_RESTRICT, mTxmT_reference(), and Q().

◆ 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(), MADNESS_RESTRICT, one(), and madness::cblas::Trans.

Referenced by inner_result().

◆ mTxmT_reference()

template<typename T, typename Q, typename S>
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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, and Q().

Referenced by mTxmT().

◆ mul() [1/5]

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,
bool do_make_redundant = true )

Same as operator* but with optional fence; see mul_sparse to screen.

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

◆ mul() [2/5]

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, madness::Function< T, NDIM >::fence(), mul(), PROFILE_FUNC, and Q().

◆ mul() [3/5]

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, madness::Function< T, NDIM >::fence(), NDIM, PROFILE_FUNC, Q(), TENSOR_RESULT_TYPE, and VERIFY_TREE.

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl(), KPeriodicBSHOperator::apply(), apply_potential(), apply_potential(), madness::XCOperator< T, NDIM >::apply_tau_term(), madness::Nemo::compute_all_cphf(), madness::CCPotentials::compute_cc2_excitation_energy(), madness::Nemo::compute_cphf_parallel_term(), madness::PNO::compute_fluctuation_matrix(), madness::Nemo::compute_fock_matrix(), madness::F12Potentials::compute_fQc_integrals_ij(), madness::Nemo::compute_nemo_potentials_impl(), 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(), fixphases(), madness::Nemo::hessian(), inner_func(), DF::iterate(), madness::MP2::K(), madness::Nemo::kinetic_energy_potential(), main(), madness::CCPotentials::make_bra(), madness::TDHF::make_bra(), madness::Nemo::make_density(), madness::CCPotentials::make_mo_bra(), madness::TDHF::make_perturbed_fock_matrix(), mul(), mul(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::DNuclear< T, NDIM >::operator()(), operator*(), operator*(), operator*(), operator*(), operator*(), madness::Nemo::population_analysis(), madness::CCPairFunction< T, NDIM >::project_out_op_decomposed(), madness::Nemo::solve_cphf(), square(), test_math(), madness::CCPotentials::test_pairs(), madness::CCPotentials::test_singles_potential(), test_weighted_bra_exchange(), test_XCOperator_matrix(), and madness::XCOperator< T, NDIM >::weak_xc_terms().

◆ mul() [4/5]

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

◆ mul() [5/5]

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,
bool do_make_redundant = true )

Multiplies two vectors of functions q[i] = a[i] * b[i]; see mul_sparse to screen.

References a, b, ensure_tree_state_respecting_fence(), madness::WorldGopInterface::fence(), madness::World::gop, make_redundant(), mul(), NDIM, print(), PROFILE_BLOCK, q(), R, redundant, 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,
bool do_make_redundant = true )

Sparse multiplication; the scalar interface redirects to the vector one in vmra.h.

Parameters
[in]toltarget absolute accuracy of the product; see the vector mul_sparse in vmra.h for the semantics, including the internal safety margin and tol=0
[in]do_make_redundantif false, both inputs must already be redundant

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

Referenced by madness::SCF::analyze_vectors(), madness::GTHPseudopotential< Q >::apply_potential(), madness::SCF::apply_potential(), madness::Solver< T, NDIM >::apply_potential(), MiniDFT::apply_potential(), madness::GTHPseudopotential< Q >::apply_potential_simple(), madness::XCOperator< T, NDIM >::apply_tau_term(), Calculation::calc_optimal_coeffs(), madness::MolecularOrbitals< T, NDIM >::compute_center(), madness::F12Potentials::compute_fQg_integrals(), madness::F12Potentials::compute_fQU_integrals(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Localizer::compute_localization_matrix(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), Calculation::compute_residuals(), madness::F12Potentials::compute_xyab_integrals(), madness::F12Potentials::convolve_with_fU(), madness::F12Potentials::convolve_with_nonlocal_U(), madness::F12Potentials::convolve_with_U(), DF::diagonalize(), dot_sparse(), DF::exchange(), madness::SCF::initial_guess_ao_eigenvectors(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_small_memory(), madness::Localizer::localize_boys(), madness::MP2::make_chi(), Calculation::make_reference(), Calculation::make_Upsi(), madness::MP2::make_xi(), mul(), Fcwf::mul_sparse(), Fcwf::mul_sparse(), mul_sparse(), mul_sparse(), madness::NemoBase::normalize(), BoysLocalization::operator()(), madness::Coulomb< T, NDIM >::MacroTaskCoulomb::operator()(), madness::XCOperator< T, NDIM >::operator()(), madness::XCOperator< T, NDIM >::operator()(), madness::NemoBase::orthonormalize(), madness::Nemo::solve(), sparse_product_error(), test_exact(), test_operand_state(), test_screening_accuracy(), test_self_consistency(), test_tree_state(), madness::SCF::twoint(), and madness::XCOperator< T, NDIM >::weak_xc_terms().

◆ 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,
double tol,
bool fence = true,
bool do_make_redundant = true )

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

Box pairs whose estimated contribution falls below the tolerance are skipped instead of being multiplied. Both inputs are made redundant; the screening reads their norm_tree and dnorm_tree.

Leaves both inputs in redundant form. Function is a shallow handle, so this is visible to the caller: logically const, not bitwise const. Converting back is not free, so a caller that reuses the operands afterwards must do it itself.

Parameters
[in]toltarget absolute accuracy of the product; the safety margin is applied internally (FunctionImpl::MUL_SCREENING_SAFETY), so pass the accuracy wanted, not a pre-scaled value. tol=0 multiplies exactly. The criterion estimates the neglected cross terms rather than bounding them: the error tracks tol up to a measured O(1-20) constant and decays as ~tol^0.75 rather than ~tol (see test_mul_sparse.cc). The meaning differs from the earlier norm_tree-based screen, so a previously tuned value needs re-checking.
[in]do_make_redundantif false, both inputs must already be redundant

References a, ensure_tree_state_respecting_fence(), madness::WorldGopInterface::fence(), get_tree_state(), madness::World::gop, MADNESS_CHECK_THROW, make_redundant(), print(), PROFILE_BLOCK, redundant, 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 std::vector< Function< T, NDIM > > & a,
const std::vector< Function< R, NDIM > > & b,
double tol,
bool fence = true,
bool do_make_redundant = true )

Multiplies two vectors of functions using sparsity of a[i] and b[i] — q[i] = a[i] * b[i]

Box pairs whose estimated contribution falls below the tolerance are skipped instead of being multiplied. Both inputs are made redundant; the screening reads their norm_tree and dnorm_tree.

Leaves both inputs in redundant form. Function is a shallow handle, so this is visible to the caller: logically const, not bitwise const. Converting back is not free, so a caller that reuses the operands afterwards must do it itself.

Parameters
[in]toltarget absolute accuracy of the product; the safety margin is applied internally (FunctionImpl::MUL_SCREENING_SAFETY), so pass the accuracy wanted, not a pre-scaled value. tol=0 multiplies exactly. The criterion estimates the neglected cross terms rather than bounding them: the error tracks tol up to a measured O(1-20) constant and decays as ~tol^0.75 rather than ~tol (see test_mul_sparse.cc). The meaning differs from the earlier norm_tree-based screen, so a previously tuned value needs re-checking.
[in]do_make_redundantif false, both inputs must already be redundant

References a, b, ensure_tree_state_respecting_fence(), madness::WorldGopInterface::fence(), madness::World::gop, make_redundant(), mul_sparse(), NDIM, print(), PROFILE_BLOCK, q(), R, redundant, and TENSOR_RESULT_TYPE.

◆ 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(), madness::Function< T, NDIM >::set_impl(), and zero_functions().

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(), madness::XCOperator< T, NDIM >::make_xc_potential_impl(), and test_multi_to_multi_op().

◆ multiop_values()

◆ multiply() [1/2]

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

◆ munge()

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

◆ 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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, and p().

◆ mxm() [2/3]

template<typename T, typename Q, typename S>
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, MADNESS_RESTRICT, mxm_reference(), and Q().

◆ 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_RESTRICT, madness::cblas::NoTrans, and one().

Referenced by inner_result().

◆ mxm_reference()

template<typename T, typename Q, typename S>
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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, and Q().

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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, and sum().

◆ mxmT() [2/3]

template<typename T, typename Q, typename S>
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, MADNESS_RESTRICT, mxmT_reference(), and Q().

◆ 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_RESTRICT, madness::cblas::NoTrans, one(), and madness::cblas::Trans.

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

◆ mxmT_reference()

template<typename T, typename Q, typename S>
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, FunctionDefaults< NDIM >::k, MADNESS_RESTRICT, Q(), and sum().

Referenced by mxmT().

◆ my_conj_transpose() [1/4]

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

References a, STATIC, and transpose().

◆ my_conj_transpose() [2/4]

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

References a, conj_transpose(), and STATIC.

◆ my_conj_transpose() [3/4]

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

References a, STATIC, 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, conj_transpose(), and STATIC.

◆ myusleep()

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, and RESPONSE.

Referenced by madness::archive::BinaryFstreamInputArchive::BinaryFstreamInputArchive(), madness::archive::BinaryFstreamOutputArchive::BinaryFstreamOutputArchive(), madness::Fock< T, NDIM >::add_operator(), madness::Fock< T, NDIM >::add_operator(), madness::SCF::apply_bsh_macrotask(), assign_calctype(), bind_factory_type(), bind_function_defaults(), bind_function_type(), madness::QCCalculationParametersBase::check_type(), clean_archive_filename(), madness::CCConvolutionOperator< T, NDIM >::clear_intermediates(), madness::DiagnosticMatrix< T, NDIM >::compute_errors(), madness::Gnuplot::db(), madness::Gnuplot::db(), madness::Molecule::GeometryParameters::derive_source_type_from_name(), madness::Gnuplot::doplot(), madness::Gnuplot::doplot(), exch_write_cost_matrix(), madness::WorldProfile::find(), madness::smooth< T, NDIM >::gaussian_smoothing(), madness::MacroTaskInfo::get_all_presets(), get_charge_from_file(), madness::MacroTask< taskT >::MacroTaskInternal::get_name(), madness::CCIntermediatePotentials::get_potential(), madness::BasisFunctions::guess_virtuals_internal(), madness::CCConvolutionOperator< T, NDIM >::info(), madness::DiagnosticMatrix< T, NDIM >::init(), load(), load_function(), madness::CCPairBuilder::load_function(), madness::CCPotentials::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::CCPairBuilder::make_bare_pair_from_file(), madness::CCPotentials::make_constant_part_macrotask(), 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(), madness::MacroTaskInfo::preset(), madness::MacroTaskQFactory::preset(), MatrixOperator::print(), print_block(), madness::MolecularOrbitals< T, NDIM >::print_cubefiles(), madness::profiling::TaskEvent::print_demangled(), madness::MacroTask< taskT >::MacroTaskInternal::print_me_as_table(), print_pair_energy_report(), madness::DiagnosticMatrix< T, NDIM >::print_report(), madness::Function< double, 3 >::print_size(), madness::FunctionImpl< T, NDIM >::print_size(), madness::FunctionImpl< T, LDIM >::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(), restartdata_basename(), run_real_mo(), run_tests(), save(), save_function(), save_function(), save_function(), madness::CalculationParameters::set_derived_values(), show_norms(), madness::CC2::singles_name(), madness::SCF::solve(), solve(), madness::ElectronPair::store_pair(), sum_sizes(), test_equivalence(), test_exchange(), test_exchange(), test_kinetic(), test_serialize(), test_Vphi_ij_u(), test_XCOperator_matrix(), madness::QCCalculationParametersBase::try_set_from_json(), madness::QCCalculationParametersBase::try_setting_user_defined_value(), madness::CCConvolutionOperator< T, NDIM >::update_elements(), and madness::type_name< T >::value().

◆ nearlyEqual()

bool madness::nearlyEqual ( double a,
double b,
double epsilon = 1e-9 )

References a, std::abs(), b, diff(), epsilon, and norm().

◆ new_am_arg()

◆ no_lattice_sum()

template<std::size_t NDIM>
array_of_bools< NDIM > madness::no_lattice_sum ( )

Referenced by main().

◆ no_lattice_sum_range()

template<std::size_t NDIM>
std::array< LatticeRange, NDIM > madness::no_lattice_sum_range ( )

Referenced by main().

◆ nonlinear_vector_solver()

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

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

Reconstructs the functions if their state does not admit a direct sum; see detail::reconstruct_for_norm for what that costs.

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

Referenced by Calculation::Calculation(), madness::F12Potentials::F12Potentials(), 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(), DF::iterate(), iterate(), iterate(), madness::OEP::iterate(), madness::Zcis::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(), AnsatzBase::normalize(), madness::Zcis::normalize(), madness::XCOperator< T, NDIM >::operator()(), MatrixOperator::operator()(), print_info(), madness::CCPairFunction< T, NDIM >::print_size(), q_c(), madness::InitParameters::readnw(), run_one(), run_real_mo(), madness::OEP::selftest(), madness::MolecularOrbitals< T, NDIM >::similar, madness::Nemo::solve(), madness::SCF::solve(), SVPESolver::solve(), madness::Nemo::solve_cphf(), sparse_product_error(), madness::CCPotentials::test(), test(), madness::smooth< T, NDIM >::test_1d(), test_adaptive_tree(), test_add(), test_add(), test_clear(), test_combined_operators(), test_converged_function(), test_convergence(), test_cross(), test_deferred(), test_dot_sparse(), test_empty_vector_norms(), test_equivalence(), test_exact(), madness::Diamagnetic_potential_factor::test_factor(), test_gconv(), test_generic_exchange(), test_immediate(), 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_norms_preserve_tree_state(), madness::CCPotentials::test_pairs(), test_projector(), test_projector_outer(), test_Q12_projector(), test_recursive_application(), test_rot(), test_scalar_multiplication(), test_screening_accuracy(), test_self_consistency(), test_single_function(), madness::CCPotentials::test_singles_potential(), test_sum_down(), test_swap_particles(), test_transform(), test_tuple(), test_tuple_of_vectors(), test_unaryop(), test_vector_composite(), madness::Diamagnetic_potential_factor::test_vector_potentials(), test_weighted_bra_exchange(), test_with_function(), test_with_function_vector(), test_XCOperator(), testbsh(), MiniDFT::update(), update(), madness::Solver< T, NDIM >::update_orbitals(), and madness::SubspaceK< T, NDIM >::update_subspace().

◆ norm2s()

◆ norm2s_T()

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

Computes the 2-norms of a vector of functions.

Reconstructs the functions if their state does not admit a direct sum; see detail::reconstruct_for_norm for what that costs.

References madness::WorldGopInterface::fence(), madness::World::gop, PROFILE_BLOCK, madness::detail::reconstruct_for_norm(), madness::BaseTensor::size(), madness::WorldGopInterface::sum(), and v.

Referenced by test_empty_vector_norms().

◆ norm_tree()

◆ normalize()

◆ operator!=() [1/2]

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/2]

bool madness::operator!= ( const QCCalculationParametersBase & p1,
const QCCalculationParametersBase & 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, 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, mul(), and Q().

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

References Q().

◆ 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, mul(), and Q().

◆ 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(), 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(), 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, 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 )
constexpr

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

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,
U r )
constexpr

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/13]

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

◆ operator+() [2/13]

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 )

◆ operator+() [3/13]

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+() [4/13]

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+() [5/13]

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+() [6/13]

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+() [7/13]

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+() [8/13]

template<typename Real1, typename Real2>
auto madness::operator+ ( KahanAccumulator< Real1 > v1,
KahanAccumulator< Real2 > v2 )

◆ operator+() [9/13]

template<typename Real1, typename Real2>
auto madness::operator+ ( KahanAccumulator< Real1 > v1,
Real2 v2 )

◆ operator+() [10/13]

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+() [11/13]

template<typename Real1, typename Real2>
auto madness::operator+ ( Real2 v2,
KahanAccumulator< Real1 > v1 )

◆ operator+() [12/13]

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

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+() [13/13]

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

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

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/12]

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/12]

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/12]

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/12]

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/12]

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/12]

template<typename Real1, typename Real2>
auto madness::operator- ( KahanAccumulator< Real1 > v1,
KahanAccumulator< Real2 > v2 )

◆ operator-() [8/12]

template<typename Real1, typename Real2>
auto madness::operator- ( KahanAccumulator< Real1 > v1,
Real2 v2 )

◆ operator-() [9/12]

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-() [10/12]

template<typename Real1, typename Real2>
auto madness::operator- ( Real2 v2,
KahanAccumulator< Real1 > v1 )

◆ 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 )
constexpr

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-() [12/12]

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

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

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

Divide (element-wise) two Vectors.

Do an element-wise division of l by 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<<() [1/28]

template<typename Char, typename Real>
std::basic_ostream< Char > & madness::operator<< ( std::basic_ostream< Char > & os,
const KahanAccumulator< Real > & v )

◆ operator<<() [2/28]

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<<() [3/28]

template<typename T = long>
std::ostream & madness::operator<< ( std::ostream & os,
const DistributionType type )

◆ operator<<() [4/28]

std::ostream & madness::operator<< ( std::ostream & os,
const EnergyType & en )

◆ operator<<() [5/28]

std::ostream & madness::operator<< ( std::ostream & os,
const GuessType & en )

◆ operator<<() [6/28]

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_INVRSQ, OT_ONE, OT_SLATER, and OT_UNDEFINED.

◆ operator<<() [7/28]

std::ostream & madness::operator<< ( std::ostream & os,
const PairType & en )

◆ operator<<() [8/28]

template<std::size_t PDIM>
std::ostream & madness::operator<< ( std::ostream & os,
const particle< PDIM > & p )

References p().

◆ operator<<() [9/28]

std::ostream & madness::operator<< ( std::ostream & os,
const permutation & p )

References p().

◆ operator<<() [10/28]

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<<() [11/28]

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<<() [12/28]

template<std::size_t NDIM = 1>
std::ostream & madness::operator<< ( std::ostream & os,
const TreeState treestate )

◆ operator<<() [13/28]

template<typename T = double>
std::ostream & madness::operator<< ( std::ostream & os,
const typename MacroTaskInfo::StoragePolicy sp )

◆ operator<<() [14/28]

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<<() [15/28]

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.

References f.

◆ operator<<() [16/28]

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.

References f.

◆ operator<<() [17/28]

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<<() [18/28]

std::ostream & madness::operator<< ( std::ostream & s,
const Atom & atom )

◆ operator<<() [19/28]

std::ostream & madness::operator<< ( std::ostream & s,
const AtomicBasis & c )

References c.

◆ operator<<() [20/28]

std::ostream & madness::operator<< ( std::ostream & s,
const AtomicBasisFunction & a )

References a.

◆ operator<<() [21/28]

template<std::size_t NDIM>
std::ostream & madness::operator<< ( std::ostream & s,
const BoundaryConditions< NDIM > & bc )
inlinestatic

References d, FunctionDefaults< NDIM >::bc, and NDIM.

◆ operator<<() [22/28]

template<typename T, std::size_t NDIM>
std::ostream & madness::operator<< ( std::ostream & s,
const CoeffTracker< T, NDIM > & ct )

◆ operator<<() [23/28]

std::ostream & madness::operator<< ( std::ostream & s,
const ContractedGaussianShell & c )

References bufsize, c, and p().

◆ operator<<() [24/28]

◆ operator<<() [25/28]

template<std::size_t NDIM>
std::ostream & madness::operator<< ( std::ostream & s,
const Key< NDIM > & key )

◆ operator<<() [26/28]

template<typename T>
std::ostream & madness::operator<< ( std::ostream & s,
const SRConf< T > & sr )
inlinestatic

◆ operator<<() [27/28]

std::ostream & madness::operator<< ( std::ostream & s,
const TensorType & tt )
inlinestatic

◆ operator<<() [28/28]

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::operator== ( const QCCalculationParametersBase & p1,
const QCCalculationParametersBase & p2 )

◆ operator>>() [1/5]

std::istream & madness::operator>> ( std::istream & is,
EnergyType & en )

◆ operator>>() [2/5]

◆ 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(), and Q().

◆ 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(), 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 FunctionDefaults< NDIM >::k, m, mask_info(), orgqr_(), madness::Tensor< T >::ptr(), madness::BaseTensor::size(), 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(), FunctionDefaults< NDIM >::thresh, inner(), MADNESS_ASSERT, madness::SRConf< T >::max_sigma(), madness::Tensor< T >::screen(), madness::BaseTensor::size(), svd(), syev(), 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(), FunctionDefaults< NDIM >::thresh, inner(), inner_result(), outer(), residual(), s0, madness::Tensor< T >::screen(), svd(), syev(), 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 Tensor< T > & ovlp,
double lindep = 1e-12 )

canonical orthonormalization (see e.g. Szabo/Ostlund)

Parameters
[in]thevector to orthonormalize
[in]overlapmatrix
[in]lindeplinear dependency threshold relative to largest eigenvalue

References canonical_orthonormalization_matrix(), e(), transform(), and v.

Referenced by madness::CCPotentials::apply_KffK(), main(), madness::Zcis::make_guess(), orthonormalize_canonical(), and test_orthonormalize_canonical().

◆ 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,
double lindep = 1e-12 )

convenience routine for canonical routine for symmetric orthonormalization (see e.g. Szabo/Ostlund) overlap matrix is calculated

Parameters
[in]thevector to orthonormalize

References e(), matrix_inner(), orthonormalize_canonical(), and v.

◆ 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(), and test_projector().

◆ 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 orthonormalize_cholesky: computes the overlap matrix and then calls orthonormalize_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
orthonormalized 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(), and orthonormalize_rrcd().

◆ 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 orthonormalize_cholesky: orthonormalize_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,
const Tensor< T > & ovlp,
double lindep = 1e-12 )

◆ 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,
double lindep = 1e-12 )

convenience routine for symmetric orthonormalization (see e.g. Szabo/Ostlund) overlap matrix is calculated

Parameters
[in]thevector to orthonormalize

References e(), matrix_inner(), orthonormalize_symmetric(), and v.

◆ orthonormalize_symmetric_matrix()

template<typename T>
Tensor< T > madness::orthonormalize_symmetric_matrix ( Tensor< T > ovlp)

return a matrix that orthonormalizes the vectors v_ortho = transform(world,v,result);

References conj_transpose(), madness::BaseTensor::dim(), inner(), and syev().

◆ 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]

◆ 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(), 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(), 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 )

◆ pair_energy_weights()

template<typename T, std::size_t NDIM>
Tensor< T > madness::pair_energy_weights ( World & world,
const std::vector< Function< T, NDIM/2 > > & observer,
const Function< T, NDIM/2 > & phi_i_bra,
const Function< T, NDIM/2 > & phi_j_bra,
const std::vector< Function< T, NDIM/2 > > & occ_ket,
const std::vector< Function< T, NDIM/2 > > & occ_bra,
const SeparatedConvolution< T, NDIM/2 > & g12 )

Strong-orthogonality-projected pair-energy weights over an orthonormal observer basis {a}: W^Q(a,b) = 2<phi_i_bra (Q a)|g12|(Q b) phi_j_bra>

  • <phi_j_bra (Q a)|g12|(Q b) phi_i_bra> with Q = 1 - sum_m |occ_ket_m><occ_bra_m| applied to both observer factors (Q12 = Q⊗Q is separable). Used to contract <ab|G Q12 X|ij> diagnostic tensors into the MP2 pair-energy contribution E = factor * sum_ab W^Q(a,b) <ab|G Q12 X|ij>.

References b, matrix_inner(), NDIM, sub(), and transform().

◆ pair_energy_weights< double, 6 >()

template Tensor< double > madness::pair_energy_weights< double, 6 > ( World & ,
const std::vector< Function< double, 3 > > & ,
const Function< double, 3 > & ,
const Function< double, 3 > & ,
const std::vector< Function< double, 3 > > & ,
const std::vector< Function< double, 3 > > & ,
const SeparatedConvolution< double, 3 > &  )

◆ parity()

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(), redundant, and madness::FunctionImpl< T, NDIM >::undo_redundant().

Referenced by multiply().

◆ peek_restartdata()

std::optional< RestartMetadata > madness::peek_restartdata ( World & world,
const std::string & filename )
inline

read ONLY the header of a restartdata archive, without loading any orbitals

This is what makes "is the archive on disk good enough?" answerable cheaply: SCF::load_mos pulls every MRA function off disk before any of the header can be looked at.

Parameters
[in]worldthe world; the parallel archive broadcasts, so all ranks see the same result and the return value is collective
[in]filenamearchive name WITHOUT the chunk suffix, e.g. "mad.restartdata"
Returns
the header, or nullopt if the archive is absent or unreadable

References filename.

Referenced by survey_restart_sources().

◆ peek_restartdata_summary()

std::optional< RestartSummary > madness::peek_restartdata_summary ( World & world,
const std::string & filename )
inline

read the header and the alpha orbital energies/occupations, no MRA functions

Parameters
[in]filenamearchive name WITHOUT the chunk suffix
Returns
nullopt if the archive is absent or cannot be parsed

References filename.

Referenced by print_restartdata_info(), and survey_restart_sources().

◆ 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, FunctionDefaults< NDIM >::k, and madness::FunctionDefaults< NDIM >::get_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 )

◆ PeriodicBSHOperator3D()

SeparatedConvolution< double_complex, 3 > madness::PeriodicBSHOperator3D ( World & world,
Vector< double, 3 > bloch_k,
double mu,
double lo,
double eps,
const std::array< KernelRange, 3 > & kernel_ranges = std::array<KernelRange, 3>(),
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

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

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_BSH.

Referenced by apply_periodic_bsh().

◆ PeriodicBSHOperatorPtr3D()

SeparatedConvolution< double_complex, 3 > * madness::PeriodicBSHOperatorPtr3D ( World & world,
Vector< double, 3 > bloch_k,
double mu,
double lo,
double eps,
const std::array< KernelRange, 3 > & kernel_ranges = std::array<KernelRange, 3>(),
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

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

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_BSH.

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 )

◆ PeriodicCoulombOp()

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

◆ PeriodicCoulombOpPtr()

◆ PeriodicHFExchangeOperator()

SeparatedConvolution< double_complex, 3 > madness::PeriodicHFExchangeOperator ( World & world,
Vector< double, 3 > bloch_k,
double lo,
double eps,
const std::array< KernelRange, 3 > & kernel_ranges = std::array<KernelRange, 3>(),
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

Factory function generating separated kernel for convolution with 1/r in 3D. N.B. bloch_k species how the function's phase changes as the operator translates, which (by translational invariance) is the additive inverse of how the function's phase changes as the cell shifts

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, and OT_G12.

Referenced by madness::Solver< T, NDIM >::apply_hf_exchange(), and madness::Solver< T, NDIM >::apply_hf_exchange4().

◆ PeriodicHFExchangeOperatorPtr()

SeparatedConvolution< double_complex, 3 > * madness::PeriodicHFExchangeOperatorPtr ( World & world,
Vector< double, 3 > bloch_k,
double lo,
double eps,
const std::array< KernelRange, 3 > & kernel_ranges = std::array<KernelRange, 3>(),
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

Factory function generating separated kernel for convolution with 1/r in 3D. N.B. bloch_k species how the function's phase changes as the operator translates, which (by translational invariance) is the additive inverse of how the function's phase changes as the cell shifts

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, and OT_G12.

◆ pg_c2()

pg_operator madness::pg_c2 ( )
inlinestatic

◆ pg_c2x()

◆ pg_c2y()

◆ pg_c2z()

◆ pg_c4()

pg_operator madness::pg_c4 ( )
inlinestatic

◆ pg_c4x()

◆ pg_c4y()

◆ pg_c4z()

◆ pg_identity()

◆ pg_inversion()

◆ pg_sigma_x()

pg_operator madness::pg_sigma_x ( )
inlinestatic

◆ pg_sigma_xy()

◆ pg_sigma_xz()

◆ pg_sigma_y()

pg_operator madness::pg_sigma_y ( )
inlinestatic

◆ pg_sigma_yz()

◆ phase()

◆ plan_restart()

RestartPlan madness::plan_restart ( const RestartMode mode,
const RestartSources & disk,
const RestartCapabilities & can,
const std::vector< double > & protocol,
const double user_dconv,
const Molecule & requested,
const Representation wanted,
const double eprec = 0.0,
const std::string & xc = "",
const std::string & ncf = "",
const std::size_t nmo_alpha = 0 )
inline

decide where the initial orbitals come from – the whole decision table

Pure: no filesystem, no MPI, no MRA. That is the point of the split, and it is what makes the table testable line by line (test_restart.cc).

Parameters
[in]modethe user's restart keyval
[in]diskwhat survey_restart_sources() found
[in]canwhich sources the asking engine can read
[in]protocolthe precision ladder, CalculationParameters::protocol()
[in]user_dconvthe user's dconv
[in]requestedthe geometry this calculation is for
[in]wantedthe representation the asking engine stores (mo/nemo/znemo)
[in]eprecthe requested molecular smoothing parameter; 0 skips the check, which is what a caller that does not know it passes
[in]xcthe requested exchange-correlation functional; an empty string skips the check
[in]ncfthe requested nuclear correlation factor, e.g. "slater:2.0"; empty for an engine that has none, and skips the check

References a, std::abs(), madness::RestartCapabilities::ao, ao, madness::RestartPlan::archive_converged, madness::RestartPlan::archive_nmo_alpha, madness::RestartPlan::archive_same_hamiltonian, automatic, b, compare_geometry(), d, different_composition, displaced, eprec, first_rung_tighter_than(), format_thresh(), madness::Molecule::get_atom(), initial_guess, iterate, madness::RestartPlan::iterate, MADNESS_CHECK, MADNESS_CHECK_THROW, madness::RestartSources::meta, madness::RestartPlan::mode, madness::Molecule::natom(), madness::RestartSources::nmo_alpha, none, madness::RestartCapabilities::nwchem, nwchem, madness::RestartSources::nwfile_named, madness::RestartPlan::protocol_start, read_only, restartao, madness::RestartSources::restartao_present, restartdata, madness::RestartSources::restartdata_present, same, madness::RestartPlan::source, madness::RestartPlan::stale_energy, to_string(), madness::RestartPlan::warn, madness::RestartPlan::why, and xc.

Referenced by make_restart_plan().

◆ 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(), and plot_plane().

Referenced by madness::TDHF::plot().

◆ plot_along() [1/2]

◆ plot_along() [2/2]

template<size_t NDIM>
void madness::plot_along ( World & world,
trajectory< NDIM > traj,
double(* ff )(const Vector< double, NDIM > &),
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,
const Vector< double, NDIM > origin = Vector<double,NDIM>(0.0) )

◆ plot_line() [1/7]

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/7]

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/7]

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/7]

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/7]

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/7]

◆ plot_line() [7/7]

template<std::size_t NDIM>
void madness::plot_line ( World & world,
const std::vector< Function< double, NDIM > > & vf,
const std::string filename,
const PlotParameters param,
int axis )

◆ plot_line_print_value() [1/2]

void madness::plot_line_print_value ( FILE * f,
double v )
inlinestatic

References f, and v.

◆ plot_line_print_value() [2/2]

◆ plot_plane() [1/6]

◆ 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(), FunctionDefaults< NDIM >::cell, madness::World::gop, h(), MADNESS_ASSERT, MADNESS_CHECK_THROW, MADNESS_EXCEPTION, NDIM, plotdx(), PROFILE_FUNC, madness::Tensor< T >::ptr(), madness::World::rank(), and madness::BaseTensor::size().

Referenced by madness::SCF::do_plots(), Plotter::dovolumeplot(), madness::Solver< T, NDIM >::initial_guess(), main(), plotdx(), madness::Solver< T, NDIM >::solve(), test_plot(), and testPeriodicCoulomb3d().

◆ plotpovray()

template<typename T>
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(), FunctionDefaults< NDIM >::cell, madness::FunctionDefaults< NDIM >::get_cell(), 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, FunctionDefaults< NDIM >::cell, 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(), FunctionDefaults< NDIM >::cell, 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(), FunctionDefaults< NDIM >::cell, 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 filename, function(), and 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().

Referenced by Plotter::dovolumeplot(), Plotter::dovolumeplot(), and testNavierStokes().

◆ PM_q()

double madness::PM_q ( const tensorT & S,
const double *MADNESS_RESTRICT Ci,
const double *MADNESS_RESTRICT Cj,
int lo,
int nbf )
inlinestatic

◆ pop()

◆ position_stream()

std::istream & madness::position_stream ( std::istream & f,
const std::string & tag,
bool rewind = true )

◆ position_stream_at_coordinates()

void madness::position_stream_at_coordinates ( std::istream & f)
static

position the stream at the head of the block holding the coordinates

The block is spelled molecule (the structure library, the madqc decks, and the inner block of legacy nested geometry{ molecule{} } decks) or geometry (the moldft/nemo/cc2 decks) – scan forward for whichever comes first. The stream must NOT be rewound: read_structure_from_library() has already positioned it on the requested structure, and an earlier molecule line in the library belongs to a different structure.

References f.

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

◆ 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,
bool first_word_only )

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
first_word_onlymatch the tag only as the first word of a line, i.e. as the header of an input group; otherwise any word of a line matches
Returns
a stream

References f, and not_found_msg.

Referenced by madness::Molecule::GeometryParameters::input_tag(), plot_plane(), madness::Molecule::position_stream_in_library(), and madness::QCCalculationParametersBase::read_internal().

◆ power() [1/2]

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

◆ power< 12 >()

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

References power().

◆ power< 2 >()

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

◆ power< 3 >()

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

◆ power< 4 >()

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

◆ power< 8 >()

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

References power().

◆ power< 9 >()

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

References power().

◆ primary_ranks_per_host()

std::vector< int > madness::primary_ranks_per_host ( World & world,
const std::map< std::string, std::vector< long > > & ranks_per_host1 )

Returns a vector of ranks such that exactly one rank is chosen per host (the lowest rank on each host). Only valid on rank 0. If called on other ranks, returns an empty vector.

References lowest_rank_on_host_of_rank(), and madness::World::size().

Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::replicate_on_hosts(), test_host_rank_map(), test_mpi_group(), test_node_replicated_function(), test_replication_policy(), and validate_distribution_type().

◆ print()

template<typename T, typename... Ts>
void madness::print ( const T & t,
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.
Note
ts are forwarding references, not const&: under C++23 ADL on a std argument also finds std::print, and const& would lose to its Args&& on that argument, making unqualified calls ambiguous. t stays const& (it competes only with the format_string parameter) so that a call with one argument resolves as before.

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(), madness::DiagnosticMatrix< T, NDIM >::DiagnosticMatrix(), madness::DispersionCorrection::DispersionCorrection(), EwaldNuclearPotentialFunctor::EwaldNuclearPotentialFunctor(), madness::GFit< T, NDIM >::GFit(), GridBuilder::GridBuilder(), madness::MacroTaskQ::MacroTaskQ(), MolecularNuclearChargeDensityFunctor::MolecularNuclearChargeDensityFunctor(), MolecularNuclearPotentialFunctor2::MolecularNuclearPotentialFunctor2(), madness::MP2::MP2(), madness::poly4erfc::poly4erfc(), madness::test_output::test_output(), TestBarrier::TestBarrier(), TestSystolicMatrixAlgorithm< T >::TestSystolicMatrixAlgorithm(), TimeBarrier::TimeBarrier(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::XNonlinearSolver(), madness::Zcis::Zcis(), B::~B(), madness::Cloud::~Cloud(), madness::DependencyInterface::~DependencyInterface(), madness::FutureImpl< T >::~FutureImpl(), madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), madness::MP2::add_local_coupling(), madness::MemoryMeasurer::add_memory_to_map(), madness::detail::RemoteCounterBase::add_ref(), madness::SRConf< T >::add_SVD(), LProjector::analyze(), madness::TDHF::analyze(), madness::Znemo::analyze(), apply(), apply(), apply_bsh(), madness::SCF::apply_bsh(), madness::CCPotentials::apply_KffK(), madness::ExchangeCommutator::apply_KffK_lowrank_split_alpha(), madness::ExchangeCommutator::apply_KffK_lowrank_three_range(), madness::CCPotentials::apply_Kfxy(), madness::projector_irrep::apply_symmetry_operators(), madness::XCOperator< T, NDIM >::apply_tau_term(), apply_U_mix(), apply_U_ncf(), madness::CCPotentials::apply_Ue(), madness::CCPotentials::apply_Vreg(), 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(), canonical_orthonormalization_matrix(), check(), check(), check(), madness::TDHF::check_consistency(), madness::NemoBase::check_convergence(), madness::Localizer::check_core_valence_separation(), madness::MP2::check_core_valence_separation(), check_err(), check_linear_dependence(), check_multiplication_table_c2v(), check_operator_multiplications_2d(), check_operator_multiplications_3d(), madness::PNO::check_orthonormality(), check_small(), madness::Function< double, 3 >::check_symmetry(), madness::QCCalculationParametersBase::check_type(), check_vector(), madness::test_output::checkpoint(), compare_calc_and_mos(), madness::Zcis::compare_to_file(), madness::CCPairBuilder::complete_pair_with_low_rank_parts(), madness::Nemo::compute_all_cphf(), madness::OEP::compute_and_print_final_energies(), madness::CCPotentials::compute_cis_expectation_value(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), madness::Znemo::compute_current_density(), compute_energy(), compute_energy(), compute_energy(), madness::Znemo::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(), madness::Nemo::compute_nemo_potentials_impl(), compute_R2f2_psi(), madness::SVDTensor< T >::compute_randomized_svd(), madness::SCF::compute_residual(), madness::Zcis::compute_residuals(), madness::Znemo::compute_residuals(), converge(), converge(), converge2s(), TestSystolicMatrixAlgorithm< T >::converged(), madness::GenTensor< T >::convert_inplace(), madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), 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(), 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(), doit(), MiniDFT::doit(), doplot(), eigenvector_test(), energy(), energy(), energy(), madness::CC2::enforce_core_valence_separation(), madness::MP2::enforce_core_valence_separation(), madness::TDHF::enforce_core_valence_separation(), ensure_tree_state_respecting_fence(), GygiPot::ESP(), madness::XCfunctional::exc(), DF::exchange(), exchange_anchor_test(), exchange_anchor_test(), madness::MacroTaskQ::execute_tasks(), 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(), madness::CCPotentials::fock_residue_6d_macrotask(), TTT::fred(), madness::MacroTaskInfo::from_vector_of_strings(), Mary::galahad(), gauss_legendre_test(), madness::GFit< T, NDIM >::GaussFit(), gaxpy(), gaxpy_oop(), gaxpy_oop(), gen_ce(), generate_G_vectors(), generate_R_vectors(), madness::MP2::get_fock_matrix(), madness::molecular_grid< NDIM >::get_grid(), madness::randomgrid< NDIM >::get_grid(), madness::SCF::get_initial_orbitals(), madness::Znemo::get_initial_orbitals(), madness::QCCalculationParametersBase::get_parameter(), madness::CCIntermediatePotentials::get_potential(), madness::MP2::get_residue(), madness::Nemo::gradient(), madness::Znemo::gradient(), 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(), 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(), initial_guess(), madness::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess_ao_eigenvectors(), madness::SCF::initial_guess_from_nwchem(), initial_loadbal(), data< T, NDIM >::initialize(), madness::SCFProtocol::initialize(), madness::CC2::initialize_pairs(), madness::CC2::initialize_singles(), madness::CCPairFunction< T, NDIM >::inner, inner(), madness::GFit< T, NDIM >::InverseRSqFit(), DF::iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), madness::OEP::iterate(), madness::Zcis::iterate(), madness::Znemo::iterate(), iterate_excite(), iterate_ground(), iterate_ground(), madness::CC2::iterate_lrcc2_pairs(), madness::CCPotentials::iterate_pair_macrotask(), madness::PNO::iterate_pairs_internal(), madness::CC2::iterate_singles(), iterate_xy(), iterate_xy(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_macrotask_efficient(), KAIN(), madness::SCF::kain_solve(), madness::Nemo::kinetic_energy_potential(), madness::QuasiNewton::line_search(), QuasiNewton::line_search(), madness::archive::ArchiveLoadImpl< Archive, FunctionImpl< T, NDIM > * >::load(), madness::detail::RemoteCounter::load_(), load_balance(), madness::LoadBalanceDeux< NDIM >::load_balance(), madness::Cloud::load_from_cache(), load_function(), madness::CCPairBuilder::load_function(), madness::CCPotentials::load_function(), load_function(), madness::MP2::load_function(), madness::Nemo::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(), madness::ThreadBase::main(), main(), main(), main(), TestCalculationParameters::make_all_parameter_doubles(), TestCalculationParameters::make_all_parameter_singles(), madness::SCF::make_bsh_operators(), madness::CCPotentials::make_constant_part_macrotask(), 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::CCPotentials::make_pair_cc2(), madness::CCPotentials::make_pair_mp2(), DF::make_point_potential(), DF::make_point_potential(), make_restart_plan(), make_ri_basis(), madness::SeparatedConvolution< double, 3 >::make_tt_representation(), madness::MP2::make_Uphi0(), makeao(), moments(), madness::MP3::mp3_energy_contribution(), madness::MP3::mp3_energy_contribution_macrotask_driver(), madness::MP3::mp3_test(), mul(), mul_sparse(), mul_sparse(), 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(), BoysLocalization::operator()(), LProjector::operator()(), madness::BSHApply< T, NDIM >::operator()(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::operator()(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_dot_local< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), madness::MacroTask< taskT >::operator()(), madness::ParametrizedExchange::operator()(), madness::TwoElectronInterface< T, NDIM >::operator()(), MicroTask< T, NDIM >::operator()(), madness::SliceLowRankTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), operator>>(), operator>>(), madness::QuasiNewton::optimize(), madness::SteepestDescent::optimize(), QuasiNewton::optimize(), SteepestDescent::optimize(), madness::MolecularOptimizer::optimize_quasi_newton(), madness::Molecule::orient(), orth(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), orthonormalize_symmetric(), 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::MacroTask< taskT >::prepare_output_records(), madness::MolecularOrbitals< T, NDIM >::pretty_print(), ExactSpinor::print(), madness::CCSize::print(), madness::LBDeuxPmap< NDIM >::print(), madness::MyPmap< D >::print(), madness::PairVectorMap::print(), madness::QCCalculationParametersBase::print(), madness::Timer::print(), MatrixOperator::print(), Metric::print(), madness::CCPotentials::print_3d_references(), madness::projector_irrep::print_character_table(), madness::DispersionCorrection::print_citation(), 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::MacroTask< taskT >::MacroTaskInternal::print_me_as_table(), madness::MacroTaskBase::print_me_as_table(), madness::MemoryMeasurer::print_memory_map(), madness::Cloud::print_memory_statistics(), print_memory_usage(), DF::print_molecule(), Spinor::print_norms(), madness::F12Potentials::print_pair_energies(), print_pair_energy_report(), print_pair_energy_report_RI(), print_pair_energy_table_RI(), 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(), print_parameters(), madness::DFParameters::print_params(), madness::InitParameters::print_params(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), madness::DiagnosticMatrix< T, NDIM >::print_report(), print_restartdata_info(), print_seq(), print_seq(), print_seq(), print_seq(), madness::CCPairFunction< T, NDIM >::print_size(), madness::CCPotentials::print_size(), madness::Cloud::print_size(), madness::Function< double, 3 >::print_size(), DF::print_sizes(), madness::MacroTaskQ::print_taskq(), madness::Cloud::print_timings(), madness::LoadBalanceDeux< NDIM >::print_tree(), madness::TDHF::print_xfunctions(), madness::MolecularOptimizer::projector_external_dof(), propagate(), propagate(), propagate(), madness::Nemo::purify_hessian(), random_gaussian(), madness::TensorTrain< T >::ranks(), madness::InitParameters::read(), Plotter::read(), madness::Znemo::read_complex_guess(), madness::Molecule::read_core_file(), madness::Znemo::read_explicit_guess_functions(), madness::FunctionImpl< T, LDIM >::read_grid(), madness::FunctionImpl< T, LDIM >::read_grid2(), madness::Zcis::read_guess(), madness::QCCalculationParametersBase::read_internal(), madness::Znemo::read_real_guess(), madness::Znemo::read_reference(), madness::MolecularOrbitals< T, NDIM >::read_restartaodata(), madness::Znemo::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, LDIM >::recursive_apply(), madness::projector_irrep::reduce(), madness::DependencyInterface::register_callback(), madness::DependencyInterface::register_final_callback(), madness::detail::RemoteCounter::register_ptr_(), madness::DispersionCorrection::reject(), madness::detail::RemoteCounterBase::release(), madness::Cloud::replicate(), madness::MacroTaskQ::replicate_inputs(), madness::Cloud::replicate_per_node(), madness::NemoBase::reproject_mos(), madness::SCF::restart_aos(), madness::MacroTask< taskT >::MacroTaskInternal::run(), madness::population::PopulationAnalysis::run(), run(), run(), TestBarrier::run(), TestTask::run(), madness::MacroTaskQ::run_all(), run_all_calculations(), run_full_closed_shell(), run_full_open_shell(), run_overlap(), run_static_closed_shell(), run_static_open_shell(), madness::MP2::save_function(), madness::Nemo::save_function(), save_function(), save_function(), save_function(), madness::Zcis::save_guess(), madness::Znemo::save_orbitals(), madness::OEP::save_restartdata(), DF::saveDF(), madness::MemoryMeasurer::search_all_worlds(), madness::MemoryMeasurer::search_world(), madness::OEP::selftest(), madness::FunctionNode< T, NDIM >::set_coeff(), madness::Molecule::GeometryParameters::set_derived_values(), madness::PCMParameters::set_derived_values(), madness::test_output::set_do_print(), madness::XCOperator< T, NDIM >::set_extra_truncation(), madness::Function< double, 3 >::set_functor(), madness::projector_irrep::set_irrep(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::set_macro_task_info(), madness::projector_irrep::set_ordering(), madness::Nemo::set_protocol(), madness::SCF::set_protocol(), show_norms(), simple_example(), madness::GFit< T, NDIM >::SlaterFit(), DF::solve(), madness::CC2::solve(), madness::Nemo::solve(), madness::OEP::solve(), madness::PNO::solve(), madness::SCF::solve(), madness::Solver< T, NDIM >::solve(), madness::SpectralPropagator::solve(), solve(), SVPESolver::solve(), madness::CC2::solve_cc2(), madness::TDHF::solve_cis(), madness::Nemo::solve_cphf(), madness::CC2::solve_lrcc2(), madness::CC2::solve_mp2_coupled(), DF::solve_occupied(), madness::MP2::solve_residual_equations(), madness::SCF::solve_virtuals(), madness::QCPropertyInterface::spindensity(), squareit(), startup(), madness::SpectralPropagator::step(), madness::SpectralPropagatorGaussLobatto::step(), madness::Solver< T, NDIM >::step_restriction(), madness::archive::BufferOutputArchive::store(), madness::Cloud::store(), madness::detail::RemoteCounter::store_(), madness::Cloud::store_batch(), madness::Cloud::store_other(), madness::CCPair::store_pair(), su_complex(), symmetrize(), madness::Molecule::symmetrize_and_identify_point_group(), madness::PNO::t_solve(), madness::IndexIterator::test(), madness::TDHF::test(), madness::Znemo::test(), test(), 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_diagnosis(), test_adaptive_grid_projection(), test_adaptive_project(), test_adaptive_tree(), test_add(), test_add(), test_addition(), test_apply(), test_apply_push_1d(), test_arithmetic(), test_assignment_factories(), test_asymmetric(), test_basic(), test_batch(), test_batch_1D(), test_batch_fetch_of_missing_record(), test_blank_separated_string_commandline(), test_bsh(), test_capitalization(), test_chin_chen(), test_coalesced_redistribute(), test_combine_generic(), test_combined_operators(), test_compress(), madness::Znemo::test_compute_current_density(), test_consolidate(), test_consolidate_vs_direct(), test_construction(), test_constructor(), test_conv(), test_converged_function(), test_conversion(), test_convert(), test_convolution(), test_copy_function_from_other_world(), test_copy_function_from_other_world_through_cloud(), test_coulomb(), test_coulomb_gfit_discard_large_alpha(), test_cross(), test_custom_worldobject(), test_deferred(), test_diff(), test_direct_projection(), test_dnuclear(), test_dot(), test_emul(), test_ethylene(), test_exchange(), test_exchange(), test_exchange(), test_florian(), test_fock(), test_G_R_vectors(), test_gaussian_num_coeffs(), test_gconv(), test_general_transform(), test_generic_exchange(), test_hartree_product(), test_hermiticity(), test_hf_be(), test_host_rank_map(), test_hybrid_coefficients(), test_hydro(), test_inner(), test_inner(), test_inner(), test_inner(), test_integration(), test_inv_rsq_gfit(), test_invrsq_operator(), test_io(), 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_meta_gga(), test_meta_gga_dedtau_polarized(), test_meta_gga_one_orbital_energy(), test_mixed_tuple(), test_modified(), test_molecular_grid(), test_mpi_group(), test_multi(), test_multi_to_multi_op(), test_ne_boys(), test_nemo(), test_node_replicated_function(), test_norm(), test_nuclear(), test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), test_nuclear_potential_big_unit_cell(), test_numerics(), test_op(), test_opdir(), test_operator_apply(), test_orthogonalization(), test_orthonormalize_canonical(), test_orthonormalize_symmetric(), test_owned_tasks(), test_owner_assignment(), 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_priority(), test_proj(), test_projector(), test_projector(), test_projector_outer(), test_Q12_projector(), test_qm(), test_reconstruct(), test_recursive_application(), test_recursive_apply(), test_redistribute_to_batches(), test_reduce_rank(), test_replication_policy(), test_rot(), test_same(), test_scalar_multiplication(), test_scalar_task(), test_size(), test_slater_exchange(), test_sliced_addition(), test_sliced_assignment(), test_smooth_maxout(), test_spherical_box(), test_stuff(), test_stuff(), test_sum_down(), test_sum_down_files(), test_swap_particles(), test_task1(), test_tight_diffuse(), test_transform(), test_trotter(), test_truncation(), test_tuple_of_vectors(), test_twice(), test_type_conversion5(), test_type_conversion8(), test_U_el(), test_unaryop(), test_vector_composite(), test_vector_of_scalar_task(), test_Vphi_ij_u(), test_weighted_bra_exchange(), test_with_function(), test_with_function_vector(), test_xcfunctional(), test_XCOperator(), test_XCOperator_matrix(), testbsh(), testgradG(), testNavierStokes(), madness::scf_data::to_json(), trotter(), trotter(), trotter(), madness::QCCalculationParametersBase::try_setting_user_defined_value(), madness::NuclearCorrelationFactor::U2X_spherical(), madness::NonlinearSolverND< 3 >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update(), MiniDFT::update(), update(), madness::PNO::update_pno(), madness::Subspace< T, NDIM >::update_subspace(), madness::SubspaceK< T, NDIM >::update_subspace(), validate_distribution_type(), madness::MolecularEnergy::value(), madness::MP2::value(), madness::Nemo::value(), madness::gridbase::visualize(), madness::XCfunctional::vxc(), walker2(), and zero_functions_tree_state().

◆ 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,
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()

◆ print_header3()

◆ 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(), print0(), 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().

Referenced by madness::SCF::apply_potential(), madness::SCF::initial_guess_ao_eigenvectors(), 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_memory_usage()

void madness::print_memory_usage ( const World & world)
inline

◆ print_mtxmq_profile()

void madness::print_mtxmq_profile ( )

Print call profile and shape statistics for mTxmq (automatically called at exit).

◆ print_pair_energy_report()

template<typename T, std::size_t NDIM>
void madness::print_pair_energy_report ( const DiagnosticMatrix< T, NDIM > & dm,
const std::vector< std::string > & pieces,
const std::vector< double > & signs,
const std::string & title )

Print the (0,1) elements of the named pieces as "6d / 3d-ref / diff" lines plus the signed total, via snprintf + print.

Intended for a DiagnosticMatrix built over a raw (non-orthonormalized) pair-bra basis {bra_i, bra_j}, where entry(0,1) = <bra_i bra_j|G Q₁₂ X|ij> is the contribution of piece X to the MP2 pair energy.

Parameters
piecesentry names;
signsper-piece sign in the total

References e(), madness::DiagnosticMatrix< T, NDIM >::entries, MADNESS_CHECK_THROW, name(), p(), and print().

Referenced by madness::CCPotentials::apply_KffK().

◆ print_pair_energy_report< double, 6 >()

template void madness::print_pair_energy_report< double, 6 > ( const DiagnosticMatrix< double, 6 > & ,
const std::vector< std::string > & ,
const std::vector< double > & ,
const std::string &  )

◆ print_pair_energy_report_RI()

template<typename T, std::size_t NDIM>
void madness::print_pair_energy_report_RI ( const DiagnosticMatrix< T, NDIM > & dm,
const std::vector< std::string > & pieces,
const std::vector< double > & signs,
const Tensor< T > & W,
double factor,
const std::string & title )

RI pair-energy report: contract the .result (6d-projected ket, "Expr3") and .ref (3d Schwinger ket, "Expr2") tensors of the named pieces with the pair-energy weights W and print "Expr2(3d-ket) / Expr3(6d-ket) / diff" per piece plus the signed total, where the per-term energy is factor * sum_p sign_p * sum_ab W(a,b) M_p(a,b).

References a, b, e(), madness::DiagnosticMatrix< T, NDIM >::entries, MADNESS_CHECK_THROW, p(), and print().

Referenced by madness::CCPotentials::apply_KffK().

◆ print_pair_energy_report_RI< double, 6 >()

template void madness::print_pair_energy_report_RI< double, 6 > ( const DiagnosticMatrix< double, 6 > & ,
const std::vector< std::string > & ,
const std::vector< double > & ,
const Tensor< double > & ,
double ,
const std::string &  )

◆ print_pair_energy_table_RI()

template<typename T, std::size_t NDIM>
void madness::print_pair_energy_table_RI ( const DiagnosticMatrix< T, NDIM > & dm,
const std::vector< std::string > & pieces,
const std::vector< std::string > & labels,
const std::vector< double > & energy6d,
const Tensor< T > & W,
double factor,
const std::string & title )

Consolidated constant-part pair-energy summary table.

One row per piece (plus a "sum" row), with columns energy(6D) energy(6D-RI) energy(3D-RI) Δenergy(RI) err(6D) where, per piece p with M6d = entries[p].result, M3d = entries[p].ref: energy(6D) = energy6d[p] (true pair energy, no RI) energy(6D-RI) = factor * Σ_ab W(a,b) M6d(a,b) energy(3D-RI) = factor * Σ_ab W(a,b) M3d(a,b) Δenergy(RI) = energy(6D-RI) − energy(3D-RI) err(6D) = ‖M3d − M6d‖_F (before W-contraction) All pieces add with +1 (each Vreg already carries its sign, and energy6d is already signed). The sum-row err is ‖Σ_p (M3d−M6d)‖_F.

Parameters
piecesentry keys into dm.entries, e.g. {"Ue","KffK"}
labelsdisplay labels per piece, e.g. {"Ue","[K,f]"}
energy6dtrue per-term 6D pair energy (aligned with pieces)

References a, b, copy(), d, e(), madness::DiagnosticMatrix< T, NDIM >::entries, MADNESS_CHECK_THROW, madness::Tensor< T >::normf(), p(), print(), and madness::BaseTensor::size().

Referenced by madness::CCPotentials::make_constant_part_macrotask().

◆ print_pair_energy_table_RI< double, 6 >()

template void madness::print_pair_energy_table_RI< double, 6 > ( const DiagnosticMatrix< double, 6 > & ,
const std::vector< std::string > & ,
const std::vector< std::string > & ,
const std::vector< double > & ,
const Tensor< double > & ,
double ,
const std::string &  )

◆ print_restartdata_info()

bool madness::print_restartdata_info ( World & world,
const std::string & prefix )
inline

print everything a restartdata archive can say about itself, and nothing more

This is what answers "why did/didn't my restart fire?" without starting a calculation. It reports only what is actually recorded: fields a version-4 archive never stored are shown as "not recorded" rather than as their placeholder values, because 1e10 masquerading as a convergence threshold has misled people before.

Parameters
[in]prefixarchive base name; .restartdata/.00000 are optional
Returns
false if there was nothing to read

References madness::RestartMetadata::CURRENT_VERSION, m, mo, nemo, peek_restartdata_summary(), print(), madness::World::rank(), restartdata_basename(), restartdata_exists(), to_string(), v, and znemo.

Referenced by main().

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

◆ print_stats()

◆ print_tree_jsonfile()

template<typename T, size_t NDIM>
void madness::print_tree_jsonfile ( World & world,
const Function< T, 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 )

◆ process_cpu_time()

double madness::process_cpu_time ( )
inlinestatic

Returns the CPU time consumed by this process, in seconds.

Aggregated over all threads of the process, so a task's compute time can be separated from its idle time. This is not what cpu_time() returns: that reads a cycle counter on x86 and therefore measures elapsed time. An instrumentation helper, not part of the documented timing API.

Returns
The process CPU time (in seconds).

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::operator()().

◆ project()

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

References R.

◆ qr() [2/5]

template void madness::qr ( Tensor< double_complex > & A,
Tensor< double_complex > & R )

References R.

◆ qr() [3/5]

template void madness::qr ( Tensor< float > & A,
Tensor< float > & R )

References R.

◆ qr() [4/5]

template void madness::qr ( Tensor< float_complex > & A,
Tensor< float_complex > & R )

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

◆ r2()

double madness::r2 ( const coord_3d & x)
static

Referenced by apply(), apply_U_ncf(), apply_V(), area_two_spheres(), assemble_nemo_ddens(), assemble_nemo_tau(), coul(), d_smoothed_potential(), d_smoothed_potential(), distances(), dsmoothed_potential(), dsmoothed_potential(), madness::NuclearCorrelationFactor::dsmoothed_unitvec(), exact_extra(), exact_pair_sum(), exact_u(), exact_uc(), exact_ucd(), exact_ud(), exact_Vphi(), f12_lambda(), f6d(), gauss_3d(), gauss_3d(), gauss_6d(), general_transform(), he_orbitals(), helium_pot(), hylleraas_3term(), data< T, NDIM >::initialize(), main(), madness::TwoElectronInterface< T, NDIM >::make_coeff(), make_radius(), mask_functor_box(), Gauss::operator()(), Gaussian< T, NDIM >::operator()(), gaussian::operator()(), madness::BasisFunctions::SolidHarmonicGaussian::operator()(), madness::WignerSeitzPotentialFunctor::operator()(), Slater::operator()(), madness::KernelRange::operator==, madness::KernelRange::Restrictor::operator==, slater_functor(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), smoothed_potential(), madness::TensorTrain< T >::splitdim(), test_add(), test_add(), test_apply(), test_consolidate(), test_consolidate_vs_direct(), test_hartree_product(), test_integration(), test_multiply(), test_multiply_with_f12(), test_partial_inner_6d(), madness::Solver< T, NDIM >::test_periodicity(), test_tt2d_summation(), test_vector_composite(), test_Vphi_ij_u(), testfn(), tightgauss_3d(), transform(), u(), u(), madness::GaussSlater::U2X_spherical(), madness::GradientalGaussSlater::U2X_spherical(), madness::Polynomial< N >::U2X_spherical(), madness::Slater::U2X_spherical(), V(), V(), V_1(), V_times_phi(), and volume_two_spheres().

◆ RandomValue()

◆ RandomValue< double >() [1/2]

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

◆ RandomValue< double >() [2/2]

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

◆ RandomValue< double_complex >() [1/2]

◆ RandomValue< double_complex >() [2/2]

◆ RandomValue< float >() [1/2]

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

Random float.

References default_random_generator.

◆ RandomValue< float >() [2/2]

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

Random float.

References default_random_generator.

◆ RandomValue< float_complex >() [1/2]

◆ RandomValue< float_complex >() [2/2]

◆ RandomValue< int >() [1/2]

◆ RandomValue< int >() [2/2]

◆ RandomValue< long >() [1/2]

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

Random long.

References RandomValue().

Referenced by make_dimensions(), and test_qr().

◆ RandomValue< long >() [2/2]

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

Random long.

References RandomValue().

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 _(), A(), copy(), madness::Tensor< T >::flat(), FunctionDefaults< NDIM >::thresh, m, MADNESS_ASSERT, madness::SRConf< T >::max_sigma(), R1, madness::BaseTensor::size(), and svd_result().

Referenced by apply().

◆ rank_to_host_and_rss_map()

◆ ranks_per_host()

◆ read_atom()

AtomCore madness::read_atom ( TiXmlElement * e,
unsigned int atn,
double eprec )
static

◆ read_data() [1/2]

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]

bool madness::read_data ( int k)
static

◆ read_df_restart_version()

template<typename Archive>
unsigned int madness::read_df_restart_version ( const Archive & ar)

Returns the format version, or 0 for an unversioned archive.

Reads from a local archive, so the caller decides which rank reads.

Referenced by madness::InitParameters::read(), TEST(), and TEST().

◆ read_orbital()

bool madness::read_orbital ( TiXmlElement * e,
AtomCore & ac )
static

References c, e(), FunctionDefaults< NDIM >::bc, and p().

Referenced by read_atom().

◆ read_potential()

bool madness::read_potential ( TiXmlElement * elem,
AtomCore & ac,
double eprec )
static

References c, e(), eprec, p(), and smoothing_parameter().

Referenced by read_atom().

◆ read_twoscale()

bool madness::read_twoscale ( int kmax)
static

◆ readmat()

Tensor< double > madness::readmat ( int k,
FILE * file )
static

References a, c, and FunctionDefaults< NDIM >::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 madness::Function< T, NDIM >::fence(), and madness::Function< T, NDIM >::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(), NDIM, 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]

◆ reconstruct() [1/2]

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_potential(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Solver< T, NDIM >::compute_rho(), div_deriv(), 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_ao_eigenvectors(), madness::CC2::iterate_lrcc2_pairs(), madness::CC2::iterate_singles(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::SCF::kinetic_energy_matrix(), MiniDFT::kinetic_energy_matrix(), Calculation::load_mos(), madness::Solver< T, NDIM >::load_orbitals(), madness::SCF::make_density(), madness::CCPotentials::make_mo_bra(), madness::TDHF::make_mo_bra(), madness::CCPotentials::make_mo_ket(), madness::TDHF::make_mo_ket(), make_operands(), Calculation::make_reference(), moments(), madness::DNuclear< T, NDIM >::operator()(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), Calculation::plot_p(), madness::MolecularOrbitals< T, NDIM >::post_process_mos(), madness::SCF::project(), madness::CCIntermediatePotentials::reconstruct(), madness::Info::reconstruct(), madness::detail::reconstruct_for_norm(), refine_to_common_level(), madness::Solver< T, NDIM >::reproject(), madness::NemoBase::reproject_mos(), rot(), test(), test2(), test_with_function_vector(), madness::SCF::twoint(), and madness::XNonlinearSolver< std::vector< Function< double, 3 > >, double, vector_function_allocator< double, 3 > >::update().

◆ reconstruct() [2/2]

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.

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

◆ redistribute_to_batches()

template<typename T, std::size_t NDIM>
void madness::redistribute_to_batches ( World & world,
std::vector< Function< T, NDIM > > & v,
const std::vector< ProcessID > & owner,
std::size_t cap_bytes = 0,
bool rotate = true )

Move each v[j] so its whole tree lives on rank owner[j], via the coalesced WorldContainer transport (bulk AMs, erase-after-copy: streams, no 2x transient). State-preserving. Each function gets its OWN single-owner pmap (Key<NDIM> is function-agnostic), and the pmap outlives the call – until redistributed again, every operation on v[j] runs on rank owner[j] alone.

Parameters
[in,out]vfunctions to localize (moved in place)
[in]ownerdestination rank per function; MUST be identical on every rank (checked collectively)
[in]cap_bytessoft cap per message (0 => ~1 MiB, sized for the default MAD_BUFFER_SIZE; lower it if that buffer was shrunk)
[in]rotatestagger destinations to reduce incast

References d, f, madness::WorldGopInterface::fence(), FunctionDefaults< NDIM >::pmap, get_impl(), madness::World::gop, h(), kmax, MADNESS_CHECK, madness::WorldGopInterface::max(), madness::WorldGopInterface::min(), NDIM, and v.

Referenced by madness::SCF::apply_bsh_macrotask(), and test_redistribute_to_batches().

◆ 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< double, 3 >::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 FunctionDefaults< NDIM >::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 the functions according to the autorefine criteria

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

◆ refine_to_common_level()

◆ representation_from_int()

Representation madness::representation_from_int ( const int i)
inline

map a stored int back to a Representation, tolerating values we do not know

References mo, nemo, unknown, and znemo.

Referenced by madness::RestartMetadata::read().

◆ require_supported_df_restart()

void madness::require_supported_df_restart ( const unsigned int version)
inline

Throws unless version is a DF restart format this build can read.

References DF_RESTART_VERSION, and MADNESS_CHECK_THROW.

Referenced by madness::InitParameters::read(), TEST(), and TEST().

◆ reset_mtxmq_profile()

void madness::reset_mtxmq_profile ( )

Reset profiling statistics counters.

◆ reset_papi_measurement()

void madness::reset_papi_measurement ( )
inline

◆ restart_mode_from_string()

RestartMode madness::restart_mode_from_string ( const std::string & s)
inline

parse the restart keyval

Throws on an unknown spelling. The keyval carries allowed_values, so QCParameter normally rejects a bad string before this is ever reached; this check is the backstop for values set programmatically.

References ao, automatic, iterate, MADNESS_EXCEPTION, none, nwchem, and read_only.

Referenced by madness::MolecularEnergy::value(), and madness::Nemo::value().

◆ restart_mode_names()

std::vector< std::string > madness::restart_mode_names ( )
inline

the six spellings accepted by the restart keyval, for allowed_values

◆ restartdata_basename()

std::string madness::restartdata_basename ( std::string name)
inline

strip the decorations a user is likely to type, leaving the archive base name

Accepts he, he.restartdata and he.restartdata.00000 alike – the chunk suffix in particular is what tab completion puts on the command line, and making the user delete it by hand is a pointless trap.

References name().

Referenced by print_restartdata_info().

◆ restartdata_exists()

bool madness::restartdata_exists ( const std::string & filename)
inline

true if the first chunk of a restartdata archive is present on disk

Lets a caller tell "no archive" from "archive present but unreadable", which want different reactions: the first is normal, the second is a corrupt file or a format mismatch and should be reported rather than silently recomputed.

References filename.

Referenced by print_restartdata_info(), and survey_restart_sources().

◆ 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(), compress(), d, madness::WorldGopInterface::fence(), FunctionDefaults< NDIM >::refine, madness::World::gop, grad(), gradient_operator(), MADNESS_ASSERT, NDIM, reconstruct(), and v.

Referenced by madness::Solver< T, NDIM >::do_rhs(), and madness::Solver< T, NDIM >::do_rhs_simple().

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

Referenced by main().

◆ row_distributed_matrix_distribution()

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 A(), mask_info(), pstrf_(), madness::Tensor< T >::ptr(), and TENSOR_ASSERT.

Referenced by madness::projector_irrep::apply_symmetry_operators(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::diagnose_error(), madness::PNO::orthonormalize_cholesky(), orthonormalize_rrcd(), madness::LowRankFunction< T, NDIM, LDIM >::rr_cholesky_matrix_and_reorder(), and test_rr_cholesky().

◆ rsquared()

double madness::rsquared ( const coordT & r)
static

◆ same_displacement_shell()

bool madness::same_displacement_shell ( double a,
double b )
inline

Whether two squared real-space distances of displacements (see Key::real_distsq, Key::real_distsq_bc) belong to the same shell. The distances are sums of (cell width * lattice offset)^2, so equivalent displacements (e.g. {3,2,2} and {2,2,3} in an (a,b,a) cell) can differ by a few ulps from summation order alone, whereas distinct shells differ by many orders of magnitude more than that. The test is purely relative, so the grouping does not depend on the units or the size of the cell. Zero (a displacement touching the central box) is exact and only matches zero.

References a, std::abs(), b, and e().

Referenced by madness::FunctionImpl< T, LDIM >::do_apply(), and madness::BoxSurfaceDisplacementValidator< NDIM >::operator()().

◆ save()

◆ 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_vector()

template<typename T>
std::vector< ScalarResult< T > > madness::scalar_result_vector ( World & world,
std::size_t n )

◆ scale() [1/2]

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

◆ scale() [2/2]

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.

Referenced by SVPESolver::SVPESolver(), madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), madness::Znemo::analyze(), madness::TDHF::apply_G(), madness::XCOperator< T, NDIM >::apply_tau_term(), madness::CCPotentials::apply_transformed_Ue(), madness::DiagnosticMatrix< T, NDIM >::build_Gab_bra(), madness::SCF::canonicalize_virtuals(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, LDIM >::coeffs2values(), madness::FunctionImpl< T, LDIM >::coeffs2values(), madness::Diamagnetic_potential_factor::compute_lz_commutator(), madness::Nemo::compute_nemo_potentials_impl(), madness::Zcis::compute_potentials(), madness::SCF::compute_residual(), madness::F12Potentials::convolve_with_fU(), madness::FunctionImpl< T, LDIM >::do_binary_op(), madness::FunctionImpl< T, LDIM >::do_mul(), madness::FunctionImpl< T, LDIM >::err_box(), madness::Molecule::from_json(), gauss_legendre_numeric(), madness::TDHF::get_tda_potential(), madness::Molecule::insert_symbols_and_geometry(), madness::Znemo::iterate(), madness::CC2::iterate_singles(), madness::Nemo::kinetic_energy_potential(), madness::Localizer::localize_cholesky(), main(), madness::MP2::make_Uphi0(), madness::Localizer::matrix_exponential(), madness::Solver< T, NDIM >::matrix_exponential(), matrix_exponential(), moments(), madness::FunctionImpl< T, LDIM >::mul(), madness::EigSolver< T, NDIM >::multi_solve(), AnsatzBase::normalize(), madness::NemoBase::normalize(), normalize(), madness::Zcis::normalize(), madness::FunctionImpl< T, LDIM >::NS_fcube_for_mul(), madness::FunctionImpl< T, LDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), operator*(), operator*(), madness::TwoBodyFunctionSeparatedComponent< T, NDIM >::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(), scale(), scale(), madness::Solver< T, NDIM >::solve(), madness::Nemo::solve_cphf(), squaremod_small(), madness::CCPotentials::test_pairs(), test_XCOperator_matrix(), testNavierStokes(), MiniDFT::update(), update(), update(), madness::PNO::update_pno(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2coeffs(), and madness::FunctionImpl< T, LDIM >::values2NScoeffs().

◆ 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_if_exists()

template<class T, class F>
void madness::set_if_exists ( nlohmann::json & j,
const std::string & key,
const std::optional< T > & opt,
F && to_json_fn )
inline

◆ 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::World::initialize, and madness::ThreadBase::main().

◆ set_thresh()

◆ sim_to_user()

template<std::size_t NDIM>
void madness::sim_to_user ( const Vector< double, NDIM > & xsim,
Vector< double, NDIM > & xuser )
static

◆ simpt2key()

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

◆ 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

References madness::Pairs< T >::allpairs, and get_size().

Referenced by madness::CCConvolutionOperator< T, NDIM >::info().

◆ slater_functor()

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

SeparatedConvolution< double, 3 > madness::SlaterF12Operator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

◆ SlaterF12OperatorPtr()

SeparatedConvolution< double, 3 > * madness::SlaterF12OperatorPtr ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_F12.

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

◆ SlaterF12OperatorPtr_ND()

template<std::size_t NDIM>
SeparatedConvolution< double, NDIM > * madness::SlaterF12OperatorPtr_ND ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
int k = FunctionDefaults<NDIM>::get_k() )
inlinestatic

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

includes the factor 1/(2 mu)

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_F12.

Referenced by madness::ExchangeCommutator::fk_provider(), madness::ExchangeCommutator::kf_provider(), make_ri_basis(), and test_lowrank_function().

◆ SlaterF12sqOperator()

SeparatedConvolution< double, 3 > madness::SlaterF12sqOperator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

◆ SlaterF12sqOperatorPtr()

SeparatedConvolution< double, 3 > * madness::SlaterF12sqOperatorPtr ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

◆ SlaterOperator()

template<std::size_t NDIM = 3>
SeparatedConvolution< double, NDIM > madness::SlaterOperator ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
int k = FunctionDefaults<NDIM>::get_k() )
inlinestatic

◆ SlaterOperatorPtr()

SeparatedConvolution< double, 3 > * madness::SlaterOperatorPtr ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_SLATER.

Referenced by bind_operators().

◆ SlaterOperatorPtr_ND()

template<std::size_t NDIM>
SeparatedConvolution< double, NDIM > * madness::SlaterOperatorPtr_ND ( World & world,
double mu,
double lo,
double eps,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
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 FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), lo, mu, and OT_SLATER.

Referenced by make_ri_basis(), and test_lowrank_function().

◆ smoothed_density()

double madness::smoothed_density ( double rs)

Charge density corresponding to smoothed 1/r potential.

To obtain the desired density as a function of r, // invoke as smoothed_density(r/c)/c^3 where c is the radius of the smoothed volume.

Parameters
rseffective distance, $ r_s \equiv r/c $ , from the origin of the density
Returns
$ \frac{\exp(-r_s^2) \left(\frac{5}{2}- r_s^2 \right)}{\pi^{3/2}} $

References madness::constants::pi.

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

◆ smoothed_potential()

◆ smoothing_parameter()

double madness::smoothing_parameter ( double Z,
double eprec )

Returns radius for smoothing nuclear potential with energy precision eprec.

References c, e(), eprec, pow(), and Z.

Referenced by madness::Molecule::add_atom(), madness::Molecule::add_atom(), Calculation::make_reference(), madness::Molecule::read_core_file(), read_potential(), and madness::Molecule::update_rcut_with_eprec().

◆ SmoothingOperator()

template<std::size_t NDIM>
SeparatedConvolution< double, NDIM > madness::SmoothingOperator ( World & world,
double eps,
const std::array< LatticeRange, NDIM > & lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),
int k = FunctionDefaults<NDIM>::get_k() )
inlinestatic

Factory function generating separated kernel for convolution a normalized Gaussian (aka a widened delta function)

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), L, NDIM, and pow().

◆ SmoothingOperator3D()

SeparatedConvolution< double, 3 > madness::SmoothingOperator3D ( World & world,
double eps,
const std::array< LatticeRange, 3 > & lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),
int k = FunctionDefaults<3>::get_k() )
inlinestatic

Factory function generating separated kernel for convolution a normalized Gaussian (aka a widened delta function)

References FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_k(), 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 mul(), and v.

◆ stage_halo()

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

Pre-stages the neighbor coefficients that differentiating v with each of grad will need.

Differentiating then serves those neighbors locally instead of fetching them one at a time. One halo per function holds every operator's pushes, so it pays when several functions are differentiated together. clear_halo frees them afterwards.

References f, madness::WorldGopInterface::fence(), madness::World::gop, grad(), MADNESS_CHECK, and v.

Referenced by differentiate(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), and madness::SCF::kinetic_energy_matrix().

◆ standard()

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

◆ START_TIMER()

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 )

initialize the internal state of the MADmra library

Reads in (and broadcasts across world) the twoscale and autocorrelation coefficients, Gauss-Legendre quadrature roots/weights, function defaults and operator displacement lists.

Note
This generates the operator displacement lists (see Displacements) for free boundary conditions in up to 6 dimensions and, if the default boundary conditions have periodic axes, for kernels lattice-summed along those axes. Lists for any other set of lattice-summed axes are built when an operator summed along them is first constructed.
Parameters
worldbroadcast data across this World
argccommand-line parameter count
argvcommand-line parameters array
doprintif true, will log status to std::cout on rank 0 [default=false]
make_stdcout_nice_to_realsif true, will configure std::cout to print reals prettily, according to the MADNESS convention [default=true]

References arg(), madness::info::build_date(), madness::info::build_time(), cpu_frequency(), madness::WorldGopInterface::fence(), gauss_legendre_test(), get_hostname(), madness::info::git_source_description(), madness::World::gop, init_tensor_lapack(), initialize_legendre_stuff(), load_coeffs(), load_quadrature(), MADNESS_CHECK, print(), madness::World::rank(), redirectio(), madness::FunctionDefaults< NDIM >::set_defaults(), madness::World::size(), test_two_scale_coefficients(), time_transform(), and xterm_debug().

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

◆ stringify()

◆ sub() [1/2]

◆ sub() [2/2]

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

Returns new function — q = sum_i f[i].

References compress(), madness::FunctionFactory< T, NDIM >::compressed(), f, madness::WorldGopInterface::fence(), madness::Function< T, NDIM >::gaxpy(), and madness::World::gop.

Referenced by apply(), madness::Molecule::atomic_attraction_potential(), checksum_file(), do_adq(), Node::do_sum(), madness::FunctionImpl< T, LDIM >::dot_local(), madness::NuclearCorrelationFactor::U3_functor::eval(), madness::FunctionImpl< T, NDIM >::eval_cube(), madness::AtomicBasis::eval_guess_density(), madness::AtomicBasisSet::eval_guess_density(), madness::ContractedGaussianShell::eval_radial(), gauss_legendre_test(), madness::PNO::get_average_rank(), madness::WorldDCPmapInterface< keyT >::global_size(), madness::Nemo::hessian(), TTT::hugh(), madness::FunctionImpl< T, LDIM >::inner_local(), inner_result(), madness::WorldDCPmapInterface< keyT >::local_size(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::make_sum_coeffs(), madness::Molecule::molecular_core_potential(), mTxmT(), madness::SeparatedConvolution< double, 3 >::munorm2_ns(), mxmT(), mxmT_reference(), madness::Molecule::n_core_orb_all(), madness::FunctionImpl< T, NDIM >::nCoeff(), madness::FunctionImpl< T, NDIM >::nCoeff_local(), madness::FunctionImpl< T, NDIM >::norm_tree_op(), madness::ContractedGaussianShell::normalize(), madness::Molecule::nuclear_attraction_potential(), madness::Molecule::nuclear_dipole(), madness::Molecule::nuclear_repulsion_derivative(), madness::Molecule::nuclear_repulsion_energy(), madness::Molecule::nuclear_repulsion_second_derivative(), BoysLocalization::operator()(), Gaussian< T, NDIM >::operator()(), Gaussian< T, NDIM >::operator()(), HeElectronicChargeDensityIGuess< T, NDIM >::operator()(), HeNuclearChargeDensityIGuess< T, NDIM >::operator()(), madness::ComplexExp< NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_dot_local< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local< R >::operator()(), madness::GaussianNuclearDensityPotentialFunctor::operator()(), madness::NuclearDensityFunctor::operator()(), madness::SAPFunctor::operator()(), madness::WSTAtomicBasisFunctor::operator()(), MolecularGuessDensityFunctor::operator()(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line(), plot_line(), Calculation::plot_p(), madness::PNO::print_ranks(), madness::FunctionImpl< T, NDIM >::real_size(), madness::SDFEllipsoid::sdf(), madness::FunctionImpl< T, NDIM >::size(), madness::iterator< hashT, >::size(), madness::FunctionImpl< T, NDIM >::size_local(), testf(), madness::Molecule::total_nuclear_charge(), madness::FunctionImpl< T, NDIM >::trace_local(), and madness::FunctionImpl< T, NDIM >::tree_size().

◆ surface()

double madness::surface ( double d) const

Value of surface function at distance d normal to surface.

Parameters
[in]dThe signed distance
Returns
The value of the surface function

References d, epsilon, and mask.

Referenced by main(), SurfaceMoleculeInteraction::make_surfcharge(), and SurfaceMoleculeInteraction::perturbed_molecular_pot().

◆ survey_restart_sources()

RestartSources madness::survey_restart_sources ( World & world,
const std::string & prefix,
const bool nwfile_named )
inline

look at the disk: what restart data is there?

The existence tests run on rank 0 and are broadcast, so ranks cannot diverge on them. peek_restartdata() is collective by construction (the parallel archive broadcasts what it reads), so every rank passes through it together or none does.

References madness::WorldGopInterface::broadcast(), madness::World::gop, madness::RestartSources::meta, madness::RestartSources::nmo_alpha, madness::RestartSources::nwfile_named, peek_restartdata(), peek_restartdata_summary(), madness::World::rank(), madness::RestartSources::restartao_present, restartdata_exists(), and madness::RestartSources::restartdata_present.

Referenced by make_restart_plan().

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

References m.

◆ svd() [6/11]

template void madness::svd ( const Tensor< double > & a,
Tensor< double > & U,
Tensor< Tensor< double >::scalar_type > & s,
Tensor< double > & VT )

References a.

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

References a.

◆ svd() [8/11]

template void madness::svd ( const Tensor< float > & a,
Tensor< float > & U,
Tensor< Tensor< float >::scalar_type > & s,
Tensor< float > & VT )

References a.

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

References a.

◆ 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(), 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_from_nwchem(), madness::ConvolutionData1D< Q >::make_approx(), madness::RandomizedMatrixDecomposition< T >::make_SVD_decaying_matrix(), ortho3(), ortho5(), madness::SVDTensor< T >::recompute_from_range(), 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 )

References a.

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

References a.

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

References a.

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

References a.

◆ 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/3]

template<typename R, std::size_t MDIM>
void madness::swap ( Function< R, MDIM > & f1,
Function< R, MDIM > & f2 )

Referenced by main(), and random_perm().

◆ swap() [2/3]

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() [3/3]

template<typename T, std::size_t N>
void madness::swap ( Vector< T, N > & l,
Vector< T, N > & r )
constexpr

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

◆ swap_particles()

◆ syev() [1/4]

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

References e(), and V().

◆ syev() [2/4]

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

References e(), and V().

◆ 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(), canonical_orthonormalization_matrix(), madness::PNO::canonicalize(), madness::OEP::compute_and_print_final_energies(), compute_frequencies(), madness::OEP::compute_ocep_correction(), condition_number(), madness::Solver< T, NDIM >::csqrt(), madness::Localizer::determine_frozen_orbitals(), fixphases(), madness::population::iao_population(), madness::Solver< T, NDIM >::initial_guess(), madness::Zcis::make_guess(), madness::TDHF::make_guess_from_initial_diagonalization(), madness::population::matrix_power(), madness::QuasiNewton::new_search_direction(), QuasiNewton::new_search_direction(), madness::MolecularOptimizer::new_search_direction2(), madness::MolecularOptimizer::optimize_quasi_newton(), madness::Molecule::orient(), orth(), ortho3(), ortho5(), orthonormalize_symmetric(), orthonormalize_symmetric_matrix(), madness::PNO::pno_compress(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::population::projection_population(), madness::MolecularOptimizer::projector_external_dof(), projector_external_dof(), madness::OEP::solve(), madness::Solver< T, NDIM >::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 )

References e(), and V().

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

References e(), and V().

◆ 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(), doit(), MiniDFT::doit(), initial_guess(), madness::Solver< T, NDIM >::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()

◆ symbol_to_atomic_number()

◆ 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, GaussianConvolution1DCache< double >::map, 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_in()

template<class T>
Tensor< T > madness::tensor_in ( const nlohmann::json & j)
inline

◆ tensor_out()

template<class T>
nlohmann::json madness::tensor_out ( const Tensor< T > & t)
inline

◆ 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(), MADNESS_ASSERT, and R.

◆ 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 f, g, and 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()

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)

References a, aa, cholesky(), copy(), inner(), and my_conj_transpose().

Referenced by test_tensor_lapack().

◆ test_exchange()

◆ test_gelss()

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

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

Referenced by test_tensor_lapack().

◆ test_gesv()

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

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

Referenced by test_tensor_lapack().

◆ test_inverse()

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

Example and test code for interface to LAPACK SVD interfae.

References A(), inner(), inverse(), madness::Tensor< T >::normf(), and madness::BaseTensor::size().

Referenced by test_tensor_lapack().

◆ test_qr()

template<typename T>
double madness::test_qr ( )

◆ test_rnlij_rangelimited()

bool madness::test_rnlij_rangelimited ( const bool log_errors)

◆ test_rnlp()

bool madness::test_rnlp ( const bool log_errors)

References a, abs(), e(), exact, g, max, and pi.

Referenced by test_op().

◆ test_rnlp_rangelimited()

bool madness::test_rnlp_rangelimited ( const bool log_errors)

these do not include 2^{n/2} factor baked into the GaussianConvolution1D (via the multiscale adjustment of the normalization constant?)

these DO include 2^{n/2} factor baked into the GaussianConvolution1D

References a, abs(), e(), FunctionDefaults< NDIM >::k, g, max, p(), pi, pow(), and madness::GaussianConvolution1D< Q >::rnlp().

Referenced by test_op().

◆ test_rnlp_rangelimited_erf()

bool madness::test_rnlp_rangelimited_erf ( const bool log_errors)

these do not include 2^{n/2} factor baked into the GaussianConvolution1D (via the multiscale adjustment of the normalization constant?)

References a, abs(), g, max, p(), pi, pow(), and madness::GaussianConvolution1D< Q >::rnlp().

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, FunctionDefaults< NDIM >::k, m, and svd().

Referenced by test_tensor_lapack().

◆ test_syev()

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

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

Referenced by test_tensor_lapack().

◆ test_sygv()

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

References _(), a, b, e(), inner(), max, my_conj_transpose(), sygv(), and V().

Referenced by test_tensor_lapack().

◆ 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(), test_cholesky(), test_gelss(), test_gesv(), test_inverse(), test_qr(), test_rr_cholesky(), test_svd(), test_syev(), and test_sygv().

Referenced by main().

◆ test_two_scale_coefficients()

bool madness::test_two_scale_coefficients ( )

Test the two scale coefficients for orthogonality

References e(), FunctionDefaults< NDIM >::k, inner(), kmax, and two_scale_hg().

Referenced by startup().

◆ testf()

double madness::testf ( int n,
double x )
static

test function for gauss_legendre_test

References sum().

Referenced by gauss_legendre_test().

◆ thread_purge()

void madness::thread_purge ( )
inline

purges tasks from this thread (if any) so that it's safe to make blocking calls from it

Note
this is only needed for the Pthreads backend

References madness::ThreadPool::flush_prebuf(), madness::ThreadPool::instance(), is_madness_thread(), and MADNESS_ASSERT.

Referenced by madness::ThreadPool::await(), blocking_invoke(), and blocking_invoke_r().

◆ time_transform()

void madness::time_transform ( World & world,
int & mflopslo,
int & mflopshi )
static

◆ to_string() [1/4]

template<typename T = long>
std::string madness::to_string ( const DistributionType type)

◆ to_string() [2/4]

◆ to_string() [3/4]

std::string madness::to_string ( const RestartMode m)
inline

References ao, automatic, iterate, m, none, nwchem, and read_only.

◆ to_string() [4/4]

std::string madness::to_string ( const RestartSource s)
inline

References nwchem, restartao, and restartdata.

◆ transform() [1/6]

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/6]

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

◆ transform() [3/6]

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(), TENSOR_RESULT_TYPE, and madness::TensorTrain< T >::zero_rank.

◆ transform() [4/6]

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 = true )

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

◆ transform() [5/6]

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() [6/6]

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_CHECK, PROFILE_BLOCK, R, TENSOR_RESULT_TYPE, v, and zero_functions_compressed().

Referenced by madness::BSHApply< T, NDIM >::add_coupling_and_levelshift(), apply_BSH(), madness::CCPotentials::apply_f12_coupling(), madness::ExchangeCommutator::apply_KffK_lowrank_split_alpha(), madness::ExchangeCommutator::apply_KffK_lowrank_three_range(), madness::GTHPseudopotential< Q >::apply_potential(), madness::projector_irrep::apply_symmetry_operators(), madness::TDHF::canonicalize(), madness::Zcis::canonicalize(), madness::Znemo::canonicalize(), madness::SCF::canonicalize_virtuals(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, LDIM >::coeffs2values(), madness::FunctionImpl< T, LDIM >::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, LDIM >::do_binary_op(), madness::FunctionImpl< T, LDIM >::do_mul(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), doit(), MiniDFT::doit(), fixphases(), madness::Convolution1D< double_complex >::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(), initial_guess(), madness::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess_from_nwchem(), madness::OEP::iterate(), Calculation::load_mos(), madness::Localizer::localize(), madness::Nemo::localize(), main(), main(), mix(), mix(), madness::Convolution1D< double_complex >::mod_nonstandard(), madness::FunctionImpl< T, LDIM >::mul(), madness::Convolution1D< double_complex >::nonstandard(), madness::FunctionImpl< T, LDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), madness::Projector< T, NDIM >::operator()(), orth(), DF::orthogonalize_inplace(), madness::NemoBase::orthonormalize(), orthonormalize(), madness::SCF::orthonormalize(), madness::SCF::orthonormalize(), madness::Solver< T, NDIM >::orthonormalize(), orthonormalize_canonical(), orthonormalize_cd(), orthonormalize_rrcd(), orthonormalize_symmetric(), madness::SCF::pad_virtuals_from_guess(), pair_energy_weights(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::InitParameters::readnw(), madness::SCF::restart_aos(), madness::SCF::rotate_subspace(), madness::SCF::rotate_subspace(), madness::Znemo::rotate_subspace(), madness::Localizer::separate_core_valence(), madness::Nemo::solve(), madness::SCF::solve(), madness::Nemo::solve_cphf(), Test7(), test_transform(), madness::GenTensor< T >::transform, madness::Znemo::potentials::transform(), madness::PNO::transform_pairs(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2coeffs(), and madness::FunctionImpl< T, LDIM >::values2NScoeffs().

◆ 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:1108
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, LDIM >::apply_1d_realspace_push_op(), madness::Derivative< double, 1 >::do_diff2b(), madness::Derivative< double, 1 >::do_diff2i(), madness::GenTensor< T >::SliceLowRankTensor< T >, 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, TENSOR_RESULT_TYPE, v, and zero_functions().

Referenced by test_transform().

◆ truncate() [1/2]

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/2]

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.

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::ExchangeImpl(), madness::F12Potentials::F12Potentials(), madness::OperatorInfo::OperatorInfo(), madness::OperatorInfo::OperatorInfo(), SVPESolver::SVPESolver(), KPeriodicBSHOperator::apply(), madness::CCPairFunction< T, NDIM >::apply(), madness::SCF::apply_bsh_plain(), madness::SCF::apply_bsh_tiled(), madness::MP2::apply_exchange_vector(), madness::ExchangeCommutator::apply_KffK_6d(), madness::ExchangeCommutator::apply_KffK_lowrank_three_range(), madness::CCPotentials::apply_Kfxy(), 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::XCOperator< T, NDIM >::apply_tau_term(), madness::CCPotentials::apply_transformed_Ue(), madness::NuclearCorrelationFactor::apply_U(), apply_U_ncf(), madness::XCOperator< T, NDIM >::apply_xc_kernel(), Calculation::calc_optimal_coeffs(), madness::SCF::canonicalize_virtuals(), madness::Nemo::compute_all_cphf(), madness::CCPotentials::compute_cc2_excitation_energy(), madness::PNO::compute_CIS_potentials(), madness::OEP::compute_coulomb_potential(), madness::Nemo::compute_cphf_parallel_term(), madness::Znemo::compute_current_density(), compute_energy(), 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_impl(), 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::Coulomb< T, NDIM >::compute_potential(), madness::Zcis::compute_potentials(), madness::Znemo::compute_potentials(), Calculation::compute_residuals(), madness::Zcis::compute_residuals(), madness::Znemo::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_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(), doit(), MiniDFT::doit(), DF::exchange(), madness::CCPotentials::fock_residue_6d(), madness::CCPotentials::fock_residue_6d_macrotask(), 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::SCF::initial_guess(), madness::Solver< T, NDIM >::initial_guess(), madness::SCF::initial_guess_ao_eigenvectors(), madness::SCF::initial_guess_from_nwchem(), madness::PNO::initialize_pairs(), madness::CCPairFunction< T, NDIM >::inner_internal(), DF::iterate(), madness::OEP::iterate(), madness::Zcis::iterate(), madness::Znemo::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::CCPotentials::make_bra(), 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::CCPotentials::make_mo_bra(), madness::TDHF::make_mo_bra(), madness::CCPotentials::make_mo_ket(), madness::TDHF::make_mo_ket(), Calculation::make_reference(), madness::MP2::make_Uphi0(), Calculation::make_Upsi(), madness::XCOperator< T, NDIM >::make_xc_potential_impl(), madness::CCPotentials::make_xy_gf_ab(), MiniDFT::makeao(), makeao_slow(), madness::EigSolver< T, NDIM >::multi_solve(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::BSHApply< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::Coulomb< T, NDIM >::MacroTaskCoulomb::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::operator()(), madness::LocalPotentialOperator< T, NDIM >::operator()(), madness::Nuclear< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), 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::SCF::project(), madness::MolecularOrbitals< T, NDIM >::project_ao(), madness::SCF::project_ao_basis_only(), madness::projector_irrep::project_on_irreps(), madness::Znemo::read_real_guess(), madness::OEP::recompute_HF(), madness::Solver< T, NDIM >::reproject(), madness::NemoBase::reproject_mos(), madness::Coulomb< double, 3 >::reset_poisson_operator_ptr(), madness::SCF::restart_aos(), madness::Nemo::solve(), madness::SCF::solve(), madness::Solver< T, NDIM >::solve(), SVPESolver::solve(), madness::MP2::solve_coupled_equations(), madness::Nemo::solve_cphf(), madness::CC2::solve_mp2_coupled(), madness::MP2::solve_residual_equations(), madness::CCPotentials::test(), test(), test(), test_diagnose_GQKffK(), madness::CCPotentials::test_singles_potential(), test_weighted_bra_exchange(), test_XCOperator_matrix(), madness::PNO::transform_pairs(), truncate(), madness::PNO::truncate_pairs(), madness::SCF::twoint(), MiniDFT::update(), update(), update(), madness::CCConvolutionOperator< T, NDIM >::update_elements(), madness::Solver< T, NDIM >::update_orbitals(), madness::PNO::update_pno(), madness::Nemo::value(), and madness::XCOperator< T, NDIM >::weak_xc_terms().

◆ 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 FunctionDefaults< NDIM >::k, and madness::TensorTrain< T >::get_core().

◆ 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(), FunctionDefaults< NDIM >::k, g0(), g1(), 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 ( 0 ,
int ,
false ,
true ,
int ,
double  )

◆ TYPEINFO() [2/6]

madness::TYPEINFO ( 1 ,
long ,
false ,
true ,
long ,
double  )

◆ TYPEINFO() [3/6]

madness::TYPEINFO ( 2 ,
float ,
false ,
true ,
float ,
float  )

◆ TYPEINFO() [4/6]

madness::TYPEINFO ( 3 ,
double ,
false ,
true ,
double ,
double  )

◆ TYPEINFO() [5/6]

madness::TYPEINFO ( 4 ,
float_complex ,
true ,
true ,
float ,
float  )

◆ TYPEINFO() [6/6]

madness::TYPEINFO ( 5 ,
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 madness::Function< T, NDIM >::fence(), func(), op(), and madness::Function< T, NDIM >::unary_op_coeffs().

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

◆ unary_tuple_loop()

template<typename tupleT, typename opT, std::size_t I = 0>
void madness::unary_tuple_loop ( tupleT & tuple,
opT & op )
static

◆ unique_fileid()

std::string madness::unique_fileid ( )

creates a unique filename, using PBS ID if available

References RandomValue< int >().

Referenced by test_lowrank_function().

◆ unitfunctor()

template<std::size_t NDIM>
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 )
constexpr

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

◆ user_to_sim()

◆ validate_distribution_type()

◆ vec()

template<typename T, typename... Ts>
Vector< T, sizeof...(Ts)+1 > madness::vec ( T t,
Ts... ts )
inlineconstexpr

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
constexpr Vector< T, sizeof...(Ts)+1 > vec(T t, Ts... ts)
Factory function for creating a madness::Vector.
Definition vector.h:750

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.

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(), CosineSphere::check_pts(), InhomoConstantSphere::check_pts(), Y20Sphere::check_pts(), madness::Localizer::determine_frozen_orbitals(), Ebar(), madness::MacroTaskInfo::from_vector_of_strings(), 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(), test_consolidate_vs_direct(), and madness::FunctionImpl< T, NDIM >::tnorm().

◆ vector_factory() [1/8]

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

left and right must be in redundant state, with tree norms available.

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

Referenced by matrix_mul_sparse(), mul(), 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::CCTimer::CCTimer(), madness::Cloud::cloudtimer::cloudtimer(), madness::MetaDataResults::MetaDataResults(), madness::Znemo::timer::timer(), madness::Cloud::cloudtimer::~cloudtimer(), madness::SRConf< T >::add_SVD(), apply(), madness::SCF::apply_bsh_macrotask(), chin_chen(), chin_chen(), madness::WorldProfile::clear(), madness::Nemo::compute_all_cphf(), madness::CC2::compute_cc2_energy(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_diagonal_batch_in_symmetric_matrix(), compute_energy(), compute_energy(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::SVDTensor< T >::compute_randomized_svd(), converge(), converge(), converge2s(), madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), cpu_frequency(), cycle_count(), madness::Cloud::deserialize_batch_p2p(), madness::ExchangeCommutator::diagnose_GKffK(), madness::ExchangeCommutator::diagnose_GQKffK(), madness::ExchangeCommutator::diagnose_KffK(), doit(), doplot(), madness::Znemo::timer::end(), END_TIMER(), END_TIMER(), END_TIMER(), END_TIMER(), madness::MP2::END_TIMER(), madness::Solver< T, NDIM >::END_TIMER(), DF::end_timer(), GygiPot::ESP(), madness::MacroTaskQ::execute_tasks(), madness::FunctionImpl< T, NDIM >::finalize_apply(), DF::get_times(), madness::Nemo::hessian(), madness::MP2::increment(), madness::SCFProtocol::initialize(), madness::World::initialize, madness::timer::interrupt(), iterate(), iterate(), madness::OEP::iterate(), madness::Zcis::iterate(), madness::Znemo::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(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::operator()(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::operator()(), ortho3(), ortho5(), madness::WorldProfile::print(), madness::CCPairFunction< T, NDIM >::print_size(), madness::FunctionImpl< T, NDIM >::print_size(), print_stats(), print_stats(), print_stats(), madness::FunctionImpl< Q, NDIM >::project(), propagate(), propagate(), madness::timer::resume(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeRow::row_fetch_compute(), madness::MacroTask< taskT >::MacroTaskInternal::run(), madness::population::PopulationAnalysis::run(), madness::MacroTaskQ::run_all(), run_one(), run_real_mo(), run_tests(), madness::CC2::solve(), madness::Nemo::solve(), madness::SCF::solve(), solve(), SVPESolver::solve(), madness::CC2::solve_cc2(), madness::MP2::solve_coupled_equations(), madness::CC2::solve_lrcc2(), madness::CC2::solve_mp2_coupled(), madness::MP2::solve_residual_equations(), madness::CCTimer::start(), madness::MyTimer::start(), madness::profiling::TaskEvent::start(), madness::MP2::START_TIMER(), madness::Solver< T, NDIM >::START_TIMER(), START_TIMER(), START_TIMER(), START_TIMER(), START_TIMER(), DF::start_timer(), madness::CCTimer::stop(), madness::MetaDataResults::stop(), madness::MyTimer::stop(), madness::profiling::TaskEvent::stop(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::PoolTaskInterface::submit(), madness::Znemo::timer::tag(), madness::TDHF::test(), test(), test2(), test_adaptive_tree(), test_florian(), test_modified(), test_stuff(), test_Vphi_ij_u(), madness::MetaDataResults::to_json(), madness::FunctionImpl< Q, NDIM >::truncate_tol(), 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_df_restart_version()

template<typename Archive>
void madness::write_df_restart_version ( const Archive & ar)

Writes the current DF restart format version as the first datum in the archive.

References DF_RESTART_VERSION.

Referenced by DF::saveDF(), and TEST().

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

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

◆ zero_functions_auto_tree_state()

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

◆ 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, and zero_functions_tree_state().

Referenced by Spinor::Spinor(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::accumulate_locally(), madness::Coulomb< T, NDIM >::MacroTaskCoulomb::allocator(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeRow::allocator(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::allocator(), madness::LRFunctorF12< T, NDIM, LDIM >::MacroTaskLRFInner::allocator(), MicroTask2::allocator(), MixedTupleTask< elementT, elementR >::allocator(), TupleTask::allocator(), madness::CCPairFunction< T, NDIM >::apply(), madness::SCF::apply_bsh_macrotask(), madness::Diamagnetic_potential_factor::apply_potential(), madness::projector_irrep::apply_symmetry_operators(), madness::XCOperator< T, NDIM >::apply_tau_term(), madness::Zcis::compare_to_file(), madness::Znemo::compute_current_density(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_diagonal_batch_in_symmetric_matrix(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), madness::Nemo::compute_nemo_potentials_impl(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::Zcis::compute_potentials(), madness::PotentialManager::core_projection(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), exchange_anchor_test(), exchange_anchor_test(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::K_small_memory(), madness::SCF::kain_combine(), madness::Nemo::make_cphf_constant_term(), madness::Zcis::make_guess(), Calculation::make_reference(), makeao(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::operator()(), madness::Fock< T, NDIM >::operator()(), madness::LRFunctorF12< T, NDIM, LDIM >::MacroTaskLRFInner::operator()(), madness::MacroTaskConstantPart::operator()(), madness::MacroTaskIteratePair::operator()(), madness::projector_irrep::project_on_irreps(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeRow::row(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeRow::row_fetch_compute(), madness::TDHF::transform(), transform(), transform(), transform(), madness::Zcis::transform(), madness::Subspace< T, NDIM >::update_subspace(), madness::SubspaceK< T, NDIM >::update_subspace(), and madness::XCOperator< T, NDIM >::weak_xc_terms().

◆ zero_functions_tree_state()

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

Variable Documentation

◆ ___

◆ _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

◆ BSH_TIGHT_THRESH

double madness::BSH_TIGHT_THRESH = 1.0e-7
staticconstexpr

loose/tight divide of the bsh_apply dispatch: at thresh <= this, auto switches to the memory-conservative macrotask configuration (one orbital per task).

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

◆ 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

◆ CubicInterpolationTable< T >::min_npts_per_task_default

template<typename T>
int madness::CubicInterpolationTable< T >::min_npts_per_task_default = 1024

◆ 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

◆ default_random_generator

◆ DF_RESTART_VERSION

unsigned int madness::DF_RESTART_VERSION = 1
inlineconstexpr

Format version for DFdriver restart archives.

Earlier archives carry no version field, and this code rejects them. The read goes through the type cookie that the BinaryFstream archives write.

Current Version: 0) DF restart format version (unsigned int) 1) Total energy (double) 2) Krestricted (boolean) 3) closed_shell (boolean) 4) number of occupied orbitals (unsigned int) 5) orbital energies (vector of doubles) 6) box size (double) 7) wavelet order (int) 8) molecule (molecule) 9) occupied orbitals as complex functions

Note
v1 introduced format version

Referenced by require_supported_df_restart(), TEST(), TEST(), TEST(), and write_df_restart_version().

◆ dir

◆ DomainMaskSDFFunctor< NDIM >::DMASK

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::DMASK = 3

◆ DomainMaskSDFFunctor< NDIM >::DSURFACE

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::DSURFACE = 5

◆ DomainMaskSDFFunctor< NDIM >::MASK

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::MASK = 1

◆ DomainMaskSDFFunctor< NDIM >::MASK_COMPLEMENT

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::MASK_COMPLEMENT = 2

◆ DomainMaskSDFFunctor< NDIM >::SURFACE

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::SURFACE = 4

◆ 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)
NDIM & f
Definition mra.h:2817
NDIM const Function< R, NDIM > & g
Definition mra.h:2817
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)
Definition ccpairfunction.h:1007

Referenced by madness::accumulate_op< T, NDIM >::accumulate_op(), madness::CCPair::CCPair(), madness::CCPairFunction< T, NDIM >::CCPairFunction(), madness::CISData::CISData(), madness::CubicInterpolationTable< T >::CubicInterpolationTable(), madness::CubicInterpolationTable< T >::CubicInterpolationTable(), madness::CubicInterpolationTable< T >::CubicInterpolationTable(), madness::FunctionImpl< T, NDIM >::do_inner_ext_local_ffi::do_inner_ext_local_ffi(), madness::guessfactory::ExopUnaryOpStructure::ExopUnaryOpStructure(), madness::Function< double, 3 >::Function(), FunctionIOData< T, NDIM >::FunctionIOData(), madness::GFit< T, NDIM >::GFit(), madness::insert_op< T, NDIM >::insert_op(), madness::MadnessException::MadnessException(), Oscillatory< NDIM >::Oscillatory(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::ThreshGuard::ThreshGuard(), madness::TwoBodyFunctionPureComponent< T, NDIM >::TwoBodyFunctionPureComponent(), madness::TwoBodyFunctionPureComponent< T, NDIM >::TwoBodyFunctionPureComponent(), abs(), abs_square(), DirichletCondIntOp::action(), madness::MemoryMeasurer::add_memory_to_map(), madness::FutureImpl< T >::add_to_assignments(), madness::LoadBalanceDeux< NDIM >::add_tree(), madness::WorldObject< DerivativeBase< T, NDIM > >::am_arg(), madness::WorldTaskQueue::am_arg(), LProjector::analyze(), ExactSpinor::angular(), apply(), apply(), apply(), apply(), apply(), apply(), madness::FunctionImpl< T, LDIM >::apply(), apply_1d_realspace_push(), madness::FunctionImpl< T, LDIM >::apply_1d_realspace_push(), madness::MP2::apply_exchange(), madness::CCPotentials::apply_gf(), madness::Solver< T, NDIM >::apply_hf_exchange(), apply_only(), madness::guessfactory::apply_polynomial_exop(), madness::guessfactory::apply_polynomial_exop(), madness::CCPotentials::apply_projector(), madness::CCPotentials::apply_Q12t(), madness::CCPotentials::apply_Qt(), madness::CCPotentials::apply_Qt(), madness::FunctionImpl< T, LDIM >::apply_source_driven(), madness::SeparatedConvolution< double, 3 >::apply_transformation(), madness::SeparatedConvolution< double, 3 >::apply_transformation2(), madness::SeparatedConvolution< double, 3 >::apply_transformation3(), madness::guessfactory::apply_trigonometric_exop(), madness::guessfactory::apply_trigonometric_exop(), madness::MP2::asymmetry(), blocking_invoke(), blocking_invoke_r(), c_rks_vwn5__(), c_uks_vwn5__(), change_tree_state(), change_tree_state(), madness::Specialbox_op< T, NDIM >::check_special_points(), clear_halo(), coalesced_gaxpy(), madness::guessfactory::compute_centroid(), madness::Localizer::compute_core_valence_separation_transformation_matrix(), madness::max_of_x_1_smooth::compute_factor(), madness::MP2::compute_gQf(), madness::MP2::compute_gQf_cc2interface(), conj(), convert(), copy(), copy(), copy(), madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), FunctionIOData< T, NDIM >::create_function(), 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(), madness::FunctionImpl< T, LDIM >::diff(), madness::Function< double, 3 >::dirac_convolution(), madness::CCPairFunction< T, NDIM >::dirac_convolution_decomposed(), madness::FunctionImpl< T, LDIM >::dirac_convolution_op(), madness::DerivativeBase< T, NDIM >::do_diff1(), madness::FunctionImpl< T, NDIM >::do_diff1(), madness::FunctionImpl< T, LDIM >::do_diff1(), madness::Derivative< double, 1 >::do_diff2b(), madness::DerivativeBase< T, NDIM >::do_diff2b(), madness::Derivative< double, 1 >::do_diff2i(), madness::DerivativeBase< T, NDIM >::do_diff2i(), madness::FunctionImpl< T, LDIM >::do_dirac_convolution(), Plotter::dolineplot(), Plotter::dolineplot(), Plotter::doplot1(), Plotter::dovolumeplot(), Plotter::dovolumeplot(), dxprintvalue(), dxprintvalue(), madness::CubicInterpolationTable< T >::err(), madness::XCfunctional::exc(), exchange_batch_salt(), fcube(), fcube(), fcube(), madness::FunctionImpl< T, NDIM >::fcube(), madness::FunctionImpl< T, NDIM >::fcube(), madness::FunctionImpl< T, LDIM >::fcube(), madness::FunctionImpl< T, LDIM >::fcube(), madness::DistributedMatrix< double >::fill(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_const_failure_handler(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_const_success_handler(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_failure_handler(), madness::DerivativeBase< T, NDIM >::find_neighbor(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_success_handler(), madness::DerivativeBase< T, NDIM >::forward_do_diff1(), madness::FunctionImpl< T, NDIM >::forward_do_diff1(), madness::FunctionImpl< T, LDIM >::forward_do_diff1(), madness::FutureImpl< T >::Future< T >, madness::smooth< T, NDIM >::gaussian_smoothing(), madness::Function< double, 3 >::gaxpy_ext(), madness::FunctionImpl< T, LDIM >::gaxpy_ext(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_node(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), madness::FunctionImpl< T, NDIM >::gaxpy_oop_reconstructed(), madness::FunctionImpl< T, LDIM >::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(), get_size_local(), get_tree_state(), get_tree_state(), 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::LowRankFunctionFactory< T, NDIM, LDIM >::harmonic_basis(), madness::CC_vecfunction::hash(), madness::CCIntermediatePotentials::hash_value, madness::CCPairFunction< T, NDIM >::hash_value, madness::LowRankFunction< T, NDIM, LDIM >::hash_value, madness::Znemo::hcore_guess(), FunctionIOData< T, NDIM >::initialize_func_coeffs(), inner(), inner(), inner(), inner(), inner(), inner(), inner(), inner(), madness::LRFunctorF12< T, NDIM, LDIM >::inner(), madness::Zcis::root::inner, madness::Function< double, 3 >::inner_adaptive(), inner_adaptive(), madness::FunctionImpl< T, LDIM >::inner_adaptive_local(), madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive(), madness::Function< double, 3 >::inner_ext(), madness::Function< double, 3 >::inner_ext_local(), madness::FunctionImpl< T, LDIM >::inner_ext_local(), madness::FunctionImpl< T, LDIM >::inner_ext_node(), madness::FunctionImpl< T, LDIM >::inner_ext_recursive(), innerXX(), innerXX(), madness::Molecule::GeometryParameters::input_tag(), madness::CC_vecfunction::insert(), madness::CCIntermediatePotentials::insert(), madness::MP2::iterate(), madness::Zcis::iterate(), line_plot(), madness::archive::ArchiveLoadImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >::load(), madness::archive::ArchiveLoadImpl< Archive, Future< void > >::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(), EmbeddedDirichlet::load_balance(), load_balance(), load_balance(), madness::LoadBalanceDeux< NDIM >::load_balance(), madness::CCPairBuilder::load_function(), madness::CCPotentials::load_function(), load_function(), madness::MP2::load_function(), madness::Nemo::load_function(), main(), main(), madness::CCPotentials::make_6D_pair(), madness::smooth< T, NDIM >::make_explog(), madness::Nemo::make_plots(), madness::smooth< T, NDIM >::make_plots(), madness::XCOperator< T, NDIM >::make_u1_functors(), madness::Function< double, 3 >::map_and_mirror(), madness::FunctionImpl< T, NDIM >::map_and_mirror(), madness::FunctionImpl< T, LDIM >::map_and_mirror(), map_and_mirror(), madness::Function< double, 3 >::mapdim(), madness::FunctionImpl< T, NDIM >::mapdim(), madness::FunctionImpl< T, LDIM >::mapdim(), mapdim(), matrix_dot(), matrix_dot(), matrix_dot_old(), matrix_inner(), matrix_inner(), matrix_inner(), matrix_inner_old(), matrix_mul_sparse(), madness::population::matrix_power(), madness::smooth< T, NDIM >::merge_functions(), madness::smooth< T, NDIM >::merge_functions(), madness::Function< double, 3 >::mirror(), madness::FunctionImpl< T, NDIM >::mirror(), madness::FunctionImpl< T, LDIM >::mirror(), mirror(), mul(), mul(), madness::Function< double, 3 >::mul_on_demand(), madness::CCPairFunction< T, NDIM >::multiply, madness::CCPairFunction< T, NDIM >::multiply, madness::FunctionImpl< T, LDIM >::multiply(), multiply(), multiply(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::SeparatedConvolution< double, 3 >::muopxv_fast(), madness::SeparatedConvolution< double, 3 >::muopxv_fast2(), madness::ContractedGaussianShell::normalize(), op(), function_allocator< T, NDIM >::operator()(), LProjector::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::CCConvolutionOperator< T, NDIM >::operator()(), madness::CCIntermediatePotentials::operator()(), madness::CCIntermediatePotentials::operator()(), madness::DerivativeBase< T, NDIM >::operator()(), madness::ElectronCuspyBox_op< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::true_refine_test::operator()(), madness::GenericConvolution1D< Q, opT >::Shmoo::operator()(), madness::merging_operator::operator()(), madness::munging_operator::operator()(), madness::NuclearCuspyBox_op< T, NDIM >::operator()(), madness::pg_operator::operator()(), madness::Projector< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::QProjector< T, NDIM >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::SeparatedConvolution< double, 3 >::operator()(), madness::Specialbox_op< T, NDIM >::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::xc_lda_potential::operator()(), madness::CCPairFunction< T, NDIM >::operator*, madness::CCPairFunction< T, NDIM >::operator*, madness::CCPairFunction< T, NDIM >::operator*, operator*(), operator*(), operator+(), operator+(), operator-(), operator-(), madness::FutureImpl< void >::operator<<, operator<<(), madness::Function< double, 3 >::operator=(), madness::LowRankFunction< T, NDIM, LDIM >::operator=(), madness::TDHF::oscillator_strength_length(), madness::TDHF::oscillator_strength_velocity(), madness::FunctionImpl< T, NDIM >::parent_to_child_NS(), madness::CCPairFunction< T, NDIM >::partial_inner(), partial_mul(), madness::CC2::plot(), madness::CCPotentials::plot(), madness::CCPotentials::plot(), madness::XCfunctional::plot(), plot_along(), plot_along(), plot_cubefile(), plot_line(), 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(), Calculation::plot_z(), plotdx(), plotpovray(), plotvtk_begin(), plotvtk_data(), plotvtk_data(), plotvtk_end(), madness::DQueue< T >::pop_front(), position_stream(), position_stream_at_coordinates(), madness::Molecule::position_stream_in_library(), position_stream_to_word(), madness::CCIntermediatePotentials::potential_exists(), madness::XCOperator< T, NDIM >::prep_xc_args(), madness::trajectory< NDIM >::print_psdot(), madness::CCPotentials::print_size(), print_tree_jsonfile(), madness::TDHF::print_xfunctions(), printfunc(), madness::CCPairFunction< T, NDIM >::project_out(), madness::FunctionImpl< T, LDIM >::project_out2(), madness::CCPairFunction< T, NDIM >::project_out_decomposed(), madness::CCPairFunction< T, NDIM >::project_out_op_decomposed(), madness::DiagnosticMatrix< T, NDIM >::project_xy(), ExactSpinor::psivalue(), 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(), CalculationParameters::read_file(), madness::DFParameters::read_file(), madness::ElectronicStructureParams::read_file(), madness::Molecule::read_file(), madness::Derivative< double, 1 >::read_from_file(), FunctionIO< double, D >::read_function(), read_function(), madness::QCCalculationParametersBase::read_input(), madness::QCCalculationParametersBase::read_internal(), madness::Molecule::read_structure_from_library(), madness::Molecule::read_xyz(), madness::CCPair::reconstruct(), madness::detail::reconstruct_for_norm(), redistribute_to_batches(), refine(), madness::FutureImpl< T >::replace_with(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeRow::row_fetch_compute(), save(), madness::MP2::save_function(), madness::Nemo::save_function(), save_function(), madness::FunctionImpl< T, LDIM >::scale_oop(), madness::DQueue< T >::scan(), madness::detail::DistCache< keyT >::set_cache_value(), madness::Molecule::GeometryParameters::set_derived_values(), FunctionIOData< T, NDIM >::set_function_coeffs(), madness::Function< double, 3 >::set_impl(), Calculation::set_protocol(), madness::SCF::set_protocol(), madness::LRFunctorF12< T, NDIM, LDIM >::set_thresh(), madness::ConditionVariable::signal(), madness::Nemo::smoothen(), madness::SCF::solve(), square(), madness::DerivativeBase< T, NDIM >::stage_halo(), stage_halo(), madness::archive::ArchiveStoreImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >::store(), madness::archive::ArchiveStoreImpl< Archive, Future< void > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< archiveT >, CCPairFunction< T, NDIM > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< archiveT >, Function< T, NDIM > >::store(), madness::DerivativeBase< T, NDIM >::submit_diff_tasks(), sum(), madness::CCPotentials::swap_particles(), madness::CCPotentials::swap_particles(), swap_particles(), symmetrize(), madness::TDHF::symmetrize(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), madness::CCPotentials::test(), madness::Random::test(), test(), Test5(), Test6(), Test6a(), madness::smooth< T, NDIM >::test_1d(), test_bad_input(), test_basic(), test_cross(), test_dot(), test_fock(), test_inner(), test_integration(), madness::Znemo::test_landau_wave_function(), test_math(), test_matrix_mul_sparse(), test_multi_to_multi_op(), test_orthonormalize_canonical(), test_orthonormalize_symmetric(), test_per(), madness::Solver< T, NDIM >::test_periodicity(), test_qm(), test_rot(), test_transform(), test_xc2(), testbsh(), testNavierStokes(), madness::Function< double, 3 >::unaryop(), madness::MutexFair::unlock(), madness::KernelRange::Restrictor::value(), madness::XCfunctional::vxc(), 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(), DF::DF(), inputfile::inputfile(), madness::io_redirect::io_redirect(), madness::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(), bind_function_type(), checksum_file(), cubefile_header(), do_plot(), madness::FunctionImpl< T, NDIM >::do_print_grid(), madness::FunctionImpl< T, LDIM >::do_print_grid(), madness::FunctionImpl< T, NDIM >::do_print_plane(), madness::FunctionImpl< T, LDIM >::do_print_plane(), draw_circle(), draw_line(), madness::archive::BaseParallelArchive< localarchiveT >::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(), DF::make_density_lineplots(), DF::make_fermi_potential(), madness::archive::BaseParallelArchive< localarchiveT >::open(), madness::archive::BinaryFstreamInputArchive::open(), madness::archive::BinaryFstreamOutputArchive::open(), madness::archive::TextFstreamInputArchive::open(), madness::archive::TextFstreamOutputArchive::open(), peek_restartdata(), peek_restartdata_summary(), plot(), Spinor::plot(), plot_along(), plot_along(), plot_cubefile(), plot_line(), 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_data(), plotvtk_end(), madness::MolecularOrbitals< T, NDIM >::print_cubefiles(), madness::FunctionImpl< T, NDIM >::print_grid(), madness::FunctionImpl< T, LDIM >::print_grid(), print_meminfo(), print_meminfo_ostream(), madness::FunctionImpl< T, NDIM >::print_plane(), madness::FunctionImpl< T, LDIM >::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(), CalculationParameters::read_file(), madness::AtomicBasisSet::read_file(), madness::DFParameters::read_file(), madness::ElectronicStructureParams::read_file(), madness::Molecule::read_file(), MolecularEntity::read_file(), madness::Derivative< double, 1 >::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< localarchiveT >::remove(), madness::commandlineparser::remove_extension(), restartdata_exists(), save(), madness::CC_vecfunction::save_restartdata(), madness::MolecularOrbitals< T, NDIM >::save_restartdata(), madness::Derivative< double, 1 >::set_ble1(), madness::Derivative< double, 1 >::set_ble2(), madness::Derivative< double, 1 >::set_bspline1(), madness::Derivative< double, 1 >::set_bspline2(), madness::Derivative< double, 1 >::set_bspline3(), solve(), madness::TDHF::solve_cis(), madness::CC2::solve_lrcc2(), test_adaptive_tree(), test_smooth_maxout(), testNavierStokes(), madness::gridbase::visualize(), and write_test_input().

◆ FUNCTION_ARCHIVE_MAGIC

long madness::FUNCTION_ARCHIVE_MAGIC = 7776770
staticconstexpr

Header magic for Function::store/load; bump whenever FunctionNode::serialize changes. 7776769 original (Mellow Mushroom Pizza tel.# in Knoxville, +1 for cell in header) 7776770 FunctionNode gained _dnorm_tree

Referenced by madness::Function< double, 3 >::load(), and madness::Function< double, 3 >::store().

◆ FunctionCommonData< T, NDIM >::data

◆ FunctionDefaults< NDIM >::apply_randomize

template<std::size_t NDIM>
bool madness::FunctionDefaults< NDIM >::apply_randomize = false

◆ FunctionDefaults< NDIM >::autorefine

template<std::size_t NDIM>
bool madness::FunctionDefaults< NDIM >::autorefine = true

◆ FunctionDefaults< NDIM >::bc

◆ FunctionDefaults< NDIM >::cell

◆ FunctionDefaults< NDIM >::cell_geometric_mean_width

template<std::size_t NDIM>
double madness::FunctionDefaults< NDIM >::cell_geometric_mean_width = 1.

◆ FunctionDefaults< NDIM >::cell_min_width

template<std::size_t NDIM>
double madness::FunctionDefaults< NDIM >::cell_min_width = 1.

◆ FunctionDefaults< NDIM >::cell_volume

template<std::size_t NDIM>
double madness::FunctionDefaults< NDIM >::cell_volume = 1.

◆ FunctionDefaults< NDIM >::cell_width

◆ FunctionDefaults< NDIM >::debug

◆ FunctionDefaults< NDIM >::initial_level

◆ FunctionDefaults< NDIM >::k

template<std::size_t NDIM>
int madness::FunctionDefaults< NDIM >::k = 6

Referenced by madness::BandlimitedPropagator::BandlimitedPropagator(), madness::ConvolutionData1D< Q >::ConvolutionData1D(), madness::FunctionCommonFunctionality< T, NDIM >::FunctionCommonFunctionality(), madness::GenTensor< T >::GenTensor(), HO_function< NDIM >::HO_function(), madness::MP2::add_local_coupling(), madness::nemo_u1_functors::append(), apply(), madness::CCPotentials::apply_Kfxy(), assign_cost_aware(), autoc(), BSHOperator(), BSHOperator3D(), BSHOperatorPtr(), BSHOperatorPtr3D(), madness::SCF::canonicalize_virtuals(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::check_redundant(), madness::CCPotentials::compute_cis_expectation_value(), madness::PNO::compute_cispd_correction_gs(), madness::CCPotentials::compute_cispd_energy(), madness::PNO::compute_cispd_f12_correction_gs(), madness::PNO::compute_cispd_fluctuation_matrix(), madness::CCPotentials::compute_excited_pair_energy(), madness::F12Potentials::compute_fQg_integral(), madness::MP2::compute_gQf(), madness::CCPotentials::compute_kinetic_energy(), madness::CC2::compute_local_coupling(), 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_klmn(), madness::MP3::compute_mp3_klmn(), madness::MP3::compute_mp3_klmn_fast(), madness::SRConf< T >::copy_slice(), CoulombOperator(), CoulombOperatorPtr(), madness::TensorTrain< T >::decompose(), BoysLocalization::DIP(), madness::Localizer::DIP(), madness::SRConf< T >::emul(), madness::TensorTrain< T >::emul(), madness::NuclearCorrelationFactor::U2_functor::eval(), exch_write_cost_matrix(), exchange_anchor_test(), exchange_batch_record_key(), exchange_batch_salt(), F2GOperator(), F2GOperatorPtr(), fcube(), FGOperator(), FGOperatorPtr(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::finalize_chunk_entries(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::forward_ctor(), free_space_derivative(), madness::BandlimitedPropagator::g0_filtered(), gauss_legendre_numeric(), GaussOperator(), GaussOperatorPtr(), madness::TensorTrain< T >::gaxpy(), madness::TensorTrain< T >::gaxpy(), madness::cblas::gemm(), madness::cblas::gemm(), madness::cblas::gemm(), madness::cblas::gemm(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::generate_multi_indices(), madness::Solver< T, NDIM >::genkmesh(), madness::GaussianConvolution1DCache< Q >::get(), madness::TDHF::get_tda_potential(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), GradBSHOperator(), GradCoulombOperator(), gradient_operator(), GradSlaterOperator(), madness::BasisFunctions::guess_contracted_virtuals_from_file(), madness::MP2::guess_mp1_3(), madness::CCPair::info(), madness::PNO::iterate_pairs_internal(), jacobi(), madness::MP2::K(), TestSystolicMatrixAlgorithm< T >::kernel(), legendre_scaling_functions(), load_coeffs(), Calculation::load_mos(), madness::SCF::load_mos(), madness::Solver< T, NDIM >::load_orbitals(), madness::Localizer::localize_cholesky(), lq_result(), madness::guessfactory::make_auto_polynom_strings(), madness::EigSolver< T, NDIM >::make_bsh_operators(), madness::SCF::make_fock_matrix(), madness::Solver< T, NDIM >::make_kinetic_matrix(), madness::TDHF::make_overlap_matrix(), madness::TDHF::make_perturbed_fock_matrix(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::make_redundant(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::make_term_ket(), AnsatzBase::make_vbra(), madness::Solver< T, NDIM >::matrix_exponential(), madness::population::matrix_power(), madness::Molecule::moment_of_inertia(), mTxm(), mTxm_reference(), mTxmq_reference(), mTxmT(), mTxmT_reference(), mxm(), mxm_reference(), mxmT(), mxmT_reference(), madness::NemoBase::need_recompute_factors_and_potentials(), madness::density_mask_operator::operator()(), madness::NuclearDensityFunctor::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::Tensor< double >::operator()(), madness::WSTAtomicBasisFunctor::operator()(), MolecularGuessDensityFunctor::operator()(), wstFunctor< Q >::operator()(), orgqr(), madness::Molecule::orient(), outer(), madness::SCF::output_scf_info_schema(), periodic_derivative(), PeriodicBSHOp(), PeriodicBSHOperator3D(), PeriodicBSHOperatorPtr3D(), PeriodicBSHOpPtr(), PeriodicCoulombOp(), PeriodicCoulombOpPtr(), PeriodicHFExchangeOperator(), PeriodicHFExchangeOperatorPtr(), madness::CCPotentials::plot(), plot_cubefile(), madness::PNO::pno_compress(), madness::MolecularOrbitals< T, NDIM >::post_process_mos(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::prepare_owner_assignment(), madness::BasisFunctions::print_contracted_basis(), Spinor::print_norms(), project(), madness::DiagnosticMatrix< T, NDIM >::project_xy(), madness::DiagnosticMatrix< T, NDIM >::project_xy(), qm_1d_free_particle_propagator(), qm_free_particle_propagator(), qm_free_particle_propagatorPtr(), read_data(), read_twoscale(), readmat(), madness::GTHPseudopotential< Q >::reproject(), madness::NemoBase::reproject_mos(), madness::ProjRLMFunctor::screened(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::sd_norm_pair_sum(), madness::Solver< T, NDIM >::set_occs2(), Calculation::set_protocol(), madness::Nemo::set_protocol(), madness::SCF::set_protocol(), madness::SRConf< T >::set_size_and_dim(), madness::apply_kernel_helper::slater_apply(), SlaterF12Operator(), SlaterF12OperatorPtr(), SlaterF12OperatorPtr_ND(), SlaterF12sqOperator(), SlaterF12sqOperatorPtr(), SlaterOperator(), SlaterOperatorPtr(), SlaterOperatorPtr_ND(), madness::Nemo::smoothen(), SmoothingOperator(), SmoothingOperator3D(), madness::CC2::solve(), madness::EigSolver< T, NDIM >::solve(), madness::SpectralPropagator::solve(), madness::Displacements< NDIM >::sort_displacements(), madness::Displacements< NDIM >::sort_displacements_images(), madness::Displacements< NDIM >::sort_displacements_periodic(), madness::SpectralPropagator::step(), madness::SpectralPropagatorGaussLobatto::step(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::store_batches(), madness::PNO::t_solve(), test_rnlij_rangelimited(), test_rnlp_rangelimited(), test_svd(), test_two_scale_coefficients(), madness::TDHF::transform(), madness::PNO::transform_pairs(), madness::TensorTrain< T >::truncate(), tt_identity(), two_scale_coefficients(), two_scale_hg(), madness::CCConvolutionOperator< T, NDIM >::update_elements(), and madness::PNO::update_pno().

◆ FunctionDefaults< NDIM >::max_refine_level

template<std::size_t NDIM>
int madness::FunctionDefaults< NDIM >::max_refine_level = 30

◆ FunctionDefaults< NDIM >::pmap

◆ FunctionDefaults< NDIM >::pmap_nproc

template<std::size_t NDIM>
int madness::FunctionDefaults< NDIM >::pmap_nproc {-1}

◆ FunctionDefaults< NDIM >::project_randomize

template<std::size_t NDIM>
bool madness::FunctionDefaults< NDIM >::project_randomize = false

◆ FunctionDefaults< NDIM >::rcell_width

template<std::size_t NDIM>
Tensor<double> madness::FunctionDefaults< NDIM >::rcell_width = FunctionDefaults<NDIM>::make_default_cell_width()

◆ FunctionDefaults< NDIM >::refine

◆ FunctionDefaults< NDIM >::special_level

template<std::size_t NDIM>
int madness::FunctionDefaults< NDIM >::special_level = 3

◆ FunctionDefaults< NDIM >::thresh

template<std::size_t NDIM>
double madness::FunctionDefaults< NDIM >::thresh = 1e-4

Referenced by madness::Coulomb< T, NDIM >::Coulomb(), madness::density_mask_operator::density_mask_operator(), madness::DFT< T, NDIM >::DFT(), madness::Exchange< T, NDIM >::Exchange(), madness::GeneralTwoElectronInterface< T, NDIM >::GeneralTwoElectronInterface(), madness::GenTensor< T >::GenTensor(), MiniDFT::MiniDFT(), madness::munging_operator::munging_operator(), madness::RandomizedMatrixDecomposition< T >::RandomizedMatrixDecomposition(), madness::SeparatedConvolution< double, 3 >::SeparatedConvolution(), madness::SeparatedConvolution< double, 3 >::SeparatedConvolution(), madness::slater_kernel::slater_kernel(), YetAnotherWrapperClass::YetAnotherWrapperClass(), madness::MP2::add_local_coupling(), madness::GenTensor< T >::add_SVD(), madness::SRConf< T >::add_SVD(), adq(), adq1(), apply(), madness::ExchangeCommutator::apply_KffK_lowrank_split_alpha(), madness::ExchangeCommutator::apply_KffK_lowrank_three_range(), madness::GTHPseudopotential< Q >::apply_potential(), madness::GTHPseudopotential< Q >::apply_potential_simple(), madness::XCfunctional::binary_munge(), madness::DiagnosticMatrix< T, NDIM >::build_Gab_bra(), madness::HartreeFock< T, NDIM >::calculate_exchange_energy(), madness::DFT< T, NDIM >::calculate_tot_coulomb_energy(), madness::DFT< T, NDIM >::calculate_tot_pe_sp(), madness::SeparatedConvolution< double, 3 >::combine_generic(), madness::SeparatedConvolution< double, 3 >::combine_generic_coeffs(), madness::CC2::compute_local_coupling(), madness::ExchangeCommutator::compute_lrf_exchange_operator(), madness::SVDTensor< T >::compute_svd(), madness::CCPairFunction< T, NDIM >::consolidate(), madness::SCF::diag_fock_matrix(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::diagnose_error(), distributed_localize_new(), distributed_localize_PM(), distributed_localize_PM(), madness::SVDTensor< T >::divide_and_conquer_reduce(), madness::Solver< T, NDIM >::do_rhs(), madness::Solver< T, NDIM >::do_rhs_simple(), MiniDFT::doit(), estimate_area(), madness::ExchangeAlgorithm< T, NDIM >::Exchange(), exchange_anchor_test(), madness::ExchangeCommutator::fk_provider(), madness::smooth< T, NDIM >::get_density_thresh(), madness::MP2::guess_mp1_3(), hartree_product(), hartree_product(), madness::NuclearCorrelationFactor::initialize(), madness::CCParameters::initialize_parameters(), madness::RestartMetadata::is_converged_to(), madness::Znemo::iterate(), madness::ExchangeCommutator::kf_provider(), Calculation::load_mos(), madness::SCF::load_mos(), madness::Solver< T, NDIM >::load_orbitals(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), madness::Localizer::localize_new_systolic(), madness::Localizer::localize_PM(), MiniDFT::make_bsh_operators(), MiniDFT::make_coulomb_potential(), madness::smooth< T, NDIM >::make_mask(), make_nuclear_charge_density(), madness::Solver< T, NDIM >::make_nuclear_charge_density_impl(), make_nuclear_charge_density_individual(), madness::Nemo::make_sigma(), madness::MP2::make_Uphi0(), madness::SRConf< T >::max_sigma(), madness::smooth< T, NDIM >::merge_functions(), madness::NemoBase::need_recompute_factors_and_potentials(), madness::Znemo::need_recompute_factors_and_potentials(), madness::HartreeFockExchangeOp< T, NDIM >::op_o(), madness::HartreeFockCoulombOp< T, NDIM >::op_r(), BoysLocalization::operator()(), madness::hartree_convolute_leaf_op< T, NDIM, LDIM, opT >::operator()(), madness::hartree_leaf_op< T, NDIM >::operator()(), madness::hartree_leaf_op_vec< T, NDIM >::operator()(), madness::LRFunctorF12< T, NDIM, LDIM >::MacroTaskLRFInner::operator()(), madness::op_leaf_op< T, NDIM, opT >::operator()(), madness::StrongOrthogonalityProjector< T, NDIM >::operator()(), madness::XCOperator< T, NDIM >::operator()(), madness::Atom::operator==(), ortho3(), ortho5(), madness::SVDTensor< T >::orthonormalize(), madness::SCF::output_scf_info_schema(), madness::MolecularOrbitals< T, NDIM >::post_process_mos(), madness::Leaf_op< T, NDIM, opT, specialboxT >::post_screening(), madness::AtomicBasisSet::print_anal(), project(), rank_revealing_decompose(), madness::Znemo::recompute_factors_and_potentials(), madness::GenTensor< T >::reduce_rank(), reduce_rank(), madness::CCPairFunction< T, NDIM >::remove_linearly_dependent_terms(), madness::GTHPseudopotential< Q >::reproject(), madness::NemoBase::reproject_mos(), madness::ConvergenceResults::set_converged_thresh(), madness::Nemo_complex_Parameters::set_derived_values(), Calculation::set_protocol(), madness::Nemo::set_protocol(), madness::SCF::set_protocol(), madness::LRFunctorBase< T, NDIM, LDIM >::set_thresh(), madness::LRFunctorF12< T, NDIM, LDIM >::set_thresh(), madness::LRFunctorPure< T, NDIM, LDIM >::set_thresh(), set_thresh(), madness::MolecularOrbitals< T, NDIM >::similar, madness::smooth< T, NDIM >::smooth_density_from_orbitals(), madness::EigSolver< T, NDIM >::solve(), test_exchange(), madness::Diamagnetic_potential_factor::test_harmonic_potential(), madness::Diamagnetic_potential_factor::test_lz_commutator(), madness::Znemo::test_U_potentials(), test_vector_composite(), madness::Diamagnetic_potential_factor::test_vector_potentials(), madness::PNO::transform_pairs(), Spinor::truncate(), madness::PNO::truncate_pairs(), and madness::SVDTensor< T >::truncate_svd().

◆ FunctionDefaults< NDIM >::truncate_mode

◆ FunctionDefaults< NDIM >::truncate_on_project

◆ FunctionDefaults< NDIM >::tt

◆ Future< void >::value

const Future<void> madness::Future< void >::value = Future<void>()

Referenced by madness::WorldGopInterface::DelayedSend< keyT, valueT >::DelayedSend(), madness::WorldGopInterface::all_reduce(), madness::WorldGopInterface::all_reduce(), madness::WorldGopInterface::bcast(), madness::WorldGopInterface::bcast(), madness::WorldGopInterface::bcast_handler(), madness::WorldGopInterface::bcast_internal(), madness::WorldGopInterface::bcast_internal(), madness::WorldGopInterface::bcast_task(), madness::CCParameters::calc_type(), madness::test_output::checkpoint(), madness::test_output::checkpoint(), madness::FunctionFactory< double, 3 >::compressed(), madness::KernelRange::Data::compute_iextent_x2(), madness::Recordlist< keyT >::compute_record(), coul(), madness::FunctionImpl< T, NDIM >::do_print_tree_graphviz(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::do_replicate(), do_test_random(), dsmoothed_potential(), madness::MolecularEnergy::energy_and_gradient(), madness::DistributedMatrix< double >::fill(), madness::SDFParaboloid::find_root(), madness::QCCalculationParametersBase::from_json(), general_fast_transform(), madness::detail::DistCache< keyT >::Cache::get(), madness::detail::DistCache< keyT >::get_cache_value(), madness::detail::DistCache< keyT >::get_cache_value(), CoreFittingTarget::gradient(), madness::MolecularEnergy::gradient(), Test2::gradient(), madness::WorldGopInterface::group_bcast_handler(), madness::WorldGopInterface::group_bcast_task(), hash_value(), helium_pot(), HO_6d(), madness::QCCalculationParametersBase::initialize(), madness::BinSorter< T, inserterT >::insert(), madness::archive::ArchiveLoadImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >::load(), madness::archive::ArchiveLoadImpl< Archive, linked_list >::load(), madness::archive::ArchiveLoadImpl< Archive, std::atomic< T >, std::enable_if_t< is_serializable_v< Archive, T > > >::load(), main(), madness::EigSolver< T, NDIM >::matrix_element(), madness::FunctionImpl< T, NDIM >::norm_tree_op(), madness::MacroTask< taskT >::operator()(), madness::Projector< T, NDIM >::operator()(), madness::Solver< T, NDIM >::GuessDensity::operator()(), MolecularNuclearChargeDensityFunctor::operator()(), madness::QCCalculationParametersBase::operator==, madness::FunctionImpl< T, LDIM >::partial_inner_contract(), madness::BandlimitedPropagator::plot(), madness::scf_data::print_data(), madness::EigSolver< T, NDIM >::print_matrix_elements(), madness::Stack< CallbackInterface *, MAXCALLBACKS >::push(), madness::DQueue< T >::push_back(), madness::DQueue< madness::PoolTaskInterface * >::push_back(), madness::DQueue< T >::push_back_with_lock(), madness::DQueue< T >::push_front(), madness::DQueue< madness::PoolTaskInterface * >::push_front(), madness::DQueue< T >::push_front_with_lock(), GygiPot::re_epsilon_rho(), GygiPot::re_grad_rho(), GygiPot::re_one_plus_ratio_rho(), madness::QCCalculationParametersBase::read_commandline_options(), madness::QCCalculationParametersBase::read_internal(), madness::WorldGopInterface::reduce(), madness::WorldGopInterface::reduce(), madness::WorldGopInterface::reduce_internal(), madness::WorldGopInterface::reduce_task(), madness::WorldContainer< Key< NDIM >, FunctionNode< T, NDIM > >::replace(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::replicate_on_hosts(), madness::WorldGopInterface::send(), madness::WorldGopInterface::send_internal(), madness::WorldGopInterface::send_internal(), madness::archive::ArchiveSerializeImpl< Archive, std::optional< T >, std::enable_if_t< is_serializable_v< Archive, T > > >::serialize(), madness::archive::ArchiveSerializeImpl< Archive, std::tuple< Types... >, std::enable_if_t<(is_serializable_v< Archive, Types > &&...) > >::serialize(), B::set(), madness::FutureImpl< T >::set(), madness::FunctionDefaults< 1 >::set_apply_randomize(), madness::FutureImpl< T >::set_assigned(), madness::Function< double, 3 >::set_autorefine(), madness::FunctionDefaults< 1 >::set_autorefine(), madness::FunctionImpl< T, NDIM >::set_autorefine(), madness::FunctionImpl< T, LDIM >::set_autorefine(), madness::FunctionDefaults< 1 >::set_bc(), madness::detail::DistCache< keyT >::set_cache_value(), madness::FunctionDefaults< 1 >::set_cell(), madness::Molecule::set_core_eprec(), madness::Molecule::set_core_rcut(), madness::Cloud::set_debug(), madness::FunctionDefaults< 1 >::set_debug(), madness::MacroTask< taskT >::set_debug(), madness::WorldGopInterface::set_debug(), madness::QCCalculationParametersBase::set_derived_value(), madness::ThreadBinder::set_do_bind(), madness::Localizer::set_enforce_core_valence_separation(), madness::Cloud::set_fence(), madness::WorldGopInterface::set_forbid_fence(), madness::Cloud::set_force_load_from_cache(), madness::FutureImpl< T >::set_handler(), madness::FunctionDefaults< 1 >::set_initial_level(), madness::FunctionDefaults< 1 >::set_k(), madness::FunctionDefaults< 1 >::set_max_refine_level(), madness::FunctionDefaults< 1 >::set_pmap(), madness::SCF::set_print_timings(), madness::FunctionDefaults< 1 >::set_project_randomize(), madness::Molecule::set_rcut(), madness::FunctionDefaults< 1 >::set_refine(), madness::Cloud::set_replication_policy(), madness::FunctionDefaults< 1 >::set_special_level(), madness::Cloud::set_storing_policy(), madness::Function< double, 3 >::set_thresh(), madness::FunctionDefaults< 1 >::set_thresh(), madness::FunctionImpl< T, NDIM >::set_thresh(), madness::FunctionImpl< T, LDIM >::set_thresh(), madness::Function< double, 3 >::set_truncate_mode(), madness::FunctionDefaults< 1 >::set_truncate_mode(), madness::FunctionDefaults< 1 >::set_truncate_on_project(), madness::QCCalculationParametersBase::set_user_defined_value(), madness::ConvolutionND< Q, NDIM >::setfac(), madness::Cloud::store_other(), madness::LBNodeDeux< NDIM >::sum(), test_custom_worldobject(), madness::OptimizationTargetInterface::test_gradient(), OptimizationTargetInterface::test_gradient(), test_periodic2(), test_periodic_bsh(), madness::detail::thread_tag_accessor(), madness::QCCalculationParametersBase::to_stored_string(), madness::QCCalculationParametersBase::try_set_from_json(), madness::QCCalculationParametersBase::try_setting_any(), madness::QCCalculationParametersBase::try_setting_any_impl(), madness::QCCalculationParametersBase::try_setting_user_defined_value(), madness::Molecule::update_rcut_with_eprec(), V_1(), V_times_phi(), madness::OptimizationTargetInterface::value_and_gradient(), OptimizationTargetInterface::value_and_gradient(), and Array::write().

◆ g

NDIM const opT & madness::g
Initial value:
{
#define PROFILE_FUNC
Definition worldprofile.h:209

Referenced by DerivativeGaussian< T, NDIM >::DerivativeGaussian(), madness::FunctionImpl< T, NDIM >::do_change_tensor_type::do_change_tensor_type(), ExactSpinor::angular(), apply_bsh(), apply_periodic_bsh(), assemble_nemo_ddens(), bind_function_ops(), bind_function_type(), madness::DispersionCorrection::compute(), 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, LDIM >::dirac_convolution_op(), Plotter::dolineplot(), Plotter::dovolumeplot(), madness::DispersionCorrection::evaluate(), madness::BatchTransport::finish_recv(), func(), madness::TwoElectronFactory< T, NDIM >::gamma(), madness::FunctionImpl< T, LDIM >::gaxpy_inplace_reconstructed(), madness::FunctionImpl< T, NDIM >::gaxpy_oop_reconstructed(), madness::FunctionImpl< T, LDIM >::gaxpy_oop_reconstructed(), madness::SDFCircle::grad_sdf(), madness::SDFSphere::grad_sdf(), CoreFittingTarget::gradient(), Fred::gradient(), Test2::gradient(), data< T, NDIM >::initialize(), inner(), inner(), inner(), inner(), inner(), inner(), madness::Zcis::root::inner, innerXX(), innerXX(), madness::Localizer::localize_boys(), madness::Localizer::localize_new(), main(), main(), Fred::make_g(), matrix_dot(), matrix_dot(), matrix_dot_old(), matrix_inner(), matrix_inner(), matrix_inner(), matrix_inner_old(), matrix_mul_sparse(), madness::FunctionImpl< T, LDIM >::multiply(), multiply(), multiply(), madness::QuasiNewton::new_search_direction(), QuasiNewton::new_search_direction(), madness::MolecularOptimizer::new_search_direction2(), madness::BatchTransport::on_reply(), madness::BatchTransport::on_trigger(), BoysLocalization::operator()(), madness::QuasiNewton::optimize(), madness::SteepestDescent::optimize(), MySteepestDescent::optimize(), QuasiNewton::optimize(), SteepestDescent::optimize(), madness::FunctionImpl< T, LDIM >::partial_inner(), madness::FunctionImpl< T, LDIM >::partial_inner_contract(), partial_mul(), plot_line(), plot_line(), plot_line(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::project_from_Y_stable(), madness::FunctionImpl< T, LDIM >::project_out2(), ExactSpinor::psivalue(), madness::AtomicBasisSet::read_file(), madness::Zcis::read_guess(), madness::AtomicBasisSet::read_nw_file(), madness::BatchTransport::reap_sends(), madness::FunctionImpl< T, LDIM >::reduce(), madness::FunctionImpl< T, LDIM >::reduce(), madness::BatchTransport::request(), madness::Zcis::save_guess(), sparse_product_error(), 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(), madness::FunctionImpl< T, LDIM >::TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), TENSOR_RESULT_TYPE(), madness::Gnuplot::test(), test(), Test6(), test_broaden_resets_norms(), test_coulomb(), test_dot_sparse(), test_gconv(), test_golden_values(), test_gradient(), test_inactive(), test_io(), test_meta_gga_one_orbital_energy(), test_norm_tree_states(), test_recursive_apply(), test_rnlp(), test_rnlp_rangelimited(), test_rnlp_rangelimited_erf(), test_scale_inplace_norms(), test_scaled_redundant_operand(), test_tt2d_summation(), test_U_el(), test_unaryop(), test_Vphi_ij_u(), testgradG(), and Fred::value_and_gradient().

◆ GaussianConvolution1DCache< double >::map

◆ GaussianConvolution1DCache< double_complex >::map

◆ has_freestanding_default_serialize_v

template<typename T, typename Archive>
bool madness::has_freestanding_default_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_t,T,Archive>
inlineconstexpr

◆ has_freestanding_default_serialize_with_size_v

template<typename T, typename Archive>
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);

Referenced by madness::archive::ArchiveImpl< Archive, archive_array< T > >::wrap_load(), and madness::archive::ArchiveImpl< Archive, archive_array< T > >::wrap_store().

◆ has_freestanding_serialize_v

◆ has_freestanding_serialize_with_size_v

template<typename T, typename Archive>
bool madness::has_freestanding_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_size_t,T,Archive>
inlineconstexpr

◆ has_freestanding_serialize_with_version_v

template<typename T, typename Archive>
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>
bool madness::has_member_serialize_v = madness::meta::is_detected_v<madness::has_member_serialize_t,T,Archive>
inlineconstexpr

◆ has_member_serialize_with_version_v

template<typename T, typename Archive>
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>
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>
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:679

◆ has_nonmember_serialize_v

template<typename T, typename Archive>
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:561

Referenced by madness::archive::ArchiveLoadImpl< Archive, T, Enabler >::load(), and madness::archive::ArchiveStoreImpl< Archive, T, Enabler >::store().

◆ has_nonmember_store_v

template<typename T, typename Archive>
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:622

◆ has_nonmember_wrap_load_and_store_v

template<typename T, typename Archive>
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>
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:748

◆ has_nonmember_wrap_store_v

template<typename T, typename Archive>
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:734

◆ is_always_serializable

template<typename T>
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 ||
std::is_function<T>::value
const Future< void > Future< void >::value
Definition future.cc:44
constexpr bool is_any_function_pointer_v
Definition type_traits.h:215

◆ is_any_function_pointer_v

template<typename T>
bool madness::is_any_function_pointer_v = is_any_function_pointer<T>::value
constexpr

◆ is_archive_v

template<typename T>
bool madness::is_archive_v = meta::is_detected_v<is_archive_defined_t,T>
inlineconstexpr

◆ is_default_serializable_v

template<typename Archive, typename T>
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>
bool madness::is_default_serializable_v< Archive, const T > = is_default_serializable_v<Archive, T>
inlineconstexpr

◆ is_function_pointer_v

template<typename T>
bool madness::is_function_pointer_v = is_function_pointer<T>::value
constexpr

◆ is_input_archive_v

template<typename T>
bool madness::is_input_archive_v = meta::is_detected_v<is_input_archive_defined_t, T>
inlineconstexpr

Referenced by G1::serialize().

◆ is_iostreammable_v

template<typename T>
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>
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>
bool madness::is_ostreammable_v = is_ostreammable<T>::value
constexpr

Shortcut for is_ostreammable<T>::value.

Referenced by madness::FutureImpl< T >::Future< T >, and test_in().

◆ is_output_archive_v

◆ is_serializable_v

template<typename Archive, typename T>
bool madness::is_serializable_v
inlineconstexpr
Initial value:
constexpr bool is_user_serializable_v
Definition type_traits.h:655
constexpr bool is_default_serializable_v
Definition type_traits.h:466
constexpr bool is_archive_v
Definition type_traits.h:512

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

Referenced by madness::archive::operator&(), and madness::archive::operator>>().

◆ is_serializable_v< Archive, const T >

template<typename Archive, typename T>
bool madness::is_serializable_v< Archive, const T > = is_serializable_v<Archive, T>
inlineconstexpr

◆ is_text_archive_v

template<typename Archive>
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

Referenced by test_in(), and test_out().

◆ is_trivially_copyable_v

template<typename T>
bool madness::is_trivially_copyable_v = is_trivially_copyable<T>::value
inlineconstexpr

◆ is_trivially_serializable_v

template<typename T>
bool madness::is_trivially_serializable_v = is_trivially_serializable<T>::value
inlineconstexpr

◆ is_user_serializable_v

template<typename Archive, typename T>
bool madness::is_user_serializable_v
inlineconstexpr
Initial value:
constexpr bool has_nonmember_wrap_load_v
Definition type_traits.h:397
constexpr bool has_member_serialize_v
Definition type_traits.h:354
constexpr bool is_output_archive_v
Definition type_traits.h:545
constexpr bool has_nonmember_wrap_store_v
Definition type_traits.h:405
constexpr bool has_freestanding_default_serialize_v
Definition type_traits.h:440
constexpr bool is_input_archive_v
Definition type_traits.h:529
constexpr bool has_nonmember_serialize_v
Definition type_traits.h:370
constexpr bool has_nonmember_store_v
Definition type_traits.h:386
constexpr bool has_nonmember_load_v
Definition type_traits.h:378

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>
bool madness::is_user_serializable_v< Archive, const T > = is_user_serializable_v<Archive, T>
inlineconstexpr

◆ is_valid_task_result_v

template<typename T>
bool madness::is_valid_task_result_v
inlineconstexpr

◆ kcur

int madness::kcur = -1
static

Referenced by autoc().

◆ kmax

◆ 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

◆ mask_factor

double madness::mask_factor = 5.0
static

◆ max_npt

const int madness::max_npt = 64
static

◆ MAXK

◆ MAXLEVEL

◆ MUL_SCREENING_SAFETY

double madness::MUL_SCREENING_SAFETY = 0.1
staticconstexpr

Safety margin on the tolerance of the screened multiplication: the criterion estimates the neglected cross terms rather than bounding them. Tightening is cheap and buys accuracy, hence the extra factor. Applied once, in mulXXvec.

Referenced by madness::FunctionImpl< T, LDIM >::mulXXvec().

◆ nn1

double madness::nn1[100]
static

◆ NORM_TREE_UNCOMPUTED

double madness::NORM_TREE_UNCOMPUTED = 1e300
staticconstexpr

◆ not_found_msg

const char* madness::not_found_msg = "position_stream: failed to locate the requested tag"
staticconstexpr

message thrown when a tag cannot be found

Callers classify the exception by its message prefix (QCCalculationParametersBase::is_missing_datagroup_exception, to tell a missing data group from a malformed one), so this text is load-bearing – keep it in sync with the prefix there. The tag itself is deliberately not interpolated: the caller knows the tag it asked for anyway.

Referenced by position_stream(), and position_stream_to_word().

◆ 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

◆ reduction_alg

std::string madness::reduction_alg ="divide_conquer"
static

◆ rmi_task_is_running

std::atomic<bool> madness::rmi_task_is_running = false
static

◆ SAPCharges

std::vector< CubicInterpolationTable< double > > madness::SAPCharges

◆ sss

std::vector<double> madness::sss
static

Referenced by END_TIMER(), and START_TIMER().

◆ tensor_type_names

const char* madness::tensor_type_names[]
extern

◆ 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

◆ WorldObject< MacroTaskQ >::pending

template<>
volatile std::list<detail::PendingMsg> madness::WorldObject< MacroTaskQ >::pending = std::list<detail::PendingMsg>()

◆ WorldObject< MacroTaskQ >::pending_mutex

template<>
Spinlock madness::WorldObject< MacroTaskQ >::pending_mutex(0) ( 0 )

◆ WorldObject< WorldContainerImpl< long, std::vector< unsignedchar >, madness::Hash< long > > >::pending

template<>
volatile std::list<detail::PendingMsg> madness::WorldObject< WorldContainerImpl< long, std::vector< unsignedchar >, madness::Hash< long > > >::pending = std::list<detail::PendingMsg>()

◆ WorldObject< WorldContainerImpl< long, std::vector< unsignedchar >, madness::Hash< long > > >::pending_mutex

template<>
Spinlock madness::WorldObject< WorldContainerImpl< long, std::vector< unsignedchar >, madness::Hash< long > > >::pending_mutex(0) ( 0 )