aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 9d15ccc2cebb1dd6572e6064171dc5d9ba4f9be2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
Cactus Code Thorn AHFinderDirect
Authors    : Jonathan Thornburg <jthorn@aei.mpg.de>
Maintainer : Jonathan Thornburg <jthorn@aei.mpg.de>
CVS info   : $Header$
--------------------------------------------------------------------------

Purpose of This Thorn
=====================

This thorn finds an apparent horizon given the 3D xyz-grid metric and
extrinsic curvature (and optionally the StaticConformal conformal factor).
It uses a direct method, writing the apparent horizon equation as an
elliptic PDE on angular-coordinate space.  This is fast, but does
require an intitial guess for the apparent horizon position.


Documentation
=============

The doc/ directory contains detailed documentation for this thorn.
There are also a lot of comments in the param.ccl file on how to set
the (many) parameters.

The par/ directory contains some sample par files.

See below in this file for notes on compiling this thorn.


Copyright
=========

This thorn is copyright (C) 2001-2002
by Jonathan Thornburg <jthorn@aei.mpg.de>.

This thorn is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This thorn is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this thorn (see the file COPYING in this directory);
if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA  02111-1307  USA


Other Software Required
=======================

This thorn inherits from ADMBase and StaticConformal (both in the
CactusEinstein arrangement), since it uses Cactus various grid functions
which are defined in those thorns.

This thorn can use either of two different interpolator APIs
* CCTK_InterpGridArrays(), which at present is only supplied by the
  CactusPUGH/PUGHInterp thorn, and which in turn uses...
* CCTK_InterpLocalUniform() interpolator API, which
  at present is only supplied by the CactusBase/InterpLocal thorn.

This thorn is written in C++, so you'll need a C++ compiler -- in fact
a fairly modern one -- to compile this thorn.  See the "Compilation Notes"
section below for details.

Most of this thorn's relativity code is machine-generated using Maple
(version 7), but you don't need Maple unless you want to modify the
relativity code.

This thorn uses the LAPACK library (which in turn uses the BLAS library).
Thus you need to configure your Cactus with LAPACK=yes.
[If you don't have LAPACK/BLAS installed on your system already, you
can get Fortran 77 source code and/or binaries for various architectures,
from http://www.netlib.org/lapack/ and http://www.netlib.org/blas/
respectively.  But many systems have these installed already -- try
'locate liblapack' and 'locate libblas' on your system.]


Library Configuration
=====================

When configuring your Cactus configuration, you need to set
   LAPACK=yes .
If all goes well, Cactus will find the LAPACK and BLAS libraries and give
during the configure process saying that it found them.  Otherwise, the
configure process will abort with a message saying that you need to set
the configure variable LAPACK_DIR to a directory (or blank-separated list
of directories) containing the LAPACK and BLAS libraries.

If the LAPACK and/or BLAS libraries were compiled with a (Fortran)
compiler which is *not* used to compile any part of this Cactus'
configuration, then you may also need to set the configure variables
   LAPACK_EXTRA_LIBS = the name (or blank-separated list of names) of
                       that (Fortran) compiler's run-time support
                       library(ies)
   LAPACK_EXTRA_LIB_DIRS = the directory (or blank-separated list of
                           directories) containing that library(ies)

For example, if your LAPACK and/or BLAS were compiled with the GNU g77
compiler (as is common on GNU/Linux and *BSD systems), and you are *not*
using g77 to compile any part of your Cactus configuration (maybe because
you're using a different Fortran compiler), then you may need to set the
environment variables to point to the g77 support library g2c:
  LAPACK_EXTRA_LIBS = g2c
  LAPACK_EXTRA_LIBDIRS = `g77 --print-file-name=libg2c.a | xargs basename`

For example, on the AEI xeons the settings would be
   LAPACK_EXTRA_LIBS = g2c
   LAPACK_EXTRA_LIBDIRS = `g77 --print-file-name=libg2c.a | xargs dirname`

All of these settings are of configure variables, i.e. you set them either
on the command line when configuring,
   % gmake my-configuration LAPACK=yes
or as assignments in your ~/.cactus/config file,
   % cat ~/.cactus/config
   LAPACK=yes
   LAPACK_EXTRA_LIBS=g2c
   LAPACK_EXTRA_LIB_DIRS=/usr/lib/gcc-lib/i386-redhat-linux/2.96


Code Notes
==========

This thorn is written in C++, and requires a fairly modern C++ compiler.
In particular:
* Templates are used, but only rather simple ones for containers or other
  low-level stuff templated on the floating-point or integer datatype.
  These templates are always instantiated explicitly.
* bool, mutable, typename are used.
* The new-style casts static_cast<...> and const_cast<...> are used.
  reinterpret_cast<...> and dynamic_cast<...> are *not* used.
* The code will compile ok under either the archaic or the modern
  for-loop declaration scope rules.
* C header files are used in the pre-namespaces form (eg <stdio.h>).
  (In ISO-standard C++ this is deprecated (but still supported), but
  alas none of the more modern forms (<cstdio> and namespace std::)
  seem to be supported on as wide a range of systems as the pre-namespaces
  form.)
* vector is the only part of the C++ standard template library (STL)
  used.  Either <vector> or <vector.h> is #included, depending on which
  of them exists (this is probed by the Cactus configuration process).


Compiler Notes
==============

This thorn should be fully portable across architectures and operating
systems, but C++ compilers may be a problem:

This thorn has been compiled and run successfully using
* gcc version 2.95.3 20010125 (prerelease)
* gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
* g++ (GCC) 3.2
* Intel(R) C++ Compiler for 32-bit applications, Version 5.0.1   Build 010730D0
* Intel C++ Compiler for Linux, version 6.0
Please let me (Jonathan) know of any other compilers which are ok.

The code will almost certainly *not* compile using
* any "egcs" version of gcc, or more generally, any version of gcc
  earlier than 2.95
* any version of Microsoft Visual C++ up to and including mid-2002