Selection of parcels based on their objectRegistry entries. Normally accessed via a dictionary entry. More...
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 () | |
| Construct null. More... | |
| virtual | ~parcelSelection ()=default |
| Destructor. More... | |
Static Public Attributes | |
| static const Enum< actionType > | actionNames |
| Names for the actionType. More... | |
| static const Enum< sourceType > | sourceNames |
| Names for the sourceType. More... | |
| static const Enum< logicType > | logicNames |
| Names for the logicType. More... | |
Protected Member Functions | |
| bool | calculateFilter (const objectRegistry &obrTmp, const bool log=true) |
| Calculate parcel selection filter. More... | |
Protected Attributes | |
| dictionary | parcelSelect_ |
| The filtered parcel addressing. Eg, for the current cloud. More... | |
| bitSet | parcelAddr_ |
| The filtered parcel addressing. Eg, for the current cloud. More... | |
Selection of parcels based on their objectRegistry entries. Normally accessed via a 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 180 of file parcelSelectionDetail.H.
| enum actionType |
Enumeration defining the valid selection actions.
Definition at line 185 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 202 of file parcelSelectionDetail.H.
| enum logicType |
Enumeration defining and/or logic.
| Enumerator | |
|---|---|
| AND | |
| OR | |
Definition at line 213 of file parcelSelectionDetail.H.
| parcelSelection | ( | ) |
Construct null.
Definition at line 149 of file parcelSelectionDetail.C.
|
virtualdefault |
Destructor.
|
protected |
Calculate parcel selection filter.
Definition at line 159 of file parcelSelectionDetail.C.
References Foam::actionNames, scalars::andOp(), Foam::apply(), dict, Foam::constant::electromagnetic::e, Foam::endl(), cloud::findIOPosition(), objectRegistry::findObject(), keyType::LITERAL, Log, objectRegistry::lookupObject(), Foam::mag(), Foam::nl, scalars::operation(), scalars::orOp(), Foam::reduce(), and WarningInFunction.
|
static |
Names for the actionType.
Definition at line 198 of file parcelSelectionDetail.H.
|
static |
Names for the sourceType.
Definition at line 209 of file parcelSelectionDetail.H.
|
static |
Names for the logicType.
Definition at line 216 of file parcelSelectionDetail.H.
|
protected |
The filtered parcel addressing. Eg, for the current cloud.
Definition at line 224 of file parcelSelectionDetail.H.
|
protected |
The filtered parcel addressing. Eg, for the current cloud.
Definition at line 227 of file parcelSelectionDetail.H.