Version 2, position dependent E/B, kinetic ions, boris mover, terminator

This commit is contained in:
Jonas Kellerer
2022-10-21 10:09:19 +02:00
parent acc55cf003
commit 83fd2e5d7e
869 changed files with 1033204 additions and 3634436 deletions
+32
View File
@@ -0,0 +1,32 @@
#include "catch.hpp"
#include "IO/hdf5_reader.h"
#include "IO/hdf5_writer.h"
#include "simulation/homebase.h"
TEST_CASE("Hdf5", "[Hdf5]") {
SECTION("Reader and Writing the same data") {
std::string directory = BUILD_HOMEBASE_STRING + std::string("/test");
std::string filename = "test_output";
std::string absolute_filename = directory + filename;
Hdf5Writer writer(directory, filename);
Hdf5Reader reader(directory, filename);
SECTION("1d data") {
blitz::Array<double, 1> data(4);
data = 0.1, -0.1, 1.2, 3.0;
std::string path_1d = "/1d_double";
writer.write(data, path_1d);
blitz::Array<double, 1> read_data = reader.readD1Double(path_1d);
REQUIRE(read_data.size() == 4);
REQUIRE(read_data(0) == data(0));
REQUIRE(read_data(1) == data(1));
REQUIRE(read_data(2) == data(2));
REQUIRE(read_data(3) == data(3));
}
}
}