Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
D
dune-grid
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 29
    • Issues 29
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 15
    • Merge Requests 15
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Core Modules
  • dune-grid
  • Issues
  • #45

Closed
Open
Opened Nov 22, 2016 by Martin Nolte@martin.nolte
  • Report abuse
  • New issue
Report abuse New issue

Move hasBoundaryIntersections to GridView

Currently, having intersections with the boundary is a property of an entity. On the other hand, handling intersections between neighboring entities or between entities and the boundary has be delegated to the GridView. This leads to the following type of code snipped:

for( const auto &entity : elements( gridView ) )
{
  if( entity.hasBoundaryIntersections() )
    for( const auto &intersection : intersections( gridView, entity ) )
    {
      if( !intersection.boundary() )
        continue;

      // do something here
    }
}

There are two problems with this approach:

  • Effectively, this forces the entity to know about the boundary of the domain, e.g., by knowing the grid. This is somewhat counterintuitive.
  • The grid might perform an intersection loop to implement hasBoundaryIntersections, just to save a loop over all intersections. This is a waste of performance.

To remedy these issues, I suggest to introduce a method

bool GridView::mightHaveBoundaryIntersections( const Entity & ) const

which returns false if and only if the entity does not have an intersection with the boundary on that grid view. Always returning true is a conforming implementation.

As a side effect, this also allows to write a grid view which introduces internal boundaries without wrapping the Entity and, hence, nearly all classes of the grid interface.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
1
Labels
suggestion
Assign labels
  • View project labels
Reference: core/dune-grid#45