Path: blob/main/src/solvers/dgsem_t8code/containers.jl
5590 views
function reinitialize_containers!(mesh::T8codeMesh, equations, dg::DGSEM, cache)1n_cells = ncells(mesh)23# Re-initialize elements container.4@unpack elements = cache5resize!(elements, n_cells)6init_elements!(elements, mesh, dg.basis)78# Resize volume integral and related datastructures9@unpack volume_integral = dg10resize_volume_integral_cache!(cache, mesh, volume_integral, n_cells)11reinit_volume_integral_cache!(cache, mesh, dg, volume_integral, n_cells)1213count_required_surfaces!(mesh)1415# Resize interfaces container.16@unpack interfaces = cache17resize!(interfaces, mesh.ninterfaces)1819# Resize mortars container.20@unpack mortars = cache21resize!(mortars, mesh.nmortars)2223# Resize boundaries container.24@unpack boundaries = cache25resize!(boundaries, mesh.nboundaries)2627fill_mesh_info!(mesh, interfaces, mortars, boundaries,28mesh.boundary_names)2930return nothing31end3233function count_required_surfaces!(mesh::T8codeMesh)34counts = count_interfaces(mesh)3536mesh.nmortars = counts.mortars37mesh.ninterfaces = counts.interfaces38mesh.nboundaries = counts.boundaries3940mesh.nmpimortars = counts.mpi_mortars41mesh.nmpiinterfaces = counts.mpi_interfaces4243return counts44end4546# Compatibility to `dgsem_p4est/containers.jl`.47function count_required_surfaces(mesh::T8codeMesh)48return (interfaces = mesh.ninterfaces,49mortars = mesh.nmortars,50boundaries = mesh.nboundaries,51mpi_interfaces = mesh.nmpiinterfaces,52mpi_mortars = mesh.nmpimortars)53end5455# Compatibility to `dgsem_p4est/containers.jl`.56function init_interfaces!(interfaces, elements,57mesh::T8codeMesh, basis)58# Already computed. Do nothing.59return nothing60end6162# Compatibility to `dgsem_p4est/containers.jl`.63function init_mortars!(mortars, mesh::T8codeMesh)64# Already computed. Do nothing.65return nothing66end6768# Compatibility to `dgsem_p4est/containers.jl`.69function init_boundaries!(boundaries, mesh::T8codeMesh)70# Already computed. Do nothing.71return nothing72end737475