Minor fixes: postfixedSubRegistry and non-contiguous lists indentation. Henrik Rusche
This commit is contained in:
commit
9c8f3f6649
9 changed files with 27 additions and 5 deletions
|
@ -129,7 +129,9 @@ void inletOutletFvPatchField<Type>::updateCoeffs()
|
|||
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
|
||||
InfoIn
|
||||
|
|
|
@ -70,7 +70,7 @@ void Foam::magLongDelta::makeMagLongDistance() const
|
|||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// if (debug)
|
||||
if (debug)
|
||||
{
|
||||
InfoIn("magLongDelta::makeMagLongDistance()")
|
||||
<< "Constructing magnitude of long cell distance"
|
||||
|
|
|
@ -198,7 +198,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
|||
// Write end delimiter
|
||||
os << token::END_BLOCK;
|
||||
}
|
||||
else if (Size < 11 && contiguous<T>())
|
||||
else if (Size <= 1 ||(Size < 11 && contiguous<T>()))
|
||||
{
|
||||
// Write start delimiter
|
||||
os << token::BEGIN_LIST;
|
||||
|
|
|
@ -67,7 +67,7 @@ Foam::Ostream& Foam::operator<<
|
|||
// Write end delimiter
|
||||
os << token::END_BLOCK;
|
||||
}
|
||||
else if (L.size() < 11 && contiguous<T>())
|
||||
else if (L.size() <= 1 || (L.size() < 11 && contiguous<T>()))
|
||||
{
|
||||
// Write size and start delimiter
|
||||
os << L.size() << token::BEGIN_LIST;
|
||||
|
|
|
@ -92,7 +92,7 @@ Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::UList<T>& L)
|
|||
// Write end delimiter
|
||||
os << token::END_BLOCK;
|
||||
}
|
||||
else if (L.size() < 11 && contiguous<T>())
|
||||
else if (L.size() <= 1 || (L.size() < 11 && contiguous<T>()))
|
||||
{
|
||||
// Write size and start delimiter
|
||||
os << L.size() << token::BEGIN_LIST;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
label curEvent = event_++;
|
||||
|
|
|
@ -187,6 +187,9 @@ public:
|
|||
template<class Type>
|
||||
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?
|
||||
template<class Type>
|
||||
bool foundObject(const word& name) const;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -88,6 +88,9 @@ public:
|
|||
//- Return mangled fileName
|
||||
virtual fileName mangleFileName (const fileName&) const;
|
||||
|
||||
//- Is the object with name found?
|
||||
virtual bool found(const word& name) const;
|
||||
|
||||
// Edit
|
||||
|
||||
//- Add an regIOobject to registry
|
||||
|
|
Reference in a new issue