From 63c147e7bdc08104efbc31db6b68b21032f68ce0 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Wed, 18 Apr 2018 00:13:23 +0200 Subject: [PATCH] source tree reorganization --- CMakeLists.txt | 30 +++---- cmake/GetPastisGitRevision.cmake | 2 +- src/CMakeLists.txt | 24 ++++++ {algebra => src/algebra}/TinyMatrix.hpp | 0 {algebra => src/algebra}/TinyVector.hpp | 0 .../experimental/AcousticSolverClass.cpp | 86 +++++++++---------- .../experimental/AcousticSolverClass.hpp | 10 +-- .../experimental}/AcousticSolverTest.cpp | 0 .../experimental}/AcousticSolverTest.hpp | 0 .../experimental}/CMakeLists.txt | 2 +- .../experimental}/MeshLessAcousticSolver.cpp | 0 .../experimental}/MeshLessAcousticSolver.hpp | 0 .../experimental}/RawKokkosAcousticSolver.cpp | 0 .../experimental}/RawKokkosAcousticSolver.hpp | 0 main.cpp => src/main.cpp | 31 ++++--- {experimental => src/mesh}/Connectivity1D.hpp | 2 +- {experimental => src/mesh}/Mesh.hpp | 1 - {experimental => src/mesh}/MeshData.hpp | 4 +- .../scheme/AcousticSolver.hpp | 12 +-- .../scheme}/BlockPerfectGas.hpp | 0 .../scheme}/FiniteVolumesEulerUnknowns.hpp | 0 {utils => src/utils}/BacktraceManager.cpp | 0 {utils => src/utils}/BacktraceManager.hpp | 0 {utils => src/utils}/CMakeLists.txt | 14 ++- {utils => src/utils}/ConsoleManager.cpp | 0 {utils => src/utils}/ConsoleManager.hpp | 0 {utils => src/utils}/FPEManager.cpp | 0 {utils => src/utils}/FPEManager.hpp | 0 {utils => src/utils}/RevisionInfo.cpp | 0 {utils => src/utils}/RevisionInfo.hpp | 0 {utils => src/utils}/SignalManager.cpp | 0 {utils => src/utils}/SignalManager.hpp | 0 {utils => src/utils}/Types.hpp | 0 .../utils/pastis_config.hpp.in | 0 .../utils}/pastis_git_revision.hpp.in | 0 {utils => src/utils}/pastis_version.hpp.in | 0 36 files changed, 122 insertions(+), 96 deletions(-) create mode 100644 src/CMakeLists.txt rename {algebra => src/algebra}/TinyMatrix.hpp (100%) rename {algebra => src/algebra}/TinyVector.hpp (100%) rename experimental/AcousticSolver.cpp => src/experimental/AcousticSolverClass.cpp (77%) rename experimental/AcousticSolver.hpp => src/experimental/AcousticSolverClass.hpp (94%) rename {experimental => src/experimental}/AcousticSolverTest.cpp (100%) rename {experimental => src/experimental}/AcousticSolverTest.hpp (100%) rename {experimental => src/experimental}/CMakeLists.txt (93%) rename {experimental => src/experimental}/MeshLessAcousticSolver.cpp (100%) rename {experimental => src/experimental}/MeshLessAcousticSolver.hpp (100%) rename {experimental => src/experimental}/RawKokkosAcousticSolver.cpp (100%) rename {experimental => src/experimental}/RawKokkosAcousticSolver.hpp (100%) rename main.cpp => src/main.cpp (89%) rename {experimental => src/mesh}/Connectivity1D.hpp (98%) rename {experimental => src/mesh}/Mesh.hpp (95%) rename {experimental => src/mesh}/MeshData.hpp (100%) rename experimental/AcousticSolverWithMesh.hpp => src/scheme/AcousticSolver.hpp (97%) rename {experimental => src/scheme}/BlockPerfectGas.hpp (100%) rename {experimental => src/scheme}/FiniteVolumesEulerUnknowns.hpp (100%) rename {utils => src/utils}/BacktraceManager.cpp (100%) rename {utils => src/utils}/BacktraceManager.hpp (100%) rename {utils => src/utils}/CMakeLists.txt (82%) rename {utils => src/utils}/ConsoleManager.cpp (100%) rename {utils => src/utils}/ConsoleManager.hpp (100%) rename {utils => src/utils}/FPEManager.cpp (100%) rename {utils => src/utils}/FPEManager.hpp (100%) rename {utils => src/utils}/RevisionInfo.cpp (100%) rename {utils => src/utils}/RevisionInfo.hpp (100%) rename {utils => src/utils}/SignalManager.cpp (100%) rename {utils => src/utils}/SignalManager.hpp (100%) rename {utils => src/utils}/Types.hpp (100%) rename pastis_config.hpp.in => src/utils/pastis_config.hpp.in (100%) rename {utils => src/utils}/pastis_git_revision.hpp.in (100%) rename {utils => src/utils}/pastis_version.hpp.in (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8f0bd7e3..f3fb6124f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,28 +38,18 @@ include_directories(${PASTIS_SOURCE_DIR}/packages/rang/include) # CLI11 include_directories(${PASTIS_SOURCE_DIR}/packages/CLI11/include) -# Pastis utils -add_subdirectory(utils) -include_directories(utils) +# Pastis src +add_subdirectory(src) -# Pastis algebra -#add_subdirectory(algebra) -include_directories(algebra) +include_directories(src) +include_directories(src/algebra) +include_directories(src/mesh) +include_directories(src/utils) +include_directories(src/scheme) -# Pastis experimental -add_subdirectory(experimental) -include_directories(experimental) +include_directories(src/experimental) -# ---------------- Checks for includes ---------------- - -# Checks for FPE -include(CheckIncludeFile) -check_include_file(fenv.h PASTIS_HAS_FENV_H) - -# Generates pastis_config.hpp -configure_file("${PASTIS_SOURCE_DIR}/pastis_config.hpp.in" - "${CMAKE_CURRENT_BINARY_DIR}/pastis_config.hpp" - @ONLY) +# ----------------------------------------------------- link_libraries("-rdynamic") @@ -67,7 +57,7 @@ link_libraries("-rdynamic") # Pastis binary add_executable( pastis - main.cpp) + src/main.cpp) # Libraries target_link_libraries( diff --git a/cmake/GetPastisGitRevision.cmake b/cmake/GetPastisGitRevision.cmake index fa4bcf61a..f3b6919e5 100644 --- a/cmake/GetPastisGitRevision.cmake +++ b/cmake/GetPastisGitRevision.cmake @@ -62,7 +62,7 @@ else() endif() # Generates revision header file candidate -configure_file("${PASTIS_SOURCE_DIR}/utils/pastis_git_revision.hpp.in" +configure_file("${PASTIS_SOURCE_DIR}/src/utils/pastis_git_revision.hpp.in" "${CMAKE_CURRENT_BINARY_DIR}/pastis_git_revision" @ONLY) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..db8252e96 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,24 @@ +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +#------------------------------------------------------ + +# Pastis utils +add_subdirectory(utils) +include_directories(utils) + +# Pastis algebra +#add_subdirectory(algebra) +include_directories(algebra) + +# Pastis mesh +#add_subdirectory(mesh) +include_directories(mesh) + +# Pastis mesh +#add_subdirectory(mesh) +include_directories(scheme) + +# Pastis experimental +add_subdirectory(experimental) +include_directories(experimental) diff --git a/algebra/TinyMatrix.hpp b/src/algebra/TinyMatrix.hpp similarity index 100% rename from algebra/TinyMatrix.hpp rename to src/algebra/TinyMatrix.hpp diff --git a/algebra/TinyVector.hpp b/src/algebra/TinyVector.hpp similarity index 100% rename from algebra/TinyVector.hpp rename to src/algebra/TinyVector.hpp diff --git a/experimental/AcousticSolver.cpp b/src/experimental/AcousticSolverClass.cpp similarity index 77% rename from experimental/AcousticSolver.cpp rename to src/experimental/AcousticSolverClass.cpp index 80ed8310e..051e148bb 100644 --- a/experimental/AcousticSolver.cpp +++ b/src/experimental/AcousticSolverClass.cpp @@ -1,11 +1,11 @@ -#include <AcousticSolver.hpp> +#include <AcousticSolverClass.hpp> #include <rang.hpp> #include <BlockPerfectGas.hpp> typedef const double my_double; -struct AcousticSolver::ReduceMin +struct AcousticSolverClass::ReduceMin { private: const Kokkos::View<my_double*> x_; @@ -43,8 +43,8 @@ public: KOKKOS_INLINE_FUNCTION const Kokkos::View<const double*> -AcousticSolver::computeRhoCj(const Kokkos::View<const double*>& rhoj, - const Kokkos::View<const double*>& cj) +AcousticSolverClass::computeRhoCj(const Kokkos::View<const double*>& rhoj, + const Kokkos::View<const double*>& cj) { Kokkos::parallel_for(m_nj, KOKKOS_LAMBDA(const int& j) { m_rhocj[j] = rhoj[j]*cj[j]; @@ -54,8 +54,8 @@ AcousticSolver::computeRhoCj(const Kokkos::View<const double*>& rhoj, KOKKOS_INLINE_FUNCTION const Kokkos::View<const double*[2]> -AcousticSolver::computeAjr(const Kokkos::View<const double*>& rhocj, - const Kokkos::View<const double*[2]>& Cjr) +AcousticSolverClass::computeAjr(const Kokkos::View<const double*>& rhocj, + const Kokkos::View<const double*[2]>& Cjr) { Kokkos::parallel_for(m_nj, KOKKOS_LAMBDA(const int& j) { for (int r=0; r<2; ++r) { @@ -68,10 +68,10 @@ AcousticSolver::computeAjr(const Kokkos::View<const double*>& rhocj, KOKKOS_INLINE_FUNCTION const Kokkos::View<const double*> -AcousticSolver::computeAr(const Kokkos::View<const double*[2]>& Ajr, - const Kokkos::View<const int*[2]>& node_cells, - const Kokkos::View<const int*[2]>& node_cell_local_node, - const Kokkos::View<const int*>& node_nb_cells) +AcousticSolverClass::computeAr(const Kokkos::View<const double*[2]>& Ajr, + const Kokkos::View<const int*[2]>& node_cells, + const Kokkos::View<const int*[2]>& node_cell_local_node, + const Kokkos::View<const int*>& node_nb_cells) { Kokkos::parallel_for(m_nr, KOKKOS_LAMBDA(const int& r) { double sum = 0; @@ -88,13 +88,13 @@ AcousticSolver::computeAr(const Kokkos::View<const double*[2]>& Ajr, KOKKOS_INLINE_FUNCTION const Kokkos::View<const double*> -AcousticSolver::computeBr(const Kokkos::View<const double*[2]>& Ajr, - const Kokkos::View<const double*[2]>& Cjr, - const Kokkos::View<const double*>& uj, - const Kokkos::View<const double*>& pj, - const Kokkos::View<const int*[2]>& node_cells, - const Kokkos::View<const int*[2]>& node_cell_local_node, - const Kokkos::View<const int*>& node_nb_cells) +AcousticSolverClass::computeBr(const Kokkos::View<const double*[2]>& Ajr, + const Kokkos::View<const double*[2]>& Cjr, + const Kokkos::View<const double*>& uj, + const Kokkos::View<const double*>& pj, + const Kokkos::View<const int*[2]>& node_cells, + const Kokkos::View<const int*[2]>& node_cell_local_node, + const Kokkos::View<const int*>& node_nb_cells) { Kokkos::parallel_for(m_nr, KOKKOS_LAMBDA(const int& r) { double sum = 0; @@ -111,8 +111,8 @@ AcousticSolver::computeBr(const Kokkos::View<const double*[2]>& Ajr, KOKKOS_INLINE_FUNCTION Kokkos::View<double*> -AcousticSolver::computeUr(const Kokkos::View<const double*>& Ar, - const Kokkos::View<const double*>& br) +AcousticSolverClass::computeUr(const Kokkos::View<const double*>& Ar, + const Kokkos::View<const double*>& br) { inverse(Ar, m_inv_Ar); const Kokkos::View<const double*> invAr = m_inv_Ar; @@ -127,12 +127,12 @@ AcousticSolver::computeUr(const Kokkos::View<const double*>& Ar, KOKKOS_INLINE_FUNCTION Kokkos::View<double*[2]> -AcousticSolver::computeFjr(const Kokkos::View<const double*[2]>& Ajr, - const Kokkos::View<const double*>& ur, - const Kokkos::View<const double*[2]>& Cjr, - const Kokkos::View<const double*>& uj, - const Kokkos::View<const double*>& pj, - const Kokkos::View<const int*[2]>& cell_nodes) +AcousticSolverClass::computeFjr(const Kokkos::View<const double*[2]>& Ajr, + const Kokkos::View<const double*>& ur, + const Kokkos::View<const double*[2]>& Cjr, + const Kokkos::View<const double*>& uj, + const Kokkos::View<const double*>& pj, + const Kokkos::View<const int*[2]>& cell_nodes) { Kokkos::parallel_for(m_nj, KOKKOS_LAMBDA(const int& j) { for (int r=0; r<2; ++r) { @@ -144,7 +144,7 @@ AcousticSolver::computeFjr(const Kokkos::View<const double*[2]>& Ajr, } KOKKOS_INLINE_FUNCTION -double AcousticSolver:: +double AcousticSolverClass:: acoustic_dt(const Kokkos::View<const double*>& Vj, const Kokkos::View<const double*>& cj) const { @@ -160,8 +160,8 @@ acoustic_dt(const Kokkos::View<const double*>& Vj, KOKKOS_INLINE_FUNCTION void -AcousticSolver::inverse(const Kokkos::View<const double*>& x, - Kokkos::View<double*>& inv_x) const +AcousticSolverClass::inverse(const Kokkos::View<const double*>& x, + Kokkos::View<double*>& inv_x) const { Kokkos::parallel_for(x.size(), KOKKOS_LAMBDA(const int& r) { inv_x(r) = 1./x(r); @@ -169,20 +169,20 @@ AcousticSolver::inverse(const Kokkos::View<const double*>& x, } KOKKOS_INLINE_FUNCTION -void AcousticSolver::computeExplicitFluxes(const Kokkos::View<const double*>& xr, - const Kokkos::View<const double*>& xj, - const Kokkos::View<const double*>& rhoj, - const Kokkos::View<const double*>& uj, - const Kokkos::View<const double*>& pj, - const Kokkos::View<const double*>& cj, - const Kokkos::View<const double*>& Vj, - const Kokkos::View<const double*[2]>& Cjr, - const Kokkos::View<const int*[2]>& cell_nodes, - const Kokkos::View<const int*[2]>& node_cells, - const Kokkos::View<const int*>& node_nb_cells, - const Kokkos::View<const int*[2]>& node_cell_local_node, - Kokkos::View<double*>& ur, - Kokkos::View<double*[2]>& Fjr) +void AcousticSolverClass::computeExplicitFluxes(const Kokkos::View<const double*>& xr, + const Kokkos::View<const double*>& xj, + const Kokkos::View<const double*>& rhoj, + const Kokkos::View<const double*>& uj, + const Kokkos::View<const double*>& pj, + const Kokkos::View<const double*>& cj, + const Kokkos::View<const double*>& Vj, + const Kokkos::View<const double*[2]>& Cjr, + const Kokkos::View<const int*[2]>& cell_nodes, + const Kokkos::View<const int*[2]>& node_cells, + const Kokkos::View<const int*>& node_nb_cells, + const Kokkos::View<const int*[2]>& node_cell_local_node, + Kokkos::View<double*>& ur, + Kokkos::View<double*[2]>& Fjr) { const Kokkos::View<const double*> rhocj = computeRhoCj(rhoj, cj); const Kokkos::View<const double*[2]> Ajr = computeAjr(rhocj, Cjr); @@ -195,7 +195,7 @@ void AcousticSolver::computeExplicitFluxes(const Kokkos::View<const double*>& xr Fjr = computeFjr(Ajr, ur, Cjr, uj, pj, cell_nodes); } -AcousticSolver::AcousticSolver(const long int& nj) +AcousticSolverClass::AcousticSolverClass(const long int& nj) : m_nj(nj), m_nr(nj+1), m_br("br", m_nr), diff --git a/experimental/AcousticSolver.hpp b/src/experimental/AcousticSolverClass.hpp similarity index 94% rename from experimental/AcousticSolver.hpp rename to src/experimental/AcousticSolverClass.hpp index 5ac400a9d..2c2f8c0ec 100644 --- a/experimental/AcousticSolver.hpp +++ b/src/experimental/AcousticSolverClass.hpp @@ -1,9 +1,9 @@ -#ifndef ACOUSTIC_SOLVER_HPP -#define ACOUSTIC_SOLVER_HPP +#ifndef ACOUSTIC_SOLVER_CLASS_HPP +#define ACOUSTIC_SOLVER_CLASS_HPP #include <Kokkos_Core.hpp> -class AcousticSolver +class AcousticSolverClass { private: inline const Kokkos::View<const double*> @@ -78,7 +78,7 @@ private: public: - AcousticSolver(const long int& nj); + AcousticSolverClass(const long int& nj); }; -#endif // ACOUSTIC_SOLVER_HPP +#endif // ACOUSTIC_SOLVER_CLASS_HPP diff --git a/experimental/AcousticSolverTest.cpp b/src/experimental/AcousticSolverTest.cpp similarity index 100% rename from experimental/AcousticSolverTest.cpp rename to src/experimental/AcousticSolverTest.cpp diff --git a/experimental/AcousticSolverTest.hpp b/src/experimental/AcousticSolverTest.hpp similarity index 100% rename from experimental/AcousticSolverTest.hpp rename to src/experimental/AcousticSolverTest.hpp diff --git a/experimental/CMakeLists.txt b/src/experimental/CMakeLists.txt similarity index 93% rename from experimental/CMakeLists.txt rename to src/experimental/CMakeLists.txt index 35eeea33d..1c6043787 100644 --- a/experimental/CMakeLists.txt +++ b/src/experimental/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories(${PASTIS_SOURCE_DIR}/packages/rang/include) add_library( PastisExperimental - AcousticSolver.cpp + AcousticSolverClass.cpp AcousticSolverTest.cpp RawKokkosAcousticSolver.cpp MeshLessAcousticSolver.cpp diff --git a/experimental/MeshLessAcousticSolver.cpp b/src/experimental/MeshLessAcousticSolver.cpp similarity index 100% rename from experimental/MeshLessAcousticSolver.cpp rename to src/experimental/MeshLessAcousticSolver.cpp diff --git a/experimental/MeshLessAcousticSolver.hpp b/src/experimental/MeshLessAcousticSolver.hpp similarity index 100% rename from experimental/MeshLessAcousticSolver.hpp rename to src/experimental/MeshLessAcousticSolver.hpp diff --git a/experimental/RawKokkosAcousticSolver.cpp b/src/experimental/RawKokkosAcousticSolver.cpp similarity index 100% rename from experimental/RawKokkosAcousticSolver.cpp rename to src/experimental/RawKokkosAcousticSolver.cpp diff --git a/experimental/RawKokkosAcousticSolver.hpp b/src/experimental/RawKokkosAcousticSolver.hpp similarity index 100% rename from experimental/RawKokkosAcousticSolver.hpp rename to src/experimental/RawKokkosAcousticSolver.hpp diff --git a/main.cpp b/src/main.cpp similarity index 89% rename from main.cpp rename to src/main.cpp index 60a288255..2fabe282c 100644 --- a/main.cpp +++ b/src/main.cpp @@ -6,13 +6,14 @@ #include <SignalManager.hpp> #include <ConsoleManager.hpp> -#include <RawKokkosAcousticSolver.hpp> -#include <MeshLessAcousticSolver.hpp> -#include <AcousticSolver.hpp> -#include <AcousticSolverTest.hpp> +// #include <RawKokkosAcousticSolver.hpp> +// #include <MeshLessAcousticSolver.hpp> +// #include <AcousticSolverClass.hpp> +// #include <AcousticSolverTest.hpp> #include <Connectivity1D.hpp> -#include <AcousticSolverWithMesh.hpp> +#include <Mesh.hpp> +#include <AcousticSolver.hpp> #include <TinyVector.hpp> #include <TinyMatrix.hpp> @@ -102,16 +103,16 @@ int main(int argc, char *argv[]) // { // class for acoustic solver // Kokkos::Timer timer; // timer.reset(); - // AcousticSolver acoustic_solver(number); - // method_cost_map["AcousticSolver"] = timer.seconds(); + // AcousticSolverClass acoustic_solver(number); + // method_cost_map["AcousticSolverClass"] = timer.seconds(); // } - { // class for acoustic solver test - Kokkos::Timer timer; - timer.reset(); - AcousticSolverTest acoustic_solver(number); - method_cost_map["AcousticSolverTest"] = timer.seconds(); - } + // { // class for acoustic solver test + // Kokkos::Timer timer; + // timer.reset(); + // AcousticSolverTest acoustic_solver(number); + // method_cost_map["AcousticSolverTest"] = timer.seconds(); + // } { // class for acoustic solver test @@ -128,7 +129,9 @@ int main(int argc, char *argv[]) unknowns.initializeSod(); - AcousticSolverWithMesh<MeshDataType> acoustic_solver(mesh_data, unknowns); + AcousticSolver<MeshDataType> acoustic_solver(mesh_data, unknowns); + + typedef TinyVector<MeshType::dimension> Rd; const Kokkos::View<const double*> Vj = mesh_data.Vj(); const Kokkos::View<const Rd**> Cjr = mesh_data.Cjr(); diff --git a/experimental/Connectivity1D.hpp b/src/mesh/Connectivity1D.hpp similarity index 98% rename from experimental/Connectivity1D.hpp rename to src/mesh/Connectivity1D.hpp index 8af879957..01c9368b8 100644 --- a/experimental/Connectivity1D.hpp +++ b/src/mesh/Connectivity1D.hpp @@ -18,8 +18,8 @@ private: const Kokkos::View<unsigned int*[2]>& m_cell_faces; Kokkos::View<unsigned short*> m_cell_nb_nodes; - const Kokkos::View<unsigned short*> m_cell_nb_faces; Kokkos::View<double*> m_inv_cell_nb_nodes; + const Kokkos::View<unsigned short*>& m_cell_nb_faces; Kokkos::View<unsigned short*> m_node_nb_cells; const Kokkos::View<unsigned short*>& m_face_nb_cells; diff --git a/experimental/Mesh.hpp b/src/mesh/Mesh.hpp similarity index 95% rename from experimental/Mesh.hpp rename to src/mesh/Mesh.hpp index f199266b5..cf199a9d5 100644 --- a/experimental/Mesh.hpp +++ b/src/mesh/Mesh.hpp @@ -38,7 +38,6 @@ public: return m_connectivity.numberOfCells(); } - #warning PASSER CES NOUVEAUX VECTEURS EN CONST Kokkos::View<Rd*> xr() const { return m_xr; diff --git a/experimental/MeshData.hpp b/src/mesh/MeshData.hpp similarity index 100% rename from experimental/MeshData.hpp rename to src/mesh/MeshData.hpp index d4b4d2802..bed5cf97e 100644 --- a/experimental/MeshData.hpp +++ b/src/mesh/MeshData.hpp @@ -10,11 +10,11 @@ class MeshData public: typedef M MeshType; - typedef TinyVector<dimension> Rd; - static constexpr size_t dimension = MeshType::dimension; static_assert(dimension>0, "dimension must be strictly positive"); + typedef TinyVector<dimension> Rd; + static constexpr double inv_dimension = 1./dimension; private: diff --git a/experimental/AcousticSolverWithMesh.hpp b/src/scheme/AcousticSolver.hpp similarity index 97% rename from experimental/AcousticSolverWithMesh.hpp rename to src/scheme/AcousticSolver.hpp index f035ced50..6c6fcdeae 100644 --- a/experimental/AcousticSolverWithMesh.hpp +++ b/src/scheme/AcousticSolver.hpp @@ -1,5 +1,5 @@ -#ifndef ACOUSTIC_SOLVER_WITH_MESH_HPP -#define ACOUSTIC_SOLVER_WITH_MESH_HPP +#ifndef ACOUSTIC_SOLVER_HPP +#define ACOUSTIC_SOLVER_HPP #include <Kokkos_Core.hpp> @@ -13,7 +13,7 @@ #include <FiniteVolumesEulerUnknowns.hpp> template<typename MeshData> -class AcousticSolverWithMesh +class AcousticSolver { typedef typename MeshData::MeshType MeshType; typedef FiniteVolumesEulerUnknowns<MeshData> UnknownsType; @@ -213,8 +213,8 @@ private: Kokkos::View<double*> m_Vj_over_cj; public: - AcousticSolverWithMesh(MeshData& mesh_data, - UnknownsType& unknowns) + AcousticSolver(MeshData& mesh_data, + UnknownsType& unknowns) : m_mesh_data(mesh_data), m_mesh(mesh_data.mesh()), m_connectivity(m_mesh.connectivity()), @@ -300,4 +300,4 @@ public: } }; -#endif // ACOUSTIC_SOLVER_WITH_MESH_HPP +#endif // ACOUSTIC_SOLVER_HPP diff --git a/experimental/BlockPerfectGas.hpp b/src/scheme/BlockPerfectGas.hpp similarity index 100% rename from experimental/BlockPerfectGas.hpp rename to src/scheme/BlockPerfectGas.hpp diff --git a/experimental/FiniteVolumesEulerUnknowns.hpp b/src/scheme/FiniteVolumesEulerUnknowns.hpp similarity index 100% rename from experimental/FiniteVolumesEulerUnknowns.hpp rename to src/scheme/FiniteVolumesEulerUnknowns.hpp diff --git a/utils/BacktraceManager.cpp b/src/utils/BacktraceManager.cpp similarity index 100% rename from utils/BacktraceManager.cpp rename to src/utils/BacktraceManager.cpp diff --git a/utils/BacktraceManager.hpp b/src/utils/BacktraceManager.hpp similarity index 100% rename from utils/BacktraceManager.hpp rename to src/utils/BacktraceManager.hpp diff --git a/utils/CMakeLists.txt b/src/utils/CMakeLists.txt similarity index 82% rename from utils/CMakeLists.txt rename to src/utils/CMakeLists.txt index e8877d862..935d1577a 100644 --- a/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -53,9 +53,9 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pastis_git_revision VERBATIM ) -# --------- check git revision info at build ---------- +# ----------------- get version info ------------------ -configure_file("${PASTIS_SOURCE_DIR}/utils/pastis_version.hpp.in" +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pastis_version.hpp.in" "${CMAKE_CURRENT_BINARY_DIR}/pastis_version.hpp" @ONLY) @@ -77,3 +77,13 @@ add_dependencies( PastisUtils PastisGitRevison) +# ---------------- Checks for includes ---------------- + +# Checks for FPE +include(CheckIncludeFile) +check_include_file(fenv.h PASTIS_HAS_FENV_H) + +# Generates pastis_config.hpp +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pastis_config.hpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/pastis_config.hpp" + @ONLY) diff --git a/utils/ConsoleManager.cpp b/src/utils/ConsoleManager.cpp similarity index 100% rename from utils/ConsoleManager.cpp rename to src/utils/ConsoleManager.cpp diff --git a/utils/ConsoleManager.hpp b/src/utils/ConsoleManager.hpp similarity index 100% rename from utils/ConsoleManager.hpp rename to src/utils/ConsoleManager.hpp diff --git a/utils/FPEManager.cpp b/src/utils/FPEManager.cpp similarity index 100% rename from utils/FPEManager.cpp rename to src/utils/FPEManager.cpp diff --git a/utils/FPEManager.hpp b/src/utils/FPEManager.hpp similarity index 100% rename from utils/FPEManager.hpp rename to src/utils/FPEManager.hpp diff --git a/utils/RevisionInfo.cpp b/src/utils/RevisionInfo.cpp similarity index 100% rename from utils/RevisionInfo.cpp rename to src/utils/RevisionInfo.cpp diff --git a/utils/RevisionInfo.hpp b/src/utils/RevisionInfo.hpp similarity index 100% rename from utils/RevisionInfo.hpp rename to src/utils/RevisionInfo.hpp diff --git a/utils/SignalManager.cpp b/src/utils/SignalManager.cpp similarity index 100% rename from utils/SignalManager.cpp rename to src/utils/SignalManager.cpp diff --git a/utils/SignalManager.hpp b/src/utils/SignalManager.hpp similarity index 100% rename from utils/SignalManager.hpp rename to src/utils/SignalManager.hpp diff --git a/utils/Types.hpp b/src/utils/Types.hpp similarity index 100% rename from utils/Types.hpp rename to src/utils/Types.hpp diff --git a/pastis_config.hpp.in b/src/utils/pastis_config.hpp.in similarity index 100% rename from pastis_config.hpp.in rename to src/utils/pastis_config.hpp.in diff --git a/utils/pastis_git_revision.hpp.in b/src/utils/pastis_git_revision.hpp.in similarity index 100% rename from utils/pastis_git_revision.hpp.in rename to src/utils/pastis_git_revision.hpp.in diff --git a/utils/pastis_version.hpp.in b/src/utils/pastis_version.hpp.in similarity index 100% rename from utils/pastis_version.hpp.in rename to src/utils/pastis_version.hpp.in -- GitLab