From 2d79d705d4bd912e21f462c74e5e9f199cb35602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Mon, 26 Mar 2018 12:05:44 +0200 Subject: [PATCH] Few preparation clean-up --- experimental/AcousticSolver.hpp | 9 --------- experimental/CMakeLists.txt | 3 +-- .../{AcousticSolver.cpp => RawKokkosAcousticSolver.cpp} | 6 +++--- experimental/RawKokkosAcousticSolver.hpp | 9 +++++++++ main.cpp | 4 ++-- 5 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 experimental/AcousticSolver.hpp rename experimental/{AcousticSolver.cpp => RawKokkosAcousticSolver.cpp} (98%) create mode 100644 experimental/RawKokkosAcousticSolver.hpp diff --git a/experimental/AcousticSolver.hpp b/experimental/AcousticSolver.hpp deleted file mode 100644 index e03a8e2a6..000000000 --- a/experimental/AcousticSolver.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef ACOUSTIC_SOLVER_HPP -#define ACOUSTIC_SOLVER_HPP - -namespace RawKokkosAcousticSolver -{ - void SodAcousticSolver(const long int& nj); -} - -#endif // ACOUSTIC_SOLVER_HPP diff --git a/experimental/CMakeLists.txt b/experimental/CMakeLists.txt index 895dbde64..30584083c 100644 --- a/experimental/CMakeLists.txt +++ b/experimental/CMakeLists.txt @@ -1,7 +1,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../packages/kokkos EXCLUDE_FROM_ALL) include_directories(${Kokkos_INCLUDE_DIRS_RET}) include_directories(${PASTIS_SOURCE_DIR}/packages/rang/include) @@ -9,7 +8,7 @@ include_directories(${PASTIS_SOURCE_DIR}/packages/rang/include) add_library( PastisExperimental - AcousticSolver.cpp + RawKokkosAcousticSolver.cpp ) diff --git a/experimental/AcousticSolver.cpp b/experimental/RawKokkosAcousticSolver.cpp similarity index 98% rename from experimental/AcousticSolver.cpp rename to experimental/RawKokkosAcousticSolver.cpp index 02bc5dcf3..77b68454c 100644 --- a/experimental/AcousticSolver.cpp +++ b/experimental/RawKokkosAcousticSolver.cpp @@ -1,8 +1,8 @@ -#include <AcousticSolver.hpp> +#include <RawKokkosAcousticSolver.hpp> #include <Kokkos_Core.hpp> #include <rang.hpp> -namespace RawKokkosAcousticSolver +namespace RawKokkos { inline double e(double rho, double p, double gamma) @@ -114,7 +114,7 @@ void computeExplicitFluxes(const Kokkos::View<double*>& xr, } -void SodAcousticSolver(const long int& nj) +void AcousticSolver(const long int& nj) { Kokkos::View<double*> xj("xj", nj); Kokkos::View<double*> rhoj("rhoj", nj); diff --git a/experimental/RawKokkosAcousticSolver.hpp b/experimental/RawKokkosAcousticSolver.hpp new file mode 100644 index 000000000..e9c36ff43 --- /dev/null +++ b/experimental/RawKokkosAcousticSolver.hpp @@ -0,0 +1,9 @@ +#ifndef RAW_KOKKOS_ACOUSTIC_SOLVER_HPP +#define RAW_KOKKOS_ACOUSTIC_SOLVER_HPP + +namespace RawKokkos +{ + void AcousticSolver(const long int& nj); +} + +#endif // RAW_KOKKOS_ACOUSTIC_SOLVER_HPP diff --git a/main.cpp b/main.cpp index 89356a5c5..ee597d14f 100644 --- a/main.cpp +++ b/main.cpp @@ -6,7 +6,7 @@ #include <SignalManager.hpp> #include <ConsoleManager.hpp> -#include <AcousticSolver.hpp> +#include <RawKokkosAcousticSolver.hpp> #include <CLI/CLI.hpp> #include <cassert> @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) Kokkos::Timer timer; timer.reset(); - RawKokkosAcousticSolver::SodAcousticSolver(number); + RawKokkos::AcousticSolver(number); double count_time = timer.seconds(); std::cout << "* Execution time: " << rang::style::bold << count_time << rang::style::reset << '\n'; -- GitLab