Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 4d040f37 authored by Quentin Khan's avatar Quentin Khan
Browse files

Update test_FAdaptiveSequential

parent e15d910a
......@@ -122,14 +122,14 @@ std::size_t expected_L2P(node_t* node) {
}
}
template<typename tree_t>
void test_P2P(tree_t& tree) {
template<typename tree_t, typename kernel_t>
void test_P2P(tree_t& tree, kernel_t& kernel) {
for(auto&& leaf : tree.leaves()) {
if(leaf->getData()->operator_calls[TestCountNodeData::P2P] != expected_P2P(leaf)) {
if(kernel.call_count["P2P"] != expected_P2P(leaf)) {
std::cout << "error-P2P-count "
<< leaf->getIndex() << " "
<< FTreeCoordinate(leaf->getIndex()) << " "
<< leaf->getData()->operator_calls[TestCountNodeData::P2P] << " "
<< kernel.call_count["P2P"] << " "
<< expected_P2P(leaf)
<< std::endl;
}
......@@ -151,16 +151,16 @@ void test_particle_count(tree_t& tree, const position_vector_t& position_vector)
}
}
template<typename tree_t>
void test_P2M(tree_t& tree) {
template<typename tree_t, typename kernel_t>
void test_P2M(tree_t& tree, kernel_t& kernel) {
// Assert that all particles have the right count attribute
for(auto&& node : tree.post_order_walk()) {
auto leaf = &node;
if(leaf->getData()->operator_calls[TestCountNodeData::P2M] != expected_P2M(leaf)) {
if(kernel.call_count["P2M"] != expected_P2M(leaf)) {
std::cout << "error-P2M "
<< leaf->getIndex() << " "
<< FTreeCoordinate(leaf->getIndex()) << " "
<< leaf->getData()->operator_calls[TestCountNodeData::P2M] << " "
<< kernel.call_count["P2M"] << " "
<< expected_P2M(leaf)
<< std::endl;
}
......@@ -168,15 +168,15 @@ void test_P2M(tree_t& tree) {
}
template<typename tree_t>
void test_M2M(tree_t& tree) {
template<typename tree_t, typename kernel_t>
void test_M2M(tree_t& tree, kernel_t& kernel) {
// Assert that all particles have the right count attribute
for(auto&& node : tree.post_order_walk()) {
auto leaf = &node;
if(leaf->getData()->operator_calls[TestCountNodeData::M2M] != expected_M2M(leaf)) {
if(kernel.call_count["M2M"] != expected_M2M(leaf)) {
std::cout << "error-M2M "
<< leaf->getIndex() << " "
<< leaf->getData()->operator_calls[TestCountNodeData::M2M] << " "
<< kernel.call_count["M2M"] << " "
<< expected_M2M(leaf)
<< std::endl;
}
......@@ -185,15 +185,15 @@ void test_M2M(tree_t& tree) {
template<typename tree_t>
void test_M2L(tree_t& tree) {
template<typename tree_t, typename kernel_t>
void test_M2L(tree_t& tree, kernel_t& kernel) {
// Assert that all particles have the right count attribute
for(auto&& node : tree.post_order_walk()) {
auto leaf = &node;
if(leaf->getData()->operator_calls[TestCountNodeData::M2L] != expected_M2L(leaf)) {
if(kernel.call_count["M2L"] != expected_M2L(leaf)) {
std::cout << "error-M2L "
<< leaf->getIndex() << " "
<< leaf->getData()->operator_calls[TestCountNodeData::M2L] << " "
<< kernel.call_count["M2L"] << " "
<< expected_M2L(leaf,true)
<< std::endl;
}
......@@ -201,30 +201,30 @@ void test_M2L(tree_t& tree) {
}
template<typename tree_t>
void test_L2L(tree_t& tree) {
template<typename tree_t, typename kernel_t>
void test_L2L(tree_t& tree, kernel_t& kernel) {
// Assert that all particles have the right count attribute
for(auto&& node : tree.in_order_walk()) {
auto leaf = &node;
if(leaf->getData()->operator_calls[TestCountNodeData::L2L] != expected_L2L(leaf)) {
if(kernel.call_count["L2L"] != expected_L2L(leaf)) {
std::cout << "error-L2L "
<< leaf->getIndex() << " "
<< leaf->getData()->operator_calls[TestCountNodeData::L2L] << " "
<< kernel.call_count["L2L"] << " "
<< expected_L2L(leaf)
<< std::endl;
}
}
}
template<typename tree_t>
void test_L2P(tree_t& tree) {
template<typename tree_t, typename kernel_t>
void test_L2P(tree_t& tree, kernel_t& kernel) {
// Assert that all particles have the right count attribute
for(auto&& node : tree.in_order_walk()) {
auto leaf = &node;
if(leaf->getData()->operator_calls[TestCountNodeData::L2P] != expected_L2P(leaf)) {
if(kernel.call_count["L2P"] != expected_L2P(leaf)) {
std::cout << "error-L2P "
<< leaf->getIndex() << " "
<< leaf->getData()->operator_calls[TestCountNodeData::L2P] << " "
<< kernel.call_count["L2P"] << " "
<< expected_L2P(leaf)
<< std::endl;
}
......@@ -271,21 +271,18 @@ int main() {
// Create kernel and FMM object
kernel_t kernel;
fmm_algo_t fmm_algo(tree, kernel);
fmm_algo_t fmm_algo(&tree, &kernel);
// Run algorithm
fmm_algo.run();
test_P2P(tree);
test_P2M(tree);
test_M2M(tree);
test_M2L(tree);
test_L2L(tree);
test_L2P(tree);
test_P2P(tree, kernel);
test_P2M(tree, kernel);
test_M2M(tree, kernel);
test_M2L(tree, kernel);
test_L2L(tree, kernel);
test_L2P(tree, kernel);
test_particle_count(tree, position_vect);
}
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