Commit dea79bc3 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

clean up testing

create dedicated folder for testing, fix compilation error for
NSVEp_extra_sampling and remove unnecessary NDEBUG definition from
`ornstein_uhlenbeck_process.cpp`
parent f9597a28
......@@ -425,14 +425,46 @@ install(CODE "execute_process(COMMAND python3 ${PROJECT_SOURCE_DIR}/setup.py ins
#####################################################################################
## Add tests
include(CTest)
set(TEST_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test_runs/")
enable_testing()
if (BUILD_TESTING)
add_test(test_fftw turtle.test_fftw)
add_test(test_Parseval turtle.test_Parseval)
add_test(test_NSVEparticles turtle.test_NSVEparticles)
add_test(test_pp_single_to_double turtle PP field_single_to_double --simname dns_nsveparticles --iter0 32 --iter1 32)
add_test(test_pp_get_rfields turtle PP get_rfields --simname dns_nsveparticles --iter0 0 --iter1 64)
add_test(test_pp_joint_acc_vel_stats turtle PP joint_acc_vel_stats --simname dns_nsveparticles --iter0 0 --iter1 64)
add_test(test_pp_resize turtle PP resize --simname dns_nsveparticles --new_nx 96 --new_ny 96 --new_nz 96 --new_simname dns_nsveparticles_resized)
file(MAKE_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
### basic functionality
add_test(NAME test_fftw
COMMAND turtle.test_fftw
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_Parseval
COMMAND turtle.test_Parseval
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
### compare DNS output to stored results
add_test(NAME test_NSVEparticles
COMMAND turtle.test_NSVEparticles
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
### simple runs of post-processing tools
add_test(NAME test_pp_single_to_double
COMMAND turtle PP field_single_to_double --simname dns_nsveparticles --iter0 32 --iter1 32
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_pp_get_rfields
COMMAND turtle PP get_rfields --simname dns_nsveparticles --iter0 0 --iter1 64
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_pp_joint_acc_vel_stats
COMMAND turtle PP joint_acc_vel_stats --simname dns_nsveparticles --iter0 0 --iter1 64
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_pp_resize
COMMAND turtle PP resize --simname dns_nsveparticles --new_nx 96 --new_ny 96 --new_nz 96 --new_simname dns_nsveparticles_resized
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
### simple runs of different DNS
add_test(NAME test_NSVEp_extra_sampling
COMMAND turtle DNS NSVEp_extra_sampling -n 32 --src-simname dns_nsveparticles --src-iteration 32 --simname dns_nsvep_extra_sampling --nparticles 1000
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_NSVEcomplex_particles
COMMAND turtle DNS NSVEcomplex_particles -n 32 --src-simname dns_nsveparticles --src-iteration 32 --simname dns_nsvecomplex_particles --nparticles 1000
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_static_field
COMMAND turtle DNS static_field --simname dns_static_field --nparticles 10000
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
add_test(NAME test_kraichnan_field
COMMAND turtle DNS kraichnan_field --simname dns_kraichnan_field --nparticles 10000
WORKING_DIRECTORY ${TEST_OUTPUT_DIRECTORY})
endif(BUILD_TESTING)
......@@ -4,20 +4,20 @@
# Copyright 2019 Max Planck Institute #
# for Dynamics and Self-Organization #
# #
# This file is part of TurTLE. #
# This file is part of TurTLE. #
# #
# TurTLE is free software: you can redistribute it and/or modify #
# TurTLE is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published #
# by the Free Software Foundation, either version 3 of the License, #
# or (at your option) any later version. #
# #
# TurTLE is distributed in the hope that it will be useful, #
# TurTLE is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with TurTLE. If not, see <http://www.gnu.org/licenses/> #
# along with TurTLE. If not, see <http://www.gnu.org/licenses/> #
# #
# Contact: Cristian.Lalescu@ds.mpg.de #
# #
......
......@@ -149,6 +149,14 @@ int NSVEp_extra_sampling<rnumber>::do_stats()
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVEp_extra_sampling<rnumber>::read_parameters(void)
{
TIMEZONE("NSVEp_extra_sampling::read_parameters");
this->NSVEparticles<rnumber>::read_parameters();
return EXIT_SUCCESS;
}
template class NSVEp_extra_sampling<float>;
template class NSVEp_extra_sampling<double>;
......@@ -4,7 +4,7 @@
#include <cassert>
#include "scope_timer.hpp"
#include <algorithm>
#define NDEBUG
template <class rnumber,field_backend be>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment