mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 04:48:23 +01:00
Merge branch 'fix-barite' into 'main'
Fix negative solutions in barite benchmark See merge request naaice/poet!9
This commit is contained in:
commit
315ac84423
@ -26,7 +26,7 @@ add_subdirectory(src)
|
|||||||
add_subdirectory(R_lib)
|
add_subdirectory(R_lib)
|
||||||
add_subdirectory(data)
|
add_subdirectory(data)
|
||||||
add_subdirectory(app)
|
add_subdirectory(app)
|
||||||
add_subdirectory(bench/dolo_diffu_inner)
|
add_subdirectory(bench)
|
||||||
|
|
||||||
# as tug will also pull in doctest as a dependency
|
# as tug will also pull in doctest as a dependency
|
||||||
set(TUG_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
set(TUG_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
||||||
|
|||||||
3
bench/CMakeLists.txt
Normal file
3
bench/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
add_subdirectory(dolo_diffu_inner)
|
||||||
|
add_subdirectory(surfex)
|
||||||
|
add_subdirectory(barite)
|
||||||
7
bench/barite/CMakeLists.txt
Normal file
7
bench/barite/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
install(FILES
|
||||||
|
barite.R
|
||||||
|
barite.pqi
|
||||||
|
db_barite.dat
|
||||||
|
DESTINATION
|
||||||
|
share/poet/bench/barite
|
||||||
|
)
|
||||||
@ -1,7 +1,7 @@
|
|||||||
## Time-stamp: "Last modified 2023-04-11 14:29:51 delucia"
|
## Time-stamp: "Last modified 2023-04-13 17:10:30 mluebke"
|
||||||
|
|
||||||
database <- normalizePath("./db_barite.dat")
|
database <- normalizePath("../share/poet/bench/barite/db_barite.dat")
|
||||||
input_script <- normalizePath("./barite.pqi")
|
input_script <- normalizePath("../share/poet/bench/barite/barite.pqi")
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
## Section 1 ##
|
## Section 1 ##
|
||||||
|
|||||||
@ -3,5 +3,5 @@ install(FILES
|
|||||||
dolo_diffu_inner_large.R
|
dolo_diffu_inner_large.R
|
||||||
dolo_inner.pqi
|
dolo_inner.pqi
|
||||||
DESTINATION
|
DESTINATION
|
||||||
share/poet/bench
|
share/poet/bench/dolo
|
||||||
)
|
)
|
||||||
|
|||||||
7
bench/surfex/CMakeLists.txt
Normal file
7
bench/surfex/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
install(FILES
|
||||||
|
surfex.R
|
||||||
|
SurfExBase.pqi
|
||||||
|
SMILE_2021_11_01_TH.dat
|
||||||
|
DESTINATION
|
||||||
|
share/poet/bench/surfex
|
||||||
|
)
|
||||||
@ -1,7 +1,7 @@
|
|||||||
## Time-stamp: "Last modified 2023-02-27 18:33:30 delucia"
|
## Time-stamp: "Last modified 2023-04-13 17:11:52 mluebke"
|
||||||
|
|
||||||
database <- normalizePath("./SMILE_2021_11_01_TH.dat")
|
database <- normalizePath("../share/poet/bench/surfex/SMILE_2021_11_01_TH.dat")
|
||||||
input_script <- normalizePath("./SurfExBase.pqi")
|
input_script <- normalizePath("../share/poet/bench/surfex/SurfExBase.pqi")
|
||||||
|
|
||||||
cat(paste(":: R This is a test 1\n"))
|
cat(paste(":: R This is a test 1\n"))
|
||||||
|
|
||||||
|
|||||||
@ -86,8 +86,6 @@ private:
|
|||||||
|
|
||||||
void initialize(poet::DiffusionParams args);
|
void initialize(poet::DiffusionParams args);
|
||||||
|
|
||||||
void RoundToZero(double *field, uint32_t cell_count) const;
|
|
||||||
|
|
||||||
Grid &grid;
|
Grid &grid;
|
||||||
uint8_t dim;
|
uint8_t dim;
|
||||||
|
|
||||||
|
|||||||
@ -182,11 +182,6 @@ void DiffusionModule::simulate(double dt) {
|
|||||||
} else {
|
} else {
|
||||||
tug::diffusion::ADI_2D(this->diff_input, in_field, in_alpha.data());
|
tug::diffusion::ADI_2D(this->diff_input, in_field, in_alpha.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: do not use hardcoded index for O, H and charge
|
|
||||||
if (i > 2) {
|
|
||||||
this->RoundToZero(in_field, this->n_cells_per_prop);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " done!\n";
|
std::cout << " done!\n";
|
||||||
@ -195,12 +190,6 @@ void DiffusionModule::simulate(double dt) {
|
|||||||
|
|
||||||
transport_t += sim_a_transport - sim_b_transport;
|
transport_t += sim_a_transport - sim_b_transport;
|
||||||
}
|
}
|
||||||
inline void DiffusionModule::RoundToZero(double *field,
|
|
||||||
uint32_t cell_count) const {
|
|
||||||
for (uint32_t i = 0; i < cell_count; i++) {
|
|
||||||
field[i] = ((int32_t)(field[i] / ZERO_MULTIPLICATOR)) * ZERO_MULTIPLICATOR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DiffusionModule::end() {
|
void DiffusionModule::end() {
|
||||||
// R["simtime_transport"] = transport_t;
|
// R["simtime_transport"] = transport_t;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user