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
8fb20557
Verified
Commit
8fb20557
authored
11 months ago
by
Florian Atteneder
Browse files
Options
Downloads
Patches
Plain Diff
implement av_recompute_substeps
parent
c0b2beb1
No related branches found
Branches containing commit
No related tags found
1 merge request
!149
SRHD: Update cons2prim
Pipeline
#6582
failed
11 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/SRHD/callbacks.jl
+6
-2
6 additions, 2 deletions
src/SRHD/callbacks.jl
src/SRHD/setup.jl
+6
-3
6 additions, 3 deletions
src/SRHD/setup.jl
with
12 additions
and
5 deletions
src/SRHD/callbacks.jl
+
6
−
2
View file @
8fb20557
...
...
@@ -8,8 +8,11 @@ function make_callback(env, P::Project, isperiodic)
cbfn_hrsc
(
u
,
t
)
=
callback_hrsc
(
u
,
t
,
env
,
P
,
isperiodic
,
P
.
hrsc
,
env
.
mesh
)
cb_hrsc
=
FunctionCallback
(
cbfn_hrsc
,
CallbackTiming
(
every_iteration
=
1
,
every_dt
=
0
))
callbackset
=
CallbackSet
(
cb_equation
,
cb_tci
,
cb_hrsc
)
return
callbackset
if
P
.
prms
.
av_recompute_substeps
&&
P
.
hrsc
isa
AbstractArtificialViscosity
return
CallbackSet
(
cb_equation
,
cb_tci
),
CallbackSet
(
cb_hrsc
)
else
return
CallbackSet
(
cb_equation
,
cb_tci
,
cb_hrsc
),
nothing
end
end
...
...
@@ -129,6 +132,7 @@ end
function
callback_hrsc
(
state_u
,
state_t
,
env
,
P
,
isperiodic
,
hrsc
::
HRSC
.
SmoothedArtificialViscosity
,
mesh
)
wrap_dynamic_variables!
(
env
.
cache
,
state_u
)
@unpack
cache
=
env
@unpack
mu
,
mu_m1
=
get_cell_variables
(
cache
)
@unpack
smoothed_mu
=
get_static_variables
(
cache
)
...
...
This diff is collapsed.
Click to expand it.
src/SRHD/setup.jl
+
6
−
3
View file @
8fb20557
...
...
@@ -9,8 +9,10 @@ function Project(env::Environment, prms, mesh::Mesh1d)
bernstein
=
BernsteinReconstruction
(
mesh
)
av_regularization
=
Symbol
(
prms
[
"SRHD"
][
"av_regularization"
])
av_drag
=
prms
[
"SRHD"
][
"av_drag"
]
av_recompute_substeps
=
prms
[
"SRHD"
][
"av_recompute_substeps"
]
K
,
Γ
=
prms
[
"SRHD"
][
"c2p_cold_eos_parameters"
]
fixedprms
=
(;
av_regularization
,
av_drag
,
id_smooth
=
prms
[
"SRHD"
][
"id_smooth"
],
fixedprms
=
(;
av_regularization
,
av_drag
,
av_recompute_substeps
,
id_smooth
=
prms
[
"SRHD"
][
"id_smooth"
],
bernstein
,
hrsc
,
slope_limiter_method
,
slope_limiter_tvb_M
)
# construct Project
...
...
@@ -41,9 +43,10 @@ function Project(env::Environment, prms, mesh::Mesh1d)
initialdata!
(
env
,
P
,
prms
[
"SRHD"
])
# setup callbacks
projectcb
=
make_callback
(
env
,
P
,
isperiodic
(
mesh
))
cbs
,
cbs_substep
=
make_callback
(
env
,
P
,
isperiodic
(
mesh
))
append!
(
env
.
callbacks
,
CallbackSet
(
projectcb
.
callbacks
...
))
append!
(
env
.
callbacks
,
cbs
)
append!
(
env
.
callbacks_substep
,
cbs_substep
)
return
P
,
(
bdryconds
,
ldg_bdryconds
,
av_bdryconds
)
end
...
...
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