mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-25 04:10:33 +05:00
Merge branch '2dgeom_index_fix' into 'master'
fix maxsegmentindex being off by one See merge request jschoeberl/netgen!124
This commit is contained in:
commit
f36ee3fe44
@ -457,9 +457,9 @@ namespace netgen
|
|||||||
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
||||||
if ( (*mesh)[si].si > maxsegmentindex) maxsegmentindex = (*mesh)[si].si;
|
if ( (*mesh)[si].si > maxsegmentindex) maxsegmentindex = (*mesh)[si].si;
|
||||||
|
|
||||||
mesh->SetNBCNames(maxsegmentindex+1);
|
mesh->SetNBCNames(maxsegmentindex);
|
||||||
|
|
||||||
for ( int sindex = 0; sindex <= maxsegmentindex; sindex++ )
|
for ( int sindex = 0; sindex < maxsegmentindex; sindex++ )
|
||||||
mesh->SetBCName ( sindex, geometry.GetBCName( sindex+1 ) );
|
mesh->SetBCName ( sindex, geometry.GetBCName( sindex+1 ) );
|
||||||
|
|
||||||
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
||||||
|
Loading…
Reference in New Issue
Block a user