aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOBasic
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2005-12-21 21:07:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2005-12-21 21:07:00 +0000
commit3424cc417277105d727da9d07c648e54fff7a549 (patch)
treea0447b4b4d07d4f6bf0d9547919f07c148c248fa /Carpet/CarpetIOBasic
parent46e68c7600ef862e08760726cbd1b0ec7c0b5e03 (diff)
CarpetIOBasic: Turn some constants into Cactus parameters
darcs-hash:20051221210730-dae7b-d840ac6a9153f1ed33d597cb973eb2a5b8c3e281.gz
Diffstat (limited to 'Carpet/CarpetIOBasic')
-rw-r--r--Carpet/CarpetIOBasic/param.ccl61
-rw-r--r--Carpet/CarpetIOBasic/src/iobasic.cc19
2 files changed, 58 insertions, 22 deletions
diff --git a/Carpet/CarpetIOBasic/param.ccl b/Carpet/CarpetIOBasic/param.ccl
index e77339d19..8153424c6 100644
--- a/Carpet/CarpetIOBasic/param.ccl
+++ b/Carpet/CarpetIOBasic/param.ccl
@@ -1,8 +1,6 @@
# Parameter definitions for thorn CarpetIOBasic
-
-
-shares: IO
+SHARES: IO
USES KEYWORD out_criterion
USES CCTK_INT out_every
@@ -12,9 +10,7 @@ USES BOOLEAN strict_io_parameter_check
-private:
-
-
+PRIVATE:
CCTK_STRING outInfo_vars "Variables to output in scalar form" STEERABLE = ALWAYS
{
@@ -49,3 +45,56 @@ REAL outInfo_dt "How often to do scalar output, overrides out_dt" STEERABLE = AL
-1 :: "Disable output"
-2 :: "Default to IO::out_dt"
} -2
+
+
+
+# Output field widths and precisions
+
+INT iter_width "Field width for the current iteration" STEERABLE = ALWAYS
+{
+ 1:* :: ""
+} 9
+
+INT time_width "Field width for the simulation time" STEERABLE = ALWAYS
+{
+ 1:* :: ""
+} 9
+
+INT time_prec "Precision for the simulation time" STEERABLE = ALWAYS
+{
+ 0:* :: ""
+} 3
+
+
+
+INT int_width "Field width for integer values" STEERABLE = ALWAYS
+{
+ 1:* :: ""
+} 11
+
+INT real_width "Field width for real values" STEERABLE = ALWAYS
+{
+ 1:* :: ""
+} 13
+
+INT real_prec "Precision for real values" STEERABLE = ALWAYS
+{
+ 0:* :: ""
+} 8
+
+INT real_prec_sci "Precision for real values in scientific notation" STEERABLE = ALWAYS
+{
+ 0:* :: ""
+} 6
+
+
+
+REAL real_min "Lower bound for numbers that are displayed in fixed notation" STEERABLE = ALWAYS
+{
+ (0.0:* :: ""
+} 1.0e-8
+
+REAL real_max "Upper bound for numbers that are displayed in fixed notation" STEERABLE = ALWAYS
+{
+ (0.0:* :: ""
+} 1.0e+3
diff --git a/Carpet/CarpetIOBasic/src/iobasic.cc b/Carpet/CarpetIOBasic/src/iobasic.cc
index 54ba5fbfd..2fe46a135 100644
--- a/Carpet/CarpetIOBasic/src/iobasic.cc
+++ b/Carpet/CarpetIOBasic/src/iobasic.cc
@@ -38,21 +38,6 @@ namespace CarpetIOBasic {
- // Output field widths and precisions
- int const iter_width = 9;
- int const time_width = 9;
- int const time_prec = 3;
-
- int const int_width = 11;
- int const real_width = 13;
- int const real_prec = 8;
- int const real_prec_sci = 6;
-
- double const real_min = 1.0e-8;
- double const real_max = 1.0e+3;
-
-
-
// Definition of local types
struct info {
string reduction;
@@ -738,7 +723,9 @@ namespace CarpetIOBasic {
bool
UseScientificNotation (T const & x)
{
- double const xa = myabs (x);
+ DECLARE_CCTK_PARAMETERS;
+
+ CCTK_REAL const xa = myabs (x);
return xa != 0 and (xa < real_min or xa >= real_max);
}