OpenFOAM: Added support for extended precision scalar

OpenFOAM can now be compiled with single, double or long double scalars by
setting the WM_PRECISION_OPTION environment variable to either SP, DP or LP
respectively.

On most 64bit systems long double is stored as 128bit but computed in the
floating point hardware to 80bit.  Due to the increased storage compared to
double precision cache and memory access is significantly more time consuming
causing a slow-down of floating point intensive operations by a factor of 2 to
3.
This commit is contained in:
Henry Weller
2018-01-29 15:03:13 +00:00
parent 22bfee0e77
commit d82cc36c5a
37 changed files with 534 additions and 69 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -37,6 +37,7 @@ alias wm64 'wmSet WM_ARCH_OPTION=64'
alias wm32 'wmSet WM_ARCH_OPTION=32'
alias wmSP 'wmSet WM_PRECISION_OPTION=SP'
alias wmDP 'wmSet WM_PRECISION_OPTION=DP'
alias wmLP 'wmSet WM_PRECISION_OPTION=LP'
# Clear env
alias wmUnset 'source $WM_PROJECT_DIR/etc/config.csh/unset'