mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: change wordRes to be a List of wordRe instead of a wrapper (issue #259)
- this permits direct storage of a list with additional matcher capabilities - provide wordRes::matcher class for similar behaviour as previously
This commit is contained in:
@ -81,12 +81,11 @@ int main(int argc, char *argv[])
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
// Find set of patches from the list of regular expressions provided
|
||||
const wordReList patches((IStringStream(args[1])()));
|
||||
const labelHashSet patchSet(mesh.boundaryMesh().patchSet(patches));
|
||||
|
||||
const wordRes patches(args.readList<wordRe>(1));
|
||||
const scalar weight = args.read<scalar>(2);
|
||||
const bool overwrite = args.found("overwrite");
|
||||
|
||||
const labelHashSet patchSet(mesh.boundaryMesh().patchSet(patches));
|
||||
if (!patchSet.size())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
|
||||
@ -1666,7 +1666,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
includePatches = bMesh.patchSet
|
||||
(
|
||||
wordReList(args.lookup("patches")())
|
||||
args.readList<wordRe>("patches")
|
||||
);
|
||||
}
|
||||
else
|
||||
|
||||
@ -414,7 +414,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (args.found("patches"))
|
||||
{
|
||||
const wordReList patchNames(args.opt<wordReList>("patches"));
|
||||
const wordRes patchNames(args.readList<wordRe>("patches"));
|
||||
|
||||
exposedPatchIDs = mesh.boundaryMesh().patchSet(patchNames).sortedToc();
|
||||
|
||||
|
||||
@ -360,10 +360,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (args.found("scale"))
|
||||
List<scalar> scaling;
|
||||
if (args.readListIfPresent("scale", scaling))
|
||||
{
|
||||
// Use readList to handle single or multiple values
|
||||
const List<scalar> scaling = args.readList<scalar>("scale");
|
||||
// readList handles single or multiple values
|
||||
|
||||
if (scaling.size() == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user