Skip to content
Snippets Groups Projects
Commit c1b76efa authored by Francesco Zappa's avatar Francesco Zappa
Browse files

Add test for octant KS data and improbe KSdata test

parent a92c4e33
No related branches found
No related tags found
No related merge requests found
# Test AHF with Kerr-Schild data
import numpy as np
# Generate KS black-hole data
from AHFpy.KerrSchild import KerrSchild
dfile = "kerrschild_octant.h5"
x = np.arange(-0.125/2,5,0.25/2)
y = np.arange(-0.125/2,5,0.25/2)
z = np.arange(-0.125/2,5,0.25/2)
ks = KerrSchild(M=1., a=0., x=x, y=y,z=z)
ks.Output(dfile)
# Search for the horizon
from AHFpy.AHF import AHF
ahf = AHF(flow_iter = 1000, # Max iterations for the fast flow
nphi = 30, # Number of points in phi direction
ntheta = 60, # Number of circles in theta direction
lmax = 9, # Maximum number of Legendre polynomials
mass_tol = 1e-3, # Mass tolerance, stopping criterion for flow
hmean_tol = 100., # h-mean tolerance
time = (0, 1), # Time window to search
nhorizons = 1, # Such many surfaces (MOTS) will be searched
use_last = True, # use the last surface found as initial guess
initial_guess_expand = 1.0, # factor to make initial guess larger
initial_radius = [2.5], # list of guesses, one per horizon
central_points = [(0.,0.,0.)], # list of central points
interpolation_method = 'linear', # order of interpolation onto surface"
compute_metric_drvts = True, # Compute first derivative of the 3-metric
output = True, # output results about MOTS
output_modes = False, # output spherical modes of MOTS
outputdir = '.',
verbose = True,
timers_on = True)
ahf.run([dfile], base_outname = 'horizon_octant', data_sym = "octant")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment