fix OpenFOAM export (untested)

This commit is contained in:
Matthias Hochsteger 2021-08-23 14:40:36 +02:00
parent ffc6d90094
commit 1774db10ff

View File

@ -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;
} }
*/
} }
} }