CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   scalar + volScalarField (http://www.cfd-online.com/Forums/openfoam-programming-development/79788-scalar-volscalarfield.html)

akidess September 3, 2010 11:11

scalar + volScalarField
 
Hello everyone,

I'm getting a Floating Point Exception on the following code fragment:
Foam::log(scalar(1) + (a_O*Kseg_O ))

a_O is a dimensionedScalar with value 0, Kseg_O is a volScalarField. The value in the brackets should never be zero thanks to scalar(1), yet still I get a floating point exception. Does the code not add scalar(1) to each element of the volScalarField?

Thanks,

Anton


All times are GMT -4. The time now is 02:39.