CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Sample utility problem in OpenFOAM141dev (http://www.cfd-online.com/Forums/openfoam-bugs/62515-sample-utility-problem-openfoam141dev.html)

7islands January 4, 2008 09:27

Dear Hrvoje, Description:
 
Dear Hrvoje,

Description:
sample utility run in stressedFoam/plateHole case crashes after eating up all the available system memory.

Solver/Application:
the sample utility

Source file:
src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.[CH]

Testcase:
tutorials/stressedFoam/plateHole

Platform:
openSUSE 10.3 x86_64 + both of the system gcc and gcc-4.2.2 built following buildInstructions.txt of OpenFOAM-1.4.1-dev

Version:
OpenFOAM-1.4.1-dev revision 393

Notes:
It appears that at least the tested gcc versions do not prefer the syntax
const_cast<scalar&>(planarTol_) = t;
to override the const attribute of a scalar variable planarTol_ in intersection::setPlanarTol(), despite this line does not result in any errors. Thus
scalar oldTol = intersection::setPlanarTol(0.0);
in octreeDataFace::intersects() is not properly executed, which leads to misdetection of intersection points.

The problem went away simply giving up declaring planarTol_ as constant as attached. I'm not sure if this is the best fix, but attaching for clarification of the fix that worked for me.
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif planarTolFix.diff

This problem does not exist in OpenCFD versions since planarTol_ is not declared as constant.

Best regards,
Takuya

hjasak January 4, 2008 09:34

Thanks Takuya, I'm on it. It
 
Thanks Takuya, I'm on it. It must have driven you crazy - please accept my apologies.

Hrv


All times are GMT -4. The time now is 07:43.