fixes with curved prisms

This commit is contained in:
Joachim Schoeberl 2010-02-22 19:28:00 +00:00
parent 3468255a89
commit 8902ef38d0
2 changed files with 18 additions and 23 deletions

View File

@ -2094,8 +2094,10 @@ 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) % 3, vi2 = (edges[i][1]-1) % 3; 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);
@ -2431,8 +2433,10 @@ namespace netgen
int order = edgeorder[info.edgenrs[i]]; int order = edgeorder[info.edgenrs[i]];
if (order >= 2) if (order >= 2)
{ {
int vi1 = (edges[i][0]-1) % 3, vi2 = (edges[i][1]-1) % 3; 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;
Vector shapei(order+1); Vector shapei(order+1);
CalcScaledEdgeShapeDxDt<3> (order, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &dshapes(ii,0) ); CalcScaledEdgeShapeDxDt<3> (order, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &dshapes(ii,0) );
@ -2467,6 +2471,7 @@ namespace netgen
ii += order-1; ii += order-1;
} }
} }
for (int i = 6; i < 9; i++) // vertical edges for (int i = 6; i < 9; i++) // vertical edges
{ {
int eorder = edgeorder[info.edgenrs[i]]; int eorder = edgeorder[info.edgenrs[i]];

View File

@ -2912,17 +2912,12 @@ namespace netgen
int nmsl = 0; int nmsl = 0;
msf >> nmsp; msf >> nmsp;
if(nmsp > 0)
{
if(!msf.good()) if(!msf.good())
throw NgException ("Mesh-size file error: No points found\n"); throw NgException ("Mesh-size file error: No points found\n");
if(nmsp > 0)
PrintMessage (4, "Number of mesh-size restriction points: ", nmsp); PrintMessage (4, "Number of mesh-size restriction points: ", nmsp);
}
else
{
msf.close();
return;
}
for (int i = 0; i < nmsp; i++) for (int i = 0; i < nmsp; i++)
{ {
Point3d pi; Point3d pi;
@ -2933,19 +2928,14 @@ namespace netgen
throw NgException ("Mesh-size file error: Number of points don't match specified list size\n"); throw NgException ("Mesh-size file error: Number of points don't match specified list size\n");
RestrictLocalH (pi, hi); RestrictLocalH (pi, hi);
} }
msf >> nmsl; msf >> nmsl;
if(nmsl > 0)
{
cout << "Number of line definitions expected = " << nmsl << endl;
if(!msf.good()) if(!msf.good())
throw NgException ("Mesh-size file error: No line definitions found\n"); throw NgException ("Mesh-size file error: No line definitions found\n");
if(nmsl > 0)
PrintMessage (4, "Number of mesh-size restriction lines: ", nmsl); PrintMessage (4, "Number of mesh-size restriction lines: ", nmsl);
}
else
{
msf.close();
return;
}
for (int i = 0; i < nmsl; i++) for (int i = 0; i < nmsl; i++)
{ {
Point3d p1, p2; Point3d p1, p2;