ENH: consistency update for box topoSetSources (#1060)

- "boxes" has precedence over "box" (similar to treatment of "zones"
  vs "zone")
This commit is contained in:
Mark Olesen
2018-10-30 12:01:36 +00:00
parent 50fe195374
commit de1832abdd
6 changed files with 21 additions and 27 deletions

View File

@ -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_);
}
}

View File

@ -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

View File

@ -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_);
}
}

View File

@ -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

View File

@ -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_);
}
}

View File

@ -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