mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: allow restart through suppression of refinement. Fixes #626.
This commit is contained in:
@ -101,8 +101,11 @@ castellatedMeshControls
|
|||||||
|
|
||||||
// The surface refinement loop might spend lots of iterations refining just
|
// The surface refinement loop might spend lots of iterations refining just
|
||||||
// a few cells. This setting will cause refinement to stop if
|
// a few cells. This setting will cause refinement to stop if
|
||||||
// <= minimumRefine cells are selected for refinement. Note: it will
|
// <= minRefinementCells cells are selected for refinement. Note: it will
|
||||||
// at least do one iteration (unless the number of cells to refine is 0)
|
// at least do one iteration unless
|
||||||
|
// a: the number of cells to refine is 0
|
||||||
|
// b: minRefinementCells = -1. This is a special value indicating
|
||||||
|
// no refinement.
|
||||||
minRefinementCells 0;
|
minRefinementCells 0;
|
||||||
|
|
||||||
// Allow a certain level of imbalance during refining
|
// Allow a certain level of imbalance during refining
|
||||||
|
|||||||
@ -3,7 +3,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-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -80,6 +80,13 @@ Foam::label Foam::snappyRefineDriver::featureEdgeRefine
|
|||||||
const label minRefine
|
const label minRefine
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
addProfiling(edge, "snappyHexMesh::refine::edge");
|
addProfiling(edge, "snappyHexMesh::refine::edge");
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
@ -190,6 +197,13 @@ Foam::label Foam::snappyRefineDriver::smallFeatureRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
addProfiling(feature, "snappyHexMesh::refine::smallFeature");
|
addProfiling(feature, "snappyHexMesh::refine::smallFeature");
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
@ -313,6 +327,13 @@ Foam::label Foam::snappyRefineDriver::surfaceOnlyRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
addProfiling(surface, "snappyHexMesh::refine::surface");
|
addProfiling(surface, "snappyHexMesh::refine::surface");
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
@ -437,6 +458,13 @@ Foam::label Foam::snappyRefineDriver::gapOnlyRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
// Determine the maximum refinement level over all surfaces. This
|
// Determine the maximum refinement level over all surfaces. This
|
||||||
@ -669,6 +697,13 @@ Foam::label Foam::snappyRefineDriver::bigGapOnlyRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
label iter = 0;
|
label iter = 0;
|
||||||
@ -811,6 +846,13 @@ Foam::label Foam::snappyRefineDriver::danglingCellRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
addProfiling(dangling, "snappyHexMesh::refine::danglingCell");
|
addProfiling(dangling, "snappyHexMesh::refine::danglingCell");
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
@ -957,6 +999,13 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
addProfiling(interface, "snappyHexMesh::refine::transition");
|
addProfiling(interface, "snappyHexMesh::refine::transition");
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
@ -1348,6 +1397,13 @@ Foam::label Foam::snappyRefineDriver::shellRefine
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (refineParams.minRefineCells() == -1)
|
||||||
|
{
|
||||||
|
// Special setting to be able to restart shm on meshes with inconsistent
|
||||||
|
// cellLevel/pointLevel
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
addProfiling(shell, "snappyHexMesh::refine::shell");
|
addProfiling(shell, "snappyHexMesh::refine::shell");
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user