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

Merge branch 'master' into refactor-operators

parents 7ce0ef27 abe829d3
No related branches found
No related tags found
2 merge requests!10Draft: consolidate refactoring work,!1Refactor operators
Pipeline #108347 failed
......@@ -123,10 +123,10 @@ END OF TERMS AND CONDITIONS
Runtime Exception
-----------------
As a special exception, you may use the dune-xt-common library without
As a special exception, you may use the dune-gdt library without
restriction. Specifically, if other files instantiate templates or
use macros or inline functions from one or more of the DUNE source
files, or you compile one or more of the DUNE source files and link
use macros or inline functions from one or more of the dune-gdt source
files, or you compile one or more of the dune-gdt source files and link
them with other files to produce an executable, this does not by
itself cause the resulting executable to be covered by the GNU
General Public License. This exception does not however invalidate
......
......@@ -36,25 +36,7 @@ class ContinuousMapper : public MapperInterface<GV>
using ThisType = ContinuousMapper;
using BaseType = MapperInterface<GV>;
template <int d>
struct GeometryTypeLayout
{
GeometryTypeLayout(std::set<GeometryType>&& types)
: types_(std::move(types))
{}
GeometryTypeLayout(const GeometryTypeLayout<d>&) = default;
GeometryTypeLayout(GeometryTypeLayout<d>&&) = default;
bool contains(const GeometryType& gt) const
{
return types_.count(gt) > 0;
}
const std::set<GeometryType> types_;
};
using Implementation = MultipleCodimMultipleGeomTypeMapper<GV, GeometryTypeLayout>;
using Implementation = MultipleCodimMultipleGeomTypeMapper<GV>;
public:
using BaseType::d;
......@@ -178,7 +160,7 @@ public:
DUNE_THROW_IF(all_DoF_attached_geometry_types_.size() == 0,
Exceptions::mapper_error,
"This must not happen, the finite elements report no DoFs attached to (sub)entities!");
mapper_.update();
mapper_.update(grid_view_);
} // ... update_after_adapt(...)
private:
......
......@@ -111,7 +111,7 @@ public:
void update_after_adapt() override final
{
mapper_.update();
mapper_.update(grid_view_);
size_ = 0;
max_num_dofs_ = 0;
if (offset_.size() != mapper_.size())
......
......@@ -122,7 +122,7 @@ public:
{
element_indices_.update_after_adapt();
element_to_global_indices_of_intersections_map_.resize(element_indices_.size());
mapper_.update();
mapper_.update(grid_view_);
for (auto&& element : elements(grid_view_)) {
const auto local_sz = this->local_size(element);
max_local_size_ = std::max(max_local_size_, local_sz);
......
......@@ -109,7 +109,7 @@ public:
void update_after_adapt() override final
{
mapper_.update();
mapper_.update(grid_view_);
}
private:
......
......@@ -77,7 +77,7 @@ struct SpaceTestBase : public ::testing::Test
ASSERT_NE(space, nullptr);
ASSERT_TRUE(space->is_lagrangian()) << "Do not call this test otherwise!";
for (auto&& element : elements(*grid_view))
EXPECT_EQ(r * numLagrangePoints(element.type().id(), d, p), space->basis().localize(element)->size());
EXPECT_EQ(r * numLagrangePoints(element.type(), p), space->basis().localize(element)->size());
}
void basis_of_lagrange_space_exists_on_each_element_with_correct_order()
......@@ -95,7 +95,7 @@ struct SpaceTestBase : public ::testing::Test
ASSERT_NE(space, nullptr);
ASSERT_TRUE(space->is_lagrangian()) << "Do not call this test otherwise!";
for (auto&& geometry_type : grid_view->indexSet().types(0))
EXPECT_EQ(numLagrangePoints(geometry_type.id(), d, p),
EXPECT_EQ(numLagrangePoints(geometry_type, p),
space->finite_elements().get(geometry_type, p).lagrange_points().size());
}
......@@ -185,7 +185,7 @@ struct SpaceTestBase : public ::testing::Test
ASSERT_NE(space, nullptr);
ASSERT_TRUE(space->is_lagrangian()) << "Do not call this test otherwise!";
for (auto&& element : elements(*grid_view))
EXPECT_EQ(r * numLagrangePoints(element.type().id(), d, p), space->mapper().local_size(element));
EXPECT_EQ(r * numLagrangePoints(element.type(), p), space->mapper().local_size(element));
}
void mapper_reports_correct_max_num_DoFs()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment