Skip to content

Commit

Permalink
fixup interp from fuka
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsvu committed Sep 15, 2023
1 parent ca53a05 commit b3ea2d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
7 changes: 1 addition & 6 deletions tests/Unit/IO/External/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ if (TARGET FUKA::Exporter)
)
endif()

add_test_library(
${LIBRARY}
"IO"
"${LIBRARY_SOURCES}"
""
)
add_test_library(${LIBRARY} "${LIBRARY_SOURCES}" WITH_CHARM)

target_link_libraries(
${LIBRARY}
Expand Down
12 changes: 6 additions & 6 deletions tests/Unit/IO/External/Test_InterpolateFromFuka.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ SPECTRE_TEST_CASE("Unit.IO.External.InterpolateFromFuka", "[Unit][IO]") {
const std::string fuka_root{fuka_root_ptr};
REQUIRE_FALSE(fuka_root.empty());
CAPTURE(fuka_root);
const std::string example_id_dir = fuka_root + "/example_id";
const std::string example_id_dir = fuka_root + "/codes/PythonTools/Example_id";
{
INFO("BH");
const tnsr::I<DataVector, 3> coords{{{{2.0}, {0.0}, {0.0}}}};
const auto fuka_data = io::interpolate_from_fuka<io::FukaIdType::Bh>(
make_not_null(&fuka_lock),
example_id_dir + "/converged_BH_TOTAL_BC.0.5.0.0.09.info", coords);
CHECK_ITERABLE_APPROX(get(get<gr::Tags::Lapse<DataVector>>(fuka_data)),
DataVector{0.30512109920956748});
DataVector{0.78166130712794868});
}
{
INFO("BBH");
Expand All @@ -40,7 +40,7 @@ SPECTRE_TEST_CASE("Unit.IO.External.InterpolateFromFuka", "[Unit][IO]") {
example_id_dir + "/converged_BBH_TOTAL_BC.10.0.0.1.q1.0.0.09.info",
coords);
CHECK_ITERABLE_APPROX(get(get<gr::Tags::Lapse<DataVector>>(fuka_data)),
DataVector{0.0000042161179477});
DataVector{0.82006289882662431});
}
{
INFO("NS");
Expand All @@ -51,7 +51,7 @@ SPECTRE_TEST_CASE("Unit.IO.External.InterpolateFromFuka", "[Unit][IO]") {
coords);
CHECK_ITERABLE_APPROX(
get(get<hydro::Tags::RestMassDensity<DataVector>>(fuka_data)),
DataVector{0.00220590213673744});
DataVector{0.00404310450359371});
}
{
INFO("BNS");
Expand All @@ -63,7 +63,7 @@ SPECTRE_TEST_CASE("Unit.IO.External.InterpolateFromFuka", "[Unit][IO]") {
coords);
CHECK_ITERABLE_APPROX(
get(get<hydro::Tags::RestMassDensity<DataVector>>(fuka_data)),
DataVector{0.00093178076659427});
DataVector{0.00137492312500218});
}
{
INFO("BHNS");
Expand All @@ -75,6 +75,6 @@ SPECTRE_TEST_CASE("Unit.IO.External.InterpolateFromFuka", "[Unit][IO]") {
"info",
coords);
CHECK_ITERABLE_APPROX(get(get<gr::Tags::Lapse<DataVector>>(fuka_data)),
DataVector{0.08808942723720847});
DataVector{0.77494679614415585});
}
}

0 comments on commit b3ea2d1

Please sign in to comment.