diff options
Diffstat (limited to 'src/Slicing.h')
-rw-r--r-- | src/Slicing.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/Slicing.h b/src/Slicing.h index d7031db..2769422 100644 --- a/src/Slicing.h +++ b/src/Slicing.h @@ -4,6 +4,16 @@ @author Gerd Lanfermann @desc Prototypes and structure for Einstein_slicing. + + Einstein_slicing holds: + 1) the name of the slicing as specified in the parameter + slicing / mixed_slicing + 2) the param_active number, which also indicates priority + when running mixed + 3) a function pointer: a "time-to-slice" function can + be registered which is called and which can be used + to do fancy conditionals, like use slicing XYZ if a + grid functions has collapsed in some region. @enddesc @@*/ @@ -12,19 +22,30 @@ extern "C" { #endif + /* Return values for the time-to-slice fucntion */ +#define SLICING_YES 1 +#define SLICING_DONTCARE 0 +#define SLICING_NO -1 + -struct Einstein_slicing -{ + +struct Einstein_slicing { char *name; int param_active; - void (*timetoslice)(cGH*); + int (*timetoslice)(cGH*); }; int Einstein_RegisterSlicing(const char *name); -int Einstein_SetSliceActive(int handle,int flag); +int Einstein_SetSlicingPriority(int handle,int flag); + +int Einstein_RegisterTimeToSlice(int handle,int (*func)(cGH *)); + +int Einstein_GetSlicingHandle(const char *name); + +void Einstein_SetNextSlicing(cGH *); + -int Einstein_RegisterTimeToSlice(int handle,void (*func)(cGH *)); #ifdef __cplusplus } @@ -33,3 +54,4 @@ int Einstein_RegisterTimeToSlice(int handle,void (*func)(cGH *)); + |