Skip to content
Snippets Groups Projects
Commit 8423fe8b authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[test.spaces.h1_continous_lagrange] fix test, fixes #144

The mapper maps correctly, the issue was in the test where some of the
global points were not correctly identified due to numerical
inaccuracies, so there were duplicate entries like
[-1.0416666666666667407 -1.4583333333333332593], {45}
[-1.0416666666666667407 -1.4583333333333330373], {45}
in the global langrange point map.
parent 17add778
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ status = 1a3bcab04b011a5d6e44f9983cae6ff89fa695e8 bin (heads/master)
28c9ce81c14c878a71e907ab05b9bb72df77883e config.opts (heads/master)
f308c6637edd65dcb83c4c1a46feaf05b958130e dune-alugrid (v2.6.0-7-gf308c663)
76d7f0c9886a061571cb8dc66dd45a4ef86e7a58 dune-common (v2.2.1-2269-g76d7f0c9)
+962e720ddb4436cd150ecdd8e643ed399823011b dune-gdt (heads/saddlepoint)
+877121a5c92d8fe419cf23a2b0476a0278e2b93c dune-gdt (heads/saddlepoint)
5235397bc16d24c759a1672fed7b8cfde4852e52 dune-geometry (v2.2.0-834-g5235397)
af5766f0df47e3d0b62ea486efb9cdbf8e1cfc52 dune-grid (v2.2.0-2671-gaf5766f0d)
1369ae9329d0928480d6b18ed772fc77e1abf752 dune-grid-glue (v2.4.0-161-g1369ae9)
......@@ -44,7 +44,7 @@ commit = 76d7f0c9886a061571cb8dc66dd45a4ef86e7a58
[submodule.dune-gdt]
remote = git@github.com:dune-community/dune-gdt.git
status = c0b1735fab0ecbd4bb4f1eaa27cb65fe813e98f0 .vcsetup (heads/master)
commit = 962e720ddb4436cd150ecdd8e643ed399823011b
commit = 877121a5c92d8fe419cf23a2b0476a0278e2b93c
[submodule.dune-geometry]
remote = git@github.com:dune-community/dune-geometry.git
......
......@@ -77,13 +77,6 @@ public:
, mapper_(nullptr)
, basis_(nullptr)
{
#if !DUNE_GDT_SPACES_H1_CONTINUOUS_LAGRANGE_IGNORE_FAILING_ALUGRID
// see https://github.com/dune-community/dune-gdt/issues/144
DUNE_THROW_IF(XT::Grid::is_alugrid<typename GridViewType::Grid>::value && order > 1,
Exceptions::space_error,
"Higher order CG spaces do not work with alugrid atm, see "
"https://github.com/dune-community/dune-gdt/issues/144!");
#endif
// create finite elements
for (auto&& geometry_type : grid_view_.indexSet().types(0))
finite_elements_->insert(
......
......@@ -52,7 +52,7 @@ struct ContinuousLagrangeSpaceTest
{
ASSERT_NE(this->space, nullptr);
// collect all global ids that are associated with a global lagrange point
std::map<FieldVector<D, d>, std::set<size_t>, XT::Common::FieldVectorLess>
std::map<FieldVector<D, d>, std::set<size_t>, XT::Common::FieldVectorFloatLess>
global_lagrange_point_to_global_indices_map;
for (auto&& element : elements(*this->grid_view)) {
const auto global_indices = this->space->mapper().global_indices(element);
......@@ -73,17 +73,7 @@ struct ContinuousLagrangeSpaceTest
EXPECT_EQ(global_DoF_indices_per_point.size(), 1);
global_DoF_indices.insert(*(global_DoF_indices_per_point.begin()));
}
if (this->space->max_polorder() > 1
&& std::string(::testing::UnitTest::GetInstance()->current_test_info()->type_param()).substr(0, 13)
== "Dune::ALUGrid"
&& std::string(::testing::UnitTest::GetInstance()->current_test_info()->type_param())
.find("(Dune::ALUGridElementType)0")
!= std::string::npos) {
EXPECT_NE(global_lagrange_point_to_global_indices_map.size(), global_DoF_indices.size())
<< "This could be a good thing! If these are the same the following issue might be resolved: "
"https://github.com/dune-community/dune-gdt/issues/144!";
} else
EXPECT_EQ(global_lagrange_point_to_global_indices_map.size(), global_DoF_indices.size());
EXPECT_EQ(global_lagrange_point_to_global_indices_map.size(), global_DoF_indices.size());
// ... and that the numbering is consecutive
size_t count = 0;
for (const auto& global_DoF_id : global_DoF_indices) {
......
......@@ -9,10 +9,6 @@
// René Fritze (2018)
// Tobias Leibner (2018)
// see https://github.com/dune-community/dune-gdt/issues/144, we want to allow construction of the broken space to test
// other functionality
#define DUNE_GDT_SPACES_H1_CONTINUOUS_LAGRANGE_IGNORE_FAILING_ALUGRID 1
#include <dune/xt/common/test/main.hxx> // <- this one has to come first (includes the config.h)!
#include "h1_continuous_lagrange.hh"
......
......@@ -9,10 +9,6 @@
// René Fritze (2018)
// Tobias Leibner (2018)
// see https://github.com/dune-community/dune-gdt/issues/144, we want to allow construction of the broken space to test
// other functionality
#define DUNE_GDT_SPACES_H1_CONTINUOUS_LAGRANGE_IGNORE_FAILING_ALUGRID 1
#include <dune/xt/common/test/main.hxx> // <- this one has to come first (includes the config.h)!
#include "h1_continuous_lagrange.hh"
......
......@@ -9,10 +9,6 @@
// René Fritze (2018)
// Tobias Leibner (2018)
// see https://github.com/dune-community/dune-gdt/issues/144, we want to allow construction of the broken space to test
// other functionality
#define DUNE_GDT_SPACES_H1_CONTINUOUS_LAGRANGE_IGNORE_FAILING_ALUGRID 1
#include <dune/xt/common/test/main.hxx> // <- this one has to come first (includes the config.h)!
#include "h1_continuous_lagrange.hh"
......
......@@ -9,10 +9,6 @@
// René Fritze (2018)
// Tobias Leibner (2018)
// see https://github.com/dune-community/dune-gdt/issues/144, we want to allow construction of the broken space to test
// other functionality
#define DUNE_GDT_SPACES_H1_CONTINUOUS_LAGRANGE_IGNORE_FAILING_ALUGRID 1
#include <dune/xt/common/test/main.hxx> // <- this one has to come first (includes the config.h)!
#include "h1_continuous_lagrange.hh"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment