COSMOS API AHF2D - cmyoo/cosmos GitHub Wiki
COSMOS :: Class description for Ahf2d
Ahf2d :: Variables
- General variables for apparent horizon finder
| type |
name |
description |
| bool |
error |
true if AH is not found |
| int |
mt |
number of theta grid |
| int |
mp |
number of phi grid |
| int |
fignum |
number for figure plot |
| double |
dt |
d theta |
| double |
dti |
1/ dtheta |
| double |
dti2 |
1/ dtheta^2 |
| double |
dp |
d phi |
| double |
dpi |
1/ dphi |
| double |
dpi2 |
1/ dphi^2 |
| double |
var |
acceleration parameter in PRD55 2002 |
| double |
fac |
factor of iteration update |
| double* |
theta |
theta coordinate |
| double* |
phi |
phi coordinate |
| double |
hini |
initial radius |
| double** |
ha |
previous horizon radius |
| double** |
hb |
updated horizon radius |
| double** |
src |
source term |
| double** |
ds |
area element |
| double** |
dce |
for equator length |
| double** |
dcp1 |
for meridian length-1 |
| double** |
dcp2 |
for merician length-2 |
| double |
area |
area |
| double |
mass |
mass |
| double |
spin |
spin |
| double |
circe |
equator length |
| double |
circp1 |
meridian length-1 |
| double |
circp2 |
meridian length-2 |
- Variables for IMLUCGS poisson solver
(see "Basics of numerical computation(note in Japanese edition)" p.90 for names of vectors)
| type |
name |
description |
| double** |
vtmp |
temporary vector in Poisson solver |
| double** |
vp |
p-vector in Poisson solver |
| double** |
vr |
r-vector in Poisson solver |
| double** |
vr0 |
r0-vector in Poisson solver |
| double** |
ve |
e-vector in Poisson solver |
| double** |
vh |
h-vector in Poisson solver |
| double** |
vcon |
temporary used in precondition |
| double** |
cb |
vector for matrix non-zero components |
| double** |
cc |
vector for matrix non-zero components |
| double** |
pcd |
vector for matrix non-zero components |
| double** |
cd |
vector for the matrix D in IMLU decomposition |
| double** |
ce |
vector for matrix non-zero components |
| double** |
cf |
vector for matrix non-zero components |
Constructor and Destructor
Ahf2d(int ntheta, int& nphi, double& va, double& fa, double& hc)
| input |
setting variables in the class |
description |
| ntheta |
mt |
number of theta grid |
| nphi |
mp |
number of phi grid |
| va |
var |
acceleration parameter |
| fa |
fac |
factor of iteration update |
| hc |
hini |
initial radius of apparent horizon |
~Ahf2d()
Functions
GET functions
| type |
name |
input |
output |
| bool |
get_error() |
no |
error |
SET functions
| type |
name |
input |
description |
| void |
set_error(bool e) |
e: existence of apparent horizon |
setting e when horizon is found or not found |
| void |
set_hini(double h) |
h:initial guess |
setting initial guess of the radius of apparent horizon |
| void |
set_hflag(Fmv0 *fmv) |
fmv:layer to find horizon |
setting hflag |
Functions for finding Apparent Horizon
| type |
name |
input |
description |
| void |
multiple(double **x,double **ax) |
x:source vector, ax:multiplied vector |
calculating the product of finder's matrix and source vector |
| void |
poisson(double **vf,double **src,double errmax) |
vf:solution vector, src:source vector, errmax:maximum error for Poisson solver |
finding the solution vector by solving Poisson equation |
| void |
precondition(double **vs) |
vs:vector for preconditioning |
Preconditioning by incomplete LU decomposition |
| void |
boundaryset(double **vs) |
vs:solution vector |
reflection boundary condition for vs |
| void |
boundary_half(double **vs) |
vs:solution vector |
reflection boundary condition (hal -sphere) |
| void |
boundary_periodicphi_nosympoletheta(double **vs) |
vs:solution vector |
periodic boundary condition for phi |
| void |
boundary0(double **vs) |
vs:solution vector |
substituting 0 for boundary |
| type |
name |
input |
description |
| void |
find_ah(Fmv0 *fmv,int loopmax,double err_p,double err_eps,ofstream& fout,short int& hsign) |
fmv:pointer to the layer, loopmax:maximum iteration number, err_p:maximum error for Poisson solver, err_eps:difference of radius error between current and previous steps, fout:output file, hsign:direction of the normal null vector |
Finding Apparent Horizon |
| void |
print_ah(Fmv0 *fmv,ofstream& fout,double time) |
fmv:pointer to the layer, fout:output file, time:current time |
Printing information of Apparent Horizon |
| type |
name |
input |
output |
| double |
hrad(int tc,int pc,double th,double ph,int order) |
tc:theta grid number, pc:phi grid number, th:theta at the point, ph:phi at the point, order:order of interpolation |
horizon radius with interpolation |
| double |
ipol( double& rr,double *xx,double *yy,int order ) |
rr:position, xx:position at grid points, yy:variables at grid points, order:order of interpolation |
interpolated value |