| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
CCTKi_DoScheduleTraverse.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4490 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
| |
the header file is compiled by a C++ compiler.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4438 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4382 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Define HAVE_CCTK_BYTE etc.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4294 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4284 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Patch from David Rideout.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4215 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
produce an error if it is exceeded.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4210 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4195 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4194 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@4158 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4142 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
grid functions
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4101 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4071 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4028 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4013 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
since there are now fairly extensive latex docs
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4012 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3995 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
another comment.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3991 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3980 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3979 17b73243-c579-4c4c-a9d2-2d5706c11dac
|