diff --git a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C b/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C index 0ac2687861f65ed8fe777391c4179fd344081a4e..35f017f9f37d0cd0bf80e2a658ff1de2befff247 100644 --- a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C +++ b/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,7 @@ namespace Foam namespace fv { + // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * // //{{{ begin localCode @@ -160,6 +161,24 @@ void ${typeName}FvOption${SourceType}::addSup } +void ${typeName}FvOption${SourceType}::addSup +( + const volScalarField& rho, + fvMatrix<${TemplateType}>& eqn, + const label fieldI +) +{ + if (${verbose:-false}) + { + Info<<"${typeName}FvOption${SourceType}::addSup()\n"; + } + +//{{{ begin code + ${codeAddSup} +//}}} end code +} + + void ${typeName}FvOption${SourceType}::setValue ( fvMatrix<${TemplateType}>& eqn, diff --git a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H b/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H index 15f1d1d520b03c2dca32119f5f93461afb17800c..8bc874b708715f43cca6b86309621bbab954ded1 100644 --- a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H +++ b/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -162,6 +162,15 @@ public: const label fieldI ); + //- Explicit and implicit matrix contributions for compressible + // equations + virtual void addSup + ( + const volScalarField& rho, + fvMatrix<${TemplateType}>& eqn, + const label fieldI + ); + //- Set value virtual void setValue (