mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
argList - specializations for optionRead<string> etc.
- new optionLookupOrDefault and additional form of optionReadIfPresent with a default value
This commit is contained in:
@ -177,13 +177,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Reading surface from " << surfName << " ..." << endl;
|
||||
|
||||
bool readSet = args.optionFound("faceSet");
|
||||
word setName;
|
||||
bool readSet = args.optionReadIfPresent("faceSet", setName);
|
||||
|
||||
if (readSet)
|
||||
{
|
||||
setName = args.option("faceSet");
|
||||
|
||||
Info<< "Repatching only the faces in faceSet " << setName
|
||||
<< " according to nearest surface triangle ..." << endl;
|
||||
}
|
||||
@ -193,8 +191,7 @@ int main(int argc, char *argv[])
|
||||
<< " triangle ..." << endl;
|
||||
}
|
||||
|
||||
scalar searchTol = 1E-3;
|
||||
args.optionReadIfPresent("tol", searchTol);
|
||||
scalar searchTol = args.optionLookupOrDefault("tol", 1e-3);
|
||||
|
||||
// Get search box. Anything not within this box will not be considered.
|
||||
const boundBox& meshBb = mesh.globalData().bb();
|
||||
@ -211,7 +208,7 @@ int main(int argc, char *argv[])
|
||||
forAll(mesh.boundaryMesh(), patchI)
|
||||
{
|
||||
Info<< " " << mesh.boundaryMesh()[patchI].name() << '\t'
|
||||
<< mesh.boundaryMesh()[patchI].size() << endl;
|
||||
<< mesh.boundaryMesh()[patchI].size() << nl;
|
||||
}
|
||||
Info<< endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user