diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index 30946d8e28..37f48b6b6c 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfluidThermophysicalModels \ diff --git a/etc/codeTemplates/dynamicCode/basicChemistryModel.C b/etc/codeTemplates/dynamicCode/basicChemistryModelTemplate.C similarity index 100% rename from etc/codeTemplates/dynamicCode/basicChemistryModel.C rename to etc/codeTemplates/dynamicCode/basicChemistryModelTemplate.C diff --git a/etc/codeTemplates/dynamicCode/fluidReactionThermo.C b/etc/codeTemplates/dynamicCode/fluidReactionThermoTemplate.C similarity index 100% rename from etc/codeTemplates/dynamicCode/fluidReactionThermo.C rename to etc/codeTemplates/dynamicCode/fluidReactionThermoTemplate.C diff --git a/etc/codeTemplates/dynamicCode/fluidThermo.C b/etc/codeTemplates/dynamicCode/fluidThermoTemplate.C similarity index 100% rename from etc/codeTemplates/dynamicCode/fluidThermo.C rename to etc/codeTemplates/dynamicCode/fluidThermoTemplate.C diff --git a/etc/codeTemplates/dynamicCode/psiThermo.C b/etc/codeTemplates/dynamicCode/psiThermo.C deleted file mode 120000 index 3bbd8a9edc..0000000000 --- a/etc/codeTemplates/dynamicCode/psiThermo.C +++ /dev/null @@ -1 +0,0 @@ -fluidThermo.C \ No newline at end of file diff --git a/etc/codeTemplates/dynamicCode/psiThermoTemplate.C b/etc/codeTemplates/dynamicCode/psiThermoTemplate.C new file mode 120000 index 0000000000..552e555aa1 --- /dev/null +++ b/etc/codeTemplates/dynamicCode/psiThermoTemplate.C @@ -0,0 +1 @@ +fluidThermoTemplate.C \ No newline at end of file diff --git a/etc/codeTemplates/dynamicCode/psiuReactionThermo.C b/etc/codeTemplates/dynamicCode/psiuReactionThermoTemplate.C similarity index 100% rename from etc/codeTemplates/dynamicCode/psiuReactionThermo.C rename to etc/codeTemplates/dynamicCode/psiuReactionThermoTemplate.C diff --git a/etc/codeTemplates/dynamicCode/rhoReactionThermo.C b/etc/codeTemplates/dynamicCode/rhoReactionThermo.C deleted file mode 120000 index eeba7607fe..0000000000 --- a/etc/codeTemplates/dynamicCode/rhoReactionThermo.C +++ /dev/null @@ -1 +0,0 @@ -fluidReactionThermo.C \ No newline at end of file diff --git a/etc/codeTemplates/dynamicCode/rhoReactionThermoTemplate.C b/etc/codeTemplates/dynamicCode/rhoReactionThermoTemplate.C new file mode 120000 index 0000000000..61fd23e25d --- /dev/null +++ b/etc/codeTemplates/dynamicCode/rhoReactionThermoTemplate.C @@ -0,0 +1 @@ +fluidReactionThermoTemplate.C \ No newline at end of file diff --git a/etc/codeTemplates/dynamicCode/rhoThermo.C b/etc/codeTemplates/dynamicCode/rhoThermo.C deleted file mode 120000 index 3bbd8a9edc..0000000000 --- a/etc/codeTemplates/dynamicCode/rhoThermo.C +++ /dev/null @@ -1 +0,0 @@ -fluidThermo.C \ No newline at end of file diff --git a/etc/codeTemplates/dynamicCode/rhoThermoTemplate.C b/etc/codeTemplates/dynamicCode/rhoThermoTemplate.C new file mode 120000 index 0000000000..552e555aa1 --- /dev/null +++ b/etc/codeTemplates/dynamicCode/rhoThermoTemplate.C @@ -0,0 +1 @@ +fluidThermoTemplate.C \ No newline at end of file diff --git a/src/OpenFOAM/db/dynamicLibrary/compileTemplate/compileTemplate.C b/src/OpenFOAM/db/dynamicLibrary/compileTemplate/compileTemplate.C index 84b548011b..93cabb71ae 100644 --- a/src/OpenFOAM/db/dynamicLibrary/compileTemplate/compileTemplate.C +++ b/src/OpenFOAM/db/dynamicLibrary/compileTemplate/compileTemplate.C @@ -123,7 +123,7 @@ void Foam::compileTemplate::prepare } // Compile filtered C template - dynCode.addCompileFile(templateName_ + ".C"); + dynCode.addCompileFile(codeTemplateC(templateName_)); // Define Make/options dynCode.setMakeOptions(context.options() + "\n\n" + context.libs()); diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C b/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C index bf161313e5..d43af7421c 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C @@ -76,7 +76,9 @@ typename Table::iterator Foam::basicThermo::lookupCstrIter << "Compilation and linkage of " << Thermo::typeName << " type " << nl << "thermoType" << thermoTypeDict << nl << nl - << "failed." << exit(FatalError); + << "failed." << nl << nl + << "Valid " << Thermo::typeName << " types are:" + << nl << nl; } } else @@ -87,7 +89,10 @@ typename Table::iterator Foam::basicThermo::lookupCstrIter << "thermoType" << thermoTypeDict << nl << nl << "Valid " << Thermo::typeName << " types are:" << nl << nl; + } + if (cstrIter == tablePtr->end()) + { // Get the list of all the suitable thermo packages available wordList validThermoTypeNames(tablePtr->sortedToc()); diff --git a/src/thermophysicalModels/basic/psiThermo/psiThermos.C b/src/thermophysicalModels/basic/psiThermo/psiThermos.C index 17c5ed617d..bde2fd590e 100644 --- a/src/thermophysicalModels/basic/psiThermo/psiThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ License namespace Foam { - forGases(makeThermos, psiThermo, hePsiThermo, pureMixture); + forGases(makeThermo, psiThermo, hePsiThermo, pureMixture); } // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C index 6d5d2ca2cf..17340c5dd0 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C @@ -36,9 +36,9 @@ License namespace Foam { - forGases(makeThermos, rhoThermo, heRhoThermo, pureMixture); - forLiquids(makeThermos, rhoThermo, heRhoThermo, pureMixture); - forTabulated(makeThermos, rhoThermo, heRhoThermo, pureMixture); + forGases(makeThermo, rhoThermo, heRhoThermo, pureMixture); + forLiquids(makeThermo, rhoThermo, heRhoThermo, pureMixture); + forTabulated(makeThermo, rhoThermo, heRhoThermo, pureMixture); } // ************************************************************************* // diff --git a/src/thermophysicalModels/specie/include/makeThermo.H b/src/thermophysicalModels/specie/include/makeThermo.H index a449569100..58b0577c63 100644 --- a/src/thermophysicalModels/specie/include/makeThermo.H +++ b/src/thermophysicalModels/specie/include/makeThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,13 +72,6 @@ Description \ defineThermo(BaseThermo, CThermo, Mixture, ThermoPhys); \ \ - addThermo(BaseThermo, CThermo, Mixture, ThermoPhys) - - -#define makeThermos(BaseThermo, CThermo, Mixture, ThermoPhys) \ - \ - defineThermo(BaseThermo, CThermo, Mixture, ThermoPhys); \ - \ addThermo(basicThermo, CThermo, Mixture, ThermoPhys); \ addThermo(fluidThermo, CThermo, Mixture, ThermoPhys); \ addThermo(BaseThermo, CThermo, Mixture, ThermoPhys)