View Issue Details

IDProjectCategoryView StatusLast Update
0000292OpenFOAM[All Projects] Bugpublic2011-10-26 10:51
ReporterbgschaidAssigned Touser4 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinuxOSCentOSOS Version5.5
Product Version 
Fixed in Version 
Summary0000292: Refactor codedFixedValueFvPatchField and codedFunctionObject to have common base class
DescriptionThe two classes that compile their own code and load a library have a lot of code in common. To avoid further code duplication (for instance when adding a class codedMixedFvPatchField) a class codedBaseClass is introduced that is inherited by these two classes and which holds all the methods they had in common. Parts where the two old classes differ are encapsulated in virtual methods and are implemented by these two classes.

- the pointer to the redirect still has to be added by the inheriting class. Alternative would have been to make codedBaseClass a template
Steps To ReproduceThe patch is on github I will issue a pull-request once I have a bug number here
Additional InformationSecond commit in the branch fixes a problem that occurs if one inherits from codedFunctionObject: then the constructor of codedFunctionObject insists to compile the code and fails if the inheriting class has to do some additional stuff to make it work.
TagsNo tags attached.



2011-10-24 21:21


added in commit 53c470a06efadc95265da4c0c4cb2d3522e6c246

I've moved the dictionary out of the codedBaseClass and now supply the redirectType though arguments.



2011-10-25 19:47

reporter   ~0000754

The potentialFoam tutorial fails (you don't see i when you run Allrun, but the code is not compiled).

The reason seems to be that the constructor of codedFunctionObject doesn't initialize dict_ (probably a forgotten "dict_(dict),")


2011-10-26 10:51


fixed in ce645a3740c28ea7b2f40697b50cb93ee6e7ab86

Thanks Bernhard. My fault for messing with working code ;-)

Issue History

Date Modified Username Field Change
2011-09-13 21:13 bgschaid New Issue
2011-10-24 21:21 user4 Note Added: 0000749
2011-10-24 21:21 user4 Status new => resolved
2011-10-24 21:21 user4 Fixed in Version => 2.0.x
2011-10-24 21:21 user4 Resolution open => fixed
2011-10-24 21:21 user4 Assigned To => user4
2011-10-25 19:47 bgschaid Note Added: 0000754
2011-10-25 19:47 bgschaid Status resolved => feedback
2011-10-25 19:47 bgschaid Resolution fixed => reopened
2011-10-26 10:51 user4 Note Added: 0000755
2011-10-26 10:51 user4 Status feedback => resolved
2011-10-26 10:51 user4 Resolution reopened => fixed