mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: dictionary lookup of embedded coordinateSystem fails (fixes #879)
- also fix incorrect documentation in forces functionObject and interRegionExplicitPorositySource fvOption.
This commit is contained in:
@ -129,9 +129,21 @@ Foam::coordinateSystem::coordinateSystem
|
||||
{
|
||||
const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
|
||||
|
||||
// non-dictionary entry is a lookup into global coordinateSystems
|
||||
if (entryPtr && !entryPtr->isDict())
|
||||
if (!entryPtr)
|
||||
{
|
||||
// No 'coordinateSystem' entry
|
||||
init(dict, obr);
|
||||
}
|
||||
else if (entryPtr->isDict())
|
||||
{
|
||||
// 'coordinateSystem' as dictionary entry - use it
|
||||
init(entryPtr->dict(), obr);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 'coordinateSystem' as non-dictionary entry
|
||||
// - this is a lookup into global coordinateSystems
|
||||
|
||||
keyType key(entryPtr->stream());
|
||||
|
||||
const coordinateSystems& lst = coordinateSystems::New(obr);
|
||||
@ -152,15 +164,11 @@ Foam::coordinateSystem::coordinateSystem
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// copy coordinateSystem, but assign the name as the typeName
|
||||
// Copy from coordinateSystem, but assign the name as the typeName
|
||||
// to avoid strange things in writeDict()
|
||||
operator=(lst[index]);
|
||||
name_ = typeName_();
|
||||
}
|
||||
else
|
||||
{
|
||||
init(dict, obr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user