Selection of parcels based on their objectRegistry entries. Normally accessed via a dictionary entry. More...
#include <parcelSelectionDetail.H>


Public Types | |
| enum | actionType { ALL , CLEAR , INVERT , ADD , SUBTRACT , SUBSET , USE , IGNORE } |
| Enumeration defining the valid selection actions. More... | |
| enum | sourceType { FIELD , STRIDE } |
| Enumeration defining the valid sources. More... | |
| enum | logicType { AND , OR } |
| Enumeration defining and/or logic. More... | |
Public Member Functions | |
| parcelSelection ()=default | |
| Default construct. | |
| virtual | ~parcelSelection ()=default |
| Destructor. | |
Static Public Attributes | |
| static const Enum< actionType > | actionNames |
| Names for the actionType. | |
| static const Enum< sourceType > | sourceNames |
| Names for the sourceType. | |
| static const Enum< logicType > | logicNames |
| Names for the logicType. | |
Protected Member Functions | |
| bool | calculateFilter (const objectRegistry &obrTmp, const bool log=true) |
| Calculate parcel selection filter. | |
Protected Attributes | |
| dictionary | parcelSelect_ |
| The filtered parcel addressing. Eg, for the current cloud. | |
| bitSet | parcelAddr_ |
| The filtered parcel addressing. Eg, for the current cloud. | |
Selection of parcels based on their objectRegistry entries. Normally accessed via a dictionary entry.
Example sub-dictionary entry
selection
{
stride
{
// every 10th parcelId
action use;
source stride;
stride 10;
}
injector
{
// Only output from injectorID == 1
action subset;
source field;
field typeId;
accept (equal 1);
}
Umin
{
// Remove slow parcels
action subtract;
source field;
field U;
accept (less 1e-3);
}
diam
{
// Only particular diameter ranges
action subset;
source field;
field d;
accept (greater 1e-5) and (less 1e-3);
}
}
Entry type
| Property | Description | Required | Default |
|---|---|---|---|
action | all/clear/invert/ignore add/subtract/subset/use | yes | |
source | field/stride | mostly |
Stride source
| Property | Description | Required | Default |
|---|---|---|---|
stride | The stride for the parcel id | yes |
Field source
| Property | Description | Required | Default |
|---|---|---|---|
field | The label/scalar/vector field name | yes | |
accept | Acceptance or test criterion | yes |
The accept criterion has two forms:
The expressions are a (op scalar) pair that form a unary scalar predicate. The op is one of the following:
For example,
accept (less 10);
accept (less 10) or (greater 100);
accept (ge 10) and (le 20);
Definition at line 176 of file parcelSelectionDetail.H.
| enum actionType |
Enumeration defining the valid selection actions.
Definition at line 183 of file parcelSelectionDetail.H.
| enum sourceType |
Enumeration defining the valid sources.
| Enumerator | |
|---|---|
| FIELD | "field" - select based on field value |
| STRIDE | "stride" - select based on stride (parcel id) |
Definition at line 204 of file parcelSelectionDetail.H.
| enum logicType |
Enumeration defining and/or logic.
| Enumerator | |
|---|---|
| AND | |
| OR | |
Definition at line 219 of file parcelSelectionDetail.H.
|
default |
Default construct.
|
virtualdefault |
Destructor.
|
protected |
Calculate parcel selection filter.
Definition at line 142 of file parcelSelectionDetail.C.
References actionNames, ADD, ALL, AND, scalars::andOp(), Foam::apply(), CLEAR, dict, e, Foam::endl(), FIELD, cloud::findIOPosition(), objectRegistry::findObject(), UList< T >::first(), IGNORE, INVERT, keyType::LITERAL, Log, Foam::log(), logicNames, objectRegistry::lookupObject(), Foam::nl, scalars::operation(), OR, scalars::orOp(), parcelAddr_, parcelSelect_, Foam::reduce(), UList< T >::size(), sourceNames, STRIDE, SUBTRACT, and WarningInFunction.
Referenced by cloudInfo::performAction().


|
static |
Names for the actionType.
Definition at line 198 of file parcelSelectionDetail.H.
Referenced by calculateFilter().
|
static |
Names for the sourceType.
Definition at line 213 of file parcelSelectionDetail.H.
Referenced by calculateFilter().
|
static |
Names for the logicType.
Definition at line 224 of file parcelSelectionDetail.H.
Referenced by calculateFilter().
|
protected |
The filtered parcel addressing. Eg, for the current cloud.
Definition at line 234 of file parcelSelectionDetail.H.
Referenced by calculateFilter(), cloudInfo::performAction(), cloudInfo::read(), and dataCloud::read().
|
protected |
The filtered parcel addressing. Eg, for the current cloud.
Definition at line 239 of file parcelSelectionDetail.H.
Referenced by calculateFilter(), and cloudInfo::performAction().