Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/src/solvers/dgsem_t8code/dg.jl
5590 views
1
@muladd begin
2
#! format: noindent
3
4
# This method is called when a SemidiscretizationHyperbolic is constructed.
5
# It constructs the basic `cache` used throughout the simulation to compute
6
# the RHS etc.
7
function create_cache(mesh::T8codeMesh, equations::AbstractEquations, dg::DG, ::Any,
8
::Type{uEltype}) where {uEltype <: Real}
9
count_required_surfaces!(mesh)
10
11
elements = init_elements(mesh, equations, dg.basis, uEltype)
12
interfaces = init_interfaces(mesh, equations, dg.basis, elements)
13
boundaries = init_boundaries(mesh, equations, dg.basis, elements)
14
mortars = init_mortars(mesh, equations, dg.basis, elements)
15
16
fill_mesh_info!(mesh, interfaces, mortars, boundaries,
17
mesh.boundary_names)
18
19
# Container cache
20
cache = (; elements, interfaces, boundaries, mortars)
21
22
# Add Volume-Integral cache
23
cache = (; cache...,
24
create_cache(mesh, equations, dg.volume_integral, dg, cache, uEltype)...)
25
# Add Mortar cache
26
cache = (; cache..., create_cache(mesh, equations, dg.mortar, uEltype)...)
27
28
return cache
29
end
30
31
include("containers.jl")
32
include("containers_2d.jl")
33
include("containers_3d.jl")
34
35
include("containers_parallel.jl")
36
37
include("dg_parallel.jl")
38
end # @muladd
39
40