| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
makes it much more convenient for C++, expecially when templates are
used.
The flesh functions for complex arithmetic are defined (not only
declared) by including Complex.c from the header file cctk_Complex.h.
They are declared "static inline", so the the compiler can inline
them, but does not have to create an out-of-line copy for every source
file. Complex.c is also compiled stand-alone without the "static
inline" prefix, so that out-of-line copies exist as well.
Add some new complex arithmetic functions, e.g. ComplexNeg to change
the sign.
Make some complex arithmetic functions more efficient by using
algorithms from glibc. These algorithms are LGPL. They should be
faster and/or more accurate than the existing implementations.
For C++, define the usual arithmetic operators (+-*/ etc.) as inline
functions calling the corresponding complex arithmetic functions.
This makes it possible to use complex numbers in the same way as real
numbers, which makes it possible to instantiate templates for both
CCTK_REAL and CCTK_COMPLEX. This leads to much code reduction in
Carpet.
The patch also appends a type postfix to the names of math functions
called in the inlined routines: 'f' for HAVE_CCTK_REAL4, nothing for
HAVE_CCTK_REAL8, and 'l' for HAVE_CCTK_REAL16. This avoids compiler
warnings about conversions from "double" to "float" which may lose
significant bits.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4418 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
from 14 Feb Patches list.
As discussed, will further investigate the validity and origin of the
Complex sqrt function later.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4262 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4163 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
rescaling the arguments. This is a standard algorithm.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4050 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3966 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3029 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
Library.
This closes PR Cactus/335.
Also added complex exp(), sin(), cos(), and sqrt() routines according to GSL.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2499 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2159 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
This closes PR Cactus 411.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2032 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1854 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Now output for complex numbers should be okay.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1709 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1700 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tidied include files a bit, removing a few cctk.h's, so I've introduced a few more warnings to fix
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1550 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1271 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1265 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1220 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1190 17b73243-c579-4c4c-a9d2-2d5706c11dac
|