| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Map CCTK_COMPLEX to "double complex" in C, and "complex<double>" in
C++. (It is already mapped to "double complex" in Fortran.)
Update type definitions.
Re-implement Cactus complex number math functions by calling the
respective C functions.
Update thorn that access real and imaginary parts of complex numbers
to use standard-conforming methods instead.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4979 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
The table data types (util_Table.h) have internal routines that print
the table contents to screen. This can be helpful for debugging. This
patch makes these functions publicly available.
Add a routine Util_TablePrintPretty that converts a table to a nice,
human-readable string.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4769 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
| |
needed was more checking. This checked out alright on lemieux.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4231 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4230 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4163 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4162 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
Complete the implementation of the Cactus variable type
CCTK_POINTER_TO_CONST. Define a constant
CCTK_VARIABLE_POINTER_TO_CONST. Handle this variable when asking for
its name and its size. Allow values of this type in tables.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4113 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4017 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4014 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
(all inside #ifdef UTIL_TABLE_TEST)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4010 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
also add another error check in insert_table_entry()
to catch the case where the type code is invalid and hence
CCTK_VarTypeSize() returns -1
--> this gives a new error return from this function, and hence
from all the Util_TableSet* functions
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4008 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
* add a bunch of debug printing to the standalone test drivers
(which still core-dumps on my laptop after corrupting the malloc heap;
I'm in the process of tracking down what's wrong...)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4006 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables, and CCTK_CHAR (like CCTK_STRING) only for other purposes,
e.g. tables.
* Introduce unique integer constants for them
* Add missing conversion functions from and to strings
* Add table functions for CCTK_BYTE.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3972 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
them. Technically, Fortran has no character type, but only strings,
hence the interface to that routine needs to be different from C.
Util_TableSetString is still there, used, and works.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3967 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Sorry.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3945 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
same name as the one from <math.h> (which is #included) but has a
different return type, which is an error for gcc 4.0.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3944 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
whether we compile the Fortran wrapper functions, and put all Fortran
wrappers inside this
--> standalone test driver now compiles again (& passes)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3665 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3604 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
systems.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3603 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Fix wrong prototype.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3585 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Extend routines to handle the new type.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3431 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Util_Table{Set,Get}FnPointer() --> Util_Table{Set,Get}FPointer()
Util_Table{Set,Get}FnPointerArray() --> Util_Table{Set,Get}FPointerArray()
(and keep old names as aliases for backwards compatability)
this fixes bug Cactus/1308
also add test routines for
Util_Table{Set,Get}PointerArray()
Util_Table{Set,Get}FPointer()
Util_Table{Set,Get}FPointer_Array()
so there are now test routines for all the CCTK_POINTER and CCTK_FPOINTER
routines (both scalar and array)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3321 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This routine first tries to create a table (if this fails it returns
an error code). Then it tries to add entries to the table via
Util_TableSetFromString(). If this fails it previously returned
without destroy the table, thus leaking memory. The fix is to
destroy the table before returning the error code.
This fixes bug Cactus/1561.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3317 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3316 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#ifndef UTIL_TABLE_TEST
#endif /* !UTIL_TABLE_TEST */
since they use CCTK_FCALL and CCTK_FNAME, both of which are only
expanded by the perl preprocessor, and thus won't be defined when
compiling this (C) file directly for standalone tests.
With this change (and my just-committed changes to the standalone-test
makefile), the standalone test driver in Table.c now compiles ok, and
passes all its tests.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3315 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3092 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
More to come.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3041 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3028 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
See its Function Reference entry in the User's Guide for details.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2850 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2819 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change our fake version of the C99/C++ "bool" type from
typedef enum { false = 0, true = 1 } bool;
to
typedef int bool;
#define true 1
#define false 0
so we can assign an int to a bool without triggering compiler warnings
on the origin.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2804 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2770 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/util/Table.c
src/include/util_Table.h
* add new functions (cf my E-mail of 30 Mar 2002)
Util_TableClone()
Util_TableItClone()
* add new functions (cf Erik Schnetter's E-mails of 5 Feb 2002)
Util_Table{Set,Get}Generic()
Util_Table{Set,Get}GenericArray()
* add tests for new functions
* fix a memory leak in Util_TableDestroy()
* fixed some assert( variable = value ) bugs (yikes!!)
* refactor some code to better modularize the implementation
* add some more const qualifiers to local vars
* reformat code to match flesh standard indentation and { } conventions
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2683 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Small fixes to Util_TableSetFromString():
* trap some error cases involving invalid keys which slipped by before
* document UTIL_ERROR_BAD_KEY as a possible error code
* accept trailing whitespace at end of string (this was rejected before)
* revise BNF in grdoc comment to correctly describe what the code accepts
[I've already revised it in the latex docs
(doc/UsersGuide/FunctionReference.tex)]
Also fix Util_TableCreateFromString():
* document UTIL_ERROR_BAD_KEY as a possible error code
Thanks to Erik Schnetter for pointing out these problems!
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2606 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
since JT doesn't have the appropriate CVS karma]]
src/util/Table.c
* by popular (or at least semi-popular :) demand.....
add new function
int Util_TableSetFromString(int handle, const char *string)
to set a sequence of key/value entries in an existing table, based
on a parameter-file-style string.
[[This functionality was present before in
Util_TableCreateFromSTring(), but bundled together with
creating a new table. This change splits out the "scan
through a string doing the table assignments it specifies"
functionality into a separate function, since it seems
useful in various contextx.]]
* change Util_TableCreateFromString() to call the new Util_TableSetFromString()
to do most of the work
* change the test suite to test the new function a bit
src/util/makefile
* new file, makefile to build standalone test driver for table routines
src/include/util_Table.h
* add prototype for new Util_TableSetFromString() function
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2588 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
completely removed. (I also changed the standalone test suite
correspondingly.)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2581 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2482 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
| |
value'.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2480 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2469 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
Documentation should follow shortly...
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2462 17b73243-c579-4c4c-a9d2-2d5706c11dac
|