Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DG1d.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
DG1d.jl
Commits
c9e98bff
Verified
Commit
c9e98bff
authored
8 months ago
by
Florian Atteneder
Browse files
Options
Downloads
Patches
Plain Diff
teach spherical1d how deal with tov and bondi data
parent
d042c5c7
Branches
fa/grhd-freeze
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/GRHD/rhs.jl
+31
-7
31 additions, 7 deletions
src/GRHD/rhs.jl
with
31 additions
and
7 deletions
src/GRHD/rhs.jl
+
31
−
7
View file @
c9e98bff
...
...
@@ -1278,17 +1278,24 @@ function rhs!(mesh::Mesh1d, P::Project{:spherical1d}, hrsc::Nothing)
broadcast_volume!
(
flux_source_spherical1d
,
equation
,
mesh
)
impose_symmetry_sources!
(
P
,
mesh
)
broadcast_faces!
(
llf_spherical1d
,
equation
,
mesh
)
if
P
.
prms
.
problem
===
:
bondi
broadcast_bdry!
(
bdryllf_spherical1d_bondi
,
equation
,
mesh
)
elseif
P
.
prms
.
problem
===
:
tov
if
ismirrored
(
mesh
)
id
=
P
.
prmsdb
[
"GRHD"
][
"id"
]
bc
=
P
.
prmsdb
[
"GRHD"
][
"bc"
]
if
id
==
"bondi_accretion"
if
bc
==
"from_id"
broadcast_bdry!
(
bdryllf_spherical1d_bondi
,
equation
,
mesh
)
else
TODO
(
"unknown boundary conditions for initial data
$
id:
$
bc"
)
end
elseif
id
==
"tov"
if
bc
==
"tov_symmetric_domain"
# nothing todo, atmosphering should take care of outer bdrys
elseif
bc
==
"tov_reflective_origin"
broadcast_bdry!
(
bdryllf_spherical1d_tov
,
equation
,
mesh
)
else
impose_symmetry_bdry_values_spherical1d!
(
mesh
)
broadcast_bdry!
(
bdryllf_spherical1d_tov_reflected
,
equation
,
mesh
)
TODO
(
"unknown boundary conditions for initial data
$
id:
$
bc"
)
end
else
TODO
()
TODO
(
"unknown boundary conditions for initial data
$
id:
$
bc"
)
end
if
"D"
∉
P
.
prmsdb
[
"GRHD"
][
"freeze_vars"
]
...
...
@@ -1304,6 +1311,23 @@ function rhs!(mesh::Mesh1d, P::Project{:spherical1d}, hrsc::Nothing)
if
!
P
.
prmsdb
[
"GRHD"
][
"atm_evolve"
]
broadcast_volume!
(
determine_atmosphere
,
P
.
equation
,
mesh
)
broadcast_volume!
(
stop_atmosphere_evolution_spherical1d
,
P
.
equation
,
mesh
)
if
bc
==
"tov_symmetric_domain"
# Need to symmetrize data around origin to avoid asymmetries to blow up there.
# This is needed, because near the surface the solution becomes asymmetric,
# and those errors are amplified when propagating inwards.
# Not sure if this is caused by the LDG/AV method or by the DG method itself.
korigin
=
find_cell_index
(
0.0
,
mesh
)
for
(
k
,(
v_rhs_D
,
v_rhs_Sr
,
v_rhs_τ
))
in
enumerate
(
zip
(
eachcell
(
mesh
,
rhs_D
),
eachcell
(
mesh
,
rhs_Sr
),
eachcell
(
mesh
,
rhs_τ
)))
if
korigin
==
k
@views
v_rhs_D
.=
(
v_rhs_D
.+
v_rhs_D
[
end
:-
1
:
1
])
./
2
@views
v_rhs_Sr
.=
(
v_rhs_Sr
.-
v_rhs_Sr
[
end
:-
1
:
1
])
./
2
@views
v_rhs_τ
.=
(
v_rhs_τ
.+
v_rhs_τ
[
end
:-
1
:
1
])
./
2
break
end
end
end
return
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment