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

@ -51,6 +51,12 @@ Foam::functionObjects::processorField::processorField
name_(name),
obr_(obr)
{
if (!isA<fvMesh>(obr))
{
FatalErrorInFunction
<< "objectRegistry is not an fvMesh" << exit(FatalError);
}
read(dict);
const fvMesh& mesh = refCast<const fvMesh>(obr_);
@ -76,20 +82,6 @@ Foam::functionObjects::processorField::processorField
}
bool Foam::functionObjects::processorField::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::processorField::~processorField()