Skip to content
Snippets Groups Projects
Commit c2cae92f authored by mattijs's avatar mattijs
Browse files

ENH: changeDictionary: support collated format. Fixes #2533

parent 58948749
No related branches found
No related tags found
No related merge requests found
...@@ -662,8 +662,8 @@ int main(int argc, char *argv[]) ...@@ -662,8 +662,8 @@ int main(int argc, char *argv[])
// Read dictionary // Read dictionary
// Note: disable class type checking so we can load field // Note: disable class type checking so we can load field
Info<< "Loading dictionary " << fieldName << endl; Info<< "Loading dictionary " << fieldName << endl;
const word oldTypeName = IOdictionary::typeName; const word oldTypeName = localIOdictionary::typeName;
const_cast<word&>(IOdictionary::typeName) = word::null; const_cast<word&>(localIOdictionary::typeName) = word::null;
IOobject fieldHeader IOobject fieldHeader
( (
...@@ -675,11 +675,15 @@ int main(int argc, char *argv[]) ...@@ -675,11 +675,15 @@ int main(int argc, char *argv[])
false false
); );
if (fieldHeader.typeHeaderOk<IOdictionary>(false)) if (fieldHeader.typeHeaderOk<localIOdictionary>(false))
{ {
IOdictionary fieldDict(fieldHeader); //IOdictionary fieldDict(fieldHeader);
//- dictionaries to-be-changed are either boundary
// or field dictionary. Both are processor-local.
localIOdictionary fieldDict(fieldHeader);
const_cast<word&>(IOdictionary::typeName) = oldTypeName; const_cast<word&>(localIOdictionary::typeName) =
oldTypeName;
// Fake type back to what was in field // Fake type back to what was in field
const_cast<word&>(fieldDict.type()) = const_cast<word&>(fieldDict.type()) =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment