diff options
Diffstat (limited to 'Carpet/CarpetIOASCII/src/ioascii.hh')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.hh | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.hh b/Carpet/CarpetIOASCII/src/ioascii.hh new file mode 100644 index 000000000..72ea5b97b --- /dev/null +++ b/Carpet/CarpetIOASCII/src/ioascii.hh @@ -0,0 +1,73 @@ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.hh,v 1.16 2004/04/03 12:38:12 schnetter Exp $ + +#ifndef CARPETIOASCII_HH +#define CARPETIOASCII_HH + +#include <vector> + +#include "cctk.h" + +#include "ioascii.h" + + + +namespace CarpetIOASCII { + + using namespace std; + + + + // Everything is a class template, so that it can easily be + // instantiated for all output dimensions. + + template<int outdim> + struct IOASCII { + + // handle from CCTK_RegisterGHExtension + static int GHExtension; + + // handles from CCTK_RegisterIOMethed + static int IOMethod; + + + + // Do truncate the output files for a variable + static vector<bool> do_truncate; + + // Last iteration on which a refinement level of a variable was + // output (INT_MIN for none) + static vector<vector<vector<int> > > last_output; // [ml][rl][var] + + + + // scheduled functions + static int Startup(); + + + + // registered functions + + static void* SetupGH (tFleshConfig* fc, int convLevel, cGH* cgh); + + static int OutputGH (const cGH* cgh); + static int OutputVarAs (const cGH* cgh, + const char* varname, const char* alias); + static int TimeToOutput (const cGH* cgh, int vindex); + static int TriggerOutput (const cGH* cgh, int vindex); + + static int GetGridOffset (const cGH* cgh, int dir, + const char* itempl, const char* iglobal, + const char* ctempl, const char* cglobal, + CCTK_REAL cfallback); + static int CoordToOffset (const cGH* cgh, int dir, CCTK_REAL coord, + int ifallback); + + static const char* GetStringParameter (const char* parametertemplate); + static CCTK_INT GetIntParameter (const char* parametertemplate); + static CCTK_REAL GetRealParameter (const char* parametertemplate); + + }; // struct IOASCII + +} // namespace CarpetIOASCII + +#endif // !defined(CARPETIOASCII_HH) |