Skip to content
Snippets Groups Projects
Commit f42be0fb authored by mattijs's avatar mattijs
Browse files

ENH: polyMeshFromShapeMesh: construct parallel

parent 4926c19d
Branches
Tags
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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -614,10 +614,17 @@ Foam::polyMesh::polyMesh ...@@ -614,10 +614,17 @@ Foam::polyMesh::polyMesh
label nAllPatches = boundaryFaces.size(); label nAllPatches = boundaryFaces.size();
if (nFaces > defaultPatchStart)
label nDefaultFaces = nFaces - defaultPatchStart;
if (syncPar)
{
reduce(nDefaultFaces, sumOp<label>());
}
if (nDefaultFaces > 0)
{ {
WarningIn("polyMesh::polyMesh(... construct from shapes...)") WarningIn("polyMesh::polyMesh(... construct from shapes...)")
<< "Found " << nFaces - defaultPatchStart << "Found " << nDefaultFaces
<< " undefined faces in mesh; adding to default patch." << endl; << " undefined faces in mesh; adding to default patch." << endl;
// Check if there already exists a defaultFaces patch as last patch // Check if there already exists a defaultFaces patch as last patch
...@@ -883,10 +890,16 @@ Foam::polyMesh::polyMesh ...@@ -883,10 +890,16 @@ Foam::polyMesh::polyMesh
label nAllPatches = boundaryFaces.size(); label nAllPatches = boundaryFaces.size();
if (nFaces > defaultPatchStart) label nDefaultFaces = nFaces - defaultPatchStart;
if (syncPar)
{
reduce(nDefaultFaces, sumOp<label>());
}
if (nDefaultFaces > 0)
{ {
WarningIn("polyMesh::polyMesh(... construct from shapes...)") WarningIn("polyMesh::polyMesh(... construct from shapes...)")
<< "Found " << nFaces - defaultPatchStart << "Found " << nDefaultFaces
<< " undefined faces in mesh; adding to default patch." << endl; << " undefined faces in mesh; adding to default patch." << endl;
// Check if there already exists a defaultFaces patch as last patch // Check if there already exists a defaultFaces patch as last patch
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment