From 1e62c3e2c5442066d382352d00693a1b19502ef6 Mon Sep 17 00:00:00 2001 From: Jonah Maxwell Miller Date: Tue, 12 Mar 2024 12:59:50 -0600 Subject: [PATCH 1/4] make phoebus a library --- src/CMakeLists.txt | 40 +++++++++++++++--------- tst/unit/geometry/CMakeLists.txt | 44 +-------------------------- tst/unit/monopole_gr/CMakeLists.txt | 28 +---------------- tst/unit/phoebus_utils/CMakeLists.txt | 28 +---------------- tst/unit/radiation/CMakeLists.txt | 18 +---------- 5 files changed, 30 insertions(+), 128 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a804522..a3658af3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,9 +11,11 @@ # the public, perform publicly and display publicly, and to permit others to do so. #========================================================================================= -add_executable(phoebus - main.cpp # first +set(MAX_NUMBER_CONSERVED_VARS 9 CACHE INTEGER "Maximum number of conserved variables") + +configure_file(compile_constants.hpp.in generated/compile_constants.hpp @ONLY) +set (SRC_LIST # alphabetical fixup/fixup.hpp fixup/fixup.cpp @@ -150,13 +152,15 @@ add_executable(phoebus tracers/tracers.hpp tracers/tracers.cpp + + # Generated + $/compile_constants.hpp ) -set(MAX_NUMBER_CONSERVED_VARS 9 CACHE INTEGER "Maximum number of conserved variables") -configure_file(compile_constants.hpp.in generated/compile_constants.hpp @ONLY) +add_library(phoebuslib ${SRC_LIST}) -target_include_directories(phoebus PRIVATE +target_include_directories(phoebuslib PUBLIC $ $ # JMM: Not needed, but can't hurt @@ -169,29 +173,37 @@ target_include_directories(phoebus PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../external/singularity-opac/utils" ) -target_compile_features(phoebus PUBLIC cxx_std_14) +target_compile_features(phoebuslib PUBLIC cxx_std_17) +# TODO(JMM): Remove this since we're never going to run on XL again (I hope) if (CMAKE_CXX_COMPILER_ID STREQUAL "XL") - target_compile_options(phoebus PUBLIC -std=c++1y -qxflag=disable__cplusplusOverride) + target_compile_options(phoebuslib PUBLIC -std=c++1y -qxflag=disable__cplusplusOverride) endif() -target_compile_definitions(phoebus PRIVATE PORTABILITY_STRATEGY_KOKKOS) +target_compile_definitions(phoebuslib PUBLIC PORTABILITY_STRATEGY_KOKKOS) if (PHOEBUS_ENABLE_HDF5) - target_compile_definitions(phoebus PRIVATE + target_compile_definitions(phoebuslib PUBLIC SINGULARITY_USE_HDF SPINER_USE_HDF ) endif() if (Kokkos_ENABLE_CUDA) - target_compile_options(phoebus PUBLIC --expt-relaxed-constexpr) + target_compile_options(phoebuslib PUBLIC --expt-relaxed-constexpr) endif() -# target_compile_options(phoebus PUBLIC -G -lineinfo) - -target_link_libraries(phoebus PRIVATE parthenon +target_link_libraries(phoebuslib PUBLIC parthenon singularity-eos::singularity-eos # singularity-opac::singularity-opac ) if (PHOEBUS_ENABLE_HDF5) - target_link_libraries(phoebus PRIVATE hdf5::hdf5 hdf5::hdf5_hl) + target_link_libraries(phoebuslib PUBLIC hdf5::hdf5 hdf5::hdf5_hl) +endif() + +# Disable executable automatically for builds with downstream codes +if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + message(STATUS "Standalone mode. Adding Phoebus executable") + add_executable(phoebus main.cpp) + target_link_libraries(phoebus PRIVATE phoebuslib) endif() + +# target_compile_options(phoebus PUBLIC -G -lineinfo) diff --git a/tst/unit/geometry/CMakeLists.txt b/tst/unit/geometry/CMakeLists.txt index 7f4fa69f..b214bdd4 100644 --- a/tst/unit/geometry/CMakeLists.txt +++ b/tst/unit/geometry/CMakeLists.txt @@ -13,57 +13,15 @@ add_library(geometry_unit_tests OBJECT test_geometry.cpp test_tetrads.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/analysis/history.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/analysis/history.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/analytic_system.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/boyer_lindquist.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/boyer_lindquist.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/cached_system.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/flrw.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/flrw.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/fmks.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/fmks.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/geometry_defaults.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/geometry_utils.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/mckinney_gammie_ryan.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/mckinney_gammie_ryan.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/modified_system.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/minkowski.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/minkowski.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/snake.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/snake.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/spherical_kerr_schild.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/spherical_kerr_schild.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/spherical_minkowski.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/spherical_minkowski.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/phoebus_utils/phoebus_interpolation.hpp ) -# Super annoying but it had to be done. -set(MAX_NUMBER_CONSERVED_VARS 9 CACHE STRING "Maximum number of conserved variables") -configure_file(../../../src/compile_constants.hpp.in generated/compile_constants.hpp @ONLY) - target_link_libraries(geometry_unit_tests PRIVATE + phoebuslib parthenon singularity-eos::singularity-eos Catch2::Catch2 Kokkos::kokkos) -target_include_directories(geometry_unit_tests PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/../../../src" - $ - $ - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/ports-of-call" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/spiner" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/variant/include" - ) - -target_compile_definitions(geometry_unit_tests PRIVATE - PORTABILITY_STRATEGY_KOKKOS) - target_link_libraries(geometry_unit_tests PRIVATE Catch2::Catch2) target_sources(phoebus_unit_tests PRIVATE $) diff --git a/tst/unit/monopole_gr/CMakeLists.txt b/tst/unit/monopole_gr/CMakeLists.txt index dbbcb867..9a6fc52b 100644 --- a/tst/unit/monopole_gr/CMakeLists.txt +++ b/tst/unit/monopole_gr/CMakeLists.txt @@ -13,42 +13,16 @@ add_library(monopole_gr_unit_tests OBJECT test_monopole_gr.cpp test_interp_3d_to_1d.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/monopole_gr/monopole_gr.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/monopole_gr/monopole_gr_utils.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/monopole_gr/monopole_gr.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/tov/tov.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/tov/tov.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/phoebus_utils/unit_conversions.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/phoebus_utils/unit_conversions.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/microphysics/eos_phoebus/eos_phoebus.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/microphysics/eos_phoebus/eos_phoebus.cpp ) target_link_libraries(monopole_gr_unit_tests PRIVATE + phoebuslib parthenon Catch2::Catch2 Kokkos::kokkos singularity-eos::singularity-eos ) -target_include_directories(monopole_gr_unit_tests PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/../../../src" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/ports-of-call" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/spiner" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/variant/include" - $ - $ - ) - target_compile_definitions(monopole_gr_unit_tests PRIVATE PHOEBUS_IN_UNIT_TESTS) -target_compile_definitions(monopole_gr_unit_tests PRIVATE - PORTABILITY_STRATEGY_KOKKOS) - target_sources(phoebus_unit_tests PRIVATE $) diff --git a/tst/unit/phoebus_utils/CMakeLists.txt b/tst/unit/phoebus_utils/CMakeLists.txt index fcae7fc5..dd91c9cf 100644 --- a/tst/unit/phoebus_utils/CMakeLists.txt +++ b/tst/unit/phoebus_utils/CMakeLists.txt @@ -38,41 +38,15 @@ add_library(phoebus_utils_unit_tests OBJECT test_relativity_utils.cpp test_reader.cpp test_adiabats.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/geometry/geometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/progenitor/ascii_reader.cpp ) target_link_libraries(phoebus_utils_unit_tests PRIVATE + phoebuslib parthenon Catch2::Catch2 Kokkos::kokkos singularity-eos::singularity-eos ) -if (PHOEBUS_ENABLE_HDF5) - target_link_libraries(phoebus_utils_unit_tests PRIVATE hdf5::hdf5 hdf5::hdf5_hl ) -endif() - -target_include_directories(phoebus_utils_unit_tests PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/../../../src" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/ports-of-call" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/spiner" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/variant/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../../" - $ - $ - ) - -target_compile_definitions(phoebus_utils_unit_tests PRIVATE - PORTABILITY_STRATEGY_KOKKOS) -if (PHOEBUS_ENABLE_HDF5) - target_compile_definitions(phoebus_utils_unit_tests PRIVATE - SINGULARITY_USE_HDF - SPINER_USE_HDF - ) -endif() target_sources(phoebus_unit_tests PRIVATE $) diff --git a/tst/unit/radiation/CMakeLists.txt b/tst/unit/radiation/CMakeLists.txt index d1de5a1b..2f4307a2 100644 --- a/tst/unit/radiation/CMakeLists.txt +++ b/tst/unit/radiation/CMakeLists.txt @@ -12,32 +12,16 @@ add_library(radiation_unit_tests OBJECT test_closure.cpp - - ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/radiation/closure.hpp - ) target_link_libraries(radiation_unit_tests PRIVATE + phoebuslib parthenon Catch2::Catch2 Kokkos::kokkos singularity-eos::singularity-eos ) -target_include_directories(radiation_unit_tests PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/../../../src" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/ports-of-call" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/spiner" - "${CMAKE_CURRENT_SOURCE_DIR}/../../../external/singularity-eos/utils/variant/include" - $ - $ - ) - -target_compile_definitions(radiation_unit_tests PRIVATE - PORTABILITY_STRATEGY_KOKKOS) - target_link_libraries(radiation_unit_tests PRIVATE Catch2::Catch2) target_sources(phoebus_unit_tests PRIVATE $) From a03fab5e10187c13480bf690c6b092057edf4c78 Mon Sep 17 00:00:00 2001 From: Jonah Maxwell Miller Date: Tue, 12 Mar 2024 14:36:58 -0600 Subject: [PATCH 2/4] fix test build/linking errors --- tst/CMakeLists.txt | 1 + tst/unit/phoebus_utils/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tst/CMakeLists.txt b/tst/CMakeLists.txt index 9f4d23aa..50c29dc3 100644 --- a/tst/CMakeLists.txt +++ b/tst/CMakeLists.txt @@ -15,6 +15,7 @@ include(Catch) add_executable(phoebus_unit_tests phoebus_unit_test_main.cpp) target_link_libraries(phoebus_unit_tests PRIVATE + phoebuslib parthenon Catch2::Catch2 Kokkos::kokkos diff --git a/tst/unit/phoebus_utils/CMakeLists.txt b/tst/unit/phoebus_utils/CMakeLists.txt index dd91c9cf..28b16f55 100644 --- a/tst/unit/phoebus_utils/CMakeLists.txt +++ b/tst/unit/phoebus_utils/CMakeLists.txt @@ -40,6 +40,12 @@ add_library(phoebus_utils_unit_tests OBJECT test_adiabats.cpp ) +target_include_directories(phoebus_utils_unit_tests PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/../../" + $ + $ + ) + target_link_libraries(phoebus_utils_unit_tests PRIVATE phoebuslib From 2614f78b37091d5ef8e63f25782811ce171e51b0 Mon Sep 17 00:00:00 2001 From: Jonah Maxwell Miller Date: Tue, 12 Mar 2024 14:43:52 -0600 Subject: [PATCH 3/4] CC --- src/CMakeLists.txt | 2 +- tst/CMakeLists.txt | 2 +- tst/unit/geometry/CMakeLists.txt | 2 +- tst/unit/monopole_gr/CMakeLists.txt | 2 +- tst/unit/phoebus_utils/CMakeLists.txt | 2 +- tst/unit/radiation/CMakeLists.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a3658af3..2748f598 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ #========================================================================================= -# (C) (or copyright) 2021. Triad National Security, LLC. All rights reserved. +# (C) (or copyright) 2021-2024. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contract 89233218CNA000001 for Los # Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC diff --git a/tst/CMakeLists.txt b/tst/CMakeLists.txt index 50c29dc3..52902bc7 100644 --- a/tst/CMakeLists.txt +++ b/tst/CMakeLists.txt @@ -1,4 +1,4 @@ -# © 2021. Triad National Security, LLC. All rights reserved. This +# © 2021-2024. Triad National Security, LLC. All rights reserved. This # program was produced under U.S. Government contract 89233218CNA000001 # for Los Alamos National Laboratory (LANL), which is operated by Triad # National Security, LLC for the U.S. Department of Energy/National diff --git a/tst/unit/geometry/CMakeLists.txt b/tst/unit/geometry/CMakeLists.txt index b214bdd4..d9621f46 100644 --- a/tst/unit/geometry/CMakeLists.txt +++ b/tst/unit/geometry/CMakeLists.txt @@ -1,4 +1,4 @@ -# © 2021. Triad National Security, LLC. All rights reserved. This +# © 2021-2024. Triad National Security, LLC. All rights reserved. This # program was produced under U.S. Government contract 89233218CNA000001 # for Los Alamos National Laboratory (LANL), which is operated by Triad # National Security, LLC for the U.S. Department of Energy/National diff --git a/tst/unit/monopole_gr/CMakeLists.txt b/tst/unit/monopole_gr/CMakeLists.txt index 9a6fc52b..24982bbd 100644 --- a/tst/unit/monopole_gr/CMakeLists.txt +++ b/tst/unit/monopole_gr/CMakeLists.txt @@ -1,4 +1,4 @@ -# © 2021. Triad National Security, LLC. All rights reserved. This +# © 2021-2024. Triad National Security, LLC. All rights reserved. This # program was produced under U.S. Government contract 89233218CNA000001 # for Los Alamos National Laboratory (LANL), which is operated by Triad # National Security, LLC for the U.S. Department of Energy/National diff --git a/tst/unit/phoebus_utils/CMakeLists.txt b/tst/unit/phoebus_utils/CMakeLists.txt index 28b16f55..81077e78 100644 --- a/tst/unit/phoebus_utils/CMakeLists.txt +++ b/tst/unit/phoebus_utils/CMakeLists.txt @@ -1,4 +1,4 @@ -# © 2021. Triad National Security, LLC. All rights reserved. This +# © 2021-2024. Triad National Security, LLC. All rights reserved. This # program was produced under U.S. Government contract 89233218CNA000001 # for Los Alamos National Laboratory (LANL), which is operated by Triad # National Security, LLC for the U.S. Department of Energy/National diff --git a/tst/unit/radiation/CMakeLists.txt b/tst/unit/radiation/CMakeLists.txt index 2f4307a2..fd9cd486 100644 --- a/tst/unit/radiation/CMakeLists.txt +++ b/tst/unit/radiation/CMakeLists.txt @@ -1,4 +1,4 @@ -# © 2021. Triad National Security, LLC. All rights reserved. This +# © 2021-2024. Triad National Security, LLC. All rights reserved. This # program was produced under U.S. Government contract 89233218CNA000001 # for Los Alamos National Laboratory (LANL), which is operated by Triad # National Security, LLC for the U.S. Department of Energy/National From 3e5190b69a69d51cc2a1f8857a149ab0b74b633c Mon Sep 17 00:00:00 2001 From: Jonah Maxwell Miller Date: Tue, 12 Mar 2024 15:10:16 -0600 Subject: [PATCH 4/4] properly link con2prim (no idea how that was working before) and also switch test to explicitly use analytic minkowski --- src/CMakeLists.txt | 1 + src/fluid/fluid.cpp | 9 +++++++ src/fluid/fluid.hpp | 10 ++++++++ tst/unit/phoebus_utils/compile_constants.hpp | 25 ------------------- .../phoebus_utils/test_relativity_utils.cpp | 3 ++- 5 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 tst/unit/phoebus_utils/compile_constants.hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2748f598..270a5726 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,6 +31,7 @@ set (SRC_LIST fluid/con2prim_statistics.hpp fluid/fluid.cpp fluid/fluid.hpp + fluid/prim2con.hpp fluid/riemann.hpp fluid/tmunu.cpp fluid/tmunu.hpp diff --git a/src/fluid/fluid.cpp b/src/fluid/fluid.cpp index 66a14580..d8264a13 100644 --- a/src/fluid/fluid.cpp +++ b/src/fluid/fluid.cpp @@ -441,6 +441,15 @@ TaskStatus ConservedToPrimitiveRegion(T *rc, const IndexRange &ib, const IndexRa auto c2p = pkg->Param>("c2p_func"); return c2p(rc, ib, jb, kb); } +// JMM: Must specialize function for both potential use cases so we +// can keep it in this file. +template TaskStatus ConservedToPrimitiveRegion>(MeshData *rc, + const IndexRange &ib, + const IndexRange &jb, + const IndexRange &kb); +template TaskStatus ConservedToPrimitiveRegion>( + MeshBlockData *rc, const IndexRange &ib, const IndexRange &jb, + const IndexRange &kb); template TaskStatus ConservedToPrimitive(T *rc) { diff --git a/src/fluid/fluid.hpp b/src/fluid/fluid.hpp index fa206f8e..702d1ab3 100644 --- a/src/fluid/fluid.hpp +++ b/src/fluid/fluid.hpp @@ -29,9 +29,19 @@ std::shared_ptr Initialize(ParameterInput *pin); TaskStatus PrimitiveToConserved(MeshBlockData *rc); TaskStatus PrimitiveToConservedRegion(MeshBlockData *rc, const IndexRange &ib, const IndexRange &jb, const IndexRange &kb); +// JMM: Not sure how the templated value here worked in the first +// place. But proper solution is need to tell the linker it's +// available elsewhere. template TaskStatus ConservedToPrimitiveRegion(T *rc, const IndexRange &ib, const IndexRange &jb, const IndexRange &kb); +extern template TaskStatus +ConservedToPrimitiveRegion>(MeshData *rc, const IndexRange &ib, + const IndexRange &jb, const IndexRange &kb); +extern template TaskStatus ConservedToPrimitiveRegion>( + MeshBlockData *rc, const IndexRange &ib, const IndexRange &jb, + const IndexRange &kb); + template TaskStatus ConservedToPrimitive(T *rc); template diff --git a/tst/unit/phoebus_utils/compile_constants.hpp b/tst/unit/phoebus_utils/compile_constants.hpp deleted file mode 100644 index fb26373d..00000000 --- a/tst/unit/phoebus_utils/compile_constants.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// © 2021. Triad National Security, LLC. All rights reserved. This -// program was produced under U.S. Government contract -// 89233218CNA000001 for Los Alamos National Laboratory (LANL), which -// is operated by Triad National Security, LLC for the U.S. -// Department of Energy/National Nuclear Security Administration. All -// rights in the program are reserved by Triad National Security, LLC, -// and the U.S. Department of Energy/National Nuclear Security -// Administration. The Government is granted for itself and others -// acting on its behalf a nonexclusive, paid-up, irrevocable worldwide -// license in this material to reproduce, prepare derivative works, -// distribute copies to the public, perform publicly and display -// publicly, and to permit others to do so. - -#ifndef COMPILE_CONSTANTS_HPP_ -#define COMPILE_CONSTANTS_HPP_ - -#define NCONS_MAX 10 - -#define PHOEBUS_GEOMETRY Geometry::Minkowski -#define GEOMETRY_MESH Analytic -#define GEOMETRY_MESH_BLOCK Analytic - -#define PRINT_RHS 0 - -#endif // COMPILE_CONSTANTS_HPP_ diff --git a/tst/unit/phoebus_utils/test_relativity_utils.cpp b/tst/unit/phoebus_utils/test_relativity_utils.cpp index 7dc24fe0..73a5982c 100644 --- a/tst/unit/phoebus_utils/test_relativity_utils.cpp +++ b/tst/unit/phoebus_utils/test_relativity_utils.cpp @@ -43,7 +43,8 @@ TEST_CASE("RELATIVITY", "[relativity_utils]") { GIVEN("A three-velocity and a coordinate system") { auto mb = GetDummyMeshBlock(); auto rc = GetDummyMeshBlockData(mb); - auto system = GetCoordinateSystem(rc.get()); + auto indexer = GetIndexer(rc.get()); + auto system = MinkowskiMeshBlock(indexer); // Dummy grid position const CellLocation loc = CellLocation::Cent; const int k = 0;