This commit is contained in:
Joachim Schoeberl 2014-09-26 11:51:10 +00:00
parent 19884bd1b5
commit aa3ce9653f
2 changed files with 8 additions and 8 deletions

View File

@ -377,6 +377,8 @@ namespace netgen
geometry.PartitionBoundary (mp, h, *mesh);
PrintMessage (3, "Boundary mesh done, np = ", mesh->GetNP());
// marks mesh points for hp-refinement
@ -413,18 +415,15 @@ namespace netgen
// number of bcnames
int maxsegmentindex = 0;
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);
mesh->SetNBCNames(maxsegmentindex+1);
for ( int sindex = 0; sindex < maxsegmentindex; sindex++ )
for ( int sindex = 0; sindex <= maxsegmentindex; sindex++ )
mesh->SetBCName ( sindex, geometry.GetBCName( sindex+1 ) );
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
(*mesh)[si].SetBCName ( (*mesh).GetBCNamePtr( (*mesh)[si].si-1 ) );
mesh->CalcLocalH(mp.grading);

View File

@ -62,7 +62,7 @@ void ExportGeom2d()
self.geompoints.Append(GeomPoint<2>(p,1));
return self.geompoints.Size()-1;
}))
.def("Append", FunctionPointer([](SplineGeometry2d &self, bp::list segment, int leftdomain, int rightdomain)
.def("Append", FunctionPointer([](SplineGeometry2d &self, bp::list segment, int leftdomain, int rightdomain, int bc)
{
bp::extract<std::string> segtype(segment[0]);
@ -94,8 +94,9 @@ void ExportGeom2d()
seg->hmax = 1e99;
seg->reffak = 1;
seg->copyfrom = -1;
seg->bc = (bc >= 0) ? bc : self.GetNSplines();
self.AppendSegment(seg);
}), (bp::arg("self"), bp::arg("point_indices"), bp::arg("leftdomain") = 1, bp::arg("rightdomain") = 0))
}), (bp::arg("self"), bp::arg("point_indices"), bp::arg("leftdomain") = 1, bp::arg("rightdomain") = 0, bp::arg("bc")=-1))
.def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, bp::list point_indices, int leftdomain, int rightdomain)
{
int npts = bp::len(point_indices);