mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 04:50:34 +05:00
insert boundary layer
This commit is contained in:
parent
49e108da4f
commit
4be52c4ee5
@ -509,8 +509,8 @@ namespace netgen
|
||||
Element el(types[classify]);
|
||||
for (int i = 0; i < 6; i++)
|
||||
el[i] = nums[vertices[classify][i]];
|
||||
el.SetIndex(1);
|
||||
cout << "el = " << el << endl;
|
||||
el.SetIndex(blp.matnr);
|
||||
// cout << "el = " << el << endl;
|
||||
if (classify != 0)
|
||||
mesh.AddVolumeElement(el);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ public:
|
||||
// parameters by Philippose ..
|
||||
Array<int> surfid;
|
||||
int prismlayers = 1;
|
||||
int matnr = 1;
|
||||
double hfirst = 0.01;
|
||||
double growthfactor = 1;
|
||||
};
|
||||
|
@ -137,10 +137,24 @@ void ExportNetgenMeshing()
|
||||
([](Mesh & self, int bc, double thickness, string material)
|
||||
{
|
||||
BoundaryLayerParameters blp;
|
||||
blp.surfid.Append (bc);
|
||||
|
||||
for (int i = 1; i <= self.GetNFD(); i++)
|
||||
if (self.GetFaceDescriptor(i).BCProperty() == bc)
|
||||
blp.surfid.Append (i);
|
||||
|
||||
cout << "add layer at surfaces: " << blp.surfid << endl;
|
||||
|
||||
blp.prismlayers = 1;
|
||||
blp.hfirst = thickness;
|
||||
blp.growthfactor = 1.0;
|
||||
|
||||
// find max domain nr
|
||||
int maxind = 0;
|
||||
for (ElementIndex ei = 0; ei < self.GetNE(); ei++)
|
||||
maxind = max (maxind, self[ei].GetIndex());
|
||||
cout << "maxind = " << maxind << endl;
|
||||
self.SetMaterial (maxind+1, material.c_str());
|
||||
blp.matnr = maxind+1;
|
||||
GenerateBoundaryLayer (self, blp);
|
||||
}
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user