BUGFIX: new inletOutlet breaks with postfixedSubRegistry

This commit is contained in:
Henrik Rusche 2019-01-03 17:01:32 +01:00
parent e114bb940d
commit a18d10c0aa
6 changed files with 24 additions and 2 deletions

View file

@ -129,7 +129,9 @@ void inletOutletFvPatchField<Type>::updateCoeffs()
return; return;
} }
if (!this->db().objectRegistry::found(phiName_)) // HR 2.1.19: Allow calls of virtual function in derived object registry
// eg. postFixedSubRegistry
if (!this->db().found(phiName_))
{ {
// Flux not available, do not update // Flux not available, do not update
InfoIn InfoIn

View file

@ -70,7 +70,7 @@ void Foam::magLongDelta::makeMagLongDistance() const
<< abort(FatalError); << abort(FatalError);
} }
// if (debug) if (debug)
{ {
InfoIn("magLongDelta::makeMagLongDistance()") InfoIn("magLongDelta::makeMagLongDistance()")
<< "Constructing magnitude of long cell distance" << "Constructing magnitude of long cell distance"

View file

@ -212,6 +212,12 @@ const Foam::objectRegistry& Foam::objectRegistry::subRegistry
} }
bool Foam::objectRegistry::found(const word& name) const
{
return HashTable<regIOobject*>::found(name);
}
Foam::label Foam::objectRegistry::getEvent() const Foam::label Foam::objectRegistry::getEvent() const
{ {
label curEvent = event_++; label curEvent = event_++;

View file

@ -187,6 +187,9 @@ public:
template<class Type> template<class Type>
HashTable<Type*> lookupClass(const bool strict = false); HashTable<Type*> lookupClass(const bool strict = false);
//- Is the object with name found?
virtual bool found(const word& name) const;
//- Is the named Type found? //- Is the named Type found?
template<class Type> template<class Type>
bool foundObject(const word& name) const; bool foundObject(const word& name) const;

View file

@ -140,4 +140,12 @@ bool Foam::postfixedSubRegistry::checkOut(regIOobject& io) const
} }
bool Foam::postfixedSubRegistry::found(const word& objName) const
{
word demangledName = objName;
demangledName = demangledName(objName.size() - name().size());
return HashTable<regIOobject*>::found(demangledName);
}
// ************************************************************************* // // ************************************************************************* //

View file

@ -88,6 +88,9 @@ public:
//- Return mangled fileName //- Return mangled fileName
virtual fileName mangleFileName (const fileName&) const; virtual fileName mangleFileName (const fileName&) const;
//- Is the object with name found?
virtual bool found(const word& name) const;
// Edit // Edit
//- Add an regIOobject to registry //- Add an regIOobject to registry