diff --git a/applications/test/extendedStencil/Test-ExtendedStencil.C b/applications/test/extendedStencil/Test-ExtendedStencil.C index 72c1afb2c1..0e50f8710f 100644 --- a/applications/test/extendedStencil/Test-ExtendedStencil.C +++ b/applications/test/extendedStencil/Test-ExtendedStencil.C @@ -56,6 +56,8 @@ Description //#include "centredCFCFaceToCellStencilObject.H" #include "centredCECCellToCellStencilObject.H" +#include "centredCFCCellToCellStencilObject.H" +#include "centredCPCCellToCellStencilObject.H" using namespace Foam; @@ -460,7 +462,63 @@ int main(int argc, char *argv[]) { writeStencilOBJ ( - runTime.path()/"centredCell" + Foam::name(cellI) + ".obj", + runTime.path()/"centredCECCell" + Foam::name(cellI) + ".obj", + mesh.cellCentres()[cellI], + stencilPoints[cellI] + ); + } + } + { + const extendedCentredCellToCellStencil& addressing = + centredCPCCellToCellStencilObject::New + ( + mesh + ); + + Info<< "cellCellCell:" << endl; + writeStencilStats(addressing.stencil()); + + // Collect stencil cell centres + List > stencilPoints(mesh.nCells()); + addressing.collectData + ( + mesh.C(), + stencilPoints + ); + + forAll(stencilPoints, cellI) + { + writeStencilOBJ + ( + runTime.path()/"centredCPCCell" + Foam::name(cellI) + ".obj", + mesh.cellCentres()[cellI], + stencilPoints[cellI] + ); + } + } + { + const extendedCentredCellToCellStencil& addressing = + centredCFCCellToCellStencilObject::New + ( + mesh + ); + + Info<< "cellCellCell:" << endl; + writeStencilStats(addressing.stencil()); + + // Collect stencil cell centres + List > stencilPoints(mesh.nCells()); + addressing.collectData + ( + mesh.C(), + stencilPoints + ); + + forAll(stencilPoints, cellI) + { + writeStencilOBJ + ( + runTime.path()/"centredCFCCell" + Foam::name(cellI) + ".obj", mesh.cellCentres()[cellI], stencilPoints[cellI] ); diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index f4ce2cc95d..f2c091e4ad 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -493,7 +493,6 @@ int main(int argc, char *argv[]) mesh.nFaces(), // start patchI, // index mesh.boundaryMesh(),// polyBoundaryMesh - Pstream::worldComm, // communicator Pstream::myProcNo(),// myProcNo nbrProcI // neighbProcNo ) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index f448faa40c..ca4a9dc6b5 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -180,6 +180,12 @@ castellatedMeshControls // - used if feature snapping (see snapControls below) is used resolveFeatureAngle 30; + // Planar angle: + // - used to determine if neighbouring surface normals + // are roughly the same so e.g. free-standing baffles can be merged + // If not specified same as resolveFeatureAngle + //planarAngle 30; + // Region-wise refinement // ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict b/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict index b392f07642..ef2eb96227 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict +++ b/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict @@ -14,6 +14,20 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Sample for creating baffles: +// - usually converting internal faces into two boundary faces +// - or converting boundary faces into a boundary face +// (internalFacesOnly=false)(though should use really createPatch +// to do this) +// - can also create duplicate (overlapping) sets of baffles: +// - internalFacesOnly = false +// - have 4 entries in patches: +// - master +// - slave +// - additional master +// - additional slave + + // Whether to convert internal faces only (so leave boundary faces intact). // This is only relevant if your face selection type can pick up boundary // faces. diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index edb29d3998..d50bf96448 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) wordHashSet allCloudNames; if (Pstream::master()) { - word geomFileName = prepend + "000"; + word geomFileName = prepend + "0000"; // test pre check variable if there is a moving mesh if (meshMoving) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index a53a5fe9ab..75af8eb20a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -79,8 +79,9 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) << nl; Info<< setw(40) << "nCells" + << setw(24) << "nFaces/nCells" << setw(24) << "nInterfaces" - << setw(24) << "Ratio" << nl + << setw(24) << "nIntFaces/nCells" << nl << setw(8) << "Level" << setw(8) << "nProcs" << " " @@ -89,6 +90,9 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) << " " << setw(8) << "avg" << setw(8) << "max" + << " " + << setw(8) << "avg" + << setw(8) << "max" << " " << setw(4) << "avg" << " " << setw(4) << "max" << nl @@ -108,6 +112,7 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) { label nProcs = 0; label nCells = 0; + scalar faceCellRatio = 0; label nInterfaces = 0; label nIntFaces = 0; scalar ratio = 0.0; @@ -118,6 +123,8 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) const lduMesh& fineMesh = meshLevel(levelI); nCells = fineMesh.lduAddr().size(); + faceCellRatio = + scalar(fineMesh.lduAddr().lowerAddr().size())/nCells; const lduInterfacePtrsList interfaces = fineMesh.interfaces(); @@ -137,6 +144,11 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) label maxNCells = returnReduce(nCells, maxOp