Skip to content
Snippets Groups Projects
Commit a1e5df8a authored by Samuel Burbulla's avatar Samuel Burbulla Committed by Timo Koch
Browse files

[factory][2d] Obtain the vertices of the intersection by reference element.

parent 0d1e9f80
No related branches found
No related tags found
1 merge request!59[gridfactory] Implement insertBoundarySegment.
Pipeline #19635 failed
......@@ -310,9 +310,13 @@ template <int dimworld>
if ( !intersection.boundary() || intersection.inside().level() != 0 )
return false;
// obtain the vertices of the intersection by reference element numbering
const auto& vertex0 = intersection.inside().template subEntity<2>( ( 3 - intersection.indexInInside() ) % 3 );
const auto& vertex1 = intersection.inside().template subEntity<2>( ( 4 - intersection.indexInInside() ) % 3 );
// Get the vertices of the intersection
const auto refElement = ReferenceElements<double, dimgrid>::general(intersection.inside().type());
const int subIdx0 = refElement.subEntity(intersection.indexInInside(), 1, /*idx*/0, dimgrid);
const auto vertex0 = intersection.inside().template subEntity<2>( subIdx0 );
const int subIdx1 = refElement.subEntity(intersection.indexInInside(), 1, /*idx*/1, dimgrid);
const auto vertex1 = intersection.inside().template subEntity<2>( subIdx1 );
std::array<unsigned int, 2> vertexIndices {{
this->insertionIndex( vertex0 ),
......
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