48 std::string msg =
"Unknown partitioning shape: " + shape;
59 else if (
diagram==
"klmn") shape=
"square";
61 std::string msg =
"Unknown MP3 diagram: " +
diagram;
69 const std::vector<int>&,
70 const std::vector<int>&,
71 const std::vector<std::vector<CCPairFunction<double,6>>>& ,
82 const std::vector<int>& j_vec,
85 const std::vector<std::string>& argument)
const {
96 bool is_triangular=(j_vec.size()==0);
106 auto ij_to_i_and_j = [&tri_map](
const int ij) {
return tri_map.
map[
ij]; };
107 auto [ii,jj]=ij_to_i_and_j(
ij);
133 std::string msg =
"Unknown MP3 diagram: " +
diagram;
159 const long i,
const long j,
162 const std::vector<std::string>& argument);
166 const long i,
const long j,
169 const std::vector<std::string>& argument);
175 const long i,
const long j,
178 const std::vector<std::string>& argument);
182 const long i,
const long j,
185 const std::vector<std::string>& argument);
long size() const
Definition macrotaskpartitioner.h:71
long begin
Definition macrotaskpartitioner.h:59
Batch_1D result
Definition macrotaskpartitioner.h:128
std::vector< Batch_1D > input
Definition macrotaskpartitioner.h:127
a 6D function, either in full or low rank form, possibly including an 2-particle function
Definition ccpairfunction.h:373
World & world() const
Returns the world.
Definition mra.h:688
Partitioner(const std::string shape)
Definition mp3.h:42
helper class for calculating the MP3 energy contributions
Definition mp3.h:38
resultT operator()(const std::vector< int > &ij_vec, const std::vector< int > &j_vec, const std::vector< std::vector< CCPairFunction< double, 6 > > > &pair_square, const Info &info, const std::vector< std::string > &argument) const
Definition mp3.h:81
std::tuple< const std::vector< int > &, const std::vector< int > &, const std::vector< std::vector< CCPairFunction< double, 6 > > > &, const Info &, const std::vector< std::string > & > argtupleT
Definition mp3.h:73
resultT allocator(World &world, const argtupleT &argtuple) const
Definition mp3.h:77
std::string diagram
Definition mp3.h:66
ScalarResult< double > resultT
Definition mp3.h:75
MacroTaskMP3(const std::string diagram)
Definition mp3.h:55
double compute_mp3_klmn_fast(const Pairs< CCPair > &mp2pairs, const Info &info) const
Definition mp3.cc:470
double compute_mp3_cd(const Pairs< CCPair > &mp2pairs, const Info &info) const
Definition mp3.cc:8
double compute_mp3_ef_low_scaling(const Pairs< CCPair > &mp2pairs, const Pairs< std::vector< CCPairFunction< double, 6 > > > clusterfunctions, const Info &info) const
Definition mp3.cc:254
double compute_mp3_ghij(const Pairs< CCPair > &mp2pairs, const Pairs< std::vector< CCPairFunction< double, 6 > > > clusterfunctions, const Info &info) const
Definition mp3.cc:319
const Info & info
Definition mp3.h:35
MP3(World &world, const Info &info)
Definition mp3.h:26
double mp3_energy_contribution_macrotask_driver(const Pairs< CCPair > &mp2pairs) const
compute the MP3 energy contribution, macrotask version
Definition mp3.cc:945
double compute_mp3_ef(const Pairs< CCPair > &mp2pairs, const Info &info) const
Definition mp3.cc:45
double compute_mp3_klmn(const Pairs< CCPair > &mp2pairs, const Info &info) const
Definition mp3.cc:541
double compute_mp3_ef_with_permutational_symmetry(const Pairs< CCPair > &mp2pairs, const Info &info) const
compute the EF term of the MP3 energy with permutational symmetry
Definition mp3.cc:168
World & world
Definition mp3.h:34
double compute_mp3_ghij_fast(const Pairs< CCPair > &mp2pairs, const Pairs< std::vector< CCPairFunction< double, 6 > > > clusterfunctions, const Info &info) const
Definition mp3.cc:403
double compute_mp3_ef_as_overlap(const Pairs< CCPair > &mp2pairs, const Pairs< std::vector< CCPairFunction< double, 6 > > > clusterfunctions, const Info &info) const
double mp3_energy_contribution(const Pairs< CCPair > &mp2pairs) const
Definition mp3.cc:903
double mp3_test(const Pairs< CCPair > &mp2pairs, const Pairs< std::vector< CCPairFunction< double, 6 > > > clusterfunctions, const Info &info) const
Definition mp3.cc:618
Definition macrotaskq.h:978
Batch batch
Definition macrotaskq.h:980
std::shared_ptr< MacroTaskPartitioner > partitioner
Definition macrotaskq.h:982
std::string name
Definition macrotaskq.h:981
partition one (two) vectors into 1D (2D) batches.
Definition macrotaskpartitioner.h:182
std::size_t dimension
partition one or two vectors
Definition macrotaskpartitioner.h:191
std::size_t min_batch_size
minimum batch size
Definition macrotaskpartitioner.h:187
std::size_t max_batch_size
maximum batch size (for memory management)
Definition macrotaskpartitioner.h:188
Definition macrotaskq.h:115
A parallel world class.
Definition world.h:132
Declares the macrotaskq and MacroTaskBase classes.
#define MADNESS_CHECK(condition)
Check a condition — even in a release build the condition is always evaluated so it can have side eff...
Definition madness_exception.h:182
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition madness_exception.h:119
Main include file for MADNESS and defines Function interface.
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
long freeze() const
Definition CCStructures.h:368
POD holding some basic functions and some intermediates for the CC2 calculation.
Definition CCStructures.h:1107
std::vector< Function< double, 3 > > mo_ket
Definition CCStructures.h:1108
CCParameters parameters
Definition CCStructures.h:1111
Function< double, 3 > R_square
Definition CCStructures.h:1115
Definition CCStructures.h:394
static PairVectorMap triangular_map(const int nfreeze, const int nocc)
Definition CCStructures.h:400
std::vector< std::pair< int, int > > map
maps pair index (i,j) to vector index k
Definition CCStructures.h:396
static PairVectorMap quadratic_map(const int nfreeze, const int nocc)
Definition CCStructures.h:410
Definition CCStructures.h:434
double ij(int64_t i, int64_t j)
Definition test_distributed_matrix.cc:8