aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@6a38eb6e-646e-4a02-a296-d141613ad6c4>2004-03-09 09:45:05 +0000
committerschnetter <schnetter@6a38eb6e-646e-4a02-a296-d141613ad6c4>2004-03-09 09:45:05 +0000
commit0d0a338cb50efccfdabbbc65c917a1e63bc05ecb (patch)
tree6fd9d0609e957e35700cc0634df1724efe9ff640
parent690b22e26602684e32447575b405158216ca25a3 (diff)
Change the table keys to not contain any spaces. That makes it
possible to create tables from strings, which it turn makes it possible to set them in parameter files, which it turn decouples evolution thorns and boundary condition thorns. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@265 6a38eb6e-646e-4a02-a296-d141613ad6c4
-rw-r--r--doc/documentation.tex31
-rw-r--r--src/CopyBoundary.c16
-rw-r--r--src/FlatBoundary.c2
-rw-r--r--src/RadiationBoundary.c10
-rw-r--r--src/RobinBoundary.c4
-rw-r--r--src/ScalarBoundary.c2
-rw-r--r--src/StaticBoundary.c2
7 files changed, 34 insertions, 33 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 72ed964..6cd40aa 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -295,7 +295,7 @@ of the domain. If you need face specific calls immediately, please
use the old interface for now.
The mapping of bits to faces will likely be the same as that used for
-the (optional) \texttt{BOUNDARY WIDTH} array. Precisely, the rule is as
+the (optional) \texttt{BOUNDARY\_WIDTH} array. Precisely, the rule is as
follows. For a $d$ dimensional grid variable, label the elements or
bits by integers $i$ from $0$ to $2d-1$. Element or bit $i$ gets
mapped to face $(-)^{i+1}e_{\lfloor i\rfloor}$, where ${}_{\lfloor
@@ -347,7 +347,7 @@ boundary conditions, which you would like to use instead.
%will be increased to $2n$ integers, so that one can have a different
%stencil size on the `plus' and `minus' faces.
Note that the number of boundary zones, as expressed in the
-\texttt{boundary\_width} argument or the \texttt{BOUNDARY WIDTH}
+\texttt{boundary\_width} argument or the \texttt{BOUNDARY\_WIDTH}
array, is taken from the total number of grid points presented by
Cactus through \texttt{cctk\_lssh}, etc.
%In this sense they do not
@@ -428,7 +428,7 @@ following additional arguments:\\[1mm]
\textbf{key} & \textbf{variable type} & \textbf{description} & \textbf{default value}\\
\hline
SCALAR & CCTK\_REAL & the scalar value & 0.0\\
-BOUNDARY WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
+BOUNDARY\_WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
\hline
\end{tabular}
@@ -528,7 +528,7 @@ following additional arguments:\\[1mm]
\hline
\textbf{key} & \textbf{variable type} & \textbf{description} & \textbf{default value}\\
\hline
-BOUNDARY WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
+BOUNDARY\_WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
\hline
\end{tabular}
@@ -674,16 +674,17 @@ following additional arguments:\\[1mm]
\textbf{key} & \textbf{variable type} & \textbf{description} & \textbf{default value}\\
\hline
LIMIT & CCTK\_REAL & $f_0$ & 0.0\\
-PREVIOUS TIME LEVEL & CCTK\_INT or CCTK\_STRING & GV which holds the & Cactus previous time level\\
+PREVIOUS\_TIME\_LEVEL & CCTK\_INT or CCTK\_STRING & GV which holds the & Cactus previous time level\\
&& previous time level&\\
SPEED & CCTK\_REAL & wave speed $v$& 1.0\\
-BOUNDARY WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
+BOUNDARY\_WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
\hline
\end{tabular}
\\[1mm] The default behavior is to use the Cactus previous time level,
as defined in the \texttt{interface.ccl} file, for the grid variable
-requested for the radiative boundary condition. The ``PREVIOUS TIME
-LEVEL'' key is provided for backward compatibility only, and will be
+requested for the radiative boundary condition. The
+``PREVIOUS\_TIME\_LEVEL''
+key is provided for backward compatibility only, and will be
deprecated in the future. The corresponding value may be either a
\texttt{CCTK\_INT}, which will be interpreted as the index of a grid
variable holding the previous time level, or a \texttt{CCTK\_STRING},
@@ -811,19 +812,19 @@ The copy boundary condition is registered under the name ``Copy''.
\subsection{Additional arguments}
-The ``COPY FROM'' argument for the copy boundary condition is
+The ``COPY\_FROM'' argument for the copy boundary condition is
required, so a valid table handle is required as well. The keys read are
\\[1mm]
\begin{tabular}{|l|l|l|l|}
\hline
\textbf{key} & \textbf{variable type} & \textbf{description} & \textbf{default value}\\
\hline
-COPY FROM & CCTK\_INT or CCTK\_STRING & GV to copy from & \emph{no default}\\
-BOUNDARY WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
+COPY\_FROM & CCTK\_INT or CCTK\_STRING & GV to copy from & \emph{no default}\\
+BOUNDARY\_WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
\hline
\end{tabular}
\\[1mm]
-(The \texttt{BOUNDARY WIDTH} table entry is only necessary if
+(The \texttt{BOUNDARY\_WIDTH} table entry is only necessary if
the \texttt{boundary\_width} parameter is negative.)
@@ -936,8 +937,8 @@ following additional arguments:\\[1mm]
\textbf{key} & \textbf{variable type} & \textbf{description} & \textbf{default value}\\
\hline
FINF & CCTK\_REAL & $f_0$ & 0\\
-DECAY POWER & CCTK\_INT & $n$ & 1\\
-BOUNDARY WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
+DECAY\_POWER & CCTK\_INT & $n$ & 1\\
+BOUNDARY\_WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
\hline
\end{tabular}
@@ -1013,7 +1014,7 @@ following additional arguments:\\[1mm]
\hline
\textbf{key} & \textbf{variable type} & \textbf{description} & \textbf{default value}\\
\hline
-BOUNDARY WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
+BOUNDARY\_WIDTH & CCTK\_INT array & stencil width for each face & n/a\\
\hline
\end{tabular}
diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c
index b87ffc3..d26f099 100644
--- a/src/CopyBoundary.c
+++ b/src/CopyBoundary.c
@@ -92,7 +92,7 @@ static int ApplyBndCopy (const cGH *GH,
@returndesc
return code of @seeroutine ApplyBndCopy
-11 invalid table handle
- -12 no "COPY FROM" key in table
+ -12 no "COPY_FROM" key in table
-21 error reading boundary width array from table
-22 wrong size boundary width array in table
@endreturndesc
@@ -140,13 +140,13 @@ CCTK_INT BndCopy(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
/* Look on table for copy-from variable */
err = Util_TableQueryValueInfo(tables[i], &value_type, &value_size,
- "COPY FROM");
+ "COPY_FROM");
if (err == UTIL_ERROR_BAD_HANDLE)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid table handle passed for Copy boundary "
"conditions for %s. Name or index of variable to copy from "
- "must be provided via key \"COPY FROM\". Aborting.",
+ "must be provided via key \"COPY_FROM\". Aborting.",
CCTK_VarName(vars[i]));
return -11;
} else if (err==1)
@@ -155,23 +155,23 @@ CCTK_INT BndCopy(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
{
copy_from_name = malloc(value_size*sizeof(char));
Util_TableGetString(tables[i], value_size, copy_from_name,
- "COPY FROM");
+ "COPY_FROM");
copy_from = CCTK_VarIndex(copy_from_name);
free(copy_from_name);
} else if (value_type==CCTK_VARIABLE_INT)
{
- Util_TableGetInt(tables[i], &copy_from, "COPY FROM");
+ Util_TableGetInt(tables[i], &copy_from, "COPY_FROM");
} else
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Invalid data type for key \"COPY FROM\" "
+ "Invalid data type for key \"COPY_FROM\" "
"Please use CCTK_STRING for the variable name, "
"or CCTK_INT for the variable index.");
}
} else
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "No key \"COPY FROM\" provided in table. Please enter the "
+ "No key \"COPY_FROM\" provided in table. Please enter the "
"name or index of variable to copy from into the table "
"under this key. Aborting.");
return -12;
@@ -192,7 +192,7 @@ CCTK_INT BndCopy(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
if (widths[i]<0)
{
err = Util_TableGetIntArray(tables[i], gdim, width_alldirs,
- "BOUNDARY WIDTH");
+ "BOUNDARY_WIDTH");
if (err<0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c
index 05508bf..136785f 100644
--- a/src/FlatBoundary.c
+++ b/src/FlatBoundary.c
@@ -148,7 +148,7 @@ CCTK_INT BndFlat(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
if (widths[i]<0)
{
err = Util_TableGetIntArray(tables[i], gdim, width_alldirs,
- "BOUNDARY WIDTH");
+ "BOUNDARY_WIDTH");
if (err<0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
diff --git a/src/RadiationBoundary.c b/src/RadiationBoundary.c
index bf6a069..47944d1 100644
--- a/src/RadiationBoundary.c
+++ b/src/RadiationBoundary.c
@@ -238,23 +238,23 @@ CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
/* Previous time level (for GVs which don't use Cactus time levels)
(to be deprecated) */
if (Util_TableQueryValueInfo(tables[i], &value_type, &value_size,
- "PREVIOUS TIME LEVEL"))
+ "PREVIOUS_TIME_LEVEL"))
{
/* Key for previous time level is set */
if (value_type==CCTK_VARIABLE_STRING)
{
prev_time_level_name = malloc(value_size*sizeof(char));
Util_TableGetString(tables[i], value_size, prev_time_level_name,
- "PREVIOUS TIME LEVEL");
+ "PREVIOUS_TIME_LEVEL");
prev_time_level = (CCTK_INT) CCTK_VarIndex(prev_time_level_name);
free(prev_time_level_name);
} else if (value_type==CCTK_VARIABLE_INT)
{
- Util_TableGetInt(tables[i], &prev_time_level, "PREVIOUS TIME LEVEL");
+ Util_TableGetInt(tables[i], &prev_time_level, "PREVIOUS_TIME_LEVEL");
} else
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Invalid data type for key \"PREVIOUS TIME LEVEL\" "
+ "Invalid data type for key \"PREVIOUS_TIME_LEVEL\" "
"Please use CCTK_STRING for the variable name, "
"or CCTK_INT for the variable index.");
}
@@ -278,7 +278,7 @@ CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
if (widths[i]<0)
{
err = Util_TableGetIntArray(tables[i], gdim, width_alldirs,
- "BOUNDARY WIDTH");
+ "BOUNDARY_WIDTH");
if (err<0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
diff --git a/src/RobinBoundary.c b/src/RobinBoundary.c
index 51fc3cf..c5a0171 100644
--- a/src/RobinBoundary.c
+++ b/src/RobinBoundary.c
@@ -157,7 +157,7 @@ CCTK_INT BndRobin(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
} else
{
/* Decay power */
- Util_TableGetInt(tables[i], &npow, "DECAY POWER");
+ Util_TableGetInt(tables[i], &npow, "DECAY_POWER");
}
/* Determine boundary width on all faces */
@@ -175,7 +175,7 @@ CCTK_INT BndRobin(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
if (widths[i]<0)
{
err = Util_TableGetIntArray(tables[i], gdim, width_alldirs,
- "BOUNDARY WIDTH");
+ "BOUNDARY_WIDTH");
if (err<0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c
index 2753cc6..81ee42f 100644
--- a/src/ScalarBoundary.c
+++ b/src/ScalarBoundary.c
@@ -167,7 +167,7 @@ CCTK_INT BndScalar(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars, CCTK_INT *f
if (widths[i]<0)
{
err = Util_TableGetIntArray(tables[i], gdim, width_alldirs,
- "BOUNDARY WIDTH");
+ "BOUNDARY_WIDTH");
if (err<0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c
index d7892bc..a70ff69 100644
--- a/src/StaticBoundary.c
+++ b/src/StaticBoundary.c
@@ -143,7 +143,7 @@ CCTK_INT BndStatic(const cGH *GH, CCTK_INT num_vars, CCTK_INT *vars,
if (widths[i]<0)
{
err = Util_TableGetIntArray(tables[i], gdim, width_alldirs,
- "BOUNDARY WIDTH");
+ "BOUNDARY_WIDTH");
if (err<0)
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,