mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added 'alwaysApply' function to bypass the apply checking
This commit is contained in:
@ -56,6 +56,12 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::basicSource::alwaysApply() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::basicSource::setSelection(const dictionary& dict)
|
void Foam::basicSource::setSelection(const dictionary& dict)
|
||||||
{
|
{
|
||||||
switch (selectionMode_)
|
switch (selectionMode_)
|
||||||
@ -314,6 +320,7 @@ Foam::basicSource::~basicSource()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::basicSource::isActive()
|
bool Foam::basicSource::isActive()
|
||||||
@ -341,6 +348,11 @@ bool Foam::basicSource::isActive()
|
|||||||
|
|
||||||
Foam::label Foam::basicSource::applyToField(const word& fieldName) const
|
Foam::label Foam::basicSource::applyToField(const word& fieldName) const
|
||||||
{
|
{
|
||||||
|
if (alwaysApply())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
forAll(fieldNames_, i)
|
forAll(fieldNames_, i)
|
||||||
{
|
{
|
||||||
if (fieldNames_[i] == fieldName)
|
if (fieldNames_[i] == fieldName)
|
||||||
|
|||||||
@ -150,6 +150,9 @@ protected:
|
|||||||
|
|
||||||
// Protected functions
|
// Protected functions
|
||||||
|
|
||||||
|
//- Flag to bypass the apply flag list checking
|
||||||
|
virtual bool alwaysApply() const;
|
||||||
|
|
||||||
//- Set the cellSet or points selection
|
//- Set the cellSet or points selection
|
||||||
void setSelection(const dictionary& dict);
|
void setSelection(const dictionary& dict);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user