View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000875 | OpenFOAM | Bug | public | 2013-05-29 16:46 | 2014-03-24 15:34 |
Reporter | davidh | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | OpenSuse | OS Version | 11.1 |
Summary | 0000875: fvOptions/codedSource - missing source code for "codedFvOptionTemplate" | ||||
Description | The source code templates necessary to use a codedSource through fvOptions seem to be missing from the directory "./etc/codeTemplates/dynamicCode". This causes a run-time error (below) when the code tries to build the dynamic library for the source. Could not find the code template(s): 2 ( "codedFvOptionTemplate.C" "codedFvOptionTemplate.H" ) | ||||
Steps To Reproduce | Build the rhoPimpleFoam angledDuct tutorial and in system/fvOptions add the following entry and delete the porosity1 entry. Then execute rhoPimpleFoam codedSourceTest { type vectorCodedSource; vectorCodedSourceCoeffs { fieldNames ( U ); redirectType none; codeCorrect #{ Pout << "**codeCorrect**" << endl; #}; codeAddSup #{ Pout << "**codeCorrect**" << endl; #}; codeSetValue #{ Pout << "**codeCorrect**" << endl; #}; code #{ $codeCorrect $codeAddSup $codeSetValue #}; } active true; selectionMode all; } | ||||
Tags | No tags attached. | ||||
|
I was able to get the coded source to work with the following modifications. 1) copy codedBasicSourceTemplate.H,.C to codedFvOptionTemplate.H,.C 2) search replace of "BasicSource" with "FvOption" in the new file 3) change inheritance and constructor from "basicSource" to "fv::option" 4) put class and member function definitions inside "fv" namespace 5) change the link libraries and include files in "CodedSource.C" from fieldSources to fvOptions The three modified files are attached. |
|
|
|
Works in 2.3.x if you add a 'noneCoeffs' to the top level directory. codedSourceTest { .. noneCoeffs {} } Thanks for reporting. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-05-29 16:46 | davidh | New Issue | |
2013-06-18 21:45 | davidh | Note Added: 0002286 | |
2013-06-18 21:46 | davidh | Note Edited: 0002286 | |
2013-06-18 21:46 | davidh | File Added: fvOptionsFix.tgz | |
2014-03-24 15:34 |
|
Note Added: 0002972 | |
2014-03-24 15:34 |
|
Status | new => resolved |
2014-03-24 15:34 |
|
Fixed in Version | => 2.3.x |
2014-03-24 15:34 |
|
Resolution | open => fixed |
2014-03-24 15:34 |
|
Assigned To | => user4 |