From ec9aea5afe671de4b4a49ca33e1b3c38bf7207c3 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 5 Dec 2025 20:17:35 +0100 Subject: [PATCH] Rename Nova++ to HERACLES++ --- .github/workflows/tests-macos.yaml | 14 +-- .github/workflows/tests-ubuntu.yaml | 110 ++++++++-------- CMakeLists.txt | 118 +++++++++--------- README.md | 20 ++- benchmarks/benchmark_conv_cons_to_prim.cpp | 20 +-- benchmarks/benchmark_conv_prim_to_cons.cpp | 20 +-- benchmarks/benchmark_face_reconstruction.cpp | 28 ++--- benchmarks/benchmark_time_step.cpp | 30 ++--- docker/Dockerfile | 6 +- src/CMakeLists.txt | 28 +++-- src/analysis/integration.cpp | 4 +- src/analysis/integration.hpp | 4 +- src/analysis/internal_energy.cpp | 4 +- src/analysis/internal_energy.hpp | 4 +- src/analysis/temperature.hpp | 4 +- src/boundary.cpp | 4 +- src/boundary.hpp | 4 +- src/boundary_distribute.cpp | 6 +- src/boundary_distribute.hpp | 6 +- src/boundary_factory.hpp | 4 +- src/broadcast.cpp | 4 +- src/broadcast.hpp | 4 +- src/default_boundary_setup.hpp | 4 +- src/default_grid_setup.hpp | 4 +- src/default_setup.hpp | 4 +- src/default_shift_criterion.hpp | 4 +- src/default_user_step.hpp | 4 +- src/gravity/gravity.cpp | 4 +- src/gravity/gravity.hpp | 4 +- src/hydro/array_conversion.hpp | 4 +- src/hydro/concepts.hpp | 4 +- src/hydro/euler_equations.hpp | 4 +- src/hydro/extrapolation_reconstruction.hpp | 4 +- src/hydro/face_reconstruction.cpp | 4 +- src/hydro/face_reconstruction.hpp | 4 +- src/hydro/godunov_scheme.hpp | 4 +- src/hydro/hydro_reconstruction.hpp | 4 +- src/hydro/limited_linear_reconstruction.hpp | 4 +- src/hydro/pressure_fix.hpp | 4 +- src/hydro/riemann_solver.hpp | 4 +- src/hydro/slope_limiters.hpp | 4 +- src/hydro/source_terms.hpp | 4 +- src/hydro/time_step.hpp | 4 +- src/initialization_interface.cpp | 4 +- src/initialization_interface.hpp | 4 +- src/io/io.cpp | 20 +-- src/io/io.hpp | 4 +- src/io/io_hdf5.hpp | 10 +- src/main.cpp | 26 ++-- src/mesh/geometry.cpp | 4 +- src/mesh/geometry.hpp | 4 +- src/mesh/geometry_factory.cpp | 4 +- src/mesh/geometry_factory.hpp | 4 +- src/mesh/grid.cpp | 4 +- src/mesh/grid.hpp | 4 +- src/mesh/grid_factory.cpp | 4 +- src/mesh/grid_factory.hpp | 4 +- src/mesh/grid_type.cpp | 6 +- src/mesh/grid_type.hpp | 4 +- src/mesh/range.cpp | 4 +- src/mesh/range.hpp | 4 +- src/moving_grid/moving_grid.cpp | 4 +- src/moving_grid/moving_grid.hpp | 4 +- src/mpi_scope_guard.cpp | 4 +- src/mpi_scope_guard.hpp | 4 +- src/setups/advection_gap/setup.hpp | 4 +- src/setups/advection_sinus/setup.hpp | 4 +- src/setups/eq_hydro_sphe/setup.hpp | 4 +- src/setups/gresho_vortex/setup.hpp | 4 +- src/setups/heat_nickel/setup.hpp | 4 +- src/setups/implosion_test/setup.hpp | 4 +- src/setups/kelvin_helmholtz/setup.hpp | 4 +- src/setups/rayleigh_taylor/setup.hpp | 4 +- src/setups/rayleigh_taylor3d/setup.hpp | 4 +- src/setups/sedov1d/setup.hpp | 4 +- src/setups/sedov2d/setup.hpp | 4 +- src/setups/sedov3d/setup.hpp | 4 +- src/setups/shock_tube/setup.hpp | 4 +- src/setups/shock_wall/setup.hpp | 4 +- src/setups/stratified_atm/setup.hpp | 4 +- src/setups/v1d/setup.hpp | 6 +- src/shift_criterion_interface.cpp | 4 +- src/shift_criterion_interface.hpp | 4 +- src/thermodynamics/perfect_gas.cpp | 4 +- src/thermodynamics/perfect_gas.hpp | 4 +- src/thermodynamics/rad_gas.cpp | 4 +- src/thermodynamics/rad_gas.hpp | 4 +- src/units/units.hpp | 4 +- src/user_step/user_step.cpp | 4 +- src/user_step/user_step.hpp | 4 +- src/user_step/user_step_factory.cpp | 4 +- src/user_step/user_step_factory.hpp | 4 +- src/utils/CMakeLists.txt | 4 +- src/utils/eos.hpp.in | 6 +- src/utils/geom.hpp.in | 6 +- src/utils/git_version.cpp.in | 4 +- src/utils/git_version.hpp | 4 +- src/utils/int_cast.hpp | 4 +- src/utils/kokkos_shortcut.hpp | 4 +- src/utils/kronecker.hpp | 4 +- src/utils/ndim.hpp.in | 6 +- src/utils/{nova_params.cpp => param.cpp} | 6 +- src/utils/{nova_params.hpp => param.hpp} | 4 +- src/utils/print_info.hpp | 4 +- test/build_suite_full.py | 29 +++-- .../run_convergence_advection_sinus.py | 11 +- tests/CMakeLists.txt | 2 +- tests/broadcast.cpp | 66 +++++----- tests/conversions.cpp | 56 ++++----- tests/euler_equations.cpp | 22 ++-- tests/gravity.cpp | 44 +++---- tests/grid_type.cpp | 4 +- tests/int_cast.cpp | 12 +- tests/kokkos_shortcut.cpp | 10 +- tests/kronecker.cpp | 20 +-- tests/main.cpp | 2 +- tests/partitioner.cpp | 8 +- tests/print_info.cpp | 6 +- tests/range.cpp | 32 ++--- tests/riemann_solvers.cpp | 26 ++-- tests/slopes.cpp | 4 +- tests/thermodynamics.cpp | 2 +- tests/utils_dual_view.hpp | 4 +- toolchains/adastra-mi250x.md | 19 ++- toolchains/jean-zay-h100.md | 19 ++- toolchains/job_cpu.sh | 2 +- toolchains/job_gpu.sh | 2 +- toolchains/job_gpu_adastra.sh | 4 +- toolchains/ruche-a100.md | 17 ++- 129 files changed, 630 insertions(+), 623 deletions(-) rename src/utils/{nova_params.cpp => param.cpp} (98%) rename src/utils/{nova_params.hpp => param.hpp} (97%) diff --git a/.github/workflows/tests-macos.yaml b/.github/workflows/tests-macos.yaml index f9c0f2a7..2c62655c 100644 --- a/.github/workflows/tests-macos.yaml +++ b/.github/workflows/tests-macos.yaml @@ -29,7 +29,7 @@ concurrency: env: CMAKE_BUILD_TYPE: Release CMAKE_GENERATOR: Ninja - NOVAPP_DEFAULT_DEPENDENCY_POLICY: INSTALLED + HERACLESPP_DEFAULT_DEPENDENCY_POLICY: INSTALLED jobs: build-serial-3d: @@ -115,12 +115,12 @@ jobs: cmake \ -D BUILD_TESTING=ON \ -D CMAKE_COMPILE_WARNING_AS_ERROR=ON \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_SETUP=advection_sinus \ - -D Novapp_NDIM=3 \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_SETUP=advection_sinus \ + -D Heraclespp_NDIM=3 \ -B build cmake --build build ctest --test-dir build --output-on-failure --timeout 5 --output-junit tests.xml diff --git a/.github/workflows/tests-ubuntu.yaml b/.github/workflows/tests-ubuntu.yaml index fcc089db..504866d4 100644 --- a/.github/workflows/tests-ubuntu.yaml +++ b/.github/workflows/tests-ubuntu.yaml @@ -32,7 +32,7 @@ env: CMAKE_BUILD_PARALLEL_LEVEL: 4 CMAKE_BUILD_TYPE: Release CMAKE_GENERATOR: Ninja - NOVAPP_DEFAULT_DEPENDENCY_POLICY: INSTALLED + HERACLESPP_DEFAULT_DEPENDENCY_POLICY: INSTALLED jobs: cpp-format: @@ -237,12 +237,12 @@ jobs: cmake \ -D BUILD_TESTING=ON \ -D CMAKE_COMPILE_WARNING_AS_ERROR=ON \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=1 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=1 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build ctest --test-dir build --output-on-failure --timeout 5 --output-junit tests.xml @@ -282,12 +282,12 @@ jobs: cmake \ -D BUILD_TESTING=ON \ -D CMAKE_COMPILE_WARNING_AS_ERROR=ON \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=2 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=2 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build ctest --test-dir build --output-on-failure --timeout 5 --output-junit tests.xml @@ -324,12 +324,12 @@ jobs: cmake \ -D BUILD_TESTING=ON \ -D CMAKE_COMPILE_WARNING_AS_ERROR=ON \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build ctest --test-dir build --output-on-failure --timeout 5 --output-junit tests.xml @@ -365,12 +365,12 @@ jobs: cmake \ -D BUILD_TESTING=ON \ -D CMAKE_CXX_EXTENSIONS=OFF \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build @@ -398,12 +398,12 @@ jobs: cmake \ -D BUILD_TESTING=ON \ -D CMAKE_COMPILE_WARNING_AS_ERROR=ON \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build @@ -439,12 +439,12 @@ jobs: -D BUILD_TESTING=ON \ -D CMAKE_CXX_COMPILER=clang++-21 \ -D CMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-Xiwyu;--verbose=3;-Xiwyu;--mapping=$PWD/iwyu-heraclespp.json;-Xiwyu;--mapping=$PWD/iwyu-kokkos.json;" \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build @@ -471,12 +471,12 @@ jobs: -D BUILD_TESTING=ON \ -D CMAKE_CXX_COMPILER=clang++-21 \ -D CMAKE_CXX_CLANG_TIDY="clang-tidy-21;-header-filter=${{github.workspace}}/src/.*;-warnings-as-errors=*" \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build @@ -503,12 +503,12 @@ jobs: -D BUILD_TESTING=ON \ -D CMAKE_CXX_COMPILER=clang++-21 \ -D CMAKE_LINK_WHAT_YOU_USE=ON \ - -D Novapp_BUILD_BENCHMARKING=ON \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=ON \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build @@ -534,11 +534,11 @@ jobs: cmake \ -D BUILD_TESTING=OFF \ -D DOXYGEN_WARN_AS_ERROR=YES \ - -D Novapp_BUILD_BENCHMARKING=OFF \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_NDIM=3 \ - -D Novapp_SETUP=advection_sinus \ + -D Heraclespp_BUILD_BENCHMARKING=OFF \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_SETUP=advection_sinus \ -B build cmake --build build --target doxygen diff --git a/CMakeLists.txt b/CMakeLists.txt index b8155e3d..b0157f70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,52 +4,52 @@ cmake_minimum_required(VERSION 3.25) -project(Nova++ LANGUAGES CXX) +project(HERACLES++ LANGUAGES CXX) set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES ON) -option(Novapp_BUILD_BENCHMARKING "Build the benchmarking tree." OFF) +option(Heraclespp_BUILD_BENCHMARKING "Build the benchmarking tree." OFF) -set(Novapp_EOS +set(Heraclespp_EOS "" CACHE STRING "Choose the equation of state: PerfectGas(Perfect Gas) ; Gas+Radiation(Gas+Radiation)" ) -set_property(CACHE Novapp_EOS PROPERTY STRINGS "PerfectGas;Gas+Radiation") -if("${Novapp_EOS}" STREQUAL "") - message(FATAL_ERROR "Novapp_EOS is not defined") +set_property(CACHE Heraclespp_EOS PROPERTY STRINGS "PerfectGas;Gas+Radiation") +if("${Heraclespp_EOS}" STREQUAL "") + message(FATAL_ERROR "Heraclespp_EOS is not defined") endif() -set(Novapp_GEOM +set(Heraclespp_GEOM "" CACHE STRING "Choose the geometric system: Cartesian(Cartesian system) ; Spherical(Spherical system)" ) -set_property(CACHE Novapp_GEOM PROPERTY STRINGS "Cartesian;Spherical") -if("${Novapp_GEOM}" STREQUAL "") - message(FATAL_ERROR "Novapp_GEOM is not defined") +set_property(CACHE Heraclespp_GEOM PROPERTY STRINGS "Cartesian;Spherical") +if("${Heraclespp_GEOM}" STREQUAL "") + message(FATAL_ERROR "Heraclespp_GEOM is not defined") endif() -set(Novapp_GRAVITY +set(Heraclespp_GRAVITY "" CACHE STRING "Choose the equation of state: Uniform(Uniform gravity) ; Point_mass(Point mass gravity); Internal_Mass(Internal mass gravity)" ) set_property( - CACHE Novapp_GRAVITY + CACHE Heraclespp_GRAVITY PROPERTY STRINGS "Uniform;Point_mass;Internal_mass" ) -if("${Novapp_GRAVITY}" STREQUAL "") - message(FATAL_ERROR "Novapp_GRAVITY is not defined") +if("${Heraclespp_GRAVITY}" STREQUAL "") + message(FATAL_ERROR "Heraclespp_GRAVITY is not defined") endif() set(DIMS "1;2;3") -set(Novapp_NDIM "" CACHE STRING "Choose the dimension, options are ${DIMS}") -set_property(CACHE Novapp_NDIM PROPERTY STRINGS "${DIMS}") -if(NOT ("${Novapp_NDIM}" IN_LIST DIMS)) +set(Heraclespp_NDIM "" CACHE STRING "Choose the dimension, options are ${DIMS}") +set_property(CACHE Heraclespp_NDIM PROPERTY STRINGS "${DIMS}") +if(NOT ("${Heraclespp_NDIM}" IN_LIST DIMS)) message( FATAL_ERROR - "Novapp_NDIM is not defined, available dimensions are ${DIMS}" + "Heraclespp_NDIM is not defined, available dimensions are ${DIMS}" ) endif() @@ -60,49 +60,49 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) ) endif() -set(Novapp_SETUP "" CACHE STRING "Choose the setup") +set(Heraclespp_SETUP "" CACHE STRING "Choose the setup") file( GLOB sub-dirs-name RELATIVE ${PROJECT_SOURCE_DIR}/src/setups ${PROJECT_SOURCE_DIR}/src/setups/* ) -set_property(CACHE Novapp_SETUP PROPERTY STRINGS "${sub-dirs-name}") +set_property(CACHE Heraclespp_SETUP PROPERTY STRINGS "${sub-dirs-name}") -if(NOT ("${Novapp_SETUP}" IN_LIST sub-dirs-name)) +if(NOT ("${Heraclespp_SETUP}" IN_LIST sub-dirs-name)) message( FATAL_ERROR - "Novapp_SETUP is not defined, available setups are: ${sub-dirs-name}" + "Heraclespp_SETUP is not defined, available setups are: ${sub-dirs-name}" ) endif() include(CTest) -set(Novapp_DEPENDENCY_POLICIES "EMBEDDED" "INSTALLED") -set(Novapp_DEFAULT_DEPENDENCY_POLICY "EMBEDDED") -if(DEFINED ENV{NOVAPP_DEFAULT_DEPENDENCY_POLICY}) - set(Novapp_DEFAULT_DEPENDENCY_POLICY - "$ENV{NOVAPP_DEFAULT_DEPENDENCY_POLICY}" +set(Heraclespp_DEPENDENCY_POLICIES "EMBEDDED" "INSTALLED") +set(Heraclespp_DEFAULT_DEPENDENCY_POLICY "EMBEDDED") +if(DEFINED ENV{HERACLESPP_DEFAULT_DEPENDENCY_POLICY}) + set(Heraclespp_DEFAULT_DEPENDENCY_POLICY + "$ENV{HERACLESPP_DEFAULT_DEPENDENCY_POLICY}" ) endif() -if(DEFINED CACHE{Novapp_DEFAULT_DEPENDENCY_POLICY}) - set(Novapp_DEFAULT_DEPENDENCY_POLICY - "$CACHE{Novapp_DEFAULT_DEPENDENCY_POLICY}" +if(DEFINED CACHE{Heraclespp_DEFAULT_DEPENDENCY_POLICY}) + set(Heraclespp_DEFAULT_DEPENDENCY_POLICY + "$CACHE{Heraclespp_DEFAULT_DEPENDENCY_POLICY}" ) endif() # benchmark dependency -set(Novapp_benchmark_DEPENDENCY_POLICY - "${Novapp_DEFAULT_DEPENDENCY_POLICY}" +set(Heraclespp_benchmark_DEPENDENCY_POLICY + "${Heraclespp_DEFAULT_DEPENDENCY_POLICY}" CACHE STRING - "Policy to find the `benchmark` package. Options: ${Novapp_DEPENDENCY_POLICIES}" + "Policy to find the `benchmark` package. Options: ${Heraclespp_DEPENDENCY_POLICIES}" ) set_property( - CACHE Novapp_benchmark_DEPENDENCY_POLICY - PROPERTY STRINGS "${Novapp_DEPENDENCY_POLICIES}" + CACHE Heraclespp_benchmark_DEPENDENCY_POLICY + PROPERTY STRINGS "${Heraclespp_DEPENDENCY_POLICIES}" ) -if("${Novapp_benchmark_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") +if("${Heraclespp_benchmark_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") add_subdirectory(vendor/benchmark SYSTEM) -elseif("${Novapp_benchmark_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") +elseif("${Heraclespp_benchmark_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") find_package(benchmark REQUIRED) endif() @@ -110,50 +110,50 @@ endif() find_package(Doxygen) # GTest dependency -set(Novapp_GTest_DEPENDENCY_POLICY - "${Novapp_DEFAULT_DEPENDENCY_POLICY}" +set(Heraclespp_GTest_DEPENDENCY_POLICY + "${Heraclespp_DEFAULT_DEPENDENCY_POLICY}" CACHE STRING - "Policy to find the `GTest` package. Options: ${Novapp_DEPENDENCY_POLICIES}" + "Policy to find the `GTest` package. Options: ${Heraclespp_DEPENDENCY_POLICIES}" ) set_property( - CACHE Novapp_GTest_DEPENDENCY_POLICY - PROPERTY STRINGS "${Novapp_DEPENDENCY_POLICIES}" + CACHE Heraclespp_GTest_DEPENDENCY_POLICY + PROPERTY STRINGS "${Heraclespp_DEPENDENCY_POLICIES}" ) -if("${Novapp_GTest_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") +if("${Heraclespp_GTest_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") add_subdirectory(vendor/googletest SYSTEM) -elseif("${Novapp_GTest_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") +elseif("${Heraclespp_GTest_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") find_package(GTest REQUIRED CONFIG) endif() # inih dependency -set(Novapp_inih_DEPENDENCY_POLICY - "${Novapp_DEFAULT_DEPENDENCY_POLICY}" +set(Heraclespp_inih_DEPENDENCY_POLICY + "${Heraclespp_DEFAULT_DEPENDENCY_POLICY}" CACHE STRING - "Policy to find the `inih` package. Options: ${Novapp_DEPENDENCY_POLICIES}" + "Policy to find the `inih` package. Options: ${Heraclespp_DEPENDENCY_POLICIES}" ) set_property( - CACHE Novapp_inih_DEPENDENCY_POLICY - PROPERTY STRINGS "${Novapp_DEPENDENCY_POLICIES}" + CACHE Heraclespp_inih_DEPENDENCY_POLICY + PROPERTY STRINGS "${Heraclespp_DEPENDENCY_POLICIES}" ) -if("${Novapp_inih_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") +if("${Heraclespp_inih_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") add_subdirectory(vendor/inih SYSTEM) -elseif("${Novapp_inih_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") +elseif("${Heraclespp_inih_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") find_package(inih REQUIRED CONFIG) endif() # Kokkos dependency -set(Novapp_Kokkos_DEPENDENCY_POLICY - "${Novapp_DEFAULT_DEPENDENCY_POLICY}" +set(Heraclespp_Kokkos_DEPENDENCY_POLICY + "${Heraclespp_DEFAULT_DEPENDENCY_POLICY}" CACHE STRING - "Policy to find the `Kokkos` package. Options: ${Novapp_DEPENDENCY_POLICIES}" + "Policy to find the `Kokkos` package. Options: ${Heraclespp_DEPENDENCY_POLICIES}" ) set_property( - CACHE Novapp_Kokkos_DEPENDENCY_POLICY - PROPERTY STRINGS "${Novapp_DEPENDENCY_POLICIES}" + CACHE Heraclespp_Kokkos_DEPENDENCY_POLICY + PROPERTY STRINGS "${Heraclespp_DEPENDENCY_POLICIES}" ) -if("${Novapp_Kokkos_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") +if("${Heraclespp_Kokkos_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") add_subdirectory(vendor/kokkos SYSTEM) -elseif("${Novapp_Kokkos_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") +elseif("${Heraclespp_Kokkos_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") find_package(Kokkos 4...<6 REQUIRED CONFIG) endif() @@ -171,6 +171,6 @@ if("${BUILD_TESTING}") add_subdirectory(tests) endif() -if("${Novapp_BUILD_BENCHMARKING}") +if("${Heraclespp_BUILD_BENCHMARKING}") add_subdirectory(benchmarks) endif() diff --git a/README.md b/README.md index df12bc18..156e10ee 100644 --- a/README.md +++ b/README.md @@ -36,25 +36,23 @@ A straightforward way to build HERACLES++ is to assume that all dependencies are cmake \ -D BUILD_TESTING=OFF \ -D CMAKE_BUILD_TYPE=Release \ - -D Novapp_SETUP=shock_tube \ - -D Novapp_NDIM=1 \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_GEOM=Cartesian \ - -D Novapp_inih_DEPENDENCY_POLICY=INSTALLED \ - -D Novapp_Kokkos_DEPENDENCY_POLICY=INSTALLED \ + -D Heraclespp_SETUP=shock_tube \ + -D Heraclespp_NDIM=1 \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_GEOM=Cartesian \ + -D Heraclespp_inih_DEPENDENCY_POLICY=INSTALLED \ + -D Heraclespp_Kokkos_DEPENDENCY_POLICY=INSTALLED \ -B build cmake --build build --parallel 2 ``` -One can notice that HERACLES++ related options are being prefixed by `Novapp`. - -The executable can be found in the directory `build/src/nova++`. +The executable can be found in the directory `build/src/heracles++`. The execution needs an input file and is done with the following command: ```bash -./build/src/nova++ ./inputs/shock_tube.ini +./build/src/heracles++ ./inputs/shock_tube.ini ``` For more complex compilation scenarios, please refer to the `toolchains` directory or the [Kokkos documentation](https://kokkos.org/kokkos-core-wiki/get-started.html). diff --git a/benchmarks/benchmark_conv_cons_to_prim.cpp b/benchmarks/benchmark_conv_cons_to_prim.cpp index ffdfbf08..326ec1d9 100644 --- a/benchmarks/benchmark_conv_cons_to_prim.cpp +++ b/benchmarks/benchmark_conv_cons_to_prim.cpp @@ -28,17 +28,17 @@ void set_constant_cells_processed(benchmark::State& state, std::size_t const cel void cons_to_prim(benchmark::State& state) { - int const nx0 = novapp::int_cast(state.range()); + int const nx0 = hclpp::int_cast(state.range()); int const nx1 = nx0; int const nx2 = nx0; - novapp::Range const range({0, 0, 0}, {nx0, nx1, nx2}, 0); - novapp::thermodynamics::PerfectGas const eos(2, 1); - novapp::KV_double_3d const rho("rho", nx0, nx1, nx2); - novapp::KV_double_4d const rhou("rhou", nx0, nx1, nx2, novapp::ndim); - novapp::KV_double_3d const E("E", nx0, nx1, nx2); - novapp::KV_double_4d const u("u", nx0, nx1, nx2, novapp::ndim); - novapp::KV_double_3d const P("P", nx0, nx1, nx2); + hclpp::Range const range({0, 0, 0}, {nx0, nx1, nx2}, 0); + hclpp::thermodynamics::PerfectGas const eos(2, 1); + hclpp::KV_double_3d const rho("rho", nx0, nx1, nx2); + hclpp::KV_double_4d const rhou("rhou", nx0, nx1, nx2, hclpp::ndim); + hclpp::KV_double_3d const E("E", nx0, nx1, nx2); + hclpp::KV_double_4d const u("u", nx0, nx1, nx2, hclpp::ndim); + hclpp::KV_double_3d const P("P", nx0, nx1, nx2); Kokkos::deep_copy(rho, 1); Kokkos::deep_copy(rhou, 0); @@ -46,14 +46,14 @@ void cons_to_prim(benchmark::State& state) Kokkos::fence(); for ([[maybe_unused]] auto _ : state) { - novapp::conv_cons_to_prim(range, eos, rho, rhou, E, u, P); + hclpp::conv_cons_to_prim(range, eos, rho, rhou, E, u, P); Kokkos::fence(); } std::size_t const cells = (static_cast(nx0) * nx1) * nx2; set_constant_cells_processed(state, cells); - set_constant_bytes_processed(state, sizeof(double) * ((2 + novapp::ndim) + (1 + novapp::ndim)) * cells); + set_constant_bytes_processed(state, sizeof(double) * ((2 + hclpp::ndim) + (1 + hclpp::ndim)) * cells); } } // namespace diff --git a/benchmarks/benchmark_conv_prim_to_cons.cpp b/benchmarks/benchmark_conv_prim_to_cons.cpp index 14b6a2e0..e5e9bc7b 100644 --- a/benchmarks/benchmark_conv_prim_to_cons.cpp +++ b/benchmarks/benchmark_conv_prim_to_cons.cpp @@ -28,17 +28,17 @@ void set_constant_cells_processed(benchmark::State& state, std::size_t const cel void prim_to_cons(benchmark::State& state) { - int const nx0 = novapp::int_cast(state.range()); + int const nx0 = hclpp::int_cast(state.range()); int const nx1 = nx0; int const nx2 = nx0; - novapp::Range const range({0, 0, 0}, {nx0, nx1, nx2}, 0); - novapp::thermodynamics::PerfectGas const eos(2, 1); - novapp::KV_double_3d const rho("rho", nx0, nx1, nx2); - novapp::KV_double_4d const rhou("rhou", nx0, nx1, nx2, novapp::ndim); - novapp::KV_double_3d const E("E", nx0, nx1, nx2); - novapp::KV_double_4d const u("u", nx0, nx1, nx2, novapp::ndim); - novapp::KV_double_3d const P("P", nx0, nx1, nx2); + hclpp::Range const range({0, 0, 0}, {nx0, nx1, nx2}, 0); + hclpp::thermodynamics::PerfectGas const eos(2, 1); + hclpp::KV_double_3d const rho("rho", nx0, nx1, nx2); + hclpp::KV_double_4d const rhou("rhou", nx0, nx1, nx2, hclpp::ndim); + hclpp::KV_double_3d const E("E", nx0, nx1, nx2); + hclpp::KV_double_4d const u("u", nx0, nx1, nx2, hclpp::ndim); + hclpp::KV_double_3d const P("P", nx0, nx1, nx2); Kokkos::deep_copy(rho, 1); Kokkos::deep_copy(u, 0); @@ -46,14 +46,14 @@ void prim_to_cons(benchmark::State& state) Kokkos::fence(); for ([[maybe_unused]] auto _ : state) { - novapp::conv_prim_to_cons(range, eos, rho, u, P, rhou, E); + hclpp::conv_prim_to_cons(range, eos, rho, u, P, rhou, E); Kokkos::fence(); } std::size_t const cells = (static_cast(nx0) * nx1) * nx2; set_constant_cells_processed(state, cells); - set_constant_bytes_processed(state, sizeof(double) * ((2 + novapp::ndim) + (1 + novapp::ndim)) * cells); + set_constant_bytes_processed(state, sizeof(double) * ((2 + hclpp::ndim) + (1 + hclpp::ndim)) * cells); } } // namespace diff --git a/benchmarks/benchmark_face_reconstruction.cpp b/benchmarks/benchmark_face_reconstruction.cpp index e815680d..34e3db43 100644 --- a/benchmarks/benchmark_face_reconstruction.cpp +++ b/benchmarks/benchmark_face_reconstruction.cpp @@ -31,7 +31,7 @@ void set_constant_cells_processed(benchmark::State& state, std::size_t const cel void face_reconstruction(benchmark::State& state) { - int const nx0 = novapp::int_cast(state.range()); + int const nx0 = hclpp::int_cast(state.range()); int const nx1 = nx0; int const nx2 = nx0; @@ -46,26 +46,26 @@ void face_reconstruction(benchmark::State& state) std::array const mpi_dims_cart {0, 0, 0}; int const Ng = 1; - novapp::Grid grid(Nx_glob_ng, mpi_dims_cart, Ng); - novapp::Regular const regular_grid(std::array {x0min, x1min, x2min}, std::array {x0max, x1max, x2max}); + hclpp::Grid grid(Nx_glob_ng, mpi_dims_cart, Ng); + hclpp::Regular const regular_grid(std::array {x0min, x1min, x2min}, std::array {x0max, x1max, x2max}); - novapp::KDV_double_1d x0_glob("x0_glob", grid.Nx_glob_ng[0] + (2 * grid.Nghost[0]) + 1); - novapp::KDV_double_1d x1_glob("x1_glob", grid.Nx_glob_ng[1] + (2 * grid.Nghost[1]) + 1); - novapp::KDV_double_1d x2_glob("x2_glob", grid.Nx_glob_ng[2] + (2 * grid.Nghost[2]) + 1); + hclpp::KDV_double_1d x0_glob("x0_glob", grid.Nx_glob_ng[0] + (2 * grid.Nghost[0]) + 1); + hclpp::KDV_double_1d x1_glob("x1_glob", grid.Nx_glob_ng[1] + (2 * grid.Nghost[1]) + 1); + hclpp::KDV_double_1d x2_glob("x2_glob", grid.Nx_glob_ng[2] + (2 * grid.Nghost[2]) + 1); regular_grid.execute(grid.Nghost, grid.Nx_glob_ng, x0_glob.view_host(), x1_glob.view_host(), x2_glob.view_host()); - novapp::modify_host(x0_glob, x1_glob, x2_glob); - novapp::sync_device(x0_glob, x1_glob, x2_glob); + hclpp::modify_host(x0_glob, x1_glob, x2_glob); + hclpp::sync_device(x0_glob, x1_glob, x2_glob); grid.set_grid(x0_glob.view_device(), x1_glob.view_device(), x2_glob.view_device()); - novapp::KV_double_3d const rho("rho", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); - novapp::KV_double_5d const rho_rec("rho_rec", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2], 2, novapp::ndim); + hclpp::KV_double_3d const rho("rho", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); + hclpp::KV_double_5d const rho_rec("rho_rec", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2], 2, hclpp::ndim); Kokkos::deep_copy(rho, 1); Kokkos::deep_copy(rho_rec, -1); - novapp::Minmod const limiter; - novapp::LimitedLinearReconstruction const face_reconstruction(limiter); - novapp::Range const range = grid.range.no_ghosts(); + hclpp::Minmod const limiter; + hclpp::LimitedLinearReconstruction const face_reconstruction(limiter); + hclpp::Range const range = grid.range.no_ghosts(); Kokkos::fence(); for ([[maybe_unused]] auto _ : state) { face_reconstruction.execute(range, grid, rho, rho_rec); @@ -76,7 +76,7 @@ void face_reconstruction(benchmark::State& state) set_constant_cells_processed(state, cells); - set_constant_bytes_processed(state, sizeof(double) * (1 + novapp::ndim * 2) * cells); + set_constant_bytes_processed(state, sizeof(double) * (1 + hclpp::ndim * 2) * cells); } } // namespace diff --git a/benchmarks/benchmark_time_step.cpp b/benchmarks/benchmark_time_step.cpp index 093a68d6..568f1965 100644 --- a/benchmarks/benchmark_time_step.cpp +++ b/benchmarks/benchmark_time_step.cpp @@ -31,7 +31,7 @@ void set_constant_cells_processed(benchmark::State& state, std::size_t const cel void time_step(benchmark::State& state) { - int const nx0 = novapp::int_cast(state.range()); + int const nx0 = hclpp::int_cast(state.range()); int const nx1 = nx0; int const nx2 = nx0; @@ -46,30 +46,30 @@ void time_step(benchmark::State& state) std::array const mpi_dims_cart {0, 0, 0}; int const Ng = 1; - novapp::Grid grid(Nx_glob_ng, mpi_dims_cart, Ng); - novapp::Regular const regular_grid(std::array {x0min, x1min, x2min}, std::array {x0max, x1max, x2max}); + hclpp::Grid grid(Nx_glob_ng, mpi_dims_cart, Ng); + hclpp::Regular const regular_grid(std::array {x0min, x1min, x2min}, std::array {x0max, x1max, x2max}); - novapp::KDV_double_1d x0_glob("x0_glob", grid.Nx_glob_ng[0] + (2 * grid.Nghost[0]) + 1); - novapp::KDV_double_1d x1_glob("x1_glob", grid.Nx_glob_ng[1] + (2 * grid.Nghost[1]) + 1); - novapp::KDV_double_1d x2_glob("x2_glob", grid.Nx_glob_ng[2] + (2 * grid.Nghost[2]) + 1); + hclpp::KDV_double_1d x0_glob("x0_glob", grid.Nx_glob_ng[0] + (2 * grid.Nghost[0]) + 1); + hclpp::KDV_double_1d x1_glob("x1_glob", grid.Nx_glob_ng[1] + (2 * grid.Nghost[1]) + 1); + hclpp::KDV_double_1d x2_glob("x2_glob", grid.Nx_glob_ng[2] + (2 * grid.Nghost[2]) + 1); regular_grid.execute(grid.Nghost, grid.Nx_glob_ng, x0_glob.view_host(), x1_glob.view_host(), x2_glob.view_host()); - novapp::modify_host(x0_glob, x1_glob, x2_glob); - novapp::sync_device(x0_glob, x1_glob, x2_glob); + hclpp::modify_host(x0_glob, x1_glob, x2_glob); + hclpp::sync_device(x0_glob, x1_glob, x2_glob); grid.set_grid(x0_glob.view_device(), x1_glob.view_device(), x2_glob.view_device()); - novapp::thermodynamics::PerfectGas const eos(2, 1); - novapp::KV_double_3d const rho("rho", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); - novapp::KV_double_3d const P("P", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); - novapp::KV_double_4d const u("u", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2], novapp::ndim); + hclpp::thermodynamics::PerfectGas const eos(2, 1); + hclpp::KV_double_3d const rho("rho", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); + hclpp::KV_double_3d const P("P", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); + hclpp::KV_double_4d const u("u", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2], hclpp::ndim); Kokkos::deep_copy(rho, 1); Kokkos::deep_copy(u, 1); Kokkos::deep_copy(P, 1); - novapp::Range const range = grid.range.no_ghosts(); + hclpp::Range const range = grid.range.no_ghosts(); Kokkos::fence(); for ([[maybe_unused]] auto _ : state) { - double dt = novapp::time_step(range, eos, grid, rho, u, P); + double dt = hclpp::time_step(range, eos, grid, rho, u, P); benchmark::DoNotOptimize(dt); Kokkos::fence(); } @@ -78,7 +78,7 @@ void time_step(benchmark::State& state) set_constant_cells_processed(state, cells); - set_constant_bytes_processed(state, sizeof(double) * (2 + novapp::ndim) * cells); + set_constant_bytes_processed(state, sizeof(double) * (2 + hclpp::ndim) * cells); } } // namespace diff --git a/docker/Dockerfile b/docker/Dockerfile index ac78bd0b..e857dd3a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,7 @@ ENV BASH_ENV=/etc/profile SHELL ["/bin/bash", "-c"] ENV PYTHONUNBUFFERED=1 -ENV PATH=/opt/nova-venv/bin:${PATH:+:${PATH}} +ENV PATH=/opt/heraclespp-venv/bin:${PATH:+:${PATH}} ENV PATH=/usr/local/cuda/bin${PATH:+:${PATH}} RUN export DEBIAN_FRONTEND=noninteractive \ @@ -73,8 +73,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && echo "/opt/rocm/lib" >> /etc/ld.so.conf.d/rocm.conf \ && echo "/opt/rocm/lib64" >> /etc/ld.so.conf.d/rocm.conf \ && ldconfig \ - && python3 -m venv /opt/nova-venv \ - && . /opt/nova-venv/bin/activate \ + && python3 -m venv /opt/heraclespp-venv \ + && . /opt/heraclespp-venv/bin/activate \ && python3 -m pip install --no-cache-dir --require-virtualenv --upgrade \ h5py \ matplotlib \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 47867bd5..d4871238 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ # Workaround a defect from FindHDF5.cmake if( - ("${Novapp_inih_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") + ("${Heraclespp_inih_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") AND (CMAKE_VERSION VERSION_LESS "3.26.1") ) enable_language(C) @@ -25,10 +25,10 @@ add_subdirectory(user_step) add_subdirectory(utils) add_subdirectory(moving_grid) -add_library(libnova++) -target_compile_features(libnova++ PUBLIC cxx_std_17) +add_library(libheracles++) +target_compile_features(libheracles++ PUBLIC cxx_std_17) target_link_libraries( - libnova++ + libheracles++ PRIVATE MPI::MPI_CXX PUBLIC analysis @@ -43,7 +43,7 @@ target_link_libraries( utils ) target_sources( - libnova++ + libheracles++ PRIVATE boundary.cpp boundary_distribute.cpp @@ -63,18 +63,20 @@ target_sources( shift_criterion_interface.hpp ) -add_executable(nova++ main.cpp) +add_executable(heracles++ main.cpp) target_compile_definitions( - nova++ - PUBLIC MY_SETUP="${Novapp_SETUP}" NOVAPP_GRAVITY_${Novapp_GRAVITY} + heracles++ + PUBLIC + MY_SETUP="${Heraclespp_SETUP}" + HERACLESPP_GRAVITY_${Heraclespp_GRAVITY} ) -target_compile_features(nova++ PUBLIC cxx_std_20) -target_include_directories(nova++ PUBLIC setups/${Novapp_SETUP}/) +target_compile_features(heracles++ PUBLIC cxx_std_20) +target_include_directories(heracles++ PUBLIC setups/${Heraclespp_SETUP}/) target_link_libraries( - nova++ - PUBLIC inih io libnova++ MPI::MPI_CXX paraconf::paraconf PDI::PDI_C + heracles++ + PUBLIC inih io libheracles++ MPI::MPI_CXX paraconf::paraconf PDI::PDI_C ) include(GNUInstallDirs) -install(TARGETS nova++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +install(TARGETS heracles++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/analysis/integration.cpp b/src/analysis/integration.cpp index f79f844c..cd930237 100644 --- a/src/analysis/integration.cpp +++ b/src/analysis/integration.cpp @@ -17,7 +17,7 @@ #include "integration.hpp" -namespace novapp { +namespace hclpp { double integrate(Range const& range, Grid const& grid, KV_cdouble_3d const& var) { @@ -36,4 +36,4 @@ double integrate(Range const& range, Grid const& grid, KV_cdouble_3d const& var) return sum; } -} // namespace novapp +} // namespace hclpp diff --git a/src/analysis/integration.hpp b/src/analysis/integration.hpp index dbd09ac6..e36888ac 100644 --- a/src/analysis/integration.hpp +++ b/src/analysis/integration.hpp @@ -10,11 +10,11 @@ #include -namespace novapp { +namespace hclpp { class Grid; class Range; [[nodiscard]] double integrate(Range const& range, Grid const& grid, KV_cdouble_3d const& var); -} // namespace novapp +} // namespace hclpp diff --git a/src/analysis/internal_energy.cpp b/src/analysis/internal_energy.cpp index 177a098f..2b38cc79 100644 --- a/src/analysis/internal_energy.cpp +++ b/src/analysis/internal_energy.cpp @@ -15,7 +15,7 @@ #include "internal_energy.hpp" -namespace novapp { +namespace hclpp { double minimum_internal_energy(Range const& range, Grid const& grid, KV_cdouble_3d const& rho, KV_cdouble_4d const& rhou, KV_cdouble_3d const& E) { @@ -43,4 +43,4 @@ double minimum_internal_energy(Range const& range, Grid const& grid, KV_cdouble_ return evol; } -} // namespace novapp +} // namespace hclpp diff --git a/src/analysis/internal_energy.hpp b/src/analysis/internal_energy.hpp index b4263e1f..cd378fb0 100644 --- a/src/analysis/internal_energy.hpp +++ b/src/analysis/internal_energy.hpp @@ -10,7 +10,7 @@ #include -namespace novapp { +namespace hclpp { class Range; class Grid; @@ -22,4 +22,4 @@ class Grid; KV_cdouble_4d const& rhou, KV_cdouble_3d const& E); -} // namespace novapp +} // namespace hclpp diff --git a/src/analysis/temperature.hpp b/src/analysis/temperature.hpp index 6448429d..bd0c8a2a 100644 --- a/src/analysis/temperature.hpp +++ b/src/analysis/temperature.hpp @@ -13,7 +13,7 @@ #include #include -namespace novapp { +namespace hclpp { template void temperature(Range const& range, EoS const& eos, KV_cdouble_3d const& rho, KV_cdouble_3d const& P, KV_double_3d const& T) @@ -24,4 +24,4 @@ void temperature(Range const& range, EoS const& eos, KV_cdouble_3d const& rho, K KOKKOS_LAMBDA(int i, int j, int k) { T(i, j, k) = eos.compute_temp_from_pres(rho(i, j, k), P(i, j, k)); }); } -} // namespace novapp +} // namespace hclpp diff --git a/src/boundary.cpp b/src/boundary.cpp index 991525ca..a19f24cc 100644 --- a/src/boundary.cpp +++ b/src/boundary.cpp @@ -16,7 +16,7 @@ #include "boundary.hpp" -namespace novapp { +namespace hclpp { std::string_view bc_dir(int i) noexcept { @@ -109,4 +109,4 @@ void reflexive_condition( }); } -} // namespace novapp +} // namespace hclpp diff --git a/src/boundary.hpp b/src/boundary.hpp index 2e3cc0ee..9671db86 100644 --- a/src/boundary.hpp +++ b/src/boundary.hpp @@ -18,7 +18,7 @@ # include #endif -namespace novapp { +namespace hclpp { class Grid; @@ -165,4 +165,4 @@ class ReflexiveCondition : public IBoundaryCondition } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/boundary_distribute.cpp b/src/boundary_distribute.cpp index 0d32eff3..d330bb03 100644 --- a/src/boundary_distribute.cpp +++ b/src/boundary_distribute.cpp @@ -22,11 +22,11 @@ #include #include #include -#include +#include #include "boundary_distribute.hpp" -namespace novapp { +namespace hclpp { namespace { @@ -131,4 +131,4 @@ DistributedBoundaryCondition::DistributedBoundaryCondition(Grid const& grid, Par generate_order(m_bc_order, m_param.bc_priority); } -} // namespace novapp +} // namespace hclpp diff --git a/src/boundary_distribute.hpp b/src/boundary_distribute.hpp index cae562bd..6f09f626 100644 --- a/src/boundary_distribute.hpp +++ b/src/boundary_distribute.hpp @@ -18,9 +18,9 @@ #include #include #include -#include +#include -namespace novapp { +namespace hclpp { template class IBoundaryCondition; @@ -76,4 +76,4 @@ class DistributedBoundaryCondition } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/boundary_factory.hpp b/src/boundary_factory.hpp index d6207301..167cc97f 100644 --- a/src/boundary_factory.hpp +++ b/src/boundary_factory.hpp @@ -14,7 +14,7 @@ #include -namespace novapp { +namespace hclpp { template class IBoundaryCondition; @@ -46,4 +46,4 @@ std::unique_ptr> factory_boundary_construction(std:: throw std::runtime_error("Unknown boundary condition : " + boundary + "."); } -} // namespace novapp +} // namespace hclpp diff --git a/src/broadcast.cpp b/src/broadcast.cpp index ac01f218..c864f1dd 100644 --- a/src/broadcast.cpp +++ b/src/broadcast.cpp @@ -12,7 +12,7 @@ #include "broadcast.hpp" -namespace novapp { +namespace hclpp { void broadcast(Range const& range, double const in, KV_double_3d const& out) { @@ -46,4 +46,4 @@ void broadcast(Range const& range, KV_cdouble_1d const& in, KV_double_4d const& } } -} // namespace novapp +} // namespace hclpp diff --git a/src/broadcast.hpp b/src/broadcast.hpp index f295ecaf..94f8f024 100644 --- a/src/broadcast.hpp +++ b/src/broadcast.hpp @@ -6,7 +6,7 @@ #include -namespace novapp { +namespace hclpp { class Range; @@ -18,4 +18,4 @@ void broadcast(Range const& range, KV_cdouble_1d const& in, KV_double_3d const& void broadcast(Range const& range, KV_cdouble_1d const& in, KV_double_4d const& out); -} // namespace novapp +} // namespace hclpp diff --git a/src/default_boundary_setup.hpp b/src/default_boundary_setup.hpp index 4374f0fa..4c36cfd3 100644 --- a/src/default_boundary_setup.hpp +++ b/src/default_boundary_setup.hpp @@ -11,7 +11,7 @@ #include "boundary.hpp" -namespace novapp { +namespace hclpp { class Grid; class ParamSetup; @@ -34,4 +34,4 @@ class BoundarySetup : public IBoundaryCondition } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/default_grid_setup.hpp b/src/default_grid_setup.hpp index 6c6ae5cb..75c7cc3e 100644 --- a/src/default_grid_setup.hpp +++ b/src/default_grid_setup.hpp @@ -10,7 +10,7 @@ #include #include -namespace novapp { +namespace hclpp { class Param; @@ -30,4 +30,4 @@ class GridSetup : public IGridType } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/default_setup.hpp b/src/default_setup.hpp index 6cdb0399..4c6b39eb 100644 --- a/src/default_setup.hpp +++ b/src/default_setup.hpp @@ -16,7 +16,7 @@ class INIReader; -namespace novapp { +namespace hclpp { class Grid; class Range; @@ -45,4 +45,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/default_shift_criterion.hpp b/src/default_shift_criterion.hpp index 7f5758ee..cb4bc75f 100644 --- a/src/default_shift_criterion.hpp +++ b/src/default_shift_criterion.hpp @@ -9,7 +9,7 @@ #include #include -namespace novapp { +namespace hclpp { class Grid; class ParamSetup; @@ -32,4 +32,4 @@ class UserShiftCriterion : public IShiftCriterion } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/default_user_step.hpp b/src/default_user_step.hpp index a5f159bd..519520ed 100644 --- a/src/default_user_step.hpp +++ b/src/default_user_step.hpp @@ -9,7 +9,7 @@ #include #include -namespace novapp { +namespace hclpp { class Range; @@ -28,4 +28,4 @@ class UserStep : public IUserStep } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/gravity/gravity.cpp b/src/gravity/gravity.cpp index d64c446b..993d0c7d 100644 --- a/src/gravity/gravity.cpp +++ b/src/gravity/gravity.cpp @@ -21,7 +21,7 @@ #include "gravity.hpp" -namespace novapp { +namespace hclpp { UniformGravity::UniformGravity(KV_cdouble_1d g) : m_g(std::move(g)) {} @@ -136,4 +136,4 @@ InternalMassGravity make_internal_mass_gravity(double const central_mass, Grid c return InternalMassGravity(g_array_dv); } -} // namespace novapp +} // namespace hclpp diff --git a/src/gravity/gravity.hpp b/src/gravity/gravity.hpp index 665aaaaa..d7d26bc5 100644 --- a/src/gravity/gravity.hpp +++ b/src/gravity/gravity.hpp @@ -11,7 +11,7 @@ #include #include -namespace novapp { +namespace hclpp { class Grid; @@ -102,4 +102,4 @@ class InternalMassGravity InternalMassGravity make_internal_mass_gravity(double central_mass, Grid const& grid, KV_cdouble_3d const& rho); -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/array_conversion.hpp b/src/hydro/array_conversion.hpp index 4f3f8176..78b4890e 100644 --- a/src/hydro/array_conversion.hpp +++ b/src/hydro/array_conversion.hpp @@ -19,7 +19,7 @@ #include "concepts.hpp" #include "euler_equations.hpp" -namespace novapp { +namespace hclpp { //! Conversion from primitive to conservative variables //! @param[in] range output iteration range @@ -171,4 +171,4 @@ void conv_cons_to_prim( conv_cons_to_prim(range, eos, rho, rhou_array, E, u_array, P); } -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/concepts.hpp b/src/hydro/concepts.hpp index 0a166281..774d99f9 100644 --- a/src/hydro/concepts.hpp +++ b/src/hydro/concepts.hpp @@ -6,7 +6,7 @@ #include -namespace novapp { +namespace hclpp { struct EulerCons; struct EulerFlux; @@ -37,4 +37,4 @@ concept GravityField = requires(Gravity const gravity, int const i) { } // namespace concepts -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/euler_equations.hpp b/src/hydro/euler_equations.hpp index aa9ad392..83282632 100644 --- a/src/hydro/euler_equations.hpp +++ b/src/hydro/euler_equations.hpp @@ -15,7 +15,7 @@ #include "concepts.hpp" -namespace novapp { +namespace hclpp { struct EulerCons { @@ -133,4 +133,4 @@ KOKKOS_FORCEINLINE_FUNCTION EulerCons to_cons(EulerPrim const& prim, EoS const& return cons; } -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/extrapolation_reconstruction.hpp b/src/hydro/extrapolation_reconstruction.hpp index d34e7c07..118fa546 100644 --- a/src/hydro/extrapolation_reconstruction.hpp +++ b/src/hydro/extrapolation_reconstruction.hpp @@ -22,7 +22,7 @@ #include "euler_equations.hpp" #include "source_terms.hpp" -namespace novapp { +namespace hclpp { template class IExtrapolationReconstruction @@ -339,4 +339,4 @@ class HancockExtrapolationReconstruction : public IExtrapolationReconstruction factory_face_reconstruction(std::string con throw std::runtime_error("Unknown face reconstruction algorithm: " + slope + "."); } -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/face_reconstruction.hpp b/src/hydro/face_reconstruction.hpp index 661bd8d4..367ce158 100644 --- a/src/hydro/face_reconstruction.hpp +++ b/src/hydro/face_reconstruction.hpp @@ -13,7 +13,7 @@ #include -namespace novapp { +namespace hclpp { class Grid; class Range; @@ -42,4 +42,4 @@ class IFaceReconstruction std::unique_ptr factory_face_reconstruction(std::string const& slope); -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/godunov_scheme.hpp b/src/hydro/godunov_scheme.hpp index 9300a8fe..1d51587c 100644 --- a/src/hydro/godunov_scheme.hpp +++ b/src/hydro/godunov_scheme.hpp @@ -26,7 +26,7 @@ #include "riemann_solver.hpp" #include "source_terms.hpp" -namespace novapp { +namespace hclpp { template class IGodunovScheme @@ -321,4 +321,4 @@ inline std::unique_ptr> factory_godunov_scheme(std::stri throw std::runtime_error("Invalid riemann solver: " + riemann_solver + "."); } -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/hydro_reconstruction.hpp b/src/hydro/hydro_reconstruction.hpp index 825baf65..05c7fbd0 100644 --- a/src/hydro/hydro_reconstruction.hpp +++ b/src/hydro/hydro_reconstruction.hpp @@ -19,7 +19,7 @@ #include "concepts.hpp" #include "face_reconstruction.hpp" -namespace novapp { +namespace hclpp { template class IExtrapolationReconstruction; @@ -130,4 +130,4 @@ class MUSCLHancockHydroReconstruction : public IHydroReconstruction } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/limited_linear_reconstruction.hpp b/src/hydro/limited_linear_reconstruction.hpp index c5a371fb..a9a7f949 100644 --- a/src/hydro/limited_linear_reconstruction.hpp +++ b/src/hydro/limited_linear_reconstruction.hpp @@ -20,7 +20,7 @@ #include "concepts.hpp" #include "face_reconstruction.hpp" -namespace novapp { +namespace hclpp { template class LimitedLinearReconstruction : public IFaceReconstruction @@ -65,4 +65,4 @@ class LimitedLinearReconstruction : public IFaceReconstruction } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/pressure_fix.hpp b/src/hydro/pressure_fix.hpp index c360a5d6..f36b46f5 100644 --- a/src/hydro/pressure_fix.hpp +++ b/src/hydro/pressure_fix.hpp @@ -14,7 +14,7 @@ #include "grid.hpp" #include "kronecker.hpp" -namespace novapp { +namespace hclpp { template void pressure_fix( @@ -171,4 +171,4 @@ void pressure_fix( }); } -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/riemann_solver.hpp b/src/hydro/riemann_solver.hpp index b6ac0d04..cfc2a47e 100644 --- a/src/hydro/riemann_solver.hpp +++ b/src/hydro/riemann_solver.hpp @@ -17,7 +17,7 @@ #include "concepts.hpp" #include "euler_equations.hpp" -namespace novapp { +namespace hclpp { class HLL { @@ -177,4 +177,4 @@ class Splitting } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/slope_limiters.hpp b/src/hydro/slope_limiters.hpp index c69a7ef7..e741eefa 100644 --- a/src/hydro/slope_limiters.hpp +++ b/src/hydro/slope_limiters.hpp @@ -12,7 +12,7 @@ #include #include -namespace novapp { +namespace hclpp { //! The null slope limiter. class Constant @@ -86,4 +86,4 @@ class VanAlbada } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/source_terms.hpp b/src/hydro/source_terms.hpp index 7ed9326a..4338c4aa 100644 --- a/src/hydro/source_terms.hpp +++ b/src/hydro/source_terms.hpp @@ -11,7 +11,7 @@ #include #include -namespace novapp { +namespace hclpp { // Pressure term (e_{r}): 2 * P_{rr} / r // Pressure term (e_{th}): cot(th) * P_{th th} / r @@ -76,4 +76,4 @@ double source_grad_u_phi( return dtodv * (sp - sm) / (sp + sm) * (rhoR * uR_phi * uR_th * dS_p + rhoL * uL_phi * uL_th * dS); } -} // namespace novapp +} // namespace hclpp diff --git a/src/hydro/time_step.hpp b/src/hydro/time_step.hpp index ab94623c..20c65346 100644 --- a/src/hydro/time_step.hpp +++ b/src/hydro/time_step.hpp @@ -22,7 +22,7 @@ #include "concepts.hpp" -namespace novapp { +namespace hclpp { //! Time step with the cfl condition //! @param[in] range output iteration range @@ -81,4 +81,4 @@ template return 1 / inverse_dt; } -} // namespace novapp +} // namespace hclpp diff --git a/src/initialization_interface.cpp b/src/initialization_interface.cpp index 3a343532..685a977a 100644 --- a/src/initialization_interface.cpp +++ b/src/initialization_interface.cpp @@ -8,7 +8,7 @@ #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { IInitializationProblem::IInitializationProblem() = default; @@ -22,4 +22,4 @@ IInitializationProblem& IInitializationProblem::operator=(IInitializationProblem IInitializationProblem& IInitializationProblem::operator=(IInitializationProblem&& /*rhs*/) noexcept = default; -} // namespace novapp +} // namespace hclpp diff --git a/src/initialization_interface.hpp b/src/initialization_interface.hpp index 4e0d78e4..753e3a55 100644 --- a/src/initialization_interface.hpp +++ b/src/initialization_interface.hpp @@ -10,7 +10,7 @@ #include -namespace novapp { +namespace hclpp { class Grid; class Range; @@ -40,4 +40,4 @@ class IInitializationProblem = 0; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/io/io.cpp b/src/io/io.cpp index 4487b985..56096798 100644 --- a/src/io/io.cpp +++ b/src/io/io.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -33,22 +33,22 @@ namespace { -void write_string_attribute(novapp::RaiiH5Hid const& file_id, char const* const attribute_name, std::string_view const attribute_value) +void write_string_attribute(hclpp::RaiiH5Hid const& file_id, char const* const attribute_name, std::string_view const attribute_value) { - novapp::RaiiH5Hid const space_id(::H5Screate(H5S_SCALAR), ::H5Sclose); + hclpp::RaiiH5Hid const space_id(::H5Screate(H5S_SCALAR), ::H5Sclose); - novapp::RaiiH5Hid const type_id(::H5Tcopy(H5T_C_S1), ::H5Tclose); + hclpp::RaiiH5Hid const type_id(::H5Tcopy(H5T_C_S1), ::H5Tclose); if (::H5Tset_size(*type_id, attribute_value.size()) < 0) { - throw std::runtime_error("Nova++ error: defining the size of the datatype failed"); + throw std::runtime_error("HERACLES++ error: defining the size of the datatype failed"); } if (::H5Tset_cset(*type_id, H5T_CSET_UTF8) < 0) { - throw std::runtime_error("Nova++ error: defining utf-8 character set failed"); + throw std::runtime_error("HERACLES++ error: defining utf-8 character set failed"); } - novapp::RaiiH5Hid const attr_id(::H5Acreate2(*file_id, attribute_name, *type_id, *space_id, H5P_DEFAULT, H5P_DEFAULT), ::H5Aclose); + hclpp::RaiiH5Hid const attr_id(::H5Acreate2(*file_id, attribute_name, *type_id, *space_id, H5P_DEFAULT, H5P_DEFAULT), ::H5Aclose); if (::H5Awrite(*attr_id, *type_id, attribute_value.data()) < 0) { - throw std::runtime_error("Nova++ error: writing attribute failed"); + throw std::runtime_error("HERACLES++ error: writing attribute failed"); } } @@ -122,7 +122,7 @@ class IndentFn } // namespace -namespace novapp { +namespace hclpp { void print_simulation_status(std::ostream& os, int const iter, double const current, double const time_out, int const output_id) { @@ -567,4 +567,4 @@ void XmlWriter::operator()( xdmfFile << indent << "\n"; } -} // namespace novapp +} // namespace hclpp diff --git a/src/io/io.hpp b/src/io/io.hpp index b224d1ca..29ad3402 100644 --- a/src/io/io.hpp +++ b/src/io/io.hpp @@ -16,7 +16,7 @@ #include -namespace novapp { +namespace hclpp { class Grid; class Param; @@ -80,4 +80,4 @@ class XmlWriter KDV_double_1d& x2) const; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/io/io_hdf5.hpp b/src/io/io_hdf5.hpp index 8ece9144..38a54779 100644 --- a/src/io/io_hdf5.hpp +++ b/src/io/io_hdf5.hpp @@ -12,7 +12,7 @@ #include -namespace novapp { +namespace hclpp { class RaiiH5Hid { @@ -25,7 +25,7 @@ class RaiiH5Hid RaiiH5Hid(hid_t id, herr_t (*f)(hid_t)) : m_id(id), m_close(f) { if (m_id < 0 || !m_close) { - throw std::runtime_error("Nova++ error: creating h5 id failed"); + throw std::runtime_error("HERACLES++ error: creating h5 id failed"); } } @@ -60,13 +60,13 @@ void check_extent_dset(RaiiH5Hid const& file_id, char const* const dset_path, st RaiiH5Hid const dspace(::H5Dget_space(*dset_id), ::H5Sclose); int const ndims = ::H5Sget_simple_extent_ndims(*dspace); if (ndims != N) { - throw std::runtime_error("Nova++ error: Expecting a 1d dataset"); + throw std::runtime_error("HERACLES++ error: Expecting a 1d dataset"); } std::array dset_extent {}; ::H5Sget_simple_extent_dims(*dspace, dset_extent.data(), nullptr); if (!std::ranges::equal(dset_extent, expected_extents)) { - throw std::runtime_error("Nova++ error: Extents do not match"); + throw std::runtime_error("HERACLES++ error: Extents do not match"); } } -} // namespace novapp +} // namespace hclpp diff --git a/src/main.cpp b/src/main.cpp index c2ef40e6..3563c565 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,8 +47,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -66,17 +66,17 @@ #include "setup.hpp" #include "shift_criterion_interface.hpp" -namespace novapp { +namespace hclpp { namespace { -#if defined(NOVAPP_GRAVITY_Uniform) +#if defined(HERACLESPP_GRAVITY_Uniform) using Gravity = UniformGravity; std::string_view const gravity_label("Uniform"); -#elif defined(NOVAPP_GRAVITY_Point_mass) +#elif defined(HERACLESPP_GRAVITY_Point_mass) using Gravity = PointMassGravity; std::string_view const gravity_label("Point_mass"); -#elif defined(NOVAPP_GRAVITY_Internal_mass) +#elif defined(HERACLESPP_GRAVITY_Internal_mass) using Gravity = InternalMassGravity; std::string_view const gravity_label("Internal_mass"); #else @@ -85,11 +85,11 @@ static_assert(false, "Gravity not defined"); Gravity make_gravity(Param const& param, [[maybe_unused]] Grid const& grid, [[maybe_unused]] KV_cdouble_3d const& rho) { -#if defined(NOVAPP_GRAVITY_Uniform) +#if defined(HERACLESPP_GRAVITY_Uniform) return make_uniform_gravity(param.gx0, param.gx1, param.gx2); -#elif defined(NOVAPP_GRAVITY_Point_mass) +#elif defined(HERACLESPP_GRAVITY_Point_mass) return make_point_mass_gravity(param.M, grid); -#elif defined(NOVAPP_GRAVITY_Internal_mass) +#elif defined(HERACLESPP_GRAVITY_Internal_mass) return make_internal_mass_gravity(param.M, grid, rho); #endif } @@ -351,10 +351,10 @@ void main(int argc, char** argv) double const initial_mass = integrate(grid.range.no_ghosts(), grid, rho.view_device()); - Kokkos::fence("Nova++: before main time loop"); + Kokkos::fence("HERACLES++: before main time loop"); MPI_Barrier(grid.comm_cart); std::chrono::steady_clock::time_point const start = std::chrono::steady_clock::now(); - Kokkos::Profiling::pushRegion("Nova++: main time loop"); + Kokkos::Profiling::pushRegion("HERACLES++: main time loop"); // Main timestep loop while (!should_exit) { @@ -570,7 +570,7 @@ void main(int argc, char** argv) } } - Kokkos::fence("Nova++: after main time loop"); + Kokkos::fence("HERACLES++: after main time loop"); MPI_Barrier(grid.comm_cart); Kokkos::Profiling::popRegion(); std::chrono::steady_clock::time_point const end = std::chrono::steady_clock::now(); @@ -599,12 +599,12 @@ void main(int argc, char** argv) } // namespace -} // namespace novapp +} // namespace hclpp int main(int argc, char** argv) { try { - novapp::main(argc, argv); + hclpp::main(argc, argv); } catch (std::exception const& e) { std::cerr << e.what() << '\n'; return EXIT_FAILURE; diff --git a/src/mesh/geometry.cpp b/src/mesh/geometry.cpp index 916d163c..3e65a1fb 100644 --- a/src/mesh/geometry.cpp +++ b/src/mesh/geometry.cpp @@ -15,7 +15,7 @@ #include "geometry.hpp" #include "range.hpp" -namespace novapp { +namespace hclpp { IComputeGeom::IComputeGeom() = default; @@ -125,4 +125,4 @@ void Spherical::execute( } } -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/geometry.hpp b/src/mesh/geometry.hpp index a90b93d8..f0e4df02 100644 --- a/src/mesh/geometry.hpp +++ b/src/mesh/geometry.hpp @@ -10,7 +10,7 @@ #include -namespace novapp { +namespace hclpp { class Range; @@ -72,4 +72,4 @@ class Spherical : public IComputeGeom KV_double_3d const& dv) const final; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/geometry_factory.cpp b/src/mesh/geometry_factory.cpp index ff362cdf..9d9a3d1f 100644 --- a/src/mesh/geometry_factory.cpp +++ b/src/mesh/geometry_factory.cpp @@ -13,7 +13,7 @@ #include "geometry.hpp" #include "geometry_factory.hpp" -namespace novapp { +namespace hclpp { std::unique_ptr factory_grid_geometry() { @@ -28,4 +28,4 @@ std::unique_ptr factory_grid_geometry() throw std::runtime_error("Invalid grid geometry: ."); } -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/geometry_factory.hpp b/src/mesh/geometry_factory.hpp index cb2a0661..1d5cecb7 100644 --- a/src/mesh/geometry_factory.hpp +++ b/src/mesh/geometry_factory.hpp @@ -10,10 +10,10 @@ #include -namespace novapp { +namespace hclpp { class IComputeGeom; std::unique_ptr factory_grid_geometry(); -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/grid.cpp b/src/mesh/grid.cpp index 736df259..5232cb71 100644 --- a/src/mesh/grid.cpp +++ b/src/mesh/grid.cpp @@ -24,7 +24,7 @@ #include "grid.hpp" #include "range.hpp" -namespace novapp { +namespace hclpp { namespace { @@ -188,4 +188,4 @@ void Grid::print_grid(std::ostream& os) const print_info(os, "Corner_max[2]", range.Corner_max[2]); } -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/grid.hpp b/src/mesh/grid.hpp index 3552db85..6504b175 100644 --- a/src/mesh/grid.hpp +++ b/src/mesh/grid.hpp @@ -18,7 +18,7 @@ #include "range.hpp" -namespace novapp { +namespace hclpp { class Grid { @@ -74,4 +74,4 @@ class Grid void mpi_decomposition(); }; -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/grid_factory.cpp b/src/mesh/grid_factory.cpp index 60c3c326..80643a53 100644 --- a/src/mesh/grid_factory.cpp +++ b/src/mesh/grid_factory.cpp @@ -13,7 +13,7 @@ #include "grid_factory.hpp" #include "grid_type.hpp" -namespace novapp { +namespace hclpp { class Param; @@ -26,4 +26,4 @@ std::unique_ptr factory_grid_type(std::string const& grid, Param cons throw std::runtime_error("Unknown grid type : " + grid + "."); } -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/grid_factory.hpp b/src/mesh/grid_factory.hpp index b9a18d15..23298be5 100644 --- a/src/mesh/grid_factory.hpp +++ b/src/mesh/grid_factory.hpp @@ -11,11 +11,11 @@ #include #include -namespace novapp { +namespace hclpp { class IGridType; class Param; std::unique_ptr factory_grid_type(std::string const& grid, Param const& param); -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/grid_type.cpp b/src/mesh/grid_type.cpp index 4e78ec50..76823334 100644 --- a/src/mesh/grid_type.cpp +++ b/src/mesh/grid_type.cpp @@ -9,11 +9,11 @@ #include #include -#include +#include #include "grid_type.hpp" -namespace novapp { +namespace hclpp { //! Computes the position of nodes in a regular mesh given the length of cells //! @param[out] x The coordinates of nodes @@ -57,4 +57,4 @@ void Regular::execute( compute_regular_mesh_1d(x2_glob, Nghost[2], m_min[2], (m_max[2] - m_min[2]) / Nx_glob_ng[2]); } -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/grid_type.hpp b/src/mesh/grid_type.hpp index 061d7f0e..7962954d 100644 --- a/src/mesh/grid_type.hpp +++ b/src/mesh/grid_type.hpp @@ -12,7 +12,7 @@ #include -namespace novapp { +namespace hclpp { class Param; @@ -62,4 +62,4 @@ class Regular : public IGridType KVH_double_1d const& x2_glob) const final; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/range.cpp b/src/mesh/range.cpp index 4d65cc22..e13abc3c 100644 --- a/src/mesh/range.cpp +++ b/src/mesh/range.cpp @@ -16,7 +16,7 @@ #include "range.hpp" -namespace novapp { +namespace hclpp { Range::Range() = default; @@ -140,4 +140,4 @@ Kokkos::MDRangePolicy, Kokkos::Rank<3, Kokkos::Iterate::L return {begin, end}; } -} // namespace novapp +} // namespace hclpp diff --git a/src/mesh/range.hpp b/src/mesh/range.hpp index de4efa5f..fda02c25 100644 --- a/src/mesh/range.hpp +++ b/src/mesh/range.hpp @@ -14,7 +14,7 @@ #include -namespace novapp { +namespace hclpp { class Range { @@ -54,4 +54,4 @@ std::array, 2> cell_range(Range const& range); Kokkos::MDRangePolicy, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>> cell_mdrange(Range const& range); -} // namespace novapp +} // namespace hclpp diff --git a/src/moving_grid/moving_grid.cpp b/src/moving_grid/moving_grid.cpp index 862eb300..e2683e5b 100644 --- a/src/moving_grid/moving_grid.cpp +++ b/src/moving_grid/moving_grid.cpp @@ -10,7 +10,7 @@ #include "moving_grid.hpp" -namespace novapp { +namespace hclpp { void shift_grid( KV_cdouble_3d const& rho_old, @@ -71,4 +71,4 @@ void shift_array(KV_cdouble_4d const& var_old, KV_double_4d const& var_new) } } -} // namespace novapp +} // namespace hclpp diff --git a/src/moving_grid/moving_grid.hpp b/src/moving_grid/moving_grid.hpp index c5c18ed1..9a11495b 100644 --- a/src/moving_grid/moving_grid.hpp +++ b/src/moving_grid/moving_grid.hpp @@ -6,7 +6,7 @@ #include -namespace novapp { +namespace hclpp { class Grid; @@ -28,4 +28,4 @@ void shift_grid( KDV_double_1d& x2_glob, Grid& grid); -} // namespace novapp +} // namespace hclpp diff --git a/src/mpi_scope_guard.cpp b/src/mpi_scope_guard.cpp index 8cb9c887..fc8cdbd6 100644 --- a/src/mpi_scope_guard.cpp +++ b/src/mpi_scope_guard.cpp @@ -6,7 +6,7 @@ #include "mpi_scope_guard.hpp" -namespace novapp { +namespace hclpp { MpiScopeGuard::MpiScopeGuard() noexcept { @@ -23,4 +23,4 @@ MpiScopeGuard::~MpiScopeGuard() noexcept MPI_Finalize(); } -} // namespace novapp +} // namespace hclpp diff --git a/src/mpi_scope_guard.hpp b/src/mpi_scope_guard.hpp index 0fc574a9..180f8a2a 100644 --- a/src/mpi_scope_guard.hpp +++ b/src/mpi_scope_guard.hpp @@ -9,7 +9,7 @@ #pragma once -namespace novapp { +namespace hclpp { class MpiScopeGuard { @@ -29,4 +29,4 @@ class MpiScopeGuard MpiScopeGuard& operator=(MpiScopeGuard&& rhs) noexcept = delete; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/advection_gap/setup.hpp b/src/setups/advection_gap/setup.hpp index f3763f21..bfa9efdb 100644 --- a/src/setups/advection_gap/setup.hpp +++ b/src/setups/advection_gap/setup.hpp @@ -22,7 +22,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -87,4 +87,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/advection_sinus/setup.hpp b/src/setups/advection_sinus/setup.hpp index 37cbc034..d300666e 100644 --- a/src/setups/advection_sinus/setup.hpp +++ b/src/setups/advection_sinus/setup.hpp @@ -22,7 +22,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -75,4 +75,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/eq_hydro_sphe/setup.hpp b/src/setups/eq_hydro_sphe/setup.hpp index ed3368d0..324dc143 100644 --- a/src/setups/eq_hydro_sphe/setup.hpp +++ b/src/setups/eq_hydro_sphe/setup.hpp @@ -25,7 +25,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -151,4 +151,4 @@ class BoundarySetup : public IBoundaryCondition } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/gresho_vortex/setup.hpp b/src/setups/gresho_vortex/setup.hpp index 4573df51..87c363b1 100644 --- a/src/setups/gresho_vortex/setup.hpp +++ b/src/setups/gresho_vortex/setup.hpp @@ -23,7 +23,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -102,4 +102,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/heat_nickel/setup.hpp b/src/setups/heat_nickel/setup.hpp index 252bb07d..04088b8a 100644 --- a/src/setups/heat_nickel/setup.hpp +++ b/src/setups/heat_nickel/setup.hpp @@ -22,7 +22,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -83,4 +83,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/implosion_test/setup.hpp b/src/setups/implosion_test/setup.hpp index 575c7d65..5a486f56 100644 --- a/src/setups/implosion_test/setup.hpp +++ b/src/setups/implosion_test/setup.hpp @@ -22,7 +22,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -95,4 +95,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/kelvin_helmholtz/setup.hpp b/src/setups/kelvin_helmholtz/setup.hpp index cfa0b9f0..e2de5a76 100644 --- a/src/setups/kelvin_helmholtz/setup.hpp +++ b/src/setups/kelvin_helmholtz/setup.hpp @@ -21,7 +21,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -85,4 +85,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/rayleigh_taylor/setup.hpp b/src/setups/rayleigh_taylor/setup.hpp index 832562d4..03624b3f 100644 --- a/src/setups/rayleigh_taylor/setup.hpp +++ b/src/setups/rayleigh_taylor/setup.hpp @@ -22,7 +22,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -95,4 +95,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/rayleigh_taylor3d/setup.hpp b/src/setups/rayleigh_taylor3d/setup.hpp index 914442e6..2222b7f3 100644 --- a/src/setups/rayleigh_taylor3d/setup.hpp +++ b/src/setups/rayleigh_taylor3d/setup.hpp @@ -29,7 +29,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -163,4 +163,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/sedov1d/setup.hpp b/src/setups/sedov1d/setup.hpp index a7ade57d..c96fcb38 100644 --- a/src/setups/sedov1d/setup.hpp +++ b/src/setups/sedov1d/setup.hpp @@ -23,7 +23,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -102,4 +102,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/sedov2d/setup.hpp b/src/setups/sedov2d/setup.hpp index be9eaefa..37239d45 100644 --- a/src/setups/sedov2d/setup.hpp +++ b/src/setups/sedov2d/setup.hpp @@ -24,7 +24,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -103,4 +103,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/sedov3d/setup.hpp b/src/setups/sedov3d/setup.hpp index c1a1979f..3c7a225a 100644 --- a/src/setups/sedov3d/setup.hpp +++ b/src/setups/sedov3d/setup.hpp @@ -24,7 +24,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -93,4 +93,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/shock_tube/setup.hpp b/src/setups/shock_tube/setup.hpp index 7be2d4c8..1d7d3fd0 100644 --- a/src/setups/shock_tube/setup.hpp +++ b/src/setups/shock_tube/setup.hpp @@ -22,7 +22,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -92,4 +92,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/shock_wall/setup.hpp b/src/setups/shock_wall/setup.hpp index b07533d8..6a1a9aa6 100644 --- a/src/setups/shock_wall/setup.hpp +++ b/src/setups/shock_wall/setup.hpp @@ -21,7 +21,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -76,4 +76,4 @@ class InitializationSetup : public IInitializationProblem } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/stratified_atm/setup.hpp b/src/setups/stratified_atm/setup.hpp index 8685dfff..17e52c6a 100644 --- a/src/setups/stratified_atm/setup.hpp +++ b/src/setups/stratified_atm/setup.hpp @@ -26,7 +26,7 @@ #include "default_user_step.hpp" // IWYU pragma: keep #include "initialization_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -160,4 +160,4 @@ class BoundarySetup : public IBoundaryCondition } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/setups/v1d/setup.hpp b/src/setups/v1d/setup.hpp index b80058c5..0517f96f 100644 --- a/src/setups/v1d/setup.hpp +++ b/src/setups/v1d/setup.hpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #if !defined(NDEBUG) @@ -37,7 +37,7 @@ #include "initialization_interface.hpp" #include "shift_criterion_interface.hpp" -namespace novapp { +namespace hclpp { class ParamSetup { @@ -220,4 +220,4 @@ class UserShiftCriterion : public IShiftCriterion } }; -} // namespace novapp +} // namespace hclpp diff --git a/src/shift_criterion_interface.cpp b/src/shift_criterion_interface.cpp index a98e23d5..1093097e 100644 --- a/src/shift_criterion_interface.cpp +++ b/src/shift_criterion_interface.cpp @@ -15,7 +15,7 @@ #include "shift_criterion_interface.hpp" -namespace novapp { +namespace hclpp { IShiftCriterion::IShiftCriterion() = default; @@ -43,4 +43,4 @@ bool NoShiftGrid::execute( return false; } -} // namespace novapp +} // namespace hclpp diff --git a/src/shift_criterion_interface.hpp b/src/shift_criterion_interface.hpp index 2de8647d..6c42fab9 100644 --- a/src/shift_criterion_interface.hpp +++ b/src/shift_criterion_interface.hpp @@ -10,7 +10,7 @@ #include -namespace novapp { +namespace hclpp { class Grid; class Range; @@ -52,4 +52,4 @@ class NoShiftGrid : public IShiftCriterion KV_cdouble_4d const& fx) const final; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/thermodynamics/perfect_gas.cpp b/src/thermodynamics/perfect_gas.cpp index 772fcbdc..bbb1ed01 100644 --- a/src/thermodynamics/perfect_gas.cpp +++ b/src/thermodynamics/perfect_gas.cpp @@ -8,7 +8,7 @@ #include "perfect_gas.hpp" -namespace novapp::thermodynamics { +namespace hclpp::thermodynamics { PerfectGas::PerfectGas(double const gamma, double const mmw) : m_gamma(gamma), m_gamma_m1(gamma - 1), m_mmw(mmw) { @@ -21,4 +21,4 @@ PerfectGas::PerfectGas(double const gamma, double const mmw) : m_gamma(gamma), m } } -} // namespace novapp::thermodynamics +} // namespace hclpp::thermodynamics diff --git a/src/thermodynamics/perfect_gas.hpp b/src/thermodynamics/perfect_gas.hpp index a2bb2cbf..228b5164 100644 --- a/src/thermodynamics/perfect_gas.hpp +++ b/src/thermodynamics/perfect_gas.hpp @@ -12,7 +12,7 @@ #include #include -namespace novapp::thermodynamics { +namespace hclpp::thermodynamics { class PerfectGas { @@ -89,4 +89,4 @@ class PerfectGas } }; -} // namespace novapp::thermodynamics +} // namespace hclpp::thermodynamics diff --git a/src/thermodynamics/rad_gas.cpp b/src/thermodynamics/rad_gas.cpp index 7d156427..f8a2c700 100644 --- a/src/thermodynamics/rad_gas.cpp +++ b/src/thermodynamics/rad_gas.cpp @@ -8,7 +8,7 @@ #include "rad_gas.hpp" -namespace novapp::thermodynamics { +namespace hclpp::thermodynamics { RadGas::RadGas(double const gamma, double const mmw) : m_gamma(gamma), m_gamma_m1(gamma - 1), m_mmw(mmw) { @@ -21,4 +21,4 @@ RadGas::RadGas(double const gamma, double const mmw) : m_gamma(gamma), m_gamma_m } } -} // namespace novapp::thermodynamics +} // namespace hclpp::thermodynamics diff --git a/src/thermodynamics/rad_gas.hpp b/src/thermodynamics/rad_gas.hpp index 5aa9644e..442b9dc1 100644 --- a/src/thermodynamics/rad_gas.hpp +++ b/src/thermodynamics/rad_gas.hpp @@ -13,7 +13,7 @@ #include #include -namespace novapp::thermodynamics { +namespace hclpp::thermodynamics { class RadGas { @@ -148,4 +148,4 @@ class RadGas } }; -} // namespace novapp::thermodynamics +} // namespace hclpp::thermodynamics diff --git a/src/units/units.hpp b/src/units/units.hpp index f9a98785..155a20b1 100644 --- a/src/units/units.hpp +++ b/src/units/units.hpp @@ -11,7 +11,7 @@ #include -namespace novapp::units { +namespace hclpp::units { // code units in SI : kg / meter / second constexpr double unit_M = 1.0; // Mass : kilogram @@ -93,4 +93,4 @@ constexpr double Mpc = kpc * 1E3; constexpr double Pascal = kg / (m * s2); // kg.m^{-1}.s^{-1} constexpr double H0 = 7.2E1 * m * 1E3 / Mpc; // Hubble constant -} // namespace novapp::units +} // namespace hclpp::units diff --git a/src/user_step/user_step.cpp b/src/user_step/user_step.cpp index 57794075..3265d96b 100644 --- a/src/user_step/user_step.cpp +++ b/src/user_step/user_step.cpp @@ -15,7 +15,7 @@ #include "user_step.hpp" -namespace novapp { +namespace hclpp { IUserStep::IUserStep() = default; @@ -69,4 +69,4 @@ void HeatNickelStep::execute( }); } -} // namespace novapp +} // namespace hclpp diff --git a/src/user_step/user_step.hpp b/src/user_step/user_step.hpp index 13f2b4c8..01c9e3ef 100644 --- a/src/user_step/user_step.hpp +++ b/src/user_step/user_step.hpp @@ -10,7 +10,7 @@ #include -namespace novapp { +namespace hclpp { class Range; @@ -44,4 +44,4 @@ class HeatNickelStep : public IUserStep void execute(Range const& range, double t, double dt, KV_double_3d const& rho, KV_double_3d const& E, KV_double_4d const& fx) const final; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/user_step/user_step_factory.cpp b/src/user_step/user_step_factory.cpp index e00e9f0d..d1134243 100644 --- a/src/user_step/user_step_factory.cpp +++ b/src/user_step/user_step_factory.cpp @@ -13,7 +13,7 @@ #include "user_step.hpp" #include "user_step_factory.hpp" -namespace novapp { +namespace hclpp { std::unique_ptr factory_user_step(std::string const& user_step) { @@ -28,4 +28,4 @@ std::unique_ptr factory_user_step(std::string const& user_step) throw std::runtime_error("Unknown user step: " + user_step + "."); } -} // namespace novapp +} // namespace hclpp diff --git a/src/user_step/user_step_factory.hpp b/src/user_step/user_step_factory.hpp index 874a04a8..15a16bd7 100644 --- a/src/user_step/user_step_factory.hpp +++ b/src/user_step/user_step_factory.hpp @@ -11,10 +11,10 @@ #include #include -namespace novapp { +namespace hclpp { class IUserStep; std::unique_ptr factory_user_step(std::string const& user_step); -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 998c0f0e..41aceddb 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -40,7 +40,7 @@ target_compile_features(utils PUBLIC cxx_std_20) target_link_libraries(utils INTERFACE Kokkos::kokkos thermodynamics PUBLIC inih) target_sources( utils - PRIVATE nova_params.cpp ${CMAKE_CURRENT_BINARY_DIR}/git_version.cpp + PRIVATE param.cpp ${CMAKE_CURRENT_BINARY_DIR}/git_version.cpp INTERFACE FILE_SET interface_utils TYPE HEADERS @@ -57,7 +57,7 @@ target_sources( int_cast.hpp kokkos_shortcut.hpp kronecker.hpp - nova_params.hpp + param.hpp print_info.hpp ) diff --git a/src/utils/eos.hpp.in b/src/utils/eos.hpp.in index 0e5befca..5636ecc0 100644 --- a/src/utils/eos.hpp.in +++ b/src/utils/eos.hpp.in @@ -15,14 +15,14 @@ #include #include -namespace novapp +namespace hclpp { -inline constexpr std::string_view eos_choice = "@Novapp_EOS@"; +inline constexpr std::string_view eos_choice = "@Heraclespp_EOS@"; using EOS = std::conditional_t< eos_choice == "PerfectGas", thermodynamics::PerfectGas, thermodynamics::RadGas>; -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/geom.hpp.in b/src/utils/geom.hpp.in index 2f9e0c2a..7d8a835c 100644 --- a/src/utils/geom.hpp.in +++ b/src/utils/geom.hpp.in @@ -11,10 +11,10 @@ #include -namespace novapp +namespace hclpp { -inline constexpr std::string_view geom_choice = "@Novapp_GEOM@"; +inline constexpr std::string_view geom_choice = "@Heraclespp_GEOM@"; enum Geometry { @@ -24,4 +24,4 @@ enum Geometry constexpr Geometry geom = geom_choice == "Spherical" ? Geometry::Geom_spherical : Geometry::Geom_cartesian; -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/git_version.cpp.in b/src/utils/git_version.cpp.in index 6042c8b7..fdf63a80 100644 --- a/src/utils/git_version.cpp.in +++ b/src/utils/git_version.cpp.in @@ -6,11 +6,11 @@ #include "git_version.hpp" -namespace novapp { +namespace hclpp { std::string_view const git_build_string("@GIT_BUILD_STRING@"); std::string_view const git_branch("@GIT_BRANCH@"); std::string_view const compile_date("@DATE_STRING@"); std::string_view const compile_time("@TIME_STRING@"); -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/git_version.hpp b/src/utils/git_version.hpp index 66d1916f..f91e2ea7 100644 --- a/src/utils/git_version.hpp +++ b/src/utils/git_version.hpp @@ -6,11 +6,11 @@ #include -namespace novapp { +namespace hclpp { extern std::string_view const git_build_string; extern std::string_view const git_branch; extern std::string_view const compile_date; extern std::string_view const compile_time; -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/int_cast.hpp b/src/utils/int_cast.hpp index ac7be89f..5feb5218 100644 --- a/src/utils/int_cast.hpp +++ b/src/utils/int_cast.hpp @@ -7,7 +7,7 @@ #include #include -namespace novapp { +namespace hclpp { template R int_cast(T t) @@ -18,4 +18,4 @@ R int_cast(T t) throw std::runtime_error("Conversion cannot preserve value representation"); } -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/kokkos_shortcut.hpp b/src/utils/kokkos_shortcut.hpp index c06f3c97..00fa9b01 100644 --- a/src/utils/kokkos_shortcut.hpp +++ b/src/utils/kokkos_shortcut.hpp @@ -15,7 +15,7 @@ #include #include -namespace novapp { +namespace hclpp { using Kokkos::ALL; @@ -104,4 +104,4 @@ bool equal_extents(std::initializer_list idx, View0 const& view0, V return std::ranges::all_of(idx, [&](std::size_t const i) -> bool { return equal_extents(i, view0, views...); }); } -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/kronecker.hpp b/src/utils/kronecker.hpp index 9ba83247..713c5e76 100644 --- a/src/utils/kronecker.hpp +++ b/src/utils/kronecker.hpp @@ -10,7 +10,7 @@ #include -namespace novapp { +namespace hclpp { KOKKOS_FORCEINLINE_FUNCTION constexpr int kron(int a, int b) noexcept @@ -34,4 +34,4 @@ constexpr Kokkos::Array rindex(int a, int i0, int i1, int i2) noexcept return Kokkos::Array {i0 + kron(a, 0), i1 + kron(a, 1), i2 + kron(a, 2)}; } -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/ndim.hpp.in b/src/utils/ndim.hpp.in index 48f83fcc..a704b5fd 100644 --- a/src/utils/ndim.hpp.in +++ b/src/utils/ndim.hpp.in @@ -9,13 +9,13 @@ #pragma once -namespace novapp +namespace hclpp { -inline constexpr int ndim = @Novapp_NDIM@; +inline constexpr int ndim = @Heraclespp_NDIM@; static_assert(ndim > 0, "ndim > 0"); static_assert(ndim < 4, "ndim < 4"); inline constexpr int nfaces = 2 * ndim; -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/nova_params.cpp b/src/utils/param.cpp similarity index 98% rename from src/utils/nova_params.cpp rename to src/utils/param.cpp index 801a1699..265b85e7 100644 --- a/src/utils/nova_params.cpp +++ b/src/utils/param.cpp @@ -7,9 +7,9 @@ #include -#include "nova_params.hpp" +#include "param.hpp" -namespace novapp { +namespace hclpp { Param::Param(INIReader const& reader) : reader(reader) { @@ -82,4 +82,4 @@ Param& Param::operator=(Param const& rhs) = default; Param& Param::operator=(Param&& rhs) noexcept = default; -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/nova_params.hpp b/src/utils/param.hpp similarity index 97% rename from src/utils/nova_params.hpp rename to src/utils/param.hpp index 33fe4c3a..660c0ba6 100644 --- a/src/utils/nova_params.hpp +++ b/src/utils/param.hpp @@ -9,7 +9,7 @@ #include -namespace novapp { +namespace hclpp { class Param { @@ -69,4 +69,4 @@ class Param Param& operator=(Param&& rhs) noexcept; }; -} // namespace novapp +} // namespace hclpp diff --git a/src/utils/print_info.hpp b/src/utils/print_info.hpp index fa508b73..58be9af6 100644 --- a/src/utils/print_info.hpp +++ b/src/utils/print_info.hpp @@ -9,7 +9,7 @@ #include #include -namespace novapp { +namespace hclpp { template void print_info(std::ostream& os, std::string_view const var_name, T const& var_value) @@ -19,4 +19,4 @@ void print_info(std::ostream& os, std::string_view const var_name, T const& var_ os << std::right << std::setw(fill_width) << std::setfill('.') << var_value << '\n'; } -} // namespace novapp +} // namespace hclpp diff --git a/test/build_suite_full.py b/test/build_suite_full.py index 646193f2..f1cbbcf8 100755 --- a/test/build_suite_full.py +++ b/test/build_suite_full.py @@ -32,16 +32,16 @@ def build_suite(sources: pathlib.Path, setups: typing.List[typing.Dict]): [ "cmake", "-DBUILD_TESTING=OFF", - "-DNovapp_BUILD_BENCHMARKING=OFF", - f"-DNovapp_EOS={cmake_options['eos']}", - f"-DNovapp_GEOM={cmake_options['geom']}", - f"-DNovapp_GRAVITY={cmake_options['gravity']}", - "-DNovapp_benchmark_DEPENDENCY_POLICY=INSTALLED", - "-DNovapp_GTest_DEPENDENCY_POLICY=INSTALLED", - "-DNovapp_inih_DEPENDENCY_POLICY=INSTALLED", - "-DNovapp_Kokkos_DEPENDENCY_POLICY=INSTALLED", - f"-DNovapp_NDIM={cmake_options['ndim']}", - f"-DNovapp_SETUP={setup['name']}", + "-DHeraclespp_BUILD_BENCHMARKING=OFF", + f"-DHeraclespp_EOS={cmake_options['eos']}", + f"-DHeraclespp_GEOM={cmake_options['geom']}", + f"-DHeraclespp_GRAVITY={cmake_options['gravity']}", + "-DHeraclespp_benchmark_DEPENDENCY_POLICY=INSTALLED", + "-DHeraclespp_GTest_DEPENDENCY_POLICY=INSTALLED", + "-DHeraclespp_inih_DEPENDENCY_POLICY=INSTALLED", + "-DHeraclespp_Kokkos_DEPENDENCY_POLICY=INSTALLED", + f"-DHeraclespp_NDIM={cmake_options['ndim']}", + f"-DHeraclespp_SETUP={setup['name']}", "-B", build_directory, "-S", @@ -64,10 +64,15 @@ def main(): """main function""" parser = argparse.ArgumentParser(description="Build suite") parser.add_argument( - "filename", type=pathlib.Path, help="Path to input YAML configuration filename" + "filename", + type=pathlib.Path, + help="Path to input YAML configuration filename", ) parser.add_argument( - "-S", default=pathlib.Path.cwd(), type=pathlib.Path, help="Path to the nova++ sources" + "-S", + default=pathlib.Path.cwd(), + type=pathlib.Path, + help="Path to the heracles++ sources", ) args = parser.parse_args() diff --git a/test/convergence_advection_sinus/run_convergence_advection_sinus.py b/test/convergence_advection_sinus/run_convergence_advection_sinus.py index 4dba35b4..a88adb86 100755 --- a/test/convergence_advection_sinus/run_convergence_advection_sinus.py +++ b/test/convergence_advection_sinus/run_convergence_advection_sinus.py @@ -16,8 +16,10 @@ def run_convergence_test(sources: pathlib.Path): """Run convergence sinus test""" - pdi_config_path = sources.joinpath("test/convergence_advection_sinus/pdi_config.yaml") - binary_path = sources.joinpath("bin/nova++") + pdi_config_path = sources.joinpath( + "test/convergence_advection_sinus/pdi_config.yaml" + ) + binary_path = sources.joinpath("bin/heracles++") base_setup_config_path = sources.joinpath("inputs/advection_sinus.ini") try: @@ -66,7 +68,10 @@ def main(): """main function""" parser = argparse.ArgumentParser(description="") parser.add_argument( - "-S", default=pathlib.Path.cwd(), type=pathlib.Path, help="Path to the nova++ sources" + "-S", + default=pathlib.Path.cwd(), + type=pathlib.Path, + help="Path to the heracles++ sources", ) args = parser.parse_args() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 19c1b6a5..94faf2f6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -23,6 +23,6 @@ add_executable( int_cast.cpp ) target_compile_features(unit_tests PUBLIC cxx_std_17) -target_link_libraries(unit_tests PUBLIC libnova++ GTest::gtest) +target_link_libraries(unit_tests PUBLIC libheracles++ GTest::gtest) gtest_discover_tests(unit_tests DISCOVERY_MODE PRE_TEST) diff --git a/tests/broadcast.cpp b/tests/broadcast.cpp index 29dd85a0..35ec6094 100644 --- a/tests/broadcast.cpp +++ b/tests/broadcast.cpp @@ -16,7 +16,7 @@ TEST(BroadcastScalar, Case1d) { - if (novapp::ndim != 1) { + if (hclpp::ndim != 1) { GTEST_SKIP(); } @@ -31,15 +31,15 @@ TEST(BroadcastScalar, Case1d) int const nx1_wg = nx1; int const nx2_wg = nx2; - novapp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); - novapp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); + hclpp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); + hclpp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); Kokkos::deep_copy(array.view_device(), outer_value); array.modify_device(); - novapp::broadcast(rng.no_ghosts(), inner_value, array.view_device()); + hclpp::broadcast(rng.no_ghosts(), inner_value, array.view_device()); array.modify_device(); array.sync_host(); { - auto const array_h = novapp::view_host(array); + auto const array_h = hclpp::view_host(array); for (int i = 0; i < nx0_wg; ++i) { for (int j = 0; j < nx1_wg; ++j) { for (int k = 0; k < nx2_wg; ++k) { @@ -56,7 +56,7 @@ TEST(BroadcastScalar, Case1d) TEST(BroadcastScalar, Case2d) { - if (novapp::ndim != 2) { + if (hclpp::ndim != 2) { GTEST_SKIP(); } @@ -71,15 +71,15 @@ TEST(BroadcastScalar, Case2d) int const nx1_wg = nx1 + (2 * ng); int const nx2_wg = nx2; - novapp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); - novapp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); + hclpp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); + hclpp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); Kokkos::deep_copy(array.view_device(), outer_value); array.modify_device(); - novapp::broadcast(rng.no_ghosts(), inner_value, array.view_device()); + hclpp::broadcast(rng.no_ghosts(), inner_value, array.view_device()); array.modify_device(); array.sync_host(); { - auto const array_h = novapp::view_host(array); + auto const array_h = hclpp::view_host(array); for (int i = 0; i < nx0_wg; ++i) { for (int j = 0; j < nx1_wg; ++j) { for (int k = 0; k < nx2_wg; ++k) { @@ -96,7 +96,7 @@ TEST(BroadcastScalar, Case2d) TEST(BroadcastScalar, Case3d) { - if (novapp::ndim != 3) { + if (hclpp::ndim != 3) { GTEST_SKIP(); } @@ -111,15 +111,15 @@ TEST(BroadcastScalar, Case3d) int const nx1_wg = nx1 + (2 * ng); int const nx2_wg = nx2 + (2 * ng); - novapp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); - novapp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); + hclpp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); + hclpp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); Kokkos::deep_copy(array.view_device(), outer_value); array.modify_device(); - novapp::broadcast(rng.no_ghosts(), inner_value, array.view_device()); + hclpp::broadcast(rng.no_ghosts(), inner_value, array.view_device()); array.modify_device(); array.sync_host(); { - auto const array_h = novapp::view_host(array); + auto const array_h = hclpp::view_host(array); for (int i = 0; i < nx0_wg; ++i) { for (int j = 0; j < nx1_wg; ++j) { for (int k = 0; k < nx2_wg; ++k) { @@ -136,7 +136,7 @@ TEST(BroadcastScalar, Case3d) TEST(BroadcastArray, Case1d) { - if (novapp::ndim != 1) { + if (hclpp::ndim != 1) { GTEST_SKIP(); } @@ -151,17 +151,17 @@ TEST(BroadcastArray, Case1d) int const nx1_wg = nx1; int const nx2_wg = nx2; - novapp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); - novapp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); + hclpp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); + hclpp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); Kokkos::deep_copy(array.view_device(), outer_value); array.modify_device(); - novapp::KV_double_1d const arr("arr", nx0); + hclpp::KV_double_1d const arr("arr", nx0); Kokkos::deep_copy(arr, inner_value); - novapp::broadcast(rng.no_ghosts(), arr, array.view_device()); + hclpp::broadcast(rng.no_ghosts(), arr, array.view_device()); array.modify_device(); array.sync_host(); { - auto const array_h = novapp::view_host(array); + auto const array_h = hclpp::view_host(array); for (int i = 0; i < nx0_wg; ++i) { for (int j = 0; j < nx1_wg; ++j) { for (int k = 0; k < nx2_wg; ++k) { @@ -178,7 +178,7 @@ TEST(BroadcastArray, Case1d) TEST(BroadcastArray, Case2d) { - if (novapp::ndim != 2) { + if (hclpp::ndim != 2) { GTEST_SKIP(); } @@ -193,17 +193,17 @@ TEST(BroadcastArray, Case2d) int const nx1_wg = nx1 + (2 * ng); int const nx2_wg = nx2; - novapp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); - novapp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); + hclpp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); + hclpp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); Kokkos::deep_copy(array.view_device(), outer_value); array.modify_device(); - novapp::KV_double_1d const arr("arr", nx0); + hclpp::KV_double_1d const arr("arr", nx0); Kokkos::deep_copy(arr, inner_value); - novapp::broadcast(rng.no_ghosts(), arr, array.view_device()); + hclpp::broadcast(rng.no_ghosts(), arr, array.view_device()); array.modify_device(); array.sync_host(); { - auto const array_h = novapp::view_host(array); + auto const array_h = hclpp::view_host(array); for (int i = 0; i < nx0_wg; ++i) { for (int j = 0; j < nx1_wg; ++j) { for (int k = 0; k < nx2_wg; ++k) { @@ -220,7 +220,7 @@ TEST(BroadcastArray, Case2d) TEST(BroadcastArray, Case3d) { - if (novapp::ndim != 3) { + if (hclpp::ndim != 3) { GTEST_SKIP(); } @@ -235,17 +235,17 @@ TEST(BroadcastArray, Case3d) int const nx1_wg = nx1 + (2 * ng); int const nx2_wg = nx2 + (2 * ng); - novapp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); - novapp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); + hclpp::Range const rng({0, 0, 0}, {nx0, nx1, nx2}, ng); + hclpp::KDV_double_3d array("array", nx0_wg, nx1_wg, nx2_wg); Kokkos::deep_copy(array.view_device(), outer_value); array.modify_device(); - novapp::KV_double_1d const arr("arr", 10); + hclpp::KV_double_1d const arr("arr", 10); Kokkos::deep_copy(arr, inner_value); - novapp::broadcast(rng.no_ghosts(), arr, array.view_device()); + hclpp::broadcast(rng.no_ghosts(), arr, array.view_device()); array.modify_device(); array.sync_host(); { - auto const array_h = novapp::view_host(array); + auto const array_h = hclpp::view_host(array); for (int i = 0; i < nx0_wg; ++i) { for (int j = 0; j < nx1_wg; ++j) { for (int k = 0; k < nx2_wg; ++k) { diff --git a/tests/conversions.cpp b/tests/conversions.cpp index 8ff28d3c..64c96262 100644 --- a/tests/conversions.cpp +++ b/tests/conversions.cpp @@ -23,39 +23,39 @@ TEST(Conversions, PrimToCons) double const u0 = -1.; double const P0 = 10.; - novapp::Range const range({0, 0, 0}, {n, n, n}, 0); - novapp::thermodynamics::PerfectGas const eos(2, 1); - novapp::EulerPrim prim; + hclpp::Range const range({0, 0, 0}, {n, n, n}, 0); + hclpp::thermodynamics::PerfectGas const eos(2, 1); + hclpp::EulerPrim prim; prim.rho = rho0; - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { prim.u[idim] = u0; } prim.P = P0; - novapp::KV_double_3d const rho_view("rho", n, n, n); - novapp::KV_double_4d const u_view("u", n, n, n, novapp::ndim); - novapp::KV_double_3d const P_view("P", n, n, n); + hclpp::KV_double_3d const rho_view("rho", n, n, n); + hclpp::KV_double_4d const u_view("u", n, n, n, hclpp::ndim); + hclpp::KV_double_3d const P_view("P", n, n, n); Kokkos::deep_copy(rho_view, prim.rho); - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { Kokkos::deep_copy(u_view, prim.u[idim]); } Kokkos::deep_copy(P_view, prim.P); - novapp::KDV_double_4d rhou_view("rhou", n, n, n, novapp::ndim); - novapp::KDV_double_3d E_view("E", n, n, n); + hclpp::KDV_double_4d rhou_view("rhou", n, n, n, hclpp::ndim); + hclpp::KDV_double_3d E_view("E", n, n, n); conv_prim_to_cons(range.all_ghosts(), eos, rho_view, u_view, P_view, rhou_view.view_device(), E_view.view_device()); rhou_view.modify_device(); E_view.modify_device(); rhou_view.sync_host(); E_view.sync_host(); - novapp::KDV_double_4d::t_host const rhou_host = novapp::view_host(rhou_view); - novapp::KDV_double_3d::t_host const E_host = novapp::view_host(E_view); - novapp::EulerCons const cons = to_cons(prim, eos); + hclpp::KDV_double_4d::t_host const rhou_host = hclpp::view_host(rhou_view); + hclpp::KDV_double_3d::t_host const E_host = hclpp::view_host(E_view); + hclpp::EulerCons const cons = to_cons(prim, eos); for (int k = 0; k < n; ++k) { for (int j = 0; j < n; ++j) { for (int i = 0; i < n; ++i) { - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { EXPECT_DOUBLE_EQ(rhou_host(i, j, k, idim), cons.rhou[idim]); } EXPECT_DOUBLE_EQ(E_host(i, j, k), cons.E); @@ -71,39 +71,39 @@ TEST(Conversions, ConsToPrim) double const rhou0 = -2.; double const E0 = 10.; - novapp::Range const range({0, 0, 0}, {n, n, n}, 0); - novapp::thermodynamics::PerfectGas const eos(2, 1); - novapp::EulerCons cons; + hclpp::Range const range({0, 0, 0}, {n, n, n}, 0); + hclpp::thermodynamics::PerfectGas const eos(2, 1); + hclpp::EulerCons cons; cons.rho = rho0; - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { cons.rhou[idim] = rhou0; } cons.E = E0; - novapp::KV_double_3d const rho_view("rho", n, n, n); - novapp::KV_double_4d const rhou_view("rhou", n, n, n, novapp::ndim); - novapp::KV_double_3d const E_view("E", n, n, n); + hclpp::KV_double_3d const rho_view("rho", n, n, n); + hclpp::KV_double_4d const rhou_view("rhou", n, n, n, hclpp::ndim); + hclpp::KV_double_3d const E_view("E", n, n, n); Kokkos::deep_copy(rho_view, cons.rho); - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { Kokkos::deep_copy(rhou_view, cons.rhou[idim]); } Kokkos::deep_copy(E_view, cons.E); - novapp::KDV_double_4d u_view("u", n, n, n, novapp::ndim); - novapp::KDV_double_3d P_view("P", n, n, n); + hclpp::KDV_double_4d u_view("u", n, n, n, hclpp::ndim); + hclpp::KDV_double_3d P_view("P", n, n, n); conv_cons_to_prim(range.all_ghosts(), eos, rho_view, rhou_view, E_view, u_view.view_device(), P_view.view_device()); u_view.modify_device(); P_view.modify_device(); u_view.sync_host(); P_view.sync_host(); - novapp::KDV_double_4d::t_host const u_host = novapp::view_host(u_view); - novapp::KDV_double_3d::t_host const P_host = novapp::view_host(P_view); - novapp::EulerPrim const prim = to_prim(cons, eos); + hclpp::KDV_double_4d::t_host const u_host = hclpp::view_host(u_view); + hclpp::KDV_double_3d::t_host const P_host = hclpp::view_host(P_view); + hclpp::EulerPrim const prim = to_prim(cons, eos); for (int k = 0; k < n; ++k) { for (int j = 0; j < n; ++j) { for (int i = 0; i < n; ++i) { - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { EXPECT_DOUBLE_EQ(u_host(i, j, k, idim), prim.u[idim]); } EXPECT_DOUBLE_EQ(P_host(i, j, k), prim.P); diff --git a/tests/euler_equations.cpp b/tests/euler_equations.cpp index 6d3cd774..cf02a6c9 100644 --- a/tests/euler_equations.cpp +++ b/tests/euler_equations.cpp @@ -14,7 +14,7 @@ TEST(EulerEquations, KineticEnergyFromPrim) double const u0 = 10.; double const P0 = 0.; - novapp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; + hclpp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; EXPECT_DOUBLE_EQ(compute_ek(prim), 100.); } @@ -24,7 +24,7 @@ TEST(EulerEquations, KineticEnergyFromCons) double const rhou0 = 20.; double const E0 = 100.; - novapp::EulerCons const cons {.rho = rho0, .rhou = {rhou0}, .E = E0}; + hclpp::EulerCons const cons {.rho = rho0, .rhou = {rhou0}, .E = E0}; EXPECT_DOUBLE_EQ(compute_ek(cons), 100.); } @@ -37,9 +37,9 @@ TEST(EulerEquations, FluxFromPrim) double const P0 = 0.; int const locdim = 0; - novapp::thermodynamics::PerfectGas const eos(gamma, mmw); - novapp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; - novapp::EulerFlux const flux = novapp::compute_flux(prim, locdim, eos); + hclpp::thermodynamics::PerfectGas const eos(gamma, mmw); + hclpp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; + hclpp::EulerFlux const flux = hclpp::compute_flux(prim, locdim, eos); EXPECT_DOUBLE_EQ(flux.rho, 20.); EXPECT_DOUBLE_EQ(flux.E, 1000.); EXPECT_DOUBLE_EQ(flux.rhou[0], 200.); @@ -54,9 +54,9 @@ TEST(EulerEquations, FluxFromCons) double const E0 = 100.; int const locdim = 0; - novapp::thermodynamics::PerfectGas const eos(gamma, mmw); - novapp::EulerCons const cons {.rho = rho0, .rhou = {rhou0}, .E = E0}; - novapp::EulerFlux const flux = novapp::compute_flux(cons, locdim, eos); + hclpp::thermodynamics::PerfectGas const eos(gamma, mmw); + hclpp::EulerCons const cons {.rho = rho0, .rhou = {rhou0}, .E = E0}; + hclpp::EulerFlux const flux = hclpp::compute_flux(cons, locdim, eos); EXPECT_DOUBLE_EQ(flux.rho, 20.); EXPECT_DOUBLE_EQ(flux.E, 1000.); EXPECT_DOUBLE_EQ(flux.rhou[0], 200.); @@ -70,9 +70,9 @@ TEST(EulerEquations, PrimToConsToPrim) double const u0 = 10.; double const P0 = 1.; - novapp::thermodynamics::PerfectGas const eos(gamma, mmw); - novapp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; - novapp::EulerPrim const prim_to_cons_to_prim = to_prim(to_cons(prim, eos), eos); + hclpp::thermodynamics::PerfectGas const eos(gamma, mmw); + hclpp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; + hclpp::EulerPrim const prim_to_cons_to_prim = to_prim(to_cons(prim, eos), eos); EXPECT_DOUBLE_EQ(prim.rho, prim_to_cons_to_prim.rho); EXPECT_DOUBLE_EQ(prim.P, prim_to_cons_to_prim.P); EXPECT_DOUBLE_EQ(prim.u[0], prim_to_cons_to_prim.u[0]); diff --git a/tests/gravity.cpp b/tests/gravity.cpp index 5ccd466b..6bec4384 100644 --- a/tests/gravity.cpp +++ b/tests/gravity.cpp @@ -23,7 +23,7 @@ namespace { void test_gravity_internal_gravity() { // The target function does not work in 1D and 2D - if constexpr (novapp::ndim != 3) { + if constexpr (hclpp::ndim != 3) { GTEST_SKIP() << "Skipping test for ndim != 3"; } @@ -39,38 +39,38 @@ void test_gravity_internal_gravity() double const rho_value = 1E10; std::array Nx_glob_ng {0, 0, 0}; - for (int idim = 0; idim < novapp::ndim; ++idim) { + for (int idim = 0; idim < hclpp::ndim; ++idim) { Nx_glob_ng[idim] = nx; } std::array const mpi_dims_cart {0, 0, 0}; - novapp::Grid grid(Nx_glob_ng, mpi_dims_cart, Ng); - novapp::Regular const regular_grid(std::array {x0min, x1min, x2min}, std::array {x0max, x1max, x2max}); + hclpp::Grid grid(Nx_glob_ng, mpi_dims_cart, Ng); + hclpp::Regular const regular_grid(std::array {x0min, x1min, x2min}, std::array {x0max, x1max, x2max}); - novapp::KDV_double_1d x0_glob("x0_glob", grid.Nx_glob_ng[0] + (2 * grid.Nghost[0]) + 1); - novapp::KDV_double_1d x1_glob("x1_glob", grid.Nx_glob_ng[1] + (2 * grid.Nghost[1]) + 1); - novapp::KDV_double_1d x2_glob("x2_glob", grid.Nx_glob_ng[2] + (2 * grid.Nghost[2]) + 1); + hclpp::KDV_double_1d x0_glob("x0_glob", grid.Nx_glob_ng[0] + (2 * grid.Nghost[0]) + 1); + hclpp::KDV_double_1d x1_glob("x1_glob", grid.Nx_glob_ng[1] + (2 * grid.Nghost[1]) + 1); + hclpp::KDV_double_1d x2_glob("x2_glob", grid.Nx_glob_ng[2] + (2 * grid.Nghost[2]) + 1); regular_grid.execute(grid.Nghost, grid.Nx_glob_ng, x0_glob.view_host(), x1_glob.view_host(), x2_glob.view_host()); - novapp::modify_host(x0_glob, x1_glob, x2_glob); - novapp::sync_device(x0_glob, x1_glob, x2_glob); + hclpp::modify_host(x0_glob, x1_glob, x2_glob); + hclpp::sync_device(x0_glob, x1_glob, x2_glob); grid.set_grid(x0_glob.view_device(), x1_glob.view_device(), x2_glob.view_device()); - novapp::KV_double_3d const rho("rho", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); + hclpp::KV_double_3d const rho("rho", grid.Nx_local_wg[0], grid.Nx_local_wg[1], grid.Nx_local_wg[2]); Kokkos::deep_copy(rho, rho_value); // Numerical gravitational field - novapp::InternalMassGravity const g = novapp::make_internal_mass_gravity(M_star, grid, rho); + hclpp::InternalMassGravity const g = hclpp::make_internal_mass_gravity(M_star, grid, rho); // Theoretical gravitational field auto x0c = grid.x0_center; - novapp::KV_double_1d const g_th("g_th", grid.Nx_local_wg[0]); + hclpp::KV_double_1d const g_th("g_th", grid.Nx_local_wg[0]); Kokkos::deep_copy(g_th, 0.); Kokkos::parallel_for( "", - novapp::cell_mdrange(grid.range.no_ghosts()), + hclpp::cell_mdrange(grid.range.no_ghosts()), KOKKOS_LAMBDA(int i, int, int) { - double const M_i = 4. / 3 * novapp::units::pi * rho_value * (x0c(i) * x0c(i) * x0c(i) - x0min * x0min * x0min); - g_th(i) = -novapp::units::G * (M_star + M_i) / (x0c(i) * x0c(i)); + double const M_i = 4. / 3 * hclpp::units::pi * rho_value * (x0c(i) * x0c(i) * x0c(i) - x0min * x0min * x0min); + g_th(i) = -hclpp::units::G * (M_star + M_i) / (x0c(i) * x0c(i)); }); // Linf norm @@ -79,7 +79,7 @@ void test_gravity_internal_gravity() double norm = 0; Kokkos::parallel_reduce( "", - novapp::cell_mdrange(grid.range.no_ghosts()), + hclpp::cell_mdrange(grid.range.no_ghosts()), KOKKOS_LAMBDA(int i, int j, int k, double& local_error, double& local_norm) { local_error = Kokkos::max(Kokkos::abs(g_th(i) - g(i, j, k, 0)), local_error); local_norm = Kokkos::max(Kokkos::abs(g_th(i)), local_norm); @@ -104,22 +104,22 @@ void test_gravity_uniform_gravity() double const gy = 1.9; double const gz = 3.7; - novapp::KDV_double_1d g("g", 3); + hclpp::KDV_double_1d g("g", 3); { - auto const g_h = novapp::view_host(g); + auto const g_h = hclpp::view_host(g); g_h(0) = gx; g_h(1) = gy; g_h(2) = gz; } g.modify_host(); g.sync_device(); - novapp::UniformGravity const gravity(g.view_device()); + hclpp::UniformGravity const gravity(g.view_device()); int const nx = 5; int const ny = 4; int const nz = 3; - novapp::KDV_double_4d result("result", nx, ny, nz, 3); + hclpp::KDV_double_4d result("result", nx, ny, nz, 3); { - auto const result_d = novapp::view_device(result); + auto const result_d = hclpp::view_device(result); Kokkos::parallel_for( Kokkos::MDRangePolicy, Kokkos::Rank<3>>({0, 0, 0}, {nx, ny, nz}), KOKKOS_LAMBDA(int i, int j, int k) { @@ -131,7 +131,7 @@ void test_gravity_uniform_gravity() result.modify_device(); result.sync_host(); { - auto const result_h = novapp::view_host(result); + auto const result_h = hclpp::view_host(result); for (int k = 0; k < nz; ++k) { for (int j = 0; j < ny; ++j) { for (int i = 0; i < nx; ++i) { diff --git a/tests/grid_type.cpp b/tests/grid_type.cpp index 17cffb5a..c0ad1b1f 100644 --- a/tests/grid_type.cpp +++ b/tests/grid_type.cpp @@ -11,8 +11,8 @@ TEST(GridType, ComputeRegularMesh1d) { int const hw = 1; - novapp::KVH_double_1d const x("x", 3 + (2 * hw)); - novapp::compute_regular_mesh_1d(x, hw, -1., 1.); + hclpp::KVH_double_1d const x("x", 3 + (2 * hw)); + hclpp::compute_regular_mesh_1d(x, hw, -1., 1.); EXPECT_DOUBLE_EQ(x(0), -2.); EXPECT_DOUBLE_EQ(x(1), -1.); EXPECT_DOUBLE_EQ(x(2), 0.); diff --git a/tests/int_cast.cpp b/tests/int_cast.cpp index e889623e..cff520b9 100644 --- a/tests/int_cast.cpp +++ b/tests/int_cast.cpp @@ -12,14 +12,14 @@ TEST(IntCast, UnsignedToInt) { - ASSERT_EQ(novapp::int_cast(0U), 0); - ASSERT_EQ(novapp::int_cast(1U), 1); - ASSERT_THROW(novapp::int_cast(std::numeric_limits::max()), std::runtime_error); + ASSERT_EQ(hclpp::int_cast(0U), 0); + ASSERT_EQ(hclpp::int_cast(1U), 1); + ASSERT_THROW(hclpp::int_cast(std::numeric_limits::max()), std::runtime_error); } TEST(IntCast, IntToUnsigned) { - ASSERT_EQ(novapp::int_cast(0), 0U); - ASSERT_EQ(novapp::int_cast(1), 1U); - ASSERT_THROW(novapp::int_cast(-1), std::runtime_error); + ASSERT_EQ(hclpp::int_cast(0), 0U); + ASSERT_EQ(hclpp::int_cast(1), 1U); + ASSERT_THROW(hclpp::int_cast(-1), std::runtime_error); } diff --git a/tests/kokkos_shortcut.cpp b/tests/kokkos_shortcut.cpp index 1bed536e..88e452a0 100644 --- a/tests/kokkos_shortcut.cpp +++ b/tests/kokkos_shortcut.cpp @@ -14,15 +14,15 @@ TEST(EqualExtents, SingleDimension) { Kokkos::DualView const v0("v0", 2, 3, 4, 5); Kokkos::View const v1("v1", 2, 0, 4); - EXPECT_TRUE(novapp::equal_extents(0, v0, v1)); - EXPECT_FALSE(novapp::equal_extents(1, v0, v1)); - EXPECT_TRUE(novapp::equal_extents(2, v0, v1)); + EXPECT_TRUE(hclpp::equal_extents(0, v0, v1)); + EXPECT_FALSE(hclpp::equal_extents(1, v0, v1)); + EXPECT_TRUE(hclpp::equal_extents(2, v0, v1)); } TEST(EqualExtents, MultipleDimensions) { Kokkos::DualView const v0("v0", 2, 3, 4, 5); Kokkos::View const v1("v1", 2, 0, 4); - EXPECT_TRUE(novapp::equal_extents({0, 2}, v0, v1)); - EXPECT_FALSE(novapp::equal_extents({1}, v0, v1)); + EXPECT_TRUE(hclpp::equal_extents({0, 2}, v0, v1)); + EXPECT_FALSE(hclpp::equal_extents({1}, v0, v1)); } diff --git a/tests/kronecker.cpp b/tests/kronecker.cpp index dd27ed0e..bc259b3a 100644 --- a/tests/kronecker.cpp +++ b/tests/kronecker.cpp @@ -9,30 +9,30 @@ TEST(Kronecker, Kronecker) { - ASSERT_EQ(novapp::kron(1, 1), 1); - ASSERT_EQ(novapp::kron(1, 2), 0); - ASSERT_EQ(novapp::kron(2, 1), 0); - ASSERT_EQ(novapp::kron(2, 2), 1); + ASSERT_EQ(hclpp::kron(1, 1), 1); + ASSERT_EQ(hclpp::kron(1, 2), 0); + ASSERT_EQ(hclpp::kron(2, 1), 0); + ASSERT_EQ(hclpp::kron(2, 2), 1); } TEST(Kronecker, LIndex) { { - auto const [i, j, k] = novapp::lindex(0, 2, 1, 1); + auto const [i, j, k] = hclpp::lindex(0, 2, 1, 1); ASSERT_EQ(i, 1); ASSERT_EQ(j, 1); ASSERT_EQ(k, 1); } { - auto const [i, j, k] = novapp::lindex(1, 1, 2, 1); + auto const [i, j, k] = hclpp::lindex(1, 1, 2, 1); ASSERT_EQ(i, 1); ASSERT_EQ(j, 1); ASSERT_EQ(k, 1); } { - auto const [i, j, k] = novapp::lindex(2, 1, 1, 2); + auto const [i, j, k] = hclpp::lindex(2, 1, 1, 2); ASSERT_EQ(i, 1); ASSERT_EQ(j, 1); ASSERT_EQ(k, 1); @@ -42,21 +42,21 @@ TEST(Kronecker, LIndex) TEST(Kronecker, RIndex) { { - auto const [i, j, k] = novapp::rindex(0, 0, 1, 1); + auto const [i, j, k] = hclpp::rindex(0, 0, 1, 1); ASSERT_EQ(i, 1); ASSERT_EQ(j, 1); ASSERT_EQ(k, 1); } { - auto const [i, j, k] = novapp::rindex(1, 1, 0, 1); + auto const [i, j, k] = hclpp::rindex(1, 1, 0, 1); ASSERT_EQ(i, 1); ASSERT_EQ(j, 1); ASSERT_EQ(k, 1); } { - auto const [i, j, k] = novapp::rindex(2, 1, 1, 0); + auto const [i, j, k] = hclpp::rindex(2, 1, 1, 0); ASSERT_EQ(i, 1); ASSERT_EQ(j, 1); ASSERT_EQ(k, 1); diff --git a/tests/main.cpp b/tests/main.cpp index 62e8a234..a267aef3 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char** argv) ::testing::InitGoogleTest(&argc, argv); Kokkos::ScopeGuard const kokkos_scope(argc, argv); - novapp::MpiScopeGuard const mpi_guard(argc, argv); + hclpp::MpiScopeGuard const mpi_guard(argc, argv); return RUN_ALL_TESTS(); } diff --git a/tests/partitioner.cpp b/tests/partitioner.cpp index d90c7043..9e5d2ac6 100644 --- a/tests/partitioner.cpp +++ b/tests/partitioner.cpp @@ -124,8 +124,8 @@ TEST(Partitionner, SomeTest) std::set> list_of_cells; { - novapp::Range const rng({0, 0, 0}, nx, nghosts); - auto const [begin, end] = novapp::cell_range(rng.no_ghosts()); + hclpp::Range const rng({0, 0, 0}, nx, nghosts); + auto const [begin, end] = hclpp::cell_range(rng.no_ghosts()); auto const [ibegin, jbegin, kbegin] = begin; auto const [iend, jend, kend] = end; for (int k = kbegin; k < kend; ++k) { @@ -142,8 +142,8 @@ TEST(Partitionner, SomeTest) for (std::array const rng2 : Partitioner(nx[2], block[2])) { for (std::array const rng1 : Partitioner(nx[1], block[1])) { for (std::array const rng0 : Partitioner(nx[0], block[0])) { - novapp::Range const rng(rng0, rng1, rng2, nghosts); - auto const [begin, end] = novapp::cell_range(rng.no_ghosts()); + hclpp::Range const rng(rng0, rng1, rng2, nghosts); + auto const [begin, end] = hclpp::cell_range(rng.no_ghosts()); auto const [ibegin, jbegin, kbegin] = begin; auto const [iend, jend, kend] = end; for (int k = kbegin; k < kend; ++k) { diff --git a/tests/print_info.cpp b/tests/print_info.cpp index e05a5d34..140c5394 100644 --- a/tests/print_info.cpp +++ b/tests/print_info.cpp @@ -9,13 +9,13 @@ #include -namespace novapp { +namespace hclpp { TEST(PrintInfo, Format) { std::stringstream ss; - novapp::print_info(ss, "Parameter", std::string_view("Value")); + hclpp::print_info(ss, "Parameter", std::string_view("Value")); EXPECT_EQ(ss.str(), "Parameter..................................................................Value\n"); } -} // namespace novapp +} // namespace hclpp diff --git a/tests/range.cpp b/tests/range.cpp index dcf4f777..450aa320 100644 --- a/tests/range.cpp +++ b/tests/range.cpp @@ -15,7 +15,7 @@ namespace { constexpr std::array dim_mask(std::array const lhs, std::array const rhs) noexcept { std::array out = lhs; - for (int idim = novapp::ndim; idim < 3; ++idim) { + for (int idim = hclpp::ndim; idim < 3; ++idim) { out[idim] = rhs[idim]; } return out; @@ -26,30 +26,30 @@ constexpr std::array dim_mask(std::array const lhs, std::array= 2) + // if (hclpp::ndim >= 2) // { // EXPECT_THROW( // Range({0, 0, 0}, {0, 0, 0}, dim_mask({2, 0, 2}, {0, 0, 0})), // std::runtime_error); // } - // if (novapp::ndim == 3) + // if (hclpp::ndim == 3) // { // EXPECT_THROW( // Range({0, 0, 0}, {0, 0, 0}, dim_mask({2, 2, 0}, {0, 0, 0})), // std::runtime_error); // } - EXPECT_THROW(novapp::Range({1, 0, 0}, {0, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, 1, 0}, {0, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, 0, 1}, {0, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({1, 0, 0}, {0, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, 1, 0}, {0, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, 0, 1}, {0, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({-1, 0, 0}, {0, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, -1, 0}, {0, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, 0, -1}, {0, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({-1, 0, 0}, {0, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, -1, 0}, {0, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, 0, -1}, {0, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, 0, 0}, {-1, 0, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, 0, 0}, {0, -1, 0}, 2), std::runtime_error); - EXPECT_THROW(novapp::Range({0, 0, 0}, {0, 0, -1}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, 0, 0}, {-1, 0, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, 0, 0}, {0, -1, 0}, 2), std::runtime_error); + EXPECT_THROW(hclpp::Range({0, 0, 0}, {0, 0, -1}, 2), std::runtime_error); } TEST(Range, Accessors) @@ -57,7 +57,7 @@ TEST(Range, Accessors) std::array const Cmin {1, 1, 1}; std::array const Cmax {2, 2, 2}; int const Ng = 2; - novapp::Range const rng(Cmin, Cmax, Ng); + hclpp::Range const rng(Cmin, Cmax, Ng); EXPECT_EQ(rng.Corner_min, Cmin); EXPECT_EQ(rng.Corner_max, Cmax); } @@ -67,7 +67,7 @@ TEST(Range, Empty) std::array const Cmin {2, 3, 4}; std::array const Cmax = Cmin; int const Ng = 3; - novapp::Range const rng(Cmin, Cmax, Ng); + hclpp::Range const rng(Cmin, Cmax, Ng); EXPECT_EQ(rng.Nc_min_0g, dim_mask({3, 3, 3}, {0, 0, 0})); EXPECT_EQ(rng.Nc_max_0g, dim_mask({3, 3, 3}, {0, 0, 0})); } @@ -77,7 +77,7 @@ TEST(Range, CellBounds) std::array const Cmin {2, 3, 4}; std::array const Cmax {4, 5, 6}; int const Ng = 3; - novapp::Range const rng(Cmin, Cmax, Ng); + hclpp::Range const rng(Cmin, Cmax, Ng); EXPECT_EQ(rng.Nc_min_0g, dim_mask({3, 3, 3}, {0, 0, 0})); EXPECT_EQ(rng.Nc_max_0g, dim_mask({5, 5, 5}, {2, 2, 2})); EXPECT_EQ(rng.Nc_min_1g, dim_mask({2, 2, 2}, {0, 0, 0})); @@ -91,7 +91,7 @@ TEST(Range, FaceBounds) std::array const Cmin {2, 3, 4}; std::array const Cmax {4, 5, 6}; int const Ng = 3; - novapp::Range const rng(Cmin, Cmax, Ng); + hclpp::Range const rng(Cmin, Cmax, Ng); EXPECT_EQ(rng.Nf_min_0g, dim_mask({3, 3, 3}, {0, 0, 0})); EXPECT_EQ(rng.Nf_max_0g, dim_mask({6, 6, 6}, {3, 3, 3})); EXPECT_EQ(rng.Nf_min_1g, dim_mask({2, 2, 2}, {0, 0, 0})); diff --git a/tests/riemann_solvers.cpp b/tests/riemann_solvers.cpp index ecb8ae50..c14fae91 100644 --- a/tests/riemann_solvers.cpp +++ b/tests/riemann_solvers.cpp @@ -30,7 +30,7 @@ class RiemannSolverFixture : public ::testing::Test RiemannSolverFixture& operator=(RiemannSolverFixture&& rhs) noexcept = default; }; -using RiemannSolvers = ::testing::Types; +using RiemannSolvers = ::testing::Types; // Trailing comma is needed to avoid spurious `gnu-zero-variadic-macro-arguments` warning with clang TYPED_TEST_SUITE(RiemannSolverFixture, RiemannSolvers, ); @@ -42,11 +42,11 @@ TYPED_TEST(RiemannSolverFixture, Consistency) double const u0 = 3.; double const P0 = 10.; - novapp::thermodynamics::PerfectGas const eos(gamma, mmw); - novapp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; - novapp::EulerCons const cons = to_cons(prim, eos); - novapp::EulerFlux const numerical_flux = this->m_riemann_solver(cons, cons, 0, eos); - novapp::EulerFlux const physical_flux = compute_flux(cons, 0, eos); + hclpp::thermodynamics::PerfectGas const eos(gamma, mmw); + hclpp::EulerPrim const prim {.rho = rho0, .u = {u0}, .P = P0}; + hclpp::EulerCons const cons = to_cons(prim, eos); + hclpp::EulerFlux const numerical_flux = this->m_riemann_solver(cons, cons, 0, eos); + hclpp::EulerFlux const physical_flux = compute_flux(cons, 0, eos); EXPECT_DOUBLE_EQ(numerical_flux.rho, physical_flux.rho); EXPECT_DOUBLE_EQ(numerical_flux.rhou[0], physical_flux.rhou[0]); EXPECT_DOUBLE_EQ(numerical_flux.E, physical_flux.E); @@ -63,16 +63,16 @@ TYPED_TEST(RiemannSolverFixture, Symmetry) double const u_right = -6.; double const P_right = 5.5; - novapp::thermodynamics::PerfectGas const eos(gamma, mmw); - novapp::EulerPrim const prim_left {.rho = rho_left, .u = {u_left}, .P = P_left}; - novapp::EulerPrim const prim_right {.rho = rho_right, .u = {u_right}, .P = P_right}; - novapp::EulerCons cons_left = to_cons(prim_left, eos); - novapp::EulerCons cons_right = to_cons(prim_right, eos); - novapp::EulerFlux const flux1 = this->m_riemann_solver(cons_left, cons_right, 0, eos); + hclpp::thermodynamics::PerfectGas const eos(gamma, mmw); + hclpp::EulerPrim const prim_left {.rho = rho_left, .u = {u_left}, .P = P_left}; + hclpp::EulerPrim const prim_right {.rho = rho_right, .u = {u_right}, .P = P_right}; + hclpp::EulerCons cons_left = to_cons(prim_left, eos); + hclpp::EulerCons cons_right = to_cons(prim_right, eos); + hclpp::EulerFlux const flux1 = this->m_riemann_solver(cons_left, cons_right, 0, eos); std::swap(cons_left, cons_right); cons_left.rhou[0] = -cons_left.rhou[0]; cons_right.rhou[0] = -cons_right.rhou[0]; - novapp::EulerFlux const flux2 = this->m_riemann_solver(cons_left, cons_right, 0, eos); + hclpp::EulerFlux const flux2 = this->m_riemann_solver(cons_left, cons_right, 0, eos); EXPECT_DOUBLE_EQ(flux1.rho, -flux2.rho); EXPECT_DOUBLE_EQ(flux1.rhou[0], flux2.rhou[0]); EXPECT_DOUBLE_EQ(flux1.E, -flux2.E); diff --git a/tests/slopes.cpp b/tests/slopes.cpp index 6cc84461..9750267f 100644 --- a/tests/slopes.cpp +++ b/tests/slopes.cpp @@ -11,7 +11,7 @@ TEST(NullSlopeLimiter, Zero) double const diffR = 68.9; double const diffL = 37.65; - novapp::Constant const slope; + hclpp::Constant const slope; EXPECT_EQ(slope(diffR, diffL), 0.); } @@ -34,7 +34,7 @@ class SlopeLimiterFixture : public ::testing::Test SlopeLimiterFixture& operator=(SlopeLimiterFixture&& rhs) noexcept = default; }; -using SlopeLimiters = ::testing::Types; +using SlopeLimiters = ::testing::Types; // Trailing comma is needed to avoid spurious `gnu-zero-variadic-macro-arguments` warning with clang TYPED_TEST_SUITE(SlopeLimiterFixture, SlopeLimiters, ); diff --git a/tests/thermodynamics.cpp b/tests/thermodynamics.cpp index c3f6cd6c..6e6fa3c0 100644 --- a/tests/thermodynamics.cpp +++ b/tests/thermodynamics.cpp @@ -31,7 +31,7 @@ class EquationOfStateFixture : public ::testing::Test EquationOfStateFixture& operator=(EquationOfStateFixture&& rhs) noexcept = default; }; -using EquationOfStates = ::testing::Types; +using EquationOfStates = ::testing::Types; // Trailing comma is needed to avoid spurious `gnu-zero-variadic-macro-arguments` warning with clang TYPED_TEST_SUITE(EquationOfStateFixture, EquationOfStates, ); diff --git a/tests/utils_dual_view.hpp b/tests/utils_dual_view.hpp index db68cc00..dc2a7bd1 100644 --- a/tests/utils_dual_view.hpp +++ b/tests/utils_dual_view.hpp @@ -6,7 +6,7 @@ #include -namespace novapp { +namespace hclpp { template requires(Kokkos::is_dual_view_v) @@ -22,4 +22,4 @@ auto view_host(DualView const& view) noexcept return view.view_host(); } -} // namespace novapp +} // namespace hclpp diff --git a/toolchains/adastra-mi250x.md b/toolchains/adastra-mi250x.md index 92e7790d..866fb477 100644 --- a/toolchains/adastra-mi250x.md +++ b/toolchains/adastra-mi250x.md @@ -4,12 +4,11 @@ SPDX-FileCopyrightText: 2025 The HERACLES++ development team, see COPYRIGHT.md f SPDX-License-Identifier: MIT --> -# Building Nova++ on the MI250X partition of Adastra +# Building HERACLES++ on the MI250X partition of Adastra ## Environment ```bash -# nova-env.sh module purge module load cpe/24.07 module load craype-x86-trento craype-accel-amd-gfx90a @@ -24,7 +23,7 @@ Notice that the last line assumes PDI is already installed, see next section. ## How to build PDI -From the nova directory +From the root directory ```bash cmake \ @@ -52,9 +51,9 @@ cmake --build build-pdi --parallel 4 cmake --install build-pdi --prefix pdi-installation-prefix-path ``` -## How to build Nova++ +## How to build HERACLES++ -From the top-level nova directory +From the root directory ```bash cmake \ @@ -68,10 +67,10 @@ cmake \ -D Kokkos_ENABLE_DEPRECATED_CODE_5=ON \ -D Kokkos_ENABLE_HIP=ON \ -D Kokkos_ENABLE_OPENMP=ON \ - -D Novapp_SETUP=sedov1d \ - -D Novapp_NDIM=1 \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_GEOM=Cartesian + -D Heraclespp_SETUP=sedov1d \ + -D Heraclespp_NDIM=1 \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_GEOM=Cartesian cmake --build build --parallel 4 ``` diff --git a/toolchains/jean-zay-h100.md b/toolchains/jean-zay-h100.md index 29d3eef0..a009ab8d 100644 --- a/toolchains/jean-zay-h100.md +++ b/toolchains/jean-zay-h100.md @@ -4,12 +4,11 @@ SPDX-FileCopyrightText: 2025 The HERACLES++ development team, see COPYRIGHT.md f SPDX-License-Identifier: MIT --> -# Building Nova++ on the H100 partition of Jean-Zay +# Building HERACLES++ on the H100 partition of Jean-Zay ## Environment ```bash -# nova-env.sh module purge module load arch/h100 module load gcc/12.2.0 @@ -25,7 +24,7 @@ Notice that the last line assumes PDI is already installed, see next section. ## How to build PDI -From the nova directory +From the root directory ```bash cmake \ @@ -53,9 +52,9 @@ cmake --build build-pdi --parallel 4 cmake --install build-pdi --prefix pdi-installation-prefix-path ``` -## How to build Nova++ +## How to build HERACLES++ -From the top-level nova directory +From the root directory ```bash cmake \ @@ -66,10 +65,10 @@ cmake \ -D Kokkos_ENABLE_DEPRECATED_CODE_5=ON \ -D Kokkos_ENABLE_CUDA=ON \ -D Kokkos_ENABLE_OPENMP=ON \ - -D Novapp_SETUP=rayleigh_taylor3d \ - -D Novapp_NDIM=3 \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_GEOM=Cartesian + -D Heraclespp_SETUP=rayleigh_taylor3d \ + -D Heraclespp_NDIM=3 \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_GEOM=Cartesian cmake --build build --parallel 4 ``` diff --git a/toolchains/job_cpu.sh b/toolchains/job_cpu.sh index b843227a..443c5d91 100644 --- a/toolchains/job_cpu.sh +++ b/toolchains/job_cpu.sh @@ -30,4 +30,4 @@ export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} export OMP_PLACES=cores # execution -./../bin/nova++ ../inputs/kelvin_helmholtz.ini +./../bin/heracles++ ../inputs/kelvin_helmholtz.ini diff --git a/toolchains/job_gpu.sh b/toolchains/job_gpu.sh index 946b25f8..cbcd4cbd 100644 --- a/toolchains/job_gpu.sh +++ b/toolchains/job_gpu.sh @@ -24,4 +24,4 @@ set -x cd "${SLURM_SUBMIT_DIR}" # execution -./../bin/nova++ ../inputs/kelvin_helmholtz.ini +./../bin/heracles++ ../inputs/kelvin_helmholtz.ini diff --git a/toolchains/job_gpu_adastra.sh b/toolchains/job_gpu_adastra.sh index 89979c54..f233c3ee 100644 --- a/toolchains/job_gpu_adastra.sh +++ b/toolchains/job_gpu_adastra.sh @@ -5,7 +5,7 @@ # SPDX-License-Identifier: MIT #SBATCH --account=cin4698 -#SBATCH --job-name=nova-run +#SBATCH --job-name=HERACLES++-run #SBATCH --output=%x.o%j #SBATCH --nodes=16 #SBATCH --exclusive @@ -23,4 +23,4 @@ set -x cd "${SLURM_SUBMIT_DIR}" # execution -srun -N16 -n128 -c2 --account=cin4698 --constraint=MI250 --gpus-per-node=8 --time=05:59:00 ./../bin/nova++ ../inputs/rayleigh_taylor3d_sph.ini +srun -N16 -n128 -c2 --account=cin4698 --constraint=MI250 --gpus-per-node=8 --time=05:59:00 ./../bin/heracles++ ../inputs/rayleigh_taylor3d_sph.ini diff --git a/toolchains/ruche-a100.md b/toolchains/ruche-a100.md index f01346cf..9484e0c8 100644 --- a/toolchains/ruche-a100.md +++ b/toolchains/ruche-a100.md @@ -4,12 +4,11 @@ SPDX-FileCopyrightText: 2025 The HERACLES++ development team, see COPYRIGHT.md f SPDX-License-Identifier: MIT --> -# Building Nova++ on the A100 partition of Ruche +# Building HERACLES++ on the A100 partition of Ruche ## Environment ```bash -# nova-env.sh module purge module load cmake/3.21.4/gcc-11.2.0 module load gcc/11.2.0/gcc-4.8.5 @@ -20,9 +19,9 @@ module load paraconf/1.0.0/gcc-11.2.0 libyaml/0.2.5/gcc-11.2.0 module load pdi/1.6.0/gcc-11.2.0 ``` -## How to build Nova++ +## How to build HERACLES++ -From the top-level nova directory +From the root directory ```bash cmake \ @@ -34,10 +33,10 @@ cmake \ -D Kokkos_ENABLE_DEPRECATED_CODE_5=ON \ -D Kokkos_ENABLE_CUDA=ON \ -D Kokkos_ENABLE_OPENMP=ON \ - -D Novapp_SETUP=sedov1d \ - -D Novapp_NDIM=1 \ - -D Novapp_EOS=PerfectGas \ - -D Novapp_GRAVITY=Uniform \ - -D Novapp_GEOM=Cartesian + -D Heraclespp_SETUP=sedov1d \ + -D Heraclespp_NDIM=1 \ + -D Heraclespp_EOS=PerfectGas \ + -D Heraclespp_GRAVITY=Uniform \ + -D Heraclespp_GEOM=Cartesian cmake --build build --parallel 4 ```