diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C index e1d2a1f11e..9d111be380 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C @@ -39,7 +39,7 @@ Foam::MRFZoneList::MRFZoneList { reset(dict); - active(); + active(true); } @@ -51,7 +51,7 @@ Foam::MRFZoneList::~MRFZoneList() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::MRFZoneList::active() const +bool Foam::MRFZoneList::active(const bool warn) const { bool a = false; forAll(*this, i) @@ -59,7 +59,7 @@ bool Foam::MRFZoneList::active() const a = a || this->operator[](i).active(); } - if (!a) + if (warn && this->size() && !a) { Info<< " No MRF zones active" << endl; } diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H index e956f6e0e0..a2311c52c8 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H @@ -88,7 +88,7 @@ public: // Member Functions //- Return active status - bool active() const; + bool active(const bool warn = false) const; //- Reset the source list void reset(const dictionary& dict); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.C b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.C index 9cccc1f7f4..df3028547c 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.C @@ -38,6 +38,8 @@ Foam::porosityModelList::porosityModelList mesh_(mesh) { reset(dict); + + active(true); } @@ -49,7 +51,7 @@ Foam::porosityModelList::~porosityModelList() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::porosityModelList::active() const +bool Foam::porosityModelList::active(const bool warn) const { bool a = false; forAll(*this, i) @@ -57,7 +59,7 @@ bool Foam::porosityModelList::active() const a = a || this->operator[](i).active(); } - if (!a) + if (warn && this->size() && !a) { Info<< "No porosity models active" << endl; } diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.H b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.H index e580a2d0fa..3d0d015923 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelList.H @@ -88,7 +88,7 @@ public: // Member Functions //- Return active status - bool active() const; + bool active(const bool active = false) const; //- Reset the source list void reset(const dictionary& dict);