A zoneGenerator which selects points, cells or faces with centres either inside or outside a box or list of boxes. More...


Public Member Functions | |
| TypeName ("box") | |
| Runtime type information. More... | |
| box (const word &name, const polyMesh &mesh, const dictionary &dict) | |
| Construct from dictionary. More... | |
| virtual | ~box () |
| Destructor. More... | |
| virtual zoneSet | generate () const |
| Generate and return the zoneSet. More... | |
Public Member Functions inherited from volume | |
| volume (const word &name, const polyMesh &mesh, const dictionary &dict) | |
| Construct from dictionary. More... | |
| virtual | ~volume () |
| Destructor. More... | |
| template<class ZoneType , class UnaryOp , class ZoneGenType > | |
| Foam::labelList | select (const ZoneGenType &zoneGen, const vectorField &pts, const UnaryOp &uop) const |
| template<class ZoneType , class UnaryOp , class ZoneGenType > | |
| Foam::labelList | select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, const UnaryOp &uop) const |
| template<class ZoneType , class ZoneGenType > | |
| Foam::labelList | selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts) const |
| template<class UnaryOp , class ZoneGenType > | |
| Foam::labelList | select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap, const UnaryOp &uop) const |
| template<class ZoneGenType > | |
| Foam::labelList | selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap) const |
| template<class ZoneGenType > | |
| Foam::zoneSet | generate (const ZoneGenType &zoneGen) const |
Public Member Functions inherited from zoneGenerator | |
| TypeName ("zoneGenerator") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, zoneGenerator, dictionary,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
| zoneGenerator (const word &name, const polyMesh &mesh, const dictionary &dict) | |
| Construct from name, polyMesh and dictionary. More... | |
| zoneGenerator (const zoneGenerator &)=delete | |
| Disallow default bitwise copy construction. More... | |
| virtual | ~zoneGenerator () |
| Destructor. More... | |
| const word & | name () const |
| const word & | zoneName () const |
| bool | moveUpdate () const |
| Return true if the zoneGenerator updates any of the zones. More... | |
| virtual zoneSet | movePoints () const |
| Regenerate the zoneSet following mesh point motion. More... | |
| void | operator= (const zoneGenerator &)=delete |
| Disallow default bitwise assignment. More... | |
Friends | |
| class | volume |
Additional Inherited Members | |
Static Public Member Functions inherited from zoneGenerator | |
| static autoPtr< zoneGenerator > | New (const word &name, const polyMesh &mesh, const dictionary &dict) |
| Select constructed from name, mesh and dictionary. More... | |
| static autoPtr< zoneGenerator > | New (const word &name, const zoneTypes &zoneType, const polyMesh &mesh, const dictionary &dict) |
| Select constructed from name, zoneType, mesh and dictionary. More... | |
| static autoPtr< zoneGenerator > | New (const polyMesh &mesh, const dictionary &dict) |
| Select constructed from mesh and first valid dictionary. More... | |
| static labelList | indices (const boolList &selected) |
| Return the list of selected indices. More... | |
Protected Types inherited from volume | |
| enum class | selection { inside , outside } |
| Enumeration for inside/outside selection. More... | |
Protected Member Functions inherited from volume | |
| template<class ZoneType , class UnaryOp , class ZoneGenType > | |
| labelList | select (const ZoneGenType &zoneGen, const vectorField &pts, const UnaryOp &uop) const |
| template<class ZoneType , class UnaryOp , class ZoneGenType > | |
| labelList | select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, const UnaryOp &uop) const |
| template<class ZoneType , class ZoneGenType > | |
| labelList | selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts) const |
| template<class UnaryOp , class ZoneGenType > | |
| labelList | select (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap, const UnaryOp &uop) const |
| template<class ZoneGenType > | |
| labelList | selectOp (const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts, boolList &flipMap) const |
| template<class ZoneGenType > | |
| zoneSet | generate (const ZoneGenType &zone) const |
| Generate the zone of the given type. More... | |
Static Protected Member Functions inherited from volume | |
| static NamedEnum< selection, 2 >::namesType | selectionNames_ () |
| Initialisation function for selection enumeration names. More... | |
Protected Attributes inherited from volume | |
| zoneTypes | zoneType_ |
| selection | select_ |
| Inside/outside selection. More... | |
| zoneGeneratorList | zoneGenerators_ |
| Optional list of zoneGenerators which provide the zones to sub-set. More... | |
Protected Attributes inherited from zoneGenerator | |
| const word | name_ |
| Name of zone generator. More... | |
| const dictionary | dict_ |
| Dictionary cached for error context. More... | |
| const word | zoneName_ |
| Name of the zone (defaults to the name of the generator) More... | |
| const polyMesh & | mesh_ |
| Reference to the polyMesh. More... | |
| bool | moveUpdate_ |
| Switch to update the zones if the mesh points are moved. More... | |
Static Protected Attributes inherited from volume | |
| static const NamedEnum< selection, 2 > | selectionNames |
| Enumeration names for inside/outside selection. More... | |
A zoneGenerator which selects points, cells or faces with centres either inside or outside a box or list of boxes.
By default all the points, cells or faces of the mesh are tested for being inside or outside the box or boxes but an optional single zone or list of zones may be provided and those points, cells or faces are tested instead. This provides an efficient method of hierarchical sub-division of space where an initial selection of points cells or faces is refined by selecting the sub-set inside or outside the given box or boxes rather than having to generate another zone to intersect with.
| Property | Description | Required | Default value |
|---|---|---|---|
type | Type: box | yes | |
name | Name of the zone | no | zoneGenerator name |
zoneType | Type of zone | yes | |
select | Select either the inside or outside | no | inside |
moveUpdate | Switch to update after mesh motion | no | false |
box | Min and max bounding points of the box | no | |
boxes | List of bounding point pairs of the boxes | no | |
min | Min bounding point of the box | no | |
max | Max bounding point of the box | no | |
zone | Optional zone to sub-set | no | |
zones | Optional list of zones to sub-set | no |
A cellZone named box1 containing the cells with centres inside a single box defined by its minimum and maximum bounding points is generated by
box1
{
type box;
zoneType cell;
min (-0.0075 0 -1);
max (-0.003 0.0025 1);
} or named box1 specifically if the zoneGenerator has to be named differently:
<zoneGenerator name>
{
type box;
zoneType cell;
name box1;
min (-0.0075 0 -1);
max (-0.003 0.0025 1);
} Alternatively the box can be specified using box entry followed by the minimum and maximum bounding points:
box2
{
type box;
zoneType cell;
box (-0.0075 0 -1) (-0.003 0.0025 1);
} or a list of boxes can be specified using the boxes entry followed by a list of minimum and maximum bounding point pairs:
boxes
{
type box;
zoneType cell;
boxes
(
(-0.0075 0 -1) (-0.003 0.0025 1)
(-0.005 0.001 -1) (-0.001 0.0025 1)
);
} To select all the cells outside a box set the optional select control to outside:
box2
{
type box;
zoneType cell;
select outside;
box (-0.0075 0 -1) (-0.003 0.0025 1);
}
| box | ( | const word & | name, |
| const polyMesh & | mesh, | ||
| const dictionary & | dict | ||
| ) |
| TypeName | ( | "box" | ) |
Runtime type information.
|
virtual |
Generate and return the zoneSet.
Implements volume.
Definition at line 86 of file box.C.
References volume::generate().
