mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
2d bc
This commit is contained in:
parent
19884bd1b5
commit
aa3ce9653f
@ -378,6 +378,8 @@ namespace netgen
|
|||||||
|
|
||||||
geometry.PartitionBoundary (mp, h, *mesh);
|
geometry.PartitionBoundary (mp, h, *mesh);
|
||||||
|
|
||||||
|
PrintMessage (3, "Boundary mesh done, np = ", mesh->GetNP());
|
||||||
|
|
||||||
|
|
||||||
// marks mesh points for hp-refinement
|
// marks mesh points for hp-refinement
|
||||||
for (int i = 0; i < geometry.GetNP(); i++)
|
for (int i = 0; i < geometry.GetNP(); i++)
|
||||||
@ -413,19 +415,16 @@ namespace netgen
|
|||||||
// number of bcnames
|
// number of bcnames
|
||||||
int maxsegmentindex = 0;
|
int maxsegmentindex = 0;
|
||||||
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);
|
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 ) );
|
mesh->SetBCName ( sindex, geometry.GetBCName( sindex+1 ) );
|
||||||
|
|
||||||
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
||||||
(*mesh)[si].SetBCName ( (*mesh).GetBCNamePtr( (*mesh)[si].si-1 ) );
|
(*mesh)[si].SetBCName ( (*mesh).GetBCNamePtr( (*mesh)[si].si-1 ) );
|
||||||
|
|
||||||
|
|
||||||
mesh->CalcLocalH(mp.grading);
|
mesh->CalcLocalH(mp.grading);
|
||||||
|
|
||||||
int bnp = mesh->GetNP(); // boundary points
|
int bnp = mesh->GetNP(); // boundary points
|
||||||
|
@ -62,7 +62,7 @@ void ExportGeom2d()
|
|||||||
self.geompoints.Append(GeomPoint<2>(p,1));
|
self.geompoints.Append(GeomPoint<2>(p,1));
|
||||||
return self.geompoints.Size()-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]);
|
bp::extract<std::string> segtype(segment[0]);
|
||||||
|
|
||||||
@ -94,8 +94,9 @@ void ExportGeom2d()
|
|||||||
seg->hmax = 1e99;
|
seg->hmax = 1e99;
|
||||||
seg->reffak = 1;
|
seg->reffak = 1;
|
||||||
seg->copyfrom = -1;
|
seg->copyfrom = -1;
|
||||||
|
seg->bc = (bc >= 0) ? bc : self.GetNSplines();
|
||||||
self.AppendSegment(seg);
|
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)
|
.def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, bp::list point_indices, int leftdomain, int rightdomain)
|
||||||
{
|
{
|
||||||
int npts = bp::len(point_indices);
|
int npts = bp::len(point_indices);
|
||||||
|
Loading…
Reference in New Issue
Block a user