mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix OpenFOAM export (untested)
This commit is contained in:
parent
ffc6d90094
commit
1774db10ff
@ -2013,27 +2013,26 @@ 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++)
|
|
||||||
{
|
|
||||||
// elfaces.Elem(i) = (faces.Get(elnr)[i-1]-1) / 8 + 1;
|
|
||||||
elfaces.Elem(i) = faces.Get(elnr)[i-1].fnr+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
if(withorientation)
|
||||||
{
|
{
|
||||||
cerr << "GetElementFaces with orientation currently not supported" << endl;
|
for(auto & face : elfaces)
|
||||||
/*
|
{
|
||||||
for (int i = 1; i <= nfa; i++)
|
auto v = face2vert[face-1];
|
||||||
{
|
if(v[3]!=0)
|
||||||
elfaces.Elem(i) = (faces.Get(elnr)[i-1]-1) / 8 + 1;
|
cerr << "GetElementFaces with orientation currently not supported for quads" << endl;
|
||||||
int orient = (faces.Get(elnr)[i-1]-1) % 8;
|
|
||||||
if(orient == 1 || orient == 2 || orient == 4 || orient == 7)
|
int classnr = 0;
|
||||||
elfaces.Elem(i) *= -1;
|
if (v[0] > v[1]) { classnr++; }
|
||||||
}
|
if (v[1] > v[2]) { classnr++; }
|
||||||
*/
|
if (v[2] > v[0]) { classnr++; }
|
||||||
}
|
|
||||||
|
if(classnr==1)
|
||||||
|
face = -face;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshTopology :: GetElementEdgeOrientations (int elnr, NgArray<int> & eorient) const
|
void MeshTopology :: GetElementEdgeOrientations (int elnr, NgArray<int> & eorient) const
|
||||||
|
Loading…
Reference in New Issue
Block a user