Skip to content
Snippets Groups Projects
Commit db6b1855 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[facet][box] fix compiler errors from periodic boundaries

parent e268c88a
No related branches found
No related tags found
2 merge requests!1269[1pncmin tests changed],!1233Fix/periodic boundaries
......@@ -254,6 +254,10 @@ public:
// if the vertices compose a facet element, the intersection is on facet grid
const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
// make sure there are no periodic boundaries
if (boundary && intersection.neighbor())
DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
// if it is not, but it is on the boundary -> boundary scvf
if (isOnFacet || boundary)
{
......@@ -309,6 +313,18 @@ public:
bool dofOnInteriorBoundary(unsigned int dofIdx) const
{ return interiorBoundaryDofIndices_[dofIdx]; }
//! Periodic boundaries are not supported for the box facet coupling scheme
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
{ return false; }
//! The index of the vertex / d.o.f. on the other side of the periodic boundary
std::size_t periodicallyMappedDof(std::size_t dofIdx) const
{ DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); }
//! Returns the map between dofs across periodic boundaries
std::unordered_map<std::size_t, std::size_t> periodicVertexMap() const
{ return std::unordered_map<std::size_t, std::size_t>(); }
private:
const FeCache feCache_;
......@@ -457,6 +473,10 @@ public:
// if all vertices are living on the facet grid, this is an interiour boundary
const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
// make sure there are no periodic boundaries
if (boundary && intersection.neighbor())
DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
if (isOnFacet || boundary)
{
const auto isGeometry = intersection.geometry();
......@@ -495,6 +515,18 @@ public:
bool isOnInteriorBoundary(const Element& element, const Intersection& intersection) const
{ return facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, intersection.indexInInside(), 1) ]; }
//! Periodic boundaries are not supported for the box facet coupling scheme
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
{ return false; }
//! The index of the vertex / d.o.f. on the other side of the periodic boundary
std::size_t periodicallyMappedDof(std::size_t dofIdx) const
{ DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); }
//! Returns the map between dofs across periodic boundaries
std::unordered_map<std::size_t, std::size_t> periodicVertexMap() const
{ return std::unordered_map<std::size_t, std::size_t>(); }
private:
const FeCache feCache_;
......
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