mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 14:10: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]);
|
Element el(types[classify]);
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
el[i] = nums[vertices[classify][i]];
|
el[i] = nums[vertices[classify][i]];
|
||||||
el.SetIndex(1);
|
el.SetIndex(blp.matnr);
|
||||||
cout << "el = " << el << endl;
|
// cout << "el = " << el << endl;
|
||||||
if (classify != 0)
|
if (classify != 0)
|
||||||
mesh.AddVolumeElement(el);
|
mesh.AddVolumeElement(el);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ public:
|
|||||||
// parameters by Philippose ..
|
// parameters by Philippose ..
|
||||||
Array<int> surfid;
|
Array<int> surfid;
|
||||||
int prismlayers = 1;
|
int prismlayers = 1;
|
||||||
|
int matnr = 1;
|
||||||
double hfirst = 0.01;
|
double hfirst = 0.01;
|
||||||
double growthfactor = 1;
|
double growthfactor = 1;
|
||||||
};
|
};
|
||||||
|
@ -137,10 +137,24 @@ void ExportNetgenMeshing()
|
|||||||
([](Mesh & self, int bc, double thickness, string material)
|
([](Mesh & self, int bc, double thickness, string material)
|
||||||
{
|
{
|
||||||
BoundaryLayerParameters blp;
|
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.prismlayers = 1;
|
||||||
blp.hfirst = thickness;
|
blp.hfirst = thickness;
|
||||||
blp.growthfactor = 1.0;
|
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);
|
GenerateBoundaryLayer (self, blp);
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
Loading…
Reference in New Issue
Block a user