mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
fix OpenFOAM export (untested)
This commit is contained in:
parent
ffc6d90094
commit
1774db10ff
@ -2013,26 +2013,25 @@ namespace netgen
|
|||||||
int nfa = GetNFaces (mesh->VolumeElement(elnr).GetType());
|
int nfa = GetNFaces (mesh->VolumeElement(elnr).GetType());
|
||||||
elfaces.SetSize (nfa);
|
elfaces.SetSize (nfa);
|
||||||
|
|
||||||
if (!withorientation)
|
for (auto i : Range(nfa))
|
||||||
|
elfaces[i] = faces.Get(elnr)[i].fnr+1;
|
||||||
|
|
||||||
for (int i = 1; i <= nfa; i++)
|
if(withorientation)
|
||||||
{
|
{
|
||||||
// elfaces.Elem(i) = (faces.Get(elnr)[i-1]-1) / 8 + 1;
|
for(auto & face : elfaces)
|
||||||
elfaces.Elem(i) = faces.Get(elnr)[i-1].fnr+1;
|
{
|
||||||
}
|
auto v = face2vert[face-1];
|
||||||
|
if(v[3]!=0)
|
||||||
|
cerr << "GetElementFaces with orientation currently not supported for quads" << endl;
|
||||||
|
|
||||||
else
|
int classnr = 0;
|
||||||
{
|
if (v[0] > v[1]) { classnr++; }
|
||||||
cerr << "GetElementFaces with orientation currently not supported" << endl;
|
if (v[1] > v[2]) { classnr++; }
|
||||||
/*
|
if (v[2] > v[0]) { classnr++; }
|
||||||
for (int i = 1; i <= nfa; i++)
|
|
||||||
{
|
if(classnr==1)
|
||||||
elfaces.Elem(i) = (faces.Get(elnr)[i-1]-1) / 8 + 1;
|
face = -face;
|
||||||
int orient = (faces.Get(elnr)[i-1]-1) % 8;
|
|
||||||
if(orient == 1 || orient == 2 || orient == 4 || orient == 7)
|
|
||||||
elfaces.Elem(i) *= -1;
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user