Skip to content
Snippets Groups Projects

Refactor GRHD project

Merged Florian Atteneder requested to merge fa/grhd into main
2 files
+ 0
139
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 20
12
@@ -3,10 +3,9 @@ module GRHD
using dg1d
using dg1d.EquationOfState
using dg1d.Roots
using Roots
using LinearAlgebra
using OrderedCollections
using BasicInterpolators
include("types.jl")
@@ -14,8 +13,8 @@ include("equation.jl")
include("rhs.jl")
include("initialdata.jl")
include("callbacks.jl")
include("boundaryconditions.jl")
include("setup.jl")
include("cons2prim.jl")
#######################################################################
@@ -26,11 +25,9 @@ include("setup.jl")
dg1d.project_type(::Val{:GRHD}) = Project
# TODO Remove bdryconds
dg1d.rhs!(env::Environment, P::Project, bdryconds) = rhs!(env, P, P.hrsc, bdryconds...)
dg1d.rhs!(env::Environment, P::Project, bdryconds) = rhs!(env.mesh, P, P.hrsc)
dg1d.plot(env::Environment, P::Project) = plot(env, P)
dg1d.timestep!(env::Environment, P::Project) = timestep(env, P, P.hrsc)
dg1d.timestep!(env::Environment, P::Project) = timestep(env.mesh, P, P.hrsc)
dg1d.@parameters GRHD begin
@@ -39,19 +36,22 @@ dg1d.@parameters GRHD begin
relative to the maximum of restmass density over the grid.
"""
atm_factor = 1e-10
@check atm_factor > 0.0
"""
Multiplicative factor to determine the cutoff restmass density below which
we impose artificial atmosphere.
"""
atm_threshold_factor = 100.0
@check atm_factor > 1.0
"""
Available options:
- `periodic`
- `from_initia_data`
- `from_id`
"""
bc = "periodic"
@check bc in [ "periodic", "from_id" ]
"""
Available options:
@@ -60,11 +60,10 @@ dg1d.@parameters GRHD begin
- `atmosphere`
"""
id = "atmosphere"
@check id in [ "tov", "bondi_accretion", "atmosphere" ]
"""
Path to an .h5 file containing initial data. Supported initial data types:
- `tov`
- `bondi_accretion`
Path to an .h5 file containing initial data.
"""
id_filename = ""
@@ -72,6 +71,15 @@ dg1d.@parameters GRHD begin
Restmass density for `atmosphere` initial data.
"""
id_atmosphere_density = 1e-11
@check id_atmosphere_density > 0.0
"""
Choice of formulation of evolution equations. Available options:
- `spherical1d` ... singular at `r=0`
- `rescaled_spherical1d` ... regular at `r=0`
"""
formulation = "spherical1d"
@check formulation in [ "spherical1d", "rescaled_spherical1d" ]
end
Loading