From e917586574feecb89ab2c0be25a7d95594a6951b Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Mon, 3 Dec 2018 10:33:00 +0000 Subject: [PATCH] ENH: triSurfaceMesh: improved error message. --- .../snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C | 5 ++++- .../searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C index 0a019b9e6e7..412bcb76088 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C @@ -2731,6 +2731,7 @@ void Foam::snappyRefineDriver::doRefine ); + // Initial automatic gap-level refinement: gaps smaller than the cell size if ( max(meshRefiner_.surfaces().maxGapLevel()) > 0 @@ -2763,6 +2764,8 @@ void Foam::snappyRefineDriver::doRefine 100 // maxIter ); + // Pass1 of automatic gap-level refinement: surface-intersected cells + // in narrow gaps. Done early so we can remove the inside gapOnlyRefine ( refineParams, @@ -2776,7 +2779,7 @@ void Foam::snappyRefineDriver::doRefine 1 // nBufferLayers ); - // Refine consistently across narrow gaps (a form of shell refinement) + // Pass2 of automatic gap-level refinement: all cells in gaps bigGapOnlyRefine ( refineParams, diff --git a/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C b/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C index 74cafc8fc39..03e36f1ed40 100644 --- a/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C +++ b/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C @@ -102,12 +102,15 @@ Foam::fileName Foam::triSurfaceMesh::checkFile fileName fName; if (dict.readIfPresent("file", fName, keyType::LITERAL)) { + const fileName rawFName(fName); + fName = relativeFilePath(io, fName, isGlobal); if (!exists(fName)) { FatalErrorInFunction - << "Cannot find triSurfaceMesh at " << fName + << "Cannot find triSurfaceMesh " << rawFName + << " starting from " << io.objectPath() << exit(FatalError); } } -- GitLab