40 CHECK(w.
R[0][0] == Approx(1.0));
54 TEST_CASE(
"walker HDF read and write",
"[particle]")
58 const size_t num_ptcls = 1;
74 std::vector<int> walker_offset(c->
size() + 1);
78 for (
int i = 0; i < c->
size(); i++)
80 walker_offset[i + 1] = offset;
87 HDFWalkerOutput hout(num_ptcls,
"this string apparently does nothing", c);
88 hout.
dump(wc_list, 0);
100 for (
int i = 0; i < 3; i++)
102 REQUIRE(wc_list2[0]->R[0][i] == w1.
R[0][i]);
103 REQUIRE(wc_list2[1]->R[0][i] == w2.
R[0][i]);
107 TEST_CASE(
"walker buffer add, update, restore",
"[particle]")
109 int num_particles = 4;
113 walker_ptr = std::make_unique<MCPWalker>(num_particles);
114 walker_ptr->registerData();
115 walker_ptr->DataSet.allocate();
119 walkers[0]->Properties(WP::LOGPSI) = 1.2;
120 walkers[0]->Properties(WP::SIGN) = 1.3;
121 walkers[0]->Properties(WP::UMBRELLAWEIGHT) = 1.4;
122 walkers[0]->Properties(WP::LOCALPOTENTIAL) = 1.6;
127 CHECK(
walkers[1]->Properties(WP::LOGPSI) == Approx(1.2));
128 CHECK(
walkers[1]->Properties(WP::LOCALPOTENTIAL) == Approx(1.6));
bool dump(const WalkerConfigurations &w, int block)
dump configurations
PropertyContainer_t Properties
scalar properties of a walker
helper functions for EinsplineSetBuilder
Declaration of a WalkerConfigurations.
size_t getActiveWalkers() const
return the number of active walkers
Writes a set of walker configurations to an HDF5 file.
A set of light weight walkers that are carried between driver sections and restart.
TEST_CASE("complex_helper", "[type_traits]")
void setWalkerOffsets(const std::vector< int > &o)
return the total number of active walkers among a MPI group
std::vector< std::unique_ptr< T > > UPtrVector
Communicate * Controller
Global Communicator for a process.
int size() const
return the number of tasks
Wrapping information on parallelism.
REQUIRE(std::filesystem::exists(filename))
void createWalkers(int numWalkers, size_t numPtcls)
create numWalkers Walkers
std::unique_ptr< T > UPtr
void setName(const std::string &aname)
Indexes
an enum denoting index of physical properties
bool read_hdf5(const std::filesystem::path &h5name)
read walkers for small number of MPI tasks
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
A container class to represent a walker.
ParticlePos R
The configuration vector (3N-dimensional vector to store the positions of all the particles for a sin...