aboutsummaryrefslogtreecommitdiff
path: root/src/ChooseOutput.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChooseOutput.c')
-rw-r--r--src/ChooseOutput.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/ChooseOutput.c b/src/ChooseOutput.c
index 55fb071..42ad065 100644
--- a/src/ChooseOutput.c
+++ b/src/ChooseOutput.c
@@ -31,25 +31,10 @@ CCTK_FILEVERSION(CactusBase_IOASCII_ChooseOutput_c)
3. Coords from IOASCII
4. Coords from IOUtil
*/
-#define GET_SLICE(IOASCII_param, IOUtil_param, origin_index, origin_phys) \
+#define GET_SLICE(IOASCII_param, IOUtil_param, index, coord) \
{ \
- origin_index = -1; \
- if (CCTK_ParameterQueryTimesSet (#IOASCII_param "i", "IOASCII") > 0)\
- { \
- origin_index = IOASCII_param##i; \
- } \
- else if (CCTK_ParameterQueryTimesSet (#IOUtil_param "i", "IOUtil")>0)\
- { \
- origin_index = IOUtil_param##i; \
- } \
- else if (CCTK_ParameterQueryTimesSet (#IOASCII_param, "IOASCII") > 0)\
- { \
- origin_phys = IOASCII_param; \
- } \
- else \
- { \
- origin_phys = IOUtil_param; \
- } \
+ index = IOASCII_param##i >= 0 ? IOASCII_param##i : IOUtil_param##i; \
+ coord = IOASCII_param != -424242 ? IOASCII_param : IOUtil_param; \
}
@@ -68,11 +53,10 @@ void IOASCII_Choose2D (const cGH *GH);
Use parameters to choose the 1D slices through the output data.
@enddesc
- @calls CCTK_ParameterQueryTimesSet
- IOUtil_1DLines
+ @calls IOUtil_1DLines
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype const cGH *
@vio in
@endvar
@@ -135,8 +119,7 @@ void IOASCII_Choose1D (const cGH *GH)
Use parameters to choose the 2D slices through the output data.
@enddesc
- @calls CCTK_ParameterQueryTimesSet
- IOUtil_2DPlanes
+ @calls IOUtil_2DPlanes
@var GH
@vdesc Pointer to CCTK grid hierarchy