1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#include <stdio.h>
#include "cctk.h"
#include "cctk_Parameters.h"
int IOJpeg_Output2DGH(cGH *GH);
int IOJpeg_TriggerOutput2D(cGH *GH, int);
int IOJpeg_TimeFor2D(cGH *GH, int);
int IOJpeg_Output2DVarAs(cGH *GH, const char *var, const char *alias);
void *IOJpeg_SetupGH (tFleshConfig *config, int convergence_level, cGH *GH);
int IOJpeg_InitGH (cGH *GH);
static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusIO_IOJpeg_Startup_c)
void IOJpeg_Startup (void)
{
DECLARE_CCTK_PARAMETERS
int IO_GHExtension;
int IOMethod;
if (CCTK_GHExtensionHandle ("IO") < 0)
{
CCTK_WARN (1, "Thorn IOUtil was not activated. "
"No IOJpeg IO methods will be enabled.");
return;
}
IO_GHExtension = CCTK_RegisterGHExtension ("IOJpeg");
CCTK_RegisterGHExtensionSetupGH (IO_GHExtension, IOJpeg_SetupGH);
CCTK_RegisterGHExtensionInitGH (IO_GHExtension, IOJpeg_InitGH);
/* Register the 2D IOJpeg routines as output methods */
IOMethod = CCTK_RegisterIOMethod ("IOJpeg_2D");
CCTK_RegisterIOMethodOutputGH (IOMethod, IOJpeg_Output2DGH);
CCTK_RegisterIOMethodOutputVarAs (IOMethod, IOJpeg_Output2DVarAs);
CCTK_RegisterIOMethodTimeToOutput (IOMethod, IOJpeg_TimeFor2D);
CCTK_RegisterIOMethodTriggerOutput (IOMethod, IOJpeg_TriggerOutput2D);
if (CCTK_Equals (newverbose, "standard") ||
CCTK_Equals( newverbose, "full"))
{
CCTK_INFO ("I/O Method 'IOJpeg_2D' registered");
CCTK_INFO ("IOJpeg_2D: Output of 2D slices in 3D in Jpeg format");
}
}
|