mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 12:54:50 +01:00
Merge branch 'restructure' into 'v0.x'
Refactor build process See merge request naaice/poet!20
This commit is contained in:
commit
bfe4d0d751
@ -24,7 +24,6 @@ find_package(RRuntime REQUIRED)
|
|||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(R_lib)
|
add_subdirectory(R_lib)
|
||||||
add_subdirectory(app)
|
|
||||||
add_subdirectory(bench)
|
add_subdirectory(bench)
|
||||||
|
|
||||||
# as tug will also pull in doctest as a dependency
|
# as tug will also pull in doctest as a dependency
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
configure_file(poet.h.in poet.h)
|
|
||||||
|
|
||||||
add_executable(poet poet.cpp)
|
|
||||||
target_include_directories(poet PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
|
|
||||||
target_link_libraries(poet PUBLIC poet_lib MPI::MPI_CXX)
|
|
||||||
|
|
||||||
install(TARGETS poet DESTINATION bin)
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
#ifndef POET_H
|
|
||||||
#define POET_H
|
|
||||||
|
|
||||||
#include "poet/ChemistryModule.hpp"
|
|
||||||
#include <Rcpp.h>
|
|
||||||
const char *poet_version = "@POET_VERSION@";
|
|
||||||
|
|
||||||
const char *CHEMISTRY_MODULE_NAME = "state_C";
|
|
||||||
|
|
||||||
|
|
||||||
#endif // POET_H
|
|
||||||
@ -18,7 +18,9 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "poet/SimParams.hpp"
|
#include "Grid.hpp"
|
||||||
|
#include "SimParams.hpp"
|
||||||
|
|
||||||
#include <RInside.h>
|
#include <RInside.h>
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -26,7 +28,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <poet/Grid.hpp>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -21,7 +21,8 @@
|
|||||||
#ifndef GRID_H
|
#ifndef GRID_H
|
||||||
#define GRID_H
|
#define GRID_H
|
||||||
|
|
||||||
#include "poet/SimParams.hpp"
|
#include "SimParams.hpp"
|
||||||
|
|
||||||
#include <RInside.h>
|
#include <RInside.h>
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
#include <array>
|
#include <array>
|
||||||
@ -20,11 +20,13 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "poet/enums.hpp"
|
#include "SimParams.hpp"
|
||||||
|
|
||||||
|
#include "../Chemistry/enums.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <poet/SimParams.hpp>
|
|
||||||
|
|
||||||
#include <RInside.h>
|
#include <RInside.h>
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
@ -21,6 +21,12 @@
|
|||||||
#ifndef PARSER_H
|
#ifndef PARSER_H
|
||||||
#define PARSER_H
|
#define PARSER_H
|
||||||
|
|
||||||
|
#include "../DataStructures/DataStructures.hpp"
|
||||||
|
#include "Macros.hpp"
|
||||||
|
#include "RInsidePOET.hpp"
|
||||||
|
|
||||||
|
#include "argh.hpp" // Argument handler https://github.com/adishavit/argh
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -28,10 +34,6 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "DataStructures.hpp"
|
|
||||||
#include "Macros.hpp"
|
|
||||||
#include "RInsidePOET.hpp"
|
|
||||||
#include "argh.hpp" // Argument handler https://github.com/adishavit/argh
|
|
||||||
#include <RInside.h>
|
#include <RInside.h>
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
// BSD-licenced
|
// BSD-licenced
|
||||||
@ -1,13 +1,27 @@
|
|||||||
file(GLOB_RECURSE poet_lib_SRC
|
add_library(poetlib
|
||||||
CONFIGURE_DEPENDS
|
Base/Grid.cpp
|
||||||
"*.cpp" "*.c")
|
Base/SimParams.cpp
|
||||||
|
Chemistry/ChemistryModule.cpp
|
||||||
|
Chemistry/MasterFunctions.cpp
|
||||||
|
Chemistry/WorkerFunctions.cpp
|
||||||
|
Chemistry/SurrogateModels/DHT_Wrapper.cpp
|
||||||
|
Chemistry/SurrogateModels/DHT.c
|
||||||
|
Chemistry/SurrogateModels/HashFunctions.cpp
|
||||||
|
Chemistry/SurrogateModels/InterpolationModule.cpp
|
||||||
|
Chemistry/SurrogateModels/ProximityHashTable.cpp
|
||||||
|
DataStructures/Field.cpp
|
||||||
|
Transport/DiffusionModule.cpp
|
||||||
|
)
|
||||||
|
|
||||||
add_library(poet_lib ${poet_lib_SRC})
|
target_link_libraries(poetlib PUBLIC
|
||||||
target_include_directories(poet_lib PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
MPI::MPI_C
|
||||||
target_link_libraries(poet_lib PUBLIC
|
${MATH_LIBRARY}
|
||||||
MPI::MPI_CXX ${MATH_LIBRARY} RRuntime PhreeqcRM tug)
|
RRuntime
|
||||||
|
PhreeqcRM
|
||||||
|
tug
|
||||||
|
)
|
||||||
|
|
||||||
target_compile_definitions(poet_lib PUBLIC STRICT_R_HEADERS OMPI_SKIP_MPICXX)
|
target_compile_definitions(poetlib PUBLIC STRICT_R_HEADERS OMPI_SKIP_MPICXX)
|
||||||
|
|
||||||
mark_as_advanced(PHREEQCRM_BUILD_MPI PHREEQCRM_DISABLE_OPENMP)
|
mark_as_advanced(PHREEQCRM_BUILD_MPI PHREEQCRM_DISABLE_OPENMP)
|
||||||
set(PHREEQCRM_DISABLE_OPENMP ON CACHE BOOL "" FORCE)
|
set(PHREEQCRM_DISABLE_OPENMP ON CACHE BOOL "" FORCE)
|
||||||
@ -15,11 +29,19 @@ set(PHREEQCRM_DISABLE_OPENMP ON CACHE BOOL "" FORCE)
|
|||||||
option(POET_DHT_DEBUG "Build with DHT debug info" OFF)
|
option(POET_DHT_DEBUG "Build with DHT debug info" OFF)
|
||||||
|
|
||||||
if(POET_DHT_DEBUG)
|
if(POET_DHT_DEBUG)
|
||||||
target_compile_definitions(poet_lib PRIVATE DHT_STATISTICS)
|
target_compile_definitions(poetlib PRIVATE DHT_STATISTICS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(POET_PHT_ADDITIONAL_INFO "Enables additional information in the PHT" OFF)
|
option(POET_PHT_ADDITIONAL_INFO "Enables additional information in the PHT" OFF)
|
||||||
|
|
||||||
if (POET_PHT_ADDITIONAL_INFO)
|
if (POET_PHT_ADDITIONAL_INFO)
|
||||||
target_compile_definitions(poet_lib PRIVATE POET_PHT_ADD)
|
target_compile_definitions(poetlib PRIVATE POET_PHT_ADD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
configure_file(poet.hpp.in poet.hpp)
|
||||||
|
|
||||||
|
add_executable(poet poet.cpp)
|
||||||
|
target_link_libraries(poet PRIVATE poetlib MPI::MPI_C RRuntime)
|
||||||
|
target_include_directories(poet PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
install(TARGETS poet DESTINATION bin)
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
#include "poet/ChemistryModule.hpp"
|
#include "ChemistryModule.hpp"
|
||||||
#include "PhreeqcRM.h"
|
|
||||||
#include "poet/DHT_Wrapper.hpp"
|
#include "SurrogateModels/DHT_Wrapper.hpp"
|
||||||
#include "poet/Interpolation.hpp"
|
#include "SurrogateModels/Interpolation.hpp"
|
||||||
|
|
||||||
|
#include <PhreeqcRM.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -3,12 +3,13 @@
|
|||||||
#ifndef CHEMISTRYMODULE_H_
|
#ifndef CHEMISTRYMODULE_H_
|
||||||
#define CHEMISTRYMODULE_H_
|
#define CHEMISTRYMODULE_H_
|
||||||
|
|
||||||
#include "DHT_Wrapper.hpp"
|
#include "../Base/SimParams.hpp"
|
||||||
#include "DataStructures.hpp"
|
#include "../DataStructures/DataStructures.hpp"
|
||||||
#include "Interpolation.hpp"
|
#include "SurrogateModels/DHT_Wrapper.hpp"
|
||||||
#include "IrmResult.h"
|
#include "SurrogateModels/Interpolation.hpp"
|
||||||
#include "PhreeqcRM.h"
|
|
||||||
#include "SimParams.hpp"
|
#include <IrmResult.h>
|
||||||
|
#include <PhreeqcRM.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
@ -1,5 +1,6 @@
|
|||||||
#include "PhreeqcRM.h"
|
#include "ChemistryModule.hpp"
|
||||||
#include "poet/ChemistryModule.hpp"
|
|
||||||
|
#include <PhreeqcRM.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
@ -16,8 +16,9 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "DHT.h"
|
||||||
|
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#include <poet/DHT.h>
|
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -20,14 +20,7 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "poet/DHT_Wrapper.hpp"
|
#include "DHT_Wrapper.hpp"
|
||||||
#include "poet/HashFunctions.hpp"
|
|
||||||
#include "poet/Interpolation.hpp"
|
|
||||||
#include "poet/LookupKey.hpp"
|
|
||||||
#include "poet/Rounding.hpp"
|
|
||||||
#include "poet/enums.hpp"
|
|
||||||
|
|
||||||
#include "poet/RInsidePOET.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -150,8 +143,7 @@ void DHT_Wrapper::fillDHT(const WorkPackage &work_package) {
|
|||||||
uint32_t proc, index;
|
uint32_t proc, index;
|
||||||
auto &key = dht_results.keys[i];
|
auto &key = dht_results.keys[i];
|
||||||
const auto data =
|
const auto data =
|
||||||
(with_interp
|
(with_interp ? outputToInputAndRates(work_package.input[i],
|
||||||
? outputToInputAndRates(work_package.input[i],
|
|
||||||
work_package.output[i])
|
work_package.output[i])
|
||||||
: work_package.output[i]);
|
: work_package.output[i]);
|
||||||
// void *data = (void *)&(work_package[i * this->data_count]);
|
// void *data = (void *)&(work_package[i * this->data_count]);
|
||||||
@ -23,14 +23,14 @@
|
|||||||
#ifndef DHT_WRAPPER_H
|
#ifndef DHT_WRAPPER_H
|
||||||
#define DHT_WRAPPER_H
|
#define DHT_WRAPPER_H
|
||||||
|
|
||||||
#include "DataStructures.hpp"
|
#include "../../Base/RInsidePOET.hpp"
|
||||||
|
#include "../../Base/SimParams.hpp"
|
||||||
|
#include "../../DataStructures/DataStructures.hpp"
|
||||||
|
#include "../enums.hpp"
|
||||||
|
#include "HashFunctions.hpp"
|
||||||
#include "LookupKey.hpp"
|
#include "LookupKey.hpp"
|
||||||
#include "RInsidePOET.hpp"
|
#include "Rounding.hpp"
|
||||||
#include "SimParams.hpp"
|
|
||||||
#include "enums.hpp"
|
|
||||||
#include "poet/HashFunctions.hpp"
|
|
||||||
#include "poet/LookupKey.hpp"
|
|
||||||
#include "poet/Rounding.hpp"
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "poet/HashFunctions.hpp"
|
#include "HashFunctions.hpp"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
@ -3,13 +3,12 @@
|
|||||||
#ifndef INTERPOLATION_H_
|
#ifndef INTERPOLATION_H_
|
||||||
#define INTERPOLATION_H_
|
#define INTERPOLATION_H_
|
||||||
|
|
||||||
#include "DHT.h"
|
#include "../../Base/SimParams.hpp"
|
||||||
|
#include "../../DataStructures/DataStructures.hpp"
|
||||||
#include "DHT_Wrapper.hpp"
|
#include "DHT_Wrapper.hpp"
|
||||||
#include "DataStructures.hpp"
|
|
||||||
#include "LookupKey.hpp"
|
#include "LookupKey.hpp"
|
||||||
#include "poet/DHT_Wrapper.hpp"
|
#include "Rounding.hpp"
|
||||||
#include "poet/Rounding.hpp"
|
|
||||||
#include "poet/SimParams.hpp"
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -17,11 +16,11 @@
|
|||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "poet/DHT.h"
|
#include "DHT.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "poet/LookupKey.hpp"
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
@ -1,13 +1,15 @@
|
|||||||
// Time-stamp: "Last modified 2023-08-16 17:02:31 mluebke"
|
// Time-stamp: "Last modified 2023-08-16 17:02:31 mluebke"
|
||||||
|
#include "Interpolation.hpp"
|
||||||
|
|
||||||
#include "poet/DHT_Wrapper.hpp"
|
#include "../../DataStructures/DataStructures.hpp"
|
||||||
#include "poet/DataStructures.hpp"
|
#include "DHT_Wrapper.hpp"
|
||||||
#include "poet/HashFunctions.hpp"
|
#include "HashFunctions.hpp"
|
||||||
#include "poet/Interpolation.hpp"
|
#include "LookupKey.hpp"
|
||||||
#include "poet/LookupKey.hpp"
|
#include "Rounding.hpp"
|
||||||
#include "poet/Rounding.hpp"
|
|
||||||
#include <Rcpp/vector/instantiation.h>
|
#include <Rcpp.h>
|
||||||
#include <Rinternals.h>
|
#include <Rinternals.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -20,8 +22,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "poet/DHT.h"
|
#include "DHT.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace poet {
|
namespace poet {
|
||||||
@ -3,7 +3,8 @@
|
|||||||
#ifndef LOOKUPKEY_H_
|
#ifndef LOOKUPKEY_H_
|
||||||
#define LOOKUPKEY_H_
|
#define LOOKUPKEY_H_
|
||||||
|
|
||||||
#include "poet/HashFunctions.hpp"
|
#include "HashFunctions.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -1,10 +1,11 @@
|
|||||||
// Time-stamp: "Last modified 2023-08-15 14:50:59 mluebke"
|
// Time-stamp: "Last modified 2023-08-15 14:50:59 mluebke"
|
||||||
|
#include "Interpolation.hpp"
|
||||||
|
|
||||||
|
#include "DHT_Wrapper.hpp"
|
||||||
|
#include "HashFunctions.hpp"
|
||||||
|
#include "LookupKey.hpp"
|
||||||
|
#include "Rounding.hpp"
|
||||||
|
|
||||||
#include "poet/DHT_Wrapper.hpp"
|
|
||||||
#include "poet/HashFunctions.hpp"
|
|
||||||
#include "poet/Interpolation.hpp"
|
|
||||||
#include "poet/LookupKey.hpp"
|
|
||||||
#include "poet/Rounding.hpp"
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -12,8 +13,9 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "poet/DHT.h"
|
#include "DHT.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace poet {
|
namespace poet {
|
||||||
@ -1,8 +1,8 @@
|
|||||||
// Time-stamp: "Last modified 2023-08-16 14:50:04 mluebke"
|
// Time-stamp: "Last modified 2023-08-16 14:50:04 mluebke"
|
||||||
|
|
||||||
#include "poet/ChemistryModule.hpp"
|
#include "ChemistryModule.hpp"
|
||||||
#include "poet/DHT_Wrapper.hpp"
|
#include "SurrogateModels/DHT_Wrapper.hpp"
|
||||||
#include "poet/Interpolation.hpp"
|
#include "SurrogateModels/Interpolation.hpp"
|
||||||
|
|
||||||
#include <IrmResult.h>
|
#include <IrmResult.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -1,21 +0,0 @@
|
|||||||
file(GLOB surrogate_models_SRC
|
|
||||||
CONFIGURE_DEPENDS
|
|
||||||
"*.cpp" "*.c")
|
|
||||||
|
|
||||||
find_library(MATH_LIBRARY m)
|
|
||||||
|
|
||||||
add_library(surrogate_models ${surrogate_models_SRC})
|
|
||||||
target_include_directories(surrogate_models PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
|
||||||
target_link_libraries(surrogate_models PUBLIC
|
|
||||||
MPI::MPI_CXX ${MATH_LIBRARY})
|
|
||||||
target_compile_definitions(surrogate_models PUBLIC OMPI_SKIP_MPICXX)
|
|
||||||
|
|
||||||
option(POET_PHT_ADDITIONAL_INFO "Enables additional information in the PHT" OFF)
|
|
||||||
|
|
||||||
if (POET_PHT_ADDITIONAL_INFO)
|
|
||||||
target_compile_definitions(surrogate_models PRIVATE POET_PHT_ADD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(POET_DHT_DEBUG)
|
|
||||||
target_compile_definitions(surrogate_models PRIVATE DHT_STATISTICS)
|
|
||||||
endif()
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef DATASTRUCTURES_H_
|
#ifndef DATASTRUCTURES_H_
|
||||||
#define DATASTRUCTURES_H_
|
#define DATASTRUCTURES_H_
|
||||||
|
|
||||||
#include "enums.hpp"
|
#include "../Chemistry/enums.hpp"
|
||||||
|
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
|
|
||||||
@ -13,6 +13,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace poet {
|
namespace poet {
|
||||||
|
|
||||||
struct WorkPackage {
|
struct WorkPackage {
|
||||||
@ -1,4 +1,5 @@
|
|||||||
#include "poet/DataStructures.hpp"
|
#include "DataStructures.hpp"
|
||||||
|
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
#include <Rinternals.h>
|
#include <Rinternals.h>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|||||||
@ -18,15 +18,15 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "DiffusionModule.hpp"
|
||||||
|
#include "../Base/Macros.hpp"
|
||||||
|
|
||||||
|
#include <tug/BoundaryCondition.hpp>
|
||||||
|
#include <tug/Diffusion.hpp>
|
||||||
|
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <poet/DiffusionModule.hpp>
|
|
||||||
#include <poet/Grid.hpp>
|
|
||||||
#include <poet/Macros.hpp>
|
|
||||||
#include <poet/SimParams.hpp>
|
|
||||||
#include <tug/BoundaryCondition.hpp>
|
|
||||||
#include <tug/Diffusion.hpp>
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -177,11 +177,11 @@ void DiffusionModule::simulate(double dt) {
|
|||||||
|
|
||||||
t_field = field_2d;
|
t_field = field_2d;
|
||||||
|
|
||||||
|
|
||||||
sim_a_transport = MPI_Wtime();
|
sim_a_transport = MPI_Wtime();
|
||||||
|
|
||||||
transport_t += sim_a_transport - sim_b_transport;
|
transport_t += sim_a_transport - sim_b_transport;
|
||||||
std::cout << " done in "<< sim_a_transport - sim_b_transport << "sec" << std::endl;
|
std::cout << " done in " << sim_a_transport - sim_b_transport << "sec"
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiffusionModule::end() {
|
void DiffusionModule::end() {
|
||||||
@ -21,16 +21,17 @@
|
|||||||
#ifndef DIFFUSION_MODULE_H
|
#ifndef DIFFUSION_MODULE_H
|
||||||
#define DIFFUSION_MODULE_H
|
#define DIFFUSION_MODULE_H
|
||||||
|
|
||||||
#include "DataStructures.hpp"
|
#include "../Base/Grid.hpp"
|
||||||
#include "SimParams.hpp"
|
#include "../Base/SimParams.hpp"
|
||||||
#include "poet/SimParams.hpp"
|
#include "../DataStructures/DataStructures.hpp"
|
||||||
|
|
||||||
|
#include <tug/BoundaryCondition.hpp>
|
||||||
|
#include <tug/Diffusion.hpp>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <poet/Grid.hpp>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <tug/BoundaryCondition.hpp>
|
|
||||||
#include <tug/Diffusion.hpp>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace poet {
|
namespace poet {
|
||||||
@ -18,15 +18,18 @@
|
|||||||
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
** Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Base/Grid.hpp"
|
||||||
|
#include "Base/Macros.hpp"
|
||||||
|
#include "Base/RInsidePOET.hpp"
|
||||||
|
#include "Base/SimParams.hpp"
|
||||||
|
#include "Chemistry/ChemistryModule.hpp"
|
||||||
|
#include "Transport/DiffusionModule.hpp"
|
||||||
|
|
||||||
|
#include <poet.hpp>
|
||||||
|
|
||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <poet/ChemistryModule.hpp>
|
|
||||||
#include <poet/DiffusionModule.hpp>
|
|
||||||
#include <poet/Grid.hpp>
|
|
||||||
#include <poet/Macros.hpp>
|
|
||||||
#include <poet/RInsidePOET.hpp>
|
|
||||||
#include <poet/SimParams.hpp>
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -34,7 +37,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#include <poet.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace poet;
|
using namespace poet;
|
||||||
8
src/poet.hpp.in
Normal file
8
src/poet.hpp.in
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef POET_H
|
||||||
|
#define POET_H
|
||||||
|
|
||||||
|
static const char *poet_version = "@POET_VERSION@";
|
||||||
|
|
||||||
|
static const char *CHEMISTRY_MODULE_NAME = "state_C";
|
||||||
|
|
||||||
|
#endif // POET_H
|
||||||
@ -3,7 +3,8 @@ file(GLOB test_SRC
|
|||||||
"*.cpp" "*.c")
|
"*.cpp" "*.c")
|
||||||
|
|
||||||
add_executable(testPOET ${test_SRC})
|
add_executable(testPOET ${test_SRC})
|
||||||
target_link_libraries(testPOET doctest poet_lib)
|
target_link_libraries(testPOET doctest poetlib)
|
||||||
|
target_include_directories(testPOET PRIVATE "${PROJECT_SOURCE_DIR}/src")
|
||||||
|
|
||||||
get_filename_component(TEST_RInsideSourceFile "RInsidePOET_funcs.R" REALPATH)
|
get_filename_component(TEST_RInsideSourceFile "RInsidePOET_funcs.R" REALPATH)
|
||||||
configure_file(testDataStructures.hpp.in testDataStructures.hpp)
|
configure_file(testDataStructures.hpp.in testDataStructures.hpp)
|
||||||
|
|||||||
@ -5,11 +5,12 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <poet/DataStructures.hpp>
|
|
||||||
#include <poet/RInsidePOET.hpp>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <Base/RInsidePOET.hpp>
|
||||||
|
#include <DataStructures/DataStructures.hpp>
|
||||||
|
|
||||||
#include "testDataStructures.hpp"
|
#include "testDataStructures.hpp"
|
||||||
|
|
||||||
using namespace poet;
|
using namespace poet;
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
#include <Rcpp.h>
|
#include <Rcpp.h>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
#include <poet/DataStructures.hpp>
|
|
||||||
#include <poet/RInsidePOET.hpp>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <Base/RInsidePOET.hpp>
|
||||||
|
#include <DataStructures/DataStructures.hpp>
|
||||||
|
|
||||||
#include "testDataStructures.hpp"
|
#include "testDataStructures.hpp"
|
||||||
|
|
||||||
TEST_CASE("NamedVector") {
|
TEST_CASE("NamedVector") {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
|
|
||||||
#include "poet/Rounding.hpp"
|
#include <Chemistry/SurrogateModels/Rounding.hpp>
|
||||||
|
|
||||||
TEST_CASE("Rounding") {
|
TEST_CASE("Rounding") {
|
||||||
constexpr int signif = 3;
|
constexpr int signif = 3;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user