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
9d3ea838
Commit
9d3ea838
authored
1 year ago
by
Florian Atteneder
Browse files
Options
Downloads
Patches
Plain Diff
add prms to Project type
parent
14d86ad9
No related branches found
No related tags found
1 merge request
!91
make shock tube and blast wave tests run for SRHD when using MDA AV
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/SRHD/setup.jl
+18
-11
18 additions, 11 deletions
src/SRHD/setup.jl
src/SRHD/types.jl
+3
-1
3 additions, 1 deletion
src/SRHD/types.jl
with
21 additions
and
12 deletions
src/SRHD/setup.jl
+
18
−
11
View file @
9d3ea838
...
...
@@ -9,7 +9,8 @@ function Project(env::Environment, prms, mesh::Mesh1d)
tci
=
TCI
.
make_TCI
(
env
.
mesh
,
prms
[
"TCI"
])
hrsc
=
HRSC
.
make_HRSC
(
env
.
mesh
,
prms
[
"HRSC"
])
P
=
Project
(
equation
,
hrsc
,
tci
)
fixedprms
=
(;
av_regularization
=:
covariant
)
P
=
Project
(
equation
,
hrsc
,
tci
,
fixedprms
)
# register variables
# TODO Somehow replace _register_variables! with register_variables!
...
...
@@ -55,7 +56,7 @@ function Project(env::Environment, prms, mesh::Mesh2d)
# TODO Somehow replace _register_variables! with register_variables!
@unpack
cache
=
env
_register_variables!
(
mesh
,
P
)
_register_variables!
(
mesh
,
hrsc
)
_register_variables!
(
mesh
,
hrsc
,
nothing
)
_register_variables!
(
mesh
,
bdrycond
)
display
(
cache
)
...
...
@@ -108,23 +109,23 @@ function _register_variables!(mesh::Mesh, P::Project)
cell_variablenames
=
(
:
cellmax_v
,),
global_variablenames
=
(
:
t
,
:
tm1
)
# time steps
)
_register_variables!
(
mesh
,
P
.
hrsc
)
_register_variables!
(
mesh
,
P
.
hrsc
,
P
.
prms
)
_register_variables!
(
mesh
,
P
.
tci
)
@unpack
x
=
get_static_variables
(
mesh
.
cache
)
# @. x = env.mesh.x[:]
end
function
_register_variables!
(
mesh
,
tci_or_hrsc
::
Nothing
)
end
function
_register_variables!
(
mesh
,
tci_or_hrsc
::
Nothing
,
args
...
)
end
_register_variables!
(
mesh
,
hrsc
::
AbstractHRSC
)
=
_register_variables!
(
mesh
,
hrsc
::
AbstractHRSC
,
prms
)
=
error
(
"_register_variables: Not implemented for hrsc of type '
$
(typeof(hrsc))'"
)
_register_variables!
(
mesh
,
hrsc
::
HRSC
.
AbstractReconstruction
)
=
nothing
_register_variables!
(
mesh
,
hrsc
::
HRSC
.
AbstractReconstruction
,
prms
)
=
nothing
function
_register_variables!
(
mesh
,
hrsc
::
HRSC
.
AbstractArtificialViscosity
)
function
_register_variables!
(
mesh
,
hrsc
::
HRSC
.
AbstractArtificialViscosity
,
prms
)
register_variables!
(
mesh
.
cache
,
static_variablenames
=
(
:
ldg_D
,
:
ldg_S
,
:
ldg_tau
,
:
flx_ldg_D
,
:
flx_ldg_S
,
:
flx_ldg_tau
),
...
...
@@ -133,17 +134,23 @@ function _register_variables!(mesh, hrsc::HRSC.AbstractArtificialViscosity)
end
function
_register_variables!
(
mesh
,
hrsc
::
HRSC
.
SmoothedArtificialViscosity
)
_register_variables!
(
mesh
,
hrsc
.
av
)
function
_register_variables!
(
mesh
,
hrsc
::
HRSC
.
SmoothedArtificialViscosity
,
prms
)
_register_variables!
(
mesh
,
hrsc
.
av
,
prms
)
register_variables!
(
mesh
.
cache
,
static_variablenames
=
(
:
smoothed_mu
,),
bdry_variablenames
=
(
:
bdry_ldg_D
,
:
bdry_ldg_S
,
:
bdry_ldg_tau
,
:
bdry_smoothed_mu
),
)
reg
=
prms
.
av_regularization
if
reg
==
:
covariant
register_variables!
(
mesh
.
cache
,
bdry_variablenames
=
(
:
bdry_rhs_D
,
:
bdry_rhs_S
,
:
bdry_rhs_tau
)
)
end
end
function
_register_variables!
(
mesh
::
Mesh2d
,
hrsc
::
HRSC
.
EntropyViscosity
)
function
_register_variables!
(
mesh
::
Mesh2d
,
hrsc
::
HRSC
.
EntropyViscosity
,
prms
)
register_variables!
(
mesh
.
cache
,
static_variablenames
=
(
:
E
,
:
Em1
,
:
flx_E_x
,
:
flx_E_y
,
:
flxm1_E_x
,
:
flxm1_E_y
,
:
ldg_D_x
,
:
ldg_D_y
,
:
ldg_Sx_x
,
:
ldg_Sx_y
,
...
...
@@ -156,7 +163,7 @@ function _register_variables!(mesh::Mesh2d, hrsc::HRSC.EntropyViscosity)
end
function
_register_variables!
(
mesh
,
tci
::
TCI
.
AbstractTCI
)
function
_register_variables!
(
mesh
,
tci
::
TCI
.
AbstractTCI
,
prms
)
register_variables!
(
mesh
.
cache
,
cell_variablenames
=
(
:
flag
,
:
D_flag
,
:
S_flag
,
:
tau_flag
))
end
...
...
This diff is collapsed.
Click to expand it.
src/SRHD/types.jl
+
3
−
1
View file @
9d3ea838
...
...
@@ -21,11 +21,13 @@ end
struct
Project
{
T_HRSC
<:
Maybe
{
HRSC
.
AbstractHRSC
},
T_TCI
<:
Maybe
{
TCI
.
AbstractTCI
}}
T_TCI
<:
Maybe
{
TCI
.
AbstractTCI
},
T_Prms
}
equation
::
Equation
hrsc
::
T_HRSC
tci
::
T_TCI
prms
::
T_Prms
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