mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: build dummy runTimePostProcessing if VTK/ParaView are not available
- this allows more use of the runTimePostProcessing functionObject that will fail more gracefully if the proper version could not be built. The dummy functionObject simply emits a message that it is not available.
This commit is contained in:
@ -40,6 +40,7 @@ bool Foam::functionObject::postProcess(false);
|
||||
|
||||
Foam::word Foam::functionObject::outputPrefix("postProcessing");
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::word Foam::functionObject::scopedName(const word& name) const
|
||||
@ -68,10 +69,9 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
{
|
||||
const word functionType(dict.get<word>("type"));
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Selecting function " << functionType << endl;
|
||||
}
|
||||
DebugInfo
|
||||
<< "Selecting function " << functionType << endl;
|
||||
|
||||
|
||||
// Load any additional libraries
|
||||
{
|
||||
@ -122,12 +122,6 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::functionObject::~functionObject()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::word& Foam::functionObject::name() const
|
||||
@ -179,4 +173,45 @@ void Foam::functionObject::movePoints(const polyMesh&)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * unavailableFunctionObject * * * * * * * * * * * * //
|
||||
|
||||
Foam::functionObject::unavailableFunctionObject::unavailableFunctionObject
|
||||
(
|
||||
const word& name
|
||||
)
|
||||
:
|
||||
functionObject(name)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::functionObject::unavailableFunctionObject::carp(std::string message)
|
||||
{
|
||||
FatalError
|
||||
<< "####" << nl
|
||||
<< " " << type() << " not available" << nl
|
||||
<< "####" << nl;
|
||||
|
||||
if (message.size())
|
||||
{
|
||||
FatalError
|
||||
<< message.c_str() << nl;
|
||||
}
|
||||
|
||||
FatalError
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObject::unavailableFunctionObject::execute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObject::unavailableFunctionObject::write()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user