aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation.tex')
-rw-r--r--doc/documentation.tex40
1 files changed, 21 insertions, 19 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index df64445..dc34f34 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -28,10 +28,12 @@ for quickly setting and checking the mask states.
The mask is a grid function which can be used to assign a state to
each point on the grid. It is used as a bit field, with different
bits, or combinations of bits, assigned to represent various states.
-The mask is currently implemented as a CCTK\_INT8 grid function,
-providing 64 bits per point. Appropriate numbers of bits within
-the mask can be allocated to represent individual states of
-a given type.
+The mask is currently implemented as a CCTK\_INT grid function,
+providing 32 bits per point.\footnote{The original implementation of
+these functions used a CCTK\_INT8 for 64 bits, however this data type
+is not supported by some Fortran compilers.} Appropriate numbers of
+bits within the mask can be allocated to represent individual states
+of a given type.
For instance, a programmer wants to record whether each point of the
grid has \emph{state} ``interior'', ``excised'' or ``boundary''. The
@@ -115,7 +117,7 @@ The state of the mask at a given point is set using the function:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
-void SpaceMask\_SetState(CCTK\_INT8* \emph{mask}, int \emph{point},
+void SpaceMask\_SetState(CCTK\_INT* \emph{mask}, int \emph{point},
char* \emph{type\_name}, char* \emph{state})
}
\hspace*{10mm}\parbox{\linewidth}{
@@ -132,7 +134,7 @@ The state of the mask at a given point can be checked using:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
-int SpaceMask\_CheckState(CCTK\_INT8* \emph{mask}, int \emph{point},
+int SpaceMask\_CheckState(CCTK\_INT* \emph{mask}, int \emph{point},
char* \emph{type\_name}, char* \emph{state})
}
\hspace*{10mm}\parbox{\linewidth}{
@@ -159,7 +161,7 @@ states need to be obtained using the following functions:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
-CCTK\_INT8 SpaceMask\_GetTypeBits(char* \emph{type\_name})
+CCTK\_INT SpaceMask\_GetTypeBits(char* \emph{type\_name})
}\\
\hspace*{10mm}\parbox{\linewidth}{
\begin{description}
@@ -170,7 +172,7 @@ CCTK\_INT8 SpaceMask\_GetTypeBits(char* \emph{type\_name})
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
-CCTK\_INT8 SpaceMask\_GetStateBits(char* \emph{type\_name},
+CCTK\_INT SpaceMask\_GetStateBits(char* \emph{type\_name},
char* \emph{state\_name})
}
\hspace*{10mm}\parbox{\linewidth}{
@@ -192,8 +194,8 @@ of the mask by direct bitwise operations:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
-void SpaceMask\_SetStateBits(CCTK\_INT8* \emph{mask}, int \emph{point},
- CCTK\_INT8 \emph{type\_bits},\\\hspace*{10mm} CCTK\_INT8 \emph{state\_bits})
+void SpaceMask\_SetStateBits(CCTK\_INT* \emph{mask}, int \emph{point},
+ CCTK\_INT \emph{type\_bits},\\\hspace*{10mm} CCTK\_INT \emph{state\_bits})
}\\
\hspace*{10mm}\parbox{\linewidth}{
\begin{description}
@@ -209,8 +211,8 @@ void SpaceMask\_SetStateBits(CCTK\_INT8* \emph{mask}, int \emph{point},
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
-int SpaceMask\_CheckStateBits(CCTK\_INT8* \emph{mask}, int \emph{point},
- CCTK\_INT8 \emph{type\_bits},\\\hspace*{10mm} CCTK\_INT8 \emph{state\_bits})
+int SpaceMask\_CheckStateBits(CCTK\_INT* \emph{mask}, int \emph{point},
+ CCTK\_INT \emph{type\_bits},\\\hspace*{10mm} CCTK\_INT \emph{state\_bits})
}\\
\hspace*{10mm}\parbox{\linewidth}{
\begin{description}
@@ -249,7 +251,7 @@ The mask states can be manipulated using the following functions:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
- SpaceMask\_SetState(CCTK\_INT8 \emph{mask(,,)}, int \emph{point},
+ SpaceMask\_SetState(CCTK\_INT \emph{mask(,,)}, int \emph{point},
character \emph{type\_name},\\\hspace*{10mm} character \emph{state\_name})
}\\
\hspace*{10mm}\parbox{\linewidth}{
@@ -268,7 +270,7 @@ the specified state at the point.
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
- SpaceMask\_CheckState(CCTK\_INT \emph{check}, CCTK\_INT8 \emph{mask(,,)},
+ SpaceMask\_CheckState(CCTK\_INT \emph{check}, CCTK\_INT \emph{mask(,,)},
int \emph{point},\\\hspace*{10mm} character \emph{type\_name},
character \emph{state\_name})
}\\
@@ -294,7 +296,7 @@ in question must first be obtained using the following functions:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
- SpaceMask\_GetTypeBits(CCTK\_INT8 \emph{type\_bits},
+ SpaceMask\_GetTypeBits(CCTK\_INT \emph{type\_bits},
character \emph{type\_name})
}
\hspace*{10mm}\parbox{\linewidth}{
@@ -307,7 +309,7 @@ in question must first be obtained using the following functions:
\indent\parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
- SpaceMask\_GetStateBits(CCTK\_INT8 \emph{state\_bits},
+ SpaceMask\_GetStateBits(CCTK\_INT \emph{state\_bits},
character \emph{type\_name},\\\hspace*{10mm} character \emph{state\_name})
}\\
\hspace*{10mm}\parbox{\linewidth}{
@@ -425,8 +427,8 @@ void Eg_CheckMaskStates (CCTK_ARGUMENTS)
int i, j, k, ijk;
- CCTK_INT8 excision_mask;
- CCTK_INT8 boundary_mask;
+ CCTK_INT excision_mask;
+ CCTK_INT boundary_mask;
excision_mask = SpaceMask_GetTypeBits("excision");
boundary_mask = SpaceMask_GetStateBits("boundary");
@@ -505,7 +507,7 @@ subroutine Eg_SetExcisedRegionByBitmask(CCTK_ARGUMENTS)
integer ni, nj, nk
integer i, j, k, ijk
- CCTK_INT8 type_bits, excised
+ CCTK_INT type_bits, excised
ni = cctk_lsh(1)
nj = cctk_lsh(2)