From 6b79aae43337052ddd7e35d1b1e8449f98aa24f9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 1 Mar 2011 10:51:59 +0100 Subject: [PATCH] BUG: removing coded FixedValue patch deleted fvPatch constructor tables - use newly introduced makeRemovablePatchTypeField to avoid this problem --- .../fixedValueFvPatchScalarFieldTemplate.C | 13 +++++++++++-- .../fixedValueFvPatchScalarFieldTemplate.H | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.C b/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.C index 76a31e9fb0..d1213a4bea 100644 --- a/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.C +++ b/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.C @@ -39,6 +39,9 @@ namespace Foam extern "C" { + // dynamicCode: + // SHA1 = ${SHA1sum} + // // unique function name that can be checked if the correct library version // has been loaded bool ${typeName}_${SHA1sum}() @@ -48,7 +51,6 @@ extern "C" } - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // ${typeName}FixedValueFvPatchScalarField:: @@ -108,6 +110,13 @@ ${typeName}FixedValueFvPatchScalarField {} +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +${typeName}FixedValueFvPatchScalarField:: +~${typeName}FixedValueFvPatchScalarField() +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void ${typeName}FixedValueFvPatchScalarField::updateCoeffs() @@ -124,7 +133,7 @@ void ${typeName}FixedValueFvPatchScalarField::updateCoeffs() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField +makeRemovablePatchTypeField ( fvPatchScalarField, ${typeName}FixedValueFvPatchScalarField diff --git a/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.H b/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.H index b6ef87c8bc..c9a2d1c160 100644 --- a/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.H +++ b/etc/codeTemplates/dynamicCode/fixedValueFvPatchScalarFieldTemplate.H @@ -121,6 +121,9 @@ public: ); } + //- Destructor + virtual ~${typeName}FixedValueFvPatchScalarField(); + // Member functions