Skip to content

Commit 504927d

Browse files
committed
CompuptNVertices also for 1D
1 parent 1141371 commit 504927d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libsrc/meshing/meshclass.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6952,6 +6952,14 @@ namespace netgen
69526952
},
69536953
[](auto a, auto b) { return a > b ? a : b; },
69546954
numvertices);
6955+
numvertices =
6956+
ParallelReduce (LineSegments().Size(),
6957+
[&](size_t nr)
6958+
{
6959+
return int(Max(LineSegments()[nr].Vertices()));
6960+
},
6961+
[](auto a, auto b) { return a > b ? a : b; },
6962+
numvertices);
69556963
numvertices += 1-PointIndex::BASE;
69566964
}
69576965

libsrc/meshing/meshtype.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,7 @@ namespace netgen
13341334
auto PNums() const { return FlatArray<const PointIndex> (GetNP(), &pnums[0]); }
13351335
auto PNums() { return FlatArray<PointIndex> (GetNP(), &pnums[0]); }
13361336

1337+
auto Vertices() const { return FlatArray<const PointIndex> (2, &pnums[0]); }
13371338

13381339
ELEMENT_TYPE GetType() const
13391340
{

0 commit comments

Comments
 (0)