Skip to content

Commit

Permalink
Fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrmrc committed Sep 10, 2024
1 parent aed376b commit 6471377
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/polydeal/fe_collection_agglomeration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ test_hyper_cube(Triangulation<2> &tria)
total_sum += weight;
}



Assert(total_sum == GridTools::volume(tria, mapping),
ExcMessage("Integration did not succeed"));
AssertThrow(total_sum == GridTools::volume(tria, mapping),
ExcMessage("Integration did not succeed"));
std::cout << "Ok" << std::endl;
}

Expand Down Expand Up @@ -194,7 +192,7 @@ test_hyper_ball(Triangulation<2> &tria)
}

FE_DGQ<2> fe_dg(0);
ah.initialize_fe_values(QGauss<2>(2), update_JxW_values);
ah.initialize_fe_values(QGauss<2>(3), update_JxW_values);
ah.distribute_agglomerated_dofs(fe_dg);
double total_sum = 0.;
for (const auto &polytope : ah.polytope_iterators())
Expand All @@ -204,8 +202,8 @@ test_hyper_ball(Triangulation<2> &tria)
total_sum += weight;
}

Assert(total_sum == GridTools::volume(tria, mapping),
ExcMessage("Integration did not succeed"));
AssertThrow((total_sum - GridTools::volume(tria, mapping) < 1e-13),
ExcMessage("Integration did not succeed."));
std::cout << "Ok" << std::endl;
}

Expand Down

0 comments on commit 6471377

Please sign in to comment.