compileTemplate: Improved the handling of backward-compatibility renaming of classes
This commit is contained in:
@ -18,7 +18,7 @@ solver
|
||||
(
|
||||
EulerImplicit
|
||||
ode
|
||||
noChemistrySolver
|
||||
none
|
||||
);
|
||||
|
||||
solverRenamed
|
||||
@ -28,7 +28,7 @@ solverRenamed
|
||||
|
||||
method
|
||||
(
|
||||
Standard
|
||||
standard
|
||||
TDAC
|
||||
);
|
||||
|
||||
|
||||
@ -36,8 +36,8 @@ energy
|
||||
|
||||
mixture
|
||||
(
|
||||
singleComponentMixture
|
||||
coefficientMultiComponentMixture
|
||||
pureMixture
|
||||
multiComponentMixture
|
||||
valueMultiComponentMixture
|
||||
coefficientWilkeMultiComponentMixture
|
||||
);
|
||||
|
||||
@ -69,10 +69,13 @@ void Foam::compileTemplate::setFilterVariable
|
||||
(
|
||||
dynamicCode& dynCode,
|
||||
const dynamicCodeContext& context,
|
||||
const word& name,
|
||||
const word& type
|
||||
const Pair<word>& substitution
|
||||
) const
|
||||
{
|
||||
const word& name(substitution.first());
|
||||
word type(substitution.second());
|
||||
const word typeRenameMapName(name + "Renamed");
|
||||
|
||||
if (context.dict().found(name))
|
||||
{
|
||||
const HashSet<word> types(context.dict().lookup(name));
|
||||
@ -85,21 +88,6 @@ void Foam::compileTemplate::setFilterVariable
|
||||
}
|
||||
}
|
||||
|
||||
dynCode.setFilterVariable(name, type);
|
||||
}
|
||||
|
||||
|
||||
void Foam::compileTemplate::setFilterVariable
|
||||
(
|
||||
dynamicCode& dynCode,
|
||||
const dynamicCodeContext& context,
|
||||
const Pair<word>& substitution
|
||||
) const
|
||||
{
|
||||
const word& name(substitution.first());
|
||||
word type(substitution.second());
|
||||
const word typeRenameMapName(name + "Renamed");
|
||||
|
||||
if (context.dict().found(typeRenameMapName))
|
||||
{
|
||||
const HashTable<word> renameMap
|
||||
@ -113,7 +101,7 @@ void Foam::compileTemplate::setFilterVariable
|
||||
}
|
||||
}
|
||||
|
||||
setFilterVariable(dynCode, context, name, type);
|
||||
dynCode.setFilterVariable(name, type);
|
||||
|
||||
const word typeBase(name + "Base");
|
||||
if (context.dict().found(typeBase))
|
||||
|
||||
@ -59,14 +59,6 @@ class compileTemplate
|
||||
const word& instantiatedName
|
||||
) const;
|
||||
|
||||
void setFilterVariable
|
||||
(
|
||||
dynamicCode& dynCode,
|
||||
const dynamicCodeContext& context,
|
||||
const word& name,
|
||||
const word& type
|
||||
) const;
|
||||
|
||||
void setFilterVariable
|
||||
(
|
||||
dynamicCode& dynCode,
|
||||
|
||||
Reference in New Issue
Block a user