Quad precision?
How much trouble would it be to try implementing quad precision in OpenFOAM?
- Easy! - Tough! - Why would you want to try? The schemes are only "second order accurate", etc.. |
Are you referring to numerical precision, or something like fourth-order accuracy?
|
Need more digits! I mean using "long double", or __float128.
|
I've implemented an arbitrary-precision data-type as a wrap-around to the GNU MPFR library. You should be able to use this as a drop-in replacement to the scalar class:
http://www.ecs.umass.edu/%7Esmenon/t...iPrecision.tgz However, this is still emulation in software, so don't expect blazing performance. |
Thanks a lot, Sandeep!
I've downloaded it, and am in the process of figuring out how to use it. I'm guessing to use it in finiteVolume calculations, I need to define a new fvMatrix template specialization for a multiPrecisionScalar... fvMultiPrecisionScalar (basically identical to fvScalarMatrix). Do you have any sample code that uses your multiPrecisionScalar class? -Dave |
All times are GMT -4. The time now is 08:40. |