mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: removed stickiness of readFields function object in postProcess mode. Fixes #2647
This commit is contained in:
@ -80,15 +80,28 @@ bool Foam::functionObjects::readFields::execute()
|
||||
for (const word& fieldName : fieldSet_)
|
||||
{
|
||||
// Already loaded?
|
||||
const auto* ptr = mesh_.cfindObject<regIOobject>(fieldName);
|
||||
auto* ptr = mesh_.getObjectPtr<regIOobject>(fieldName);
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
DebugInfo
|
||||
<< "readFields : "
|
||||
<< ptr->name() << " (" << ptr->type()
|
||||
<< ") already in database" << endl;
|
||||
continue;
|
||||
if (functionObject::postProcess)
|
||||
{
|
||||
DebugInfo
|
||||
<< "readFields : "
|
||||
<< ptr->name() << " (" << ptr->type()
|
||||
<< ") already in database - removing" << endl;
|
||||
|
||||
ptr->checkOut();
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugInfo
|
||||
<< "readFields : "
|
||||
<< ptr->name() << " (" << ptr->type()
|
||||
<< ") already in database" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Load field as necessary
|
||||
|
||||
Reference in New Issue
Block a user