QMCPACK
test_RecordArray.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2020 QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
10 
11 //////////////////////////////////////////////////////////////////////////////////////
12 
14 
15 #include "catch.hpp"
16 
17 
18 namespace qmcplusplus
19 {
20 TEST_CASE("RecordArray basics", "[containers]")
21 {
22  RecordArray<double> records;
23 
24  int nentry = 1;
25  int nparam = 2;
26  records.resize(nentry, nparam);
27 
28  records[0][0] = 1.1;
29  records[0][1] = 1.2;
30 
31  REQUIRE(records.getNumOfParams() == 2);
32  REQUIRE(records.getNumOfEntries() == 1);
33 
34  CHECK(records[0][0] == Approx(1.1));
35  CHECK(records[0][1] == Approx(1.2));
36 }
37 
38 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
TEST_CASE("complex_helper", "[type_traits]")
REQUIRE(std::filesystem::exists(filename))
void resize(size_t nentries, size_t nparams)
Change the size.
Definition: RecordArray.hpp:36
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))