mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
fixes for curved elements
This commit is contained in:
parent
8902ef38d0
commit
36e517fbb1
@ -2080,7 +2080,7 @@ namespace netgen
|
|||||||
double lami[6] = { xi(0), xi(1), 1-xi(0)-xi(1), xi(0), xi(1), 1-xi(0)-xi(1) };
|
double lami[6] = { xi(0), xi(1), 1-xi(0)-xi(1), xi(0), xi(1), 1-xi(0)-xi(1) };
|
||||||
double lamiz[6] = { 1-xi(2), 1-xi(2), 1-xi(2), xi(2), xi(2), xi(2) };
|
double lamiz[6] = { 1-xi(2), 1-xi(2), 1-xi(2), xi(2), xi(2), xi(2) };
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
shapes(i) = lami[i%3] * ( (i < 3) ? (1-xi(2)) : xi(2) );
|
shapes(i) = lami[i] * lamiz[i];
|
||||||
for (int i = 6; i < info.ndof; i++)
|
for (int i = 6; i < info.ndof; i++)
|
||||||
shapes(i) = 0;
|
shapes(i) = 0;
|
||||||
|
|
||||||
@ -2094,10 +2094,8 @@ namespace netgen
|
|||||||
int eorder = edgeorder[info.edgenrs[i]];
|
int eorder = edgeorder[info.edgenrs[i]];
|
||||||
if (eorder >= 2)
|
if (eorder >= 2)
|
||||||
{
|
{
|
||||||
int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1);
|
int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1;
|
||||||
if (el[vi1] > el[vi2]) swap (vi1, vi2);
|
if (el[vi1] > el[vi2]) swap (vi1, vi2);
|
||||||
vi1 = vi1 % 3;
|
|
||||||
vi2 = vi2 % 3;
|
|
||||||
|
|
||||||
CalcScaledEdgeShape (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &shapes(ii));
|
CalcScaledEdgeShape (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &shapes(ii));
|
||||||
double facz = (i < 3) ? (1-xi(2)) : xi(2);
|
double facz = (i < 3) ? (1-xi(2)) : xi(2);
|
||||||
@ -2113,12 +2111,12 @@ namespace netgen
|
|||||||
int eorder = edgeorder[info.edgenrs[i]];
|
int eorder = edgeorder[info.edgenrs[i]];
|
||||||
if (eorder >= 2)
|
if (eorder >= 2)
|
||||||
{
|
{
|
||||||
int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1);
|
int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1;
|
||||||
if (el[vi1] > el[vi2]) swap (vi1, vi2);
|
if (el[vi1] > el[vi2]) swap (vi1, vi2);
|
||||||
|
|
||||||
double bubz = lamiz[vi1]*lamiz[vi2];
|
double bubz = lamiz[vi1]*lamiz[vi2];
|
||||||
double polyz = lamiz[vi1] - lamiz[vi2];
|
double polyz = lamiz[vi1] - lamiz[vi2];
|
||||||
double bubxy = lami[(vi1)%3];
|
double bubxy = lami[vi1];
|
||||||
|
|
||||||
for (int j = 0; j < eorder-1; j++)
|
for (int j = 0; j < eorder-1; j++)
|
||||||
{
|
{
|
||||||
|
@ -65,50 +65,46 @@ namespace netgen
|
|||||||
double globmaxh = mp.maxh;
|
double globmaxh = mp.maxh;
|
||||||
|
|
||||||
for (int k = 1; k <= mesh3d.GetNDomains(); k++)
|
for (int k = 1; k <= mesh3d.GetNDomains(); k++)
|
||||||
{
|
{
|
||||||
if (multithread.terminate)
|
if (multithread.terminate)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
PrintMessage (2, "");
|
PrintMessage (2, "");
|
||||||
PrintMessage (1, "Meshing subdomain ", k, " of ", mesh3d.GetNDomains());
|
PrintMessage (1, "Meshing subdomain ", k, " of ", mesh3d.GetNDomains());
|
||||||
(*testout) << "Meshing subdomain " << k << endl;
|
(*testout) << "Meshing subdomain " << k << endl;
|
||||||
|
|
||||||
mp.maxh = min2 (globmaxh, mesh3d.MaxHDomain(k));
|
mp.maxh = min2 (globmaxh, mesh3d.MaxHDomain(k));
|
||||||
|
|
||||||
mesh3d.CalcSurfacesOfNode();
|
mesh3d.CalcSurfacesOfNode();
|
||||||
mesh3d.FindOpenElements(k);
|
mesh3d.FindOpenElements(k);
|
||||||
|
|
||||||
if (!mesh3d.GetNOpenElements())
|
if (!mesh3d.GetNOpenElements())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Box<3> domain_bbox( Box<3>::EMPTY_BOX );
|
||||||
|
|
||||||
Box<3> domain_bbox( Box<3>::EMPTY_BOX );
|
for (SurfaceElementIndex sei = 0; sei < mesh3d.GetNSE(); sei++)
|
||||||
/*
|
{
|
||||||
Point<3> (1e10, 1e10, 1e10),
|
const Element2d & el = mesh3d[sei];
|
||||||
Point<3> (-1e10, -1e10, -1e10));
|
if (el.IsDeleted() ) continue;
|
||||||
*/
|
|
||||||
|
if (mesh3d.GetFaceDescriptor(el.GetIndex()).DomainIn() == k ||
|
||||||
for (SurfaceElementIndex sei = 0; sei < mesh3d.GetNSE(); sei++)
|
mesh3d.GetFaceDescriptor(el.GetIndex()).DomainOut() == k)
|
||||||
{
|
|
||||||
const Element2d & el = mesh3d[sei];
|
for (int j = 0; j < el.GetNP(); j++)
|
||||||
if (el.IsDeleted() ) continue;
|
domain_bbox.Add (mesh3d[el[j]]);
|
||||||
|
}
|
||||||
if (mesh3d.GetFaceDescriptor(el.GetIndex()).DomainIn() == k ||
|
domain_bbox.Increase (0.01 * domain_bbox.Diam());
|
||||||
mesh3d.GetFaceDescriptor(el.GetIndex()).DomainOut() == k)
|
|
||||||
|
|
||||||
for (int j = 0; j < el.GetNP(); j++)
|
|
||||||
domain_bbox.Add (mesh3d[el[j]]);
|
|
||||||
}
|
|
||||||
domain_bbox.Increase (0.01 * domain_bbox.Diam());
|
|
||||||
|
|
||||||
|
|
||||||
for (int qstep = 1; qstep <= 3; qstep++)
|
for (int qstep = 1; qstep <= 3; qstep++)
|
||||||
{
|
{
|
||||||
if (mesh3d.HasOpenQuads())
|
if (mesh3d.HasOpenQuads())
|
||||||
{
|
{
|
||||||
string rulefile = ngdir;
|
string rulefile = ngdir;
|
||||||
|
|
||||||
const char ** rulep = NULL;
|
const char ** rulep = NULL;
|
||||||
switch (qstep)
|
switch (qstep)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user