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 ()=default | |
Default construct. 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 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 143 of file parcelSelectionDetail.C.
References Foam::apply(), dict, Foam::constant::electromagnetic::e, Foam::endl(), objectRegistry::findObject(), UList< T >::first(), Log, objectRegistry::lookupObject(), Foam::mag(), Foam::nl, Foam::reduce(), UList< T >::size(), and WarningInFunction.
|
static |
Names for the actionType.
Definition at line 198 of file parcelSelectionDetail.H.
|
static |
Names for the sourceType.
Definition at line 213 of file parcelSelectionDetail.H.
|
static |
Names for the logicType.
Definition at line 224 of file parcelSelectionDetail.H.
|
protected |
The filtered parcel addressing. Eg, for the current cloud.
Definition at line 234 of file parcelSelectionDetail.H.
|
protected |
The filtered parcel addressing. Eg, for the current cloud.
Definition at line 239 of file parcelSelectionDetail.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.