mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surfaceHookUp: add maximum-iteration option (fixes #3401)
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2014-2017 OpenFOAM Foundation
|
Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
Copyright (C) 2020-2025 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -268,6 +268,12 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addArgument("hookTolerance", "The point merge tolerance");
|
argList::addArgument("hookTolerance", "The point merge tolerance");
|
||||||
argList::addOption("dict", "file", "Alternative surfaceHookUpDict");
|
argList::addOption("dict", "file", "Alternative surfaceHookUpDict");
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"maxIters",
|
||||||
|
"number",
|
||||||
|
"Maximum number of iterations (default: 100)"
|
||||||
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
@ -281,9 +287,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const scalar dist(args.get<scalar>(1));
|
const scalar dist(args.get<scalar>(1));
|
||||||
const scalar matchTolerance(Foam::max(1e-6*dist, SMALL));
|
const scalar matchTolerance(Foam::max(1e-6*dist, SMALL));
|
||||||
const label maxIters = 100;
|
const label maxIters = args.getOrDefault<label>("maxIters", 100);
|
||||||
|
|
||||||
Info<< "Hooking distance = " << dist << endl;
|
Info<< "Hooking distance = " << dist << nl
|
||||||
|
<< "Maximum iterations = " << maxIters << endl;
|
||||||
|
|
||||||
searchableSurfaces surfs
|
searchableSurfaces surfs
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user