aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/documentation.tex84
-rw-r--r--param.ccl6
-rw-r--r--schedule.ccl18
-rw-r--r--src/driver/find_horizons.cc4
-rw-r--r--src/driver/mask.cc5
5 files changed, 96 insertions, 21 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 9b52242..7258ec5 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -107,6 +107,7 @@
\def\arrangement#1{{\bf #1}} % name of an arrangement
\def\thorn#1{{\bf #1}} % name of a thorn
\def\cvsplace#1{{\bf #1}} % name of a CVS repository/directory
+\def\cf{\hbox{cf.\hbox{}}}
\def\eg{\hbox{eg.\hbox{}}}
\def\ie{\hbox{i.e.\hbox{}}}
\def\eqref#1{$(\ref{#1})$}
@@ -167,7 +168,7 @@ derivation of equation~\eqref{AHFinderDirect/eqn-horizon}.)
of~\eqref{AHFinderDirect/eqn-horizon} by any specified nonzero
constant, \ie{} you can find a surface of constant
(in general nonzero) expansion.; this is dicsussed in
-section~\ref{AHFinderDirect/sect-parameters/other-parameters}.)
+section~\ref{AHFinderDirect/sect-parameters/other-IO-parameters}.)
Thorn~\thorn{AHFinderDirect} finds an apparent horizon by numerically
solving equation~\eqref{AHFinderDirect/eqn-horizon}. It requires
@@ -251,7 +252,7 @@ necessary in order for \thorn{AHFinderDirect} to work:
In other words, using polar spherical coordinates relative
to the local coordinate origin, the apparent horizon's shape
must be parameterizable as $r = h(\text{angle})$ for some
- single-value function $h: S^2 \to \Re^+$. (\thorn{AHFinderDirect}
+ single-valued function $h: S^2 \to \Re^+$. (\thorn{AHFinderDirect}
uses precisely this parameterization.)
\end{itemize}
@@ -277,15 +278,23 @@ here's what works and what doesn't:
have storage turned on for at least the conformal factor
\verb|StaticConformal::psi|. (The Cactus 3-D grid functions
for 1st and 2nd derivatives of \verb|psi| aren't used.)
-\item By default \thorn{AHFinderDirect} uses the new
- \verb|CCTK_InterpGridArrays()| global interpolator API,
- which in turn uses the new \verb|CCTK_InterpLocalUniform()|
- local interpolator API. At present these interpolators
- are only provided by the thorns \thorn{PUGHInterp} and
- \thorn{AEILocalInterp} respectively, so you need to have
- these thorns compiled into your configuration and activated.
+\item \thorn{AHFinderDirect} uses the \verb|CCTK_InterpGridArrays()|
+ Cactus global (multi-processor grid array) interpolator API;
+ this is provided by \thorn{PUGHInterp} or \thorn{CarpetInterp}
+ (so you must have the appropriate one of these thorns compiled
+ in and activated). \verb|CCTK_InterpGridArrays()| in turn uses
+ the new \verb|CCTK_InterpLocalUniform()| processor-local
+ interpolator API; \thorn{AHFinderDirect} uses various options
+ in this API which at present are only supported by thorn
+ \thorn{AEILocalInterp} (so you must have this thorn compiled in
+ and activated)
\item \thorn{AHFinderDirect} works fine in single- or multi-processor
Cactus runs.
+\item \thorn{AHFinderDirect} uses various Cactus reduction APIs to
+ coordinate multi-processor horizon finding, so (even if you're
+ only going to run on a single processor) you must have a reduction
+ thorn like \thorn{PUGHReduce} or \thorn{CarpetReduce} compiled in
+ and activated.
\item At present none of \thorn{AHFinderDirect}'s parameters are steerable.
\item I think \thorn{AHFinderDirect} will ``work'' with checkpoint/restart,
but I haven't tested this yet. Here ``work'' means the restart
@@ -351,6 +360,7 @@ section~\ref{AHFinderDirect/sect-examples} should make this clear.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Overall Parameters}
+\label{AHFinderDirect/sect-parameters/overall-parameters}
\begin{description}
\item[\code{find\_AHs}]
@@ -1051,7 +1061,7 @@ to do this before \thorn{AHFinderDirect} tries to find the horizon(s).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Other Parameters}
-\label{AHFinderDirect/sect-parameters/other-parameters}
+\label{AHFinderDirect/sect-parameters/other-IO-parameters}
\begin{description}
\item[%%%
@@ -1146,6 +1156,60 @@ to do this before \thorn{AHFinderDirect} tries to find the horizon(s).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Monitoring \thorn{AHFinderDirect}'s Status}
+
+There are two primary ways of monitoring what \thorn{AHFinderDirect}
+is doing during a Cactus run: the \verb|BH_diagnostics| files and the
+\verb|CCTK_INFO| messages written to the Cactus standard output:
+
+The \verb|BH_diagnostics| files are described in detail in
+section~\ref{AHFinderDirect/sect-parameters/other-IO-parameters}.
+These files are written and ``flushed'' at each time step, so they're
+always up-to-date.
+
+During the apparent-horizon--finding process, \thorn{AHFinderDirect}
+writes various \verb|CCTK_INFO| messages describing the convergence
+of the iterative solution of the apparent horizon
+equation~\ref{AHFinderDirect/eqn-horizon} on each processor.
+In particular, if \verb|verbose_level| is set to
+\verb|"algorithm highlights"| or a more verbose setting
+(\cf{}~section~\ref{AHFinderDirect/sect-parameters/overall-parameters}),
+then \thorn{AHFinderDirect} writes \verb|CCTK_INFO| messages like
+these:
+\begin{verbatim}
+INFO (AHFinderDirect): proc 0/horizon 1:it 1 r_grid=0.595 ||Theta||=1.1e-01
+INFO (AHFinderDirect): proc 0/horizon 1:it 2 r_grid=0.614 ||Theta||=7.2e-02
+INFO (AHFinderDirect): proc 0/horizon 1:it 3 r_grid=0.632 ||Theta||=2.9e-02
+INFO (AHFinderDirect): proc 0/horizon 1:it 4 r_grid=0.642 ||Theta||=9.9e-04
+INFO (AHFinderDirect): proc 0/horizon 1:it 5 r_grid=0.642 ||Theta||=7.9e-07
+INFO (AHFinderDirect): proc 0/horizon 1:it 6 r_grid=0.642 ||Theta||=7.2e-13
+INFO (AHFinderDirect): AH 1/2: r=0.660716 at (0.000000,0.000000,1.127434)
+INFO (AHFinderDirect): AH 1/2: area=338.0473838 m_irreducible=2.59330658
+INFO (AHFinderDirect): writing h to "misner.h.t0.ah1.gp"
+\end{verbatim}
+Here \verb|r_grid| is a rough estimate of the mean radius of
+the trial surface at each iteration, and \verb:||Theta||: is the
+infinity-norm of $\Theta$, the left hand side of the apparent
+horizon equation~\ref{AHFinderDirect/eqn-horizon} over the surface.
+Once the apparent horizon has been found
+(\verb:||Theta||: is sufficiently small), then \thorn{AHFinderDirect}
+prints its mean radius,%%%
+\footnote{%%%
+ Note that this may differ significantly from
+ the last iterations' estimated radius. This
+ is because the mean radius printed during the
+ iterations is only a rough estimate (it's the
+ unweighted arithmetic mean of the radius at
+ all the horizon-surface grid points), while
+ the radius printed after the horizon is found
+ is a more accurate value (it's computed via
+ numerical integrals over the surface, taking
+ into account the induced metric).
+ }%%%
+{} centroid position, area, and irreducible mass.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\section{Accuracy}
The apparent horizon positions are typically computed very accurately;
diff --git a/param.ccl b/param.ccl
index c9857fa..7ceddd2 100644
--- a/param.ccl
+++ b/param.ccl
@@ -31,9 +31,11 @@ private:
#
# set this to (try to) find apparent horizons at every time step
-boolean find_AHs "should we try to find apparent horizons?"
+int find_every "how often should we try to find apparent horizons?"
{
-} "true"
+0 :: "don't find AHs at all (this thorn is a no-op)"
+1:* :: "any integer >= 1"
+} 1
keyword method "what should this thorn do for each apparent horizon?"
{
diff --git a/schedule.ccl b/schedule.ccl
index 0af9e2d..f617fe7 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -7,22 +7,22 @@ schedule AHFinderDirect_setup at CCTK_BASEGRID after SpatialCoordinates
options: global
} "setup data structures"
-if (find_AHs != 0)
+if (find_every != 0)
{
schedule AHFinderDirect_find_horizons at CCTK_POSTSTEP
{
lang: C
options: global
} "find apparent horizon(s) after this time step"
- }
-if ((find_AHs != 0) && (set_mask != 0))
- {
- schedule AHFinderDirect_do_masks at CCTK_POSTSTEP \
- after AHFinderDirect_find_horizons
- {
- lang: C
- } "set mask(s) based on apparent horizon position(s)"
+ if (set_mask != 0)
+ {
+ schedule AHFinderDirect_do_masks at CCTK_POSTSTEP \
+ after AHFinderDirect_find_horizons
+ {
+ lang: C
+ } "set mask(s) based on apparent horizon position(s)"
+ }
}
########################################
diff --git a/src/driver/find_horizons.cc b/src/driver/find_horizons.cc
index e8336db..2a0cd39 100644
--- a/src/driver/find_horizons.cc
+++ b/src/driver/find_horizons.cc
@@ -91,6 +91,10 @@ extern "C"
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
+// only try to find horizons every find_every time steps
+if ((cctk_iteration % find_every) != 0)
+ then return;
+
if (state.timer_handle >= 0)
then CCTK_TimerResetI(state.timer_handle);
diff --git a/src/driver/mask.cc b/src/driver/mask.cc
index 898e899..87e0506 100644
--- a/src/driver/mask.cc
+++ b/src/driver/mask.cc
@@ -153,6 +153,11 @@ extern "C"
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
+// only try to do mask stuff if we've found AHs at this time level
+// ==> only try every find_every time steps
+if ((cctk_iteration % find_every) != 0)
+ then return;
+
const struct verbose_info& verbose_info = state.verbose_info;
struct mask_info& mask_info = state.mask_info;