Permalink
Browse files

ENH: autoLayerDriver: better layering information message

  • Loading branch information...
1 parent bda3d30 commit f978623fef8b8a8b1003e2053e874d22b0b52f4b mattijs committed Feb 8, 2012
Showing with 24 additions and 8 deletions.
  1. +24 −8 src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
@@ -1134,6 +1134,7 @@ void Foam::autoLayerDriver::syncPatchDisplacement
);
// Reset if differs
+ // 1. take max
forAll(syncPatchNLayers, i)
{
if (syncPatchNLayers[i] != patchNLayers[i])
@@ -1164,6 +1165,7 @@ void Foam::autoLayerDriver::syncPatchDisplacement
);
// Reset if differs
+ // 2. take min
forAll(syncPatchNLayers, i)
{
if (syncPatchNLayers[i] != patchNLayers[i])
@@ -2085,8 +2087,10 @@ Foam::label Foam::autoLayerDriver::checkAndUnmark
// The important thing, however, is that when only a few faces
// are disabled, their coordinates are printed, and this should be
// the case
- label nReportLocal =
- min
+ label nReportLocal = nChanged;
+ if (nChangedTotal > nReportMax)
+ {
+ nReportLocal = min
(
max(nChangedTotal / Pstream::nProcs(), 1),
min
@@ -2095,11 +2099,15 @@ Foam::label Foam::autoLayerDriver::checkAndUnmark
max(nReportMax / Pstream::nProcs(), 1)
)
);
+ }
- Pout<< "Checked mesh with layers. Disabled extrusion at " << endl;
- for (label i=0; i < nReportLocal; i++)
+ if (nReportLocal)
{
- Pout<< " " << disabledFaceCentres[i] << endl;
+ Pout<< "Checked mesh with layers. Disabled extrusion at " << endl;
+ for (label i=0; i < nReportLocal; i++)
+ {
+ Pout<< " " << disabledFaceCentres[i] << endl;
+ }
}
label nReportTotal = returnReduce(nReportLocal, sumOp<label>());
@@ -2266,7 +2274,11 @@ void Foam::autoLayerDriver::addLayers
{
const_cast<Time&>(mesh.time())++;
Info<< "Writing baffled mesh to " << meshRefiner_.timeName() << endl;
- mesh.write();
+ meshRefiner_.write
+ (
+ debug,
+ mesh.time().path()/meshRefiner_.timeName()
+ );
}
@@ -2742,9 +2754,13 @@ void Foam::autoLayerDriver::addLayers
Info<< "Writing shrunk mesh to " << meshRefiner_.timeName() << endl;
// See comment in autoSnapDriver why we should not remove meshPhi
- // using mesh.clearPout().
+ // using mesh.clearOut().
- mesh.write();
+ meshRefiner_.write
+ (
+ debug,
+ mesh.time().path()/meshRefiner_.timeName()
+ );
}

0 comments on commit f978623

Please sign in to comment.