diff --git a/src/functionObjects/field/readFields/readFields.C b/src/functionObjects/field/readFields/readFields.C index 79a085431a..bd670217d3 100644 --- a/src/functionObjects/field/readFields/readFields.C +++ b/src/functionObjects/field/readFields/readFields.C @@ -80,15 +80,28 @@ bool Foam::functionObjects::readFields::execute() for (const word& fieldName : fieldSet_) { // Already loaded? - const auto* ptr = mesh_.cfindObject(fieldName); + auto* ptr = mesh_.getObjectPtr(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