mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add 'use' action for parcel selection
- shortcut for "clear" + "add". At the end of the operation, only parcels matching that particular selection source will be used.
This commit is contained in:
@ -41,6 +41,7 @@ Foam::Detail::parcelSelection::actionNames
|
||||
{ actionType::ALL, "all" },
|
||||
{ actionType::CLEAR, "clear" },
|
||||
{ actionType::INVERT, "invert" },
|
||||
{ actionType::USE, "use" },
|
||||
{ actionType::ADD, "add" },
|
||||
{ actionType::SUBTRACT, "subtract" },
|
||||
{ actionType::SUBSET, "subset" },
|
||||
@ -90,7 +91,14 @@ namespace Foam
|
||||
switch (action)
|
||||
{
|
||||
case actionType::ADD:
|
||||
case actionType::USE:
|
||||
{
|
||||
if (actionType::USE == action)
|
||||
{
|
||||
// USE = CLEAR + ADD (ie, only use this selection)
|
||||
selection = false;
|
||||
}
|
||||
|
||||
for (label parceli = 0; parceli < len; ++parceli)
|
||||
{
|
||||
if (accept(aop(list[parceli])))
|
||||
|
||||
@ -35,7 +35,7 @@ Description
|
||||
stride
|
||||
{
|
||||
// every 10th parcelId
|
||||
action add;
|
||||
action use;
|
||||
source stride;
|
||||
stride 10;
|
||||
}
|
||||
@ -69,7 +69,7 @@ Description
|
||||
\heading Entry type
|
||||
\table
|
||||
Property | Description | Required | Default
|
||||
action | all/clear/invert add/subtract/subset/ignore | yes |
|
||||
action | all/clear/invert/ignore add/subtract/subset/use | yes |
|
||||
source | field/stride | mostly |
|
||||
\endtable
|
||||
|
||||
@ -149,6 +149,7 @@ public:
|
||||
ADD, //!< "add" - parcel selection
|
||||
SUBTRACT, //!< "subtract" - remove parcel selection
|
||||
SUBSET, //!< "subset" - subset parcel selection
|
||||
USE, //!< "use" - same as clear + add
|
||||
IGNORE, //!< "ignore" - dummy no-op
|
||||
};
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ dataCloud
|
||||
// Reduced number of output parcels
|
||||
stride
|
||||
{
|
||||
action add;
|
||||
action use;
|
||||
source stride;
|
||||
stride 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user