View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000900 | OpenFOAM | Bug | public | 2013-06-25 09:24 | 2013-07-05 10:23 |
Reporter | monto | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Other | OS Version | (please specify) |
Summary | 0000900: execFlowFunctionObject does not work with '-dict' option | ||||
Description | the application execFlowFunctionObjects does not work properly when it is used with the '-dict' option. No error message is issued, but functionObjects are not executed and no output is produced. | ||||
Steps To Reproduce | check the attached motorBike tutorial with modified system/streamLines file. run with: motorBike $ ./Allrun motorBike $ execFlowFunctionObjects -dict system/streamLines | ||||
Tags | execFlowFunctionObjects, functionObject | ||||
|
|
|
With reference to the function defined in execFlowFunctionObjects.C: void execFunctionObjects ( const argList& args, const Time& runTime, autoPtr<functionObjectList>& folPtr ) { if (folPtr.empty()) { if (args.optionFound("dict")) { IOdictionary dict ( IOobject ( args["dict"], runTime, IOobject::MUST_READ_IF_MODIFIED ) ); folPtr.reset(new functionObjectList(runTime, dict)); } else { folPtr.reset(new functionObjectList(runTime)); } folPtr->start(); } folPtr->execute(true); } it appears that the private member "parentDict_" of class "Foam::functionObjectList" is reset to a null object between the constructor "folPtr.reset(new functionObjectList(runTime, dict));" and the call folPtr->start(); Moving "folPtr->start();" inside the "if" body fixes the problem: void execFunctionObjects ( const argList& args, const Time& runTime, autoPtr<functionObjectList>& folPtr ) { if (folPtr.empty()) { if (args.optionFound("dict")) { IOdictionary dict ( IOobject ( args["dict"], runTime, IOobject::MUST_READ_IF_MODIFIED ) ); folPtr.reset(new functionObjectList(runTime, dict)); folPtr->start(); } else { folPtr.reset(new functionObjectList(runTime)); folPtr->start(); } } folPtr->execute(true); } |
|
Fixed in 2639f219c3068f7ab888b6751db6a133ad936c0e Thanks for reporting. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-06-25 09:24 | monto | New Issue | |
2013-06-25 09:24 | monto | File Added: motorBike.tgz | |
2013-06-25 09:25 | monto | Note Added: 0002292 | |
2013-06-25 09:28 | monto | Tag Attached: execFlowFunctionObjects | |
2013-06-25 09:28 | monto | Tag Attached: functionObject | |
2013-07-05 10:23 |
|
Note Added: 0002309 | |
2013-07-05 10:23 |
|
Status | new => resolved |
2013-07-05 10:23 |
|
Fixed in Version | => 2.2.x |
2013-07-05 10:23 |
|
Resolution | open => fixed |
2013-07-05 10:23 |
|
Assigned To | => user4 |