functionObjects: Removed the redundant "viable" member function

Construction failure and recovery is not handled with exceptions in functionObjectList
This commit is contained in:
Henry Weller
2016-05-11 12:57:17 +01:00
parent 82151962c5
commit 437030a57d
99 changed files with 220 additions and 1154 deletions

View File

@ -53,6 +53,12 @@ fieldCoordinateSystemTransform
fieldSet_(),
coordSys_(obr, dict)
{
if (!isA<fvMesh>(obr))
{
FatalErrorInFunction
<< "objectRegistry is not an fvMesh" << exit(FatalError);
}
read(dict);
Info<< type() << " " << name_ << ":" << nl
@ -61,19 +67,6 @@ fieldCoordinateSystemTransform
}
bool Foam::functionObjects::fieldCoordinateSystemTransform::viable
(
const word& name,
const objectRegistry& obr,
const dictionary& dict,
const bool loadFromFiles
)
{
// Construction is viable if the available mesh is an fvMesh
return isA<fvMesh>(obr);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::fieldCoordinateSystemTransform::

View File

@ -155,16 +155,6 @@ public:
const bool loadFromFiles = false
);
//- Return true if the construction of this functionObject is viable
// i.e. the prerequisites for construction are available
static bool viable
(
const word& name,
const objectRegistry&,
const dictionary&,
const bool loadFromFiles = false
);
//- Destructor
virtual ~fieldCoordinateSystemTransform();