Skip to content
Snippets Groups Projects
Commit de1832ab authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: consistency update for box topoSetSources (#1060)

- "boxes" has precedence over "box" (similar to treatment of "zones"
  vs "zone")
parent 50fe1953
Branches
Tags
No related merge requests found
......@@ -87,15 +87,12 @@ Foam::boxToCell::boxToCell
topoSetSource(mesh),
bbs_()
{
if (dict.found("box"))
// Look for 'boxes' or 'box'
if (!dict.readIfPresent("boxes", bbs_))
{
bbs_.resize(1);
dict.readEntry("box", bbs_.first());
}
else
{
dict.readEntry("boxes", bbs_);
}
}
......
......@@ -29,13 +29,14 @@ Description
\heading Dictionary parameters
\table
Property | Description | Required | Default
box | A single bounding box | partly |
boxes | Multiple bounding boxes | partly |
Property | Description | Required | Default
box | A single bounding box | partly |
boxes | Multiple bounding boxes | partly |
\endtable
Note
Must specify either "box" or "boxes"
Must specify either "box" or "boxes".
The selection of multiple boxes has precedence.
SourceFiles
boxToCell.C
......
......@@ -87,15 +87,12 @@ Foam::boxToFace::boxToFace
topoSetSource(mesh),
bbs_()
{
if (dict.found("box"))
// Look for 'boxes' or 'box'
if (!dict.readIfPresent("boxes", bbs_))
{
bbs_.resize(1);
dict.readEntry("box", bbs_.first());
}
else
{
dict.readEntry("boxes", bbs_);
}
}
......
......@@ -29,13 +29,14 @@ Description
\heading Dictionary parameters
\table
Property | Description | Required | Default
box | A single bounding box | partly |
boxes | Multiple bounding boxes | partly |
Property | Description | Required | Default
box | A single bounding box | partly |
boxes | Multiple bounding boxes | partly |
\endtable
Note
Must specify either "box" or "boxes"
Must specify either "box" or "boxes".
The selection of multiple boxes has precedence.
SourceFiles
boxToFace.C
......
......@@ -87,15 +87,12 @@ Foam::boxToPoint::boxToPoint
topoSetSource(mesh),
bbs_()
{
if (dict.found("box"))
// Look for 'boxes' or 'box'
if (!dict.readIfPresent("boxes", bbs_))
{
bbs_.resize(1);
dict.readEntry("box", bbs_.first());
}
else
{
dict.readEntry("boxes", bbs_);
}
}
......
......@@ -29,13 +29,14 @@ Description
\heading Dictionary parameters
\table
Property | Description | Required | Default
box | A single bounding box | partly |
boxes | Multiple bounding boxes | partly |
Property | Description | Required | Default
box | A single bounding box | partly |
boxes | Multiple bounding boxes | partly |
\endtable
Note
Must specify either "box" or "boxes"
Must specify either "box" or "boxes".
The selection of multiple boxes has precedence.
SourceFiles
boxToPoint.C
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment