summaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAge
* Add new schedule modes meta_early, meta_late, global_early, andschnetter2009-12-05
| | | | | | | | | global_late. These modes can then be used in Carpet, where they will simplify traversing the schedule tree when local, level, and global mode routines are mixed. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4589 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename routine CCTK_IOMethod to CCTK_IOMethodName, since it returnsschnetter2009-12-05
| | | | | | | | | | the name of the I/O method, not an IOMethod structure. Add a new routine CCTK_IOMethod which returns a pointer to the IOMethod structure describing the I/O method. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4588 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Provide LoopControl macros.schnetter2009-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These generalise the LoopControl thorn of Carpet, and introduce a generic looping mechanism to Cactus. They provides a simple, straightforward implementation (without the optimisations found in Carpet's LoopControl thorn), and other thorns can provide various optimisations, e.g. loop tiling or OpenMP parallelisation. The macros are defined in a new file cctk_Loop.h, automatically included from cctk.h. There are macros for 1D, 2D, 3D, and 4D loops, corresponding to Cactus' CCTK_GFINDEX* macros. Each macro comes in four variants: CCTK_LOOP3: a generic 3D loop CCTK_LOOP3_ALL: loop over all grid points of a grid function CCTK_LOOP3_INTERIOR: loop over the interior points, excluding ghost, symmetry, and boundary points CCTK_LOOP3_BOUNDARY: loop over all (outer) boundary points The header file contains a straightforward implementation via macros that expand to corresponding "for" statements. There are also macros for Fortran, but these are much less elegant since Fortran does not support block-scope local variables. In addition, Fortran requires declaring certain variables as private when OpenMP is used, which adds another complication. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4581 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Remove superfluous argument "first" from if_check prototype; "first"schnetter2008-08-29
| | | | | | | only makes sense for while_check. Update all callers and callees. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4502 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct inconsistency in prototype for argument check_if in functionschnetter2008-05-26
| | | | | | | CCTKi_DoScheduleTraverse. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4490 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add IF clauses to schedule itemsschnetter2008-04-09
| | | | | | | | | | | | | | | Schedule items in Cactus can already have WHILE clauses, which means that they are executed while a certain condition are true. This patch adds IF clauses, which means that they are executed only if a certain condition is true. The syntax is equivalent to WHILE clauses. These if clauses is different from the existing C-syntax if statements, which are only evaluated at startup and determine how the schedule is constructed. These if clauses are evaluated every time the schedule is traversed, and can skip certain schedule items. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4478 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add a new function CCTK_MaxGFDim to the flesh which returns theschnetter2008-04-07
| | | | | | | | | | | | | | | | | (maximum) dimension of all grid functions. Cactus can currently not handle the case where one uses grid arrays of dimension D while grid functions have a dimension less than D. During initialisation, Cactus sets cctk_dim to the largest dimension of all grid variables in all active thorns. This is arguably wrong; cctk_dim should be set to the (maximum) dimension of the grid functions. This patch adds a new function CCTK_MaxGFDim to the flesh which returns the (maximum) dimension of all grid functions. This function is used to set cctk_dim. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4476 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct #ifdef _cplusplus to #ifdef __cplusplus to find out whetherschnetter2007-11-16
| | | | | | | the header file is compiled by a C++ compiler. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4438 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Implement a new flesh function CCTK_SchedulePrintTimesToFile.schnetter2007-08-25
| | | | | | | | | The existing internal schedule printing functions now take an additional FILE* argument, and the existing CCTK_SchedulePrintTimes prints explicitly to stdout. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4428 17b73243-c579-4c4c-a9d2-2d5706c11dac
* This patch makes complex arithmetic in C and C++ more efficient, andschnetter2007-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove external include guard "#ifndef _CCTK_TYPES_H" aroundjthorn2006-12-21
| | | | | | | | | | | | | | | #include "cctk_Types.h" since this is (a) wrong [the actual symbol is _CCTK_TYPES_H_ (with a trailing underscore)], (b) unnecessary [cctk_Types.h already has an internal include guard, and modern compilers have special-case optimizations for internal include guards so they're just as fast at compile-time as external ones], and (c) inconsistent with the 3 other files in this same directory (cctk_Groups.h, cctk_Misc.h, and util_Table.h) which #include "cctk_Types.h", none of which use an external include guard git-svn-id: http://svn.cactuscode.org/flesh/trunk@4397 17b73243-c579-4c4c-a9d2-2d5706c11dac
* oops, the previous commit lost a file, due to a permissions problemswhite2006-10-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4382 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added two new flesh API functions CCTK_ParameterSetNotifyRegister() andtradke2006-09-28
| | | | | | | | | | | | | CCTK_ParameterSetNotifyUnregister() to register/unregister user callback functions for parameter set nofications. See discussion thread http://www.cactuscode.org/old/pipermail/developers/2006-September/005090.html for details. This closes patch Cactus-2057 "add new flesh functions to register/unregister notify callbacks for parameter set operations". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4375 17b73243-c579-4c4c-a9d2-2d5706c11dac
* add another error code for the interpolators:jthorn2006-08-31
| | | | | | | | | | previously specifying a grid spacing of zero caused the interpolator to return a generic "we encountered a NaN/infinity/non-finite" error code now there's a new error code specifically for this case git-svn-id: http://svn.cactuscode.org/flesh/trunk@4368 17b73243-c579-4c4c-a9d2-2d5706c11dac
* += new interpolator error codejthorn2006-08-13
| | | | | | | | CCTK_ERROR_INTERP_COORD_NAN (needed for a bugfix in some other interpolator code) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4362 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add new flesh API functions CCTK_CompileDateTime() and Util_CurrentDateTime()tradke2006-07-28
| | | | | | | | | | | | | to return a date/time stamp following the ISO 8601 standard format if possible (see http://www.cactuscode.org/old/pipermail/developers/2006-July/004971.html). Add the timezone information in the time stamp returned by Util_CurrentTime(). You also need to update lib/make/make.configuration now in order to compile src/datestamp.c. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4358 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Declare and make use of new overloadable CCTK_SyncGroupsByDirI() whichtradke2006-07-06
| | | | | | | | | | | synchronises multiple groups in a single call. This function deprecates the old overloadable function CCTK_SyncGroup(). This patch concludes the discussion thread starting on http://www.cactuscode.org/old/pipermail/developers/2006-June/004933.html. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4348 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added new command line option '--logdir <dir>' which sets the output directorytradke2006-06-29
| | | | | | | | | | for logfiles created by the \texttt{-r} option. If the directory doesn't exist yet, it will be created by Cactus. This applies patch http://www.cactuscode.org/old/pipermail/developers/2006-June/004901.html. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4337 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add a new command line option to select the buffering mode of stdout.schnetter2006-06-23
| | | | | | | | | | | | | The option is "-b <mode>", or "-buffering=<mode>", where mode can be "no", "line", or "full". This option uses the ANSI C function call setvbuf() to select the corresponding buffering mode. The buffering mode can be selected only once in a portable programme, and it has to be selected before the first output occurs. This means that it has to be implemented in the flesh. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4329 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Application of Frank Löffler's patch of 28.02.06swhite2006-06-15
| | | | | | | | | | | | | reduces FARGUMENTS line length in cctk.h http://www.cactuscode.org/old/pipermail/patches/2006-February/000138.html "Spaces in _CCTK_FARGUMENTS removed to use as less space as possible. This leaves thorn writers more space for their own variables. Space can be a problem because of Fortran standard and/or compiler limitations." git-svn-id: http://svn.cactuscode.org/flesh/trunk@4322 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Applies Erik's patch from 06.03.06swhite2006-05-11
| | | | | | | Define HAVE_CCTK_BYTE etc. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4294 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Applying Erik's patch from 6.10.05swhite2006-05-11
| | | | | | | New command line option to stop after printing the schedule git-svn-id: http://svn.cactuscode.org/flesh/trunk@4293 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct 3D stagger codesschnetter2006-04-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4284 17b73243-c579-4c4c-a9d2-2d5706c11dac
* According to the standard, the ptrdiff_t type is declared in <stddef.h> (andtradke2006-02-09
| | | | | | | not in <stdlib.h> as used in my previous commit). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4251 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Define the variable cctki_dummy_int (which is used internally in thetradke2006-02-08
| | | | | | | | | | DECLARE_CCTK_ARGUMENTS macro to do pointer arithmetics) of type 'ptrdiff_t' rather than 'int'. This prevents compiler warnings on 64-bit systems where pointer offsets are assumed as long ints. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4250 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix macro for getting size of staggered array.goodale2005-12-15
| | | | | | | Patch from David Rideout. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4215 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Patch from Erik Schnetter to track the capacity of the list andgoodale2005-12-13
| | | | | | | produce an error if it is exceeded. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4210 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Define macros CCTK_{INT,REAL,COMPLEX}_PRECISION to values of 1, 2, 4, 8, 16,goodale2005-12-13
| | | | | | | | | | | or 32, depending on the definition of the default data types CCTK_{INT,REAL,COMPLEX}. These new macros make type generic code more convenient to write. Patch from Erik Schnetter. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4209 17b73243-c579-4c4c-a9d2-2d5706c11dac
* migration from misnomer pointwise-reduction to reduce arrays globallyyye002005-11-14
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4195 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Pointwise reduction flesh supportyye002005-11-08
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4194 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Untabifying.goodale2005-10-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4163 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Untabifying.goodale2005-10-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4158 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Patch from Jian Tao to add some callback functionality to thegoodale2005-10-03
| | | | | | | | | | warning system. This allows thorns to register functions which will be called when CCTK_Warn or CCTK_Info are called, with the contents of the warning/info message, thus allowing thorns to do things like logging warnings to file or displaying on webpages. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4157 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo changes that prevent more unwanted warnings about unused variables.schnetter2005-09-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce macros CCTK_DECLARE and CCTK_DECLARE_INIT which declare orschnetter2005-09-26
| | | | | | | | | | | | | | declare and initialise local variables. They also add the necessary magic to prevent compiler warnings about unused variables. If the compiler supports __attribute__((unused)), then use this. Otherwise, use the existing fallback of taking the variable's address. In Fortran, use the variable's kind as fallback. Use these macros in autogenerated code and in "cctk.h". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct typos in commentsschnetter2005-09-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4142 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add Cactus variable type CCTK_POINTER_TO_CONSTschnetter2005-08-25
| | | | | | | | | | 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
* Clean up the declaration of CCTK_ReduceLocalArrays:schnetter2005-08-04
| | | | | | | | | | | | Correct indentation. Use one line per argument. Rename the *output_number* arguments to *output_value*, as we did for CCTK_ReduceGridArrays. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4104 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Avoid warning about unused variable cctki_dummy_int in thorns withoutschnetter2005-08-03
| | | | | | | grid functions git-svn-id: http://svn.cactuscode.org/flesh/trunk@4101 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct typo in commentschnetter2005-06-04
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4071 17b73243-c579-4c4c-a9d2-2d5706c11dac
* make CCTK_WARN_* #defines visible to Fortran code, as perjthorn2005-05-11
| | | | | | | | http://cactus.cct.lsu.edu/pipermail/developers/2005-May/000920.html http://cactus.cct.lsu.edu/pipermail/developers/2005-May/000938.html git-svn-id: http://svn.cactuscode.org/flesh/trunk@4044 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Remove duplicate definitionschnetter2005-04-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4028 17b73243-c579-4c4c-a9d2-2d5706c11dac
* fix header comment description of where more documentation can be foundjthorn2005-03-18
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4013 17b73243-c579-4c4c-a9d2-2d5706c11dac
* remove a FIXME comment 'should write some latex docs'jthorn2005-03-18
| | | | | | | since there are now fairly extensive latex docs git-svn-id: http://svn.cactuscode.org/flesh/trunk@4012 17b73243-c579-4c4c-a9d2-2d5706c11dac
* change hexadecimal flags-words constants to decimal so Fortran 77jthorn2005-03-18
| | | | | | | | will grok them (keep hex values in comments since they're convenient for C bitwise-oring) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4011 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Move check for C++ into CCODE sectionschnetter2005-02-27
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3995 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed typo to properly end a comment which otherwise would have been enclosed intradke2005-02-22
| | | | | | | another comment. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3991 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add cctk_Interp.h to cctk.h (FCODE section). Surround C prototypes inhawke2005-02-18
| | | | | | | | | cctk_Interp.h with CCODE ifdefs. This allows Fortran code to use the same #def'd error codes as the C code. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3989 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct description of the warning levelsschnetter2005-02-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3980 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct description of the warning levelsschnetter2005-02-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3979 17b73243-c579-4c4c-a9d2-2d5706c11dac