mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: make dictionary of topoSet box sources consistent with searchableBox
This commit is contained in:
@ -114,11 +114,15 @@ Foam::boxToCell::boxToCell
|
|||||||
topoSetCellSource(mesh),
|
topoSetCellSource(mesh),
|
||||||
bbs_()
|
bbs_()
|
||||||
{
|
{
|
||||||
// Look for 'boxes' or 'box'
|
// Accept 'boxes', 'box' or 'min/max'
|
||||||
if (!dict.readIfPresent("boxes", bbs_))
|
if (!dict.readIfPresent("boxes", bbs_))
|
||||||
{
|
{
|
||||||
bbs_.resize(1);
|
bbs_.resize(1);
|
||||||
dict.readEntry("box", bbs_.first());
|
if (!dict.readIfPresent("box", bbs_.first()))
|
||||||
|
{
|
||||||
|
dict.readEntry<point>("min", bbs_.first().min());
|
||||||
|
dict.readEntry<point>("max", bbs_.first().max());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,13 +30,15 @@ Description
|
|||||||
\heading Dictionary parameters
|
\heading Dictionary parameters
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
box | A single bounding box | partly |
|
|
||||||
boxes | Multiple bounding boxes | partly |
|
boxes | Multiple bounding boxes | partly |
|
||||||
|
box | A single bounding box | partly |
|
||||||
|
min | Minimum point for a single box | partly |
|
||||||
|
max | Maximum point for a single box | partly |
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Note
|
Note
|
||||||
Must specify either "box" or "boxes".
|
In the order of highest to lowest precedence, must specify "boxes",
|
||||||
The selection of multiple boxes has precedence.
|
"box" or a "min/max" pair (compatibility with searchable box).
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
boxToCell.C
|
boxToCell.C
|
||||||
@ -92,7 +94,7 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
boxToCell(const polyMesh& mesh, const dictionary& dict);
|
boxToCell(const polyMesh& mesh, const dictionary& dict);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from stream - a single box.
|
||||||
boxToCell(const polyMesh& mesh, Istream& is);
|
boxToCell(const polyMesh& mesh, Istream& is);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -114,11 +114,15 @@ Foam::boxToFace::boxToFace
|
|||||||
topoSetFaceSource(mesh),
|
topoSetFaceSource(mesh),
|
||||||
bbs_()
|
bbs_()
|
||||||
{
|
{
|
||||||
// Look for 'boxes' or 'box'
|
// Accept 'boxes', 'box' or 'min/max'
|
||||||
if (!dict.readIfPresent("boxes", bbs_))
|
if (!dict.readIfPresent("boxes", bbs_))
|
||||||
{
|
{
|
||||||
bbs_.resize(1);
|
bbs_.resize(1);
|
||||||
dict.readEntry("box", bbs_.first());
|
if (!dict.readIfPresent("box", bbs_.first()))
|
||||||
|
{
|
||||||
|
dict.readEntry<point>("min", bbs_.first().min());
|
||||||
|
dict.readEntry<point>("max", bbs_.first().max());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,13 +30,15 @@ Description
|
|||||||
\heading Dictionary parameters
|
\heading Dictionary parameters
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
box | A single bounding box | partly |
|
|
||||||
boxes | Multiple bounding boxes | partly |
|
boxes | Multiple bounding boxes | partly |
|
||||||
|
box | A single bounding box | partly |
|
||||||
|
min | Minimum point for a single box | partly |
|
||||||
|
max | Maximum point for a single box | partly |
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Note
|
Note
|
||||||
Must specify either "box" or "boxes".
|
In the order of highest to lowest precedence, must specify "boxes",
|
||||||
The selection of multiple boxes has precedence.
|
"box" or a "min/max" pair (compatibility with searchable box).
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
boxToFace.C
|
boxToFace.C
|
||||||
@ -92,7 +94,7 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
boxToFace(const polyMesh& mesh, const dictionary& dict);
|
boxToFace(const polyMesh& mesh, const dictionary& dict);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from stream - a single box.
|
||||||
boxToFace(const polyMesh& mesh, Istream& is);
|
boxToFace(const polyMesh& mesh, Istream& is);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -114,11 +114,15 @@ Foam::boxToPoint::boxToPoint
|
|||||||
topoSetPointSource(mesh),
|
topoSetPointSource(mesh),
|
||||||
bbs_()
|
bbs_()
|
||||||
{
|
{
|
||||||
// Look for 'boxes' or 'box'
|
// Accept 'boxes', 'box' or 'min/max'
|
||||||
if (!dict.readIfPresent("boxes", bbs_))
|
if (!dict.readIfPresent("boxes", bbs_))
|
||||||
{
|
{
|
||||||
bbs_.resize(1);
|
bbs_.resize(1);
|
||||||
dict.readEntry("box", bbs_.first());
|
if (!dict.readIfPresent("box", bbs_.first()))
|
||||||
|
{
|
||||||
|
dict.readEntry<point>("min", bbs_.first().min());
|
||||||
|
dict.readEntry<point>("max", bbs_.first().max());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,13 +30,15 @@ Description
|
|||||||
\heading Dictionary parameters
|
\heading Dictionary parameters
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
box | A single bounding box | partly |
|
|
||||||
boxes | Multiple bounding boxes | partly |
|
boxes | Multiple bounding boxes | partly |
|
||||||
|
box | A single bounding box | partly |
|
||||||
|
min | Minimum point for a single box | partly |
|
||||||
|
max | Maximum point for a single box | partly |
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Note
|
Note
|
||||||
Must specify either "box" or "boxes".
|
In the order of highest to lowest precedence, must specify "boxes",
|
||||||
The selection of multiple boxes has precedence.
|
"box" or a "min/max" pair (compatibility with searchable box).
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
boxToPoint.C
|
boxToPoint.C
|
||||||
@ -93,7 +95,7 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
boxToPoint(const polyMesh& mesh, const dictionary& dict);
|
boxToPoint(const polyMesh& mesh, const dictionary& dict);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from stream - a single box.
|
||||||
boxToPoint(const polyMesh& mesh, Istream& is);
|
boxToPoint(const polyMesh& mesh, Istream& is);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user