View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000292OpenFOAM[All Projects] Bugpublic2011-09-13 20:132011-10-26 09:51
Assigned Tomattijs 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformLinuxOSCentOSOS Version5.5
Product Version2.0.x 
Target VersionFixed in Version2.0.x 
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.
Attached Files

- Relationships

-  Notes
mattijs (reporter)
2011-10-24 20:21

added in commit 53c470a06efadc95265da4c0c4cb2d3522e6c246

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

bgschaid (reporter)
2011-10-25 18:47

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),")
mattijs (reporter)
2011-10-26 09:51

fixed in ce645a3740c28ea7b2f40697b50cb93ee6e7ab86

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

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