33 CHECK(num_batches == 1);
34 CHECK(final_batch_size == 1);
41 CHECK(num_batches == 3);
42 CHECK(final_batch_size == 3);
46 CHECK(num_batches == 0);
47 CHECK(final_batch_size == 0);
81 for (
int i = 0; i < nparam; i++)
83 std::string varname =
"var" + std::to_string(i);
97 TEST_CASE(
"fillOverlapAndHamiltonianMatrices",
"[drivers]")
99 std::vector<int> walkers_per_crowd{1};
111 std::vector<Return_rt>& SumValue = lin.
getSumValue();
121 derivRecords(0, 0) = 1.1;
124 HDerivRecords(0, 0) = -1.2;
126 int N = numParam + 1;
131 CHECK(ovlp(0, 0) == Approx(1.0));
132 CHECK(ovlp(1, 0) == Approx(0.0));
133 CHECK(ovlp(0, 1) == Approx(0.0));
135 CHECK(ovlp(1, 1) == Approx(0.0));
149 std::vector<int> walkers_per_crowd(num_opt_crowds, 1);
161 std::vector<Return_rt>& SumValue = lin.
getSumValue();
167 for (
int iw = 0; iw < numSamples; iw++)
179 int N = numParam + 1;
184 for (
int iw = 0; iw < numParam; iw++)
186 for (
int iw2 = 0; iw2 < numParam; iw2++)
208 for (
int num_opt_crowds = 1; num_opt_crowds < 3; num_opt_crowds++)
Matrix< QMCCostFunctionBase::Return_rt > & getHDerivRecords()
int rank_local_num_samples_
A set of walkers that are to be advanced by Metropolis Monte Carlo.
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
TEST_CASE("complex_helper", "[type_traits]")
int NumOptimizables
total number of optimizable variables
Collection of Local Energy Operators.
opt_variables_type OptVariables
list of optimizables
void set_samples_and_param(int nsamples, int nparam)
Matrix< QMCCostFunctionBase::Return_rt > & getRecordsOnNode()
Matrix< double > HDerivRecords
Communicate * Controller
Global Communicator for a process.
QMCCostFunctionBatched costFn
Wrapping information on parallelism.
void fill_from_text(int num_opt_crowds, FillData &fd)
RuntimeOptions runtime_options_
void compute_batch_parameters(int sample_size, int batch_size, int &num_batches, int &final_batch_size)
Compute number of batches and final batch size given the number of samples and a batch size...
void insert(const std::string &vname, real_type v, bool enable=true, int type=OTHER_P)
Matrix< double > ham_gold
Matrix< double > derivRecords
LinearMethodTestSupport(const std::vector< int > &walkers_per_crowd, Communicate *comm)
const SimulationCell simulation_cell
Matrix< Return_rt > HDerivRecords_
Class to represent a many-body trial wave function.
std::vector< double > reweight
std::vector< Return_rt > SumValue
Sum of energies and weights for averages.
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
Matrix< Return_rt > RecordsOnNode_
std::vector< QMCCostFunctionBase::Return_rt > & getSumValue()
Matrix< QMCCostFunctionBase::Return_t > & getDerivRecords()
Matrix< Return_t > DerivRecords_
Temp derivative properties and Hderivative properties of all the walkers.
Matrix< double > ovlp_gold
Return_rt fillOverlapHamiltonianMatrices(Matrix< Return_rt > &Left, Matrix< Return_rt > &Right) override
void get_diamond_fill_data(qmcplusplus::FillData &fd)
std::vector< double > energy_new