src/Boundary/FacetedVolumeBoundary.cc
//------------------------------------------------------------------------------
// Construct the planes bounding the unique facet volume for ghosts
//------------------------------------------------------------------------------
// 2D
Construct the planes bounding the unique facet volume for ghosts
2D
Construct the planes bounding the unique facet volume for ghosts 2D
std::vector<GeomPlane<Dim<2>>>
facetGhostPlanes(const GeomPolygon& poly,
                 const GeomFacet2d& facet,
                 const bool interiorBoundary) {
  typedef Dim<2>::Vector Vector;
  typedef GeomPlane<Dim<2>> Plane;
  const auto& centroid = poly.centroid();
  const auto& p1 = facet.point1();
  const auto& p2 = facet.point2();
  const auto& vhat1 = (p1 - centroid).unitVector();
  const auto& vhat2 = (p2 - centroid).unitVector();
  return std::vector<Plane>({Plane(p1, Vector(-vhat1.y(),  vhat1.x())),
                             Plane(p2, Vector( vhat2.y(), -vhat2.x())),
                             facetPlane(facet, not interiorBoundary)});
}
std :: vector < GeomPlane < Dim < 2 > > > facetGhostPlanes ( const GeomPolygon & poly , const GeomFacet2d & facet , const bool interiorBoundary ) { typedef Dim < 2 > :: Vector Vector ; typedef GeomPlane < Dim < 2 > > Plane ; const auto & centroid = poly . centroid ( ) ; const auto & p1 = facet . point1 ( ) ; const auto & p2 = facet . point2 ( ) ; const auto & vhat1 = ( p1 - centroid ) . unitVector ( ) ; const auto & vhat2 = ( p2 - centroid ) . unitVector ( ) ; return std :: vector < Plane > ( { Plane ( p1 , Vector ( - vhat1 . y ( ) , vhat1 . x ( ) ) ) , Plane ( p2 , Vector ( vhat2 . y ( ) , - vhat2 . x ( ) ) ) , facetPlane ( facet , not interiorBoundary ) } ) ; }
Construct the planes bounding the unique facet volume for ghosts
2D
Construct the planes bounding the unique facet volume for ghosts 2D