Skip to content
Snippets Groups Projects
Commit 6c1f95cc authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

BUG: fluentMeshToFoam: correct sets addressing

parent 04effdf5
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -1385,25 +1385,12 @@ int main(int argc, char *argv[]) ...@@ -1385,25 +1385,12 @@ int main(int argc, char *argv[])
label sz = bFaces.size(); label sz = bFaces.size();
labelList meshFaces(sz,-1); labelList meshFaces(sz,-1);
// Search faces by point matching
//make face set and write (seperate from rest for clarity) forAll(bFaces, j)
//internal and external Fluent boundaries
{ {
faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz); const face& f = bFaces[j];
label cMeshFace = findFace(pShapeMesh, f);
forAll(bFaces, j) meshFaces[j] = cMeshFace;
{
const face& f = bFaces[j];
label cMeshFace = findFace(pShapeMesh, f);
meshFaces[j] = cMeshFace;
pFaceSet.insert(cMeshFace);
}
if (writeSets)
{
Info<< "Writing patch " << patchNames[patchI]
<< " of size " << sz << " to faceSet." << endl;
pFaceSet.write();
}
} }
...@@ -1546,6 +1533,31 @@ int main(int argc, char *argv[]) ...@@ -1546,6 +1533,31 @@ int main(int argc, char *argv[])
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision())); IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
// Re-do face matching to write sets
if (writeSets)
{
forAll(patches, patchI)
{
const faceList& bFaces = patches[patchI];
label sz = bFaces.size();
faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz);
forAll(bFaces, j)
{
const face& f = bFaces[j];
label cMeshFace = findFace(pShapeMesh, f);
pFaceSet.insert(cMeshFace);
}
Info<< "Writing patch " << patchNames[patchI]
<< " of size " << sz << " to faceSet" << endl;
pFaceSet.instance() = pShapeMesh.instance();
pFaceSet.write();
}
}
// Zones // Zones
// will write out cell zones and internal faces for those zones // will write out cell zones and internal faces for those zones
// note: zone boundary faces are not added to face zones // note: zone boundary faces are not added to face zones
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment