ENH: Added 'alwaysApply' function to bypass the apply checking

This commit is contained in:
andy
2012-10-19 11:29:38 +01:00
parent f3467d4d03
commit 62e5412802
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -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);