aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.c')
-rw-r--r--src/Utils.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Utils.c b/src/Utils.c
index 38e7e94..d1def3d 100644
--- a/src/Utils.c
+++ b/src/Utils.c
@@ -828,6 +828,41 @@ static void SetOutputVar (int vindex, const char *optstring, void *arg)
Util_TableDeleteKey (table, "out_every");
}
+ /* check for boolean option 'out_unchunked' */
+ if (Util_TableQueryValueInfo (table, &type, &nelems, "out_unchunked") > 0)
+ {
+ int unchunked = -1;
+ if (type == CCTK_VARIABLE_CHAR &&
+ nelems >= sizeof ("no")-1 && nelems <= sizeof ("false")-1)
+ {
+ char value[sizeof ("false")];
+ Util_TableGetString (table, sizeof (value), value, "out_unchunked");
+ if (CCTK_Equals (value, "yes") || CCTK_Equals (value, "true"))
+ {
+ unchunked = 1;
+ }
+ else if (CCTK_Equals (value, "no") || CCTK_Equals (value, "false"))
+ {
+ unchunked = 0;
+ }
+ }
+ if (unchunked >= 0)
+ {
+ request->out_unchunked = unchunked;
+ }
+ else
+ {
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Invalid value for option 'out_unchunked' in option string "
+ "'%s' in parameter '%s' (must be a boolean)",
+ optstring, info->parameter_name);
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Option 'out_unchunked' will be ignored for %s output of "
+ "variable '%s'", info->method_name, fullname);
+ }
+ Util_TableDeleteKey (table, "out_unchunked");
+ }
+
/* check for hyperslab option 'direction' */
if (Util_TableQueryValueInfo (table, &type, &nelems, "direction") > 0)
{
@@ -1025,6 +1060,7 @@ ioRequest *IOUtil_DefaultIORequest (const cGH *GH, int vindex,
request->timelevel = 0;
request->check_exist = myGH->recovered;
request->out_every = out_every_default;
+ request->out_unchunked = out_unchunked;
request->with_ghostzones = 0;
request->refinement_levels = -1;