atl_modg_1d_set_bnd Subroutine

public subroutine atl_modg_1d_set_bnd(bc, boundary, facedata, statedata, poly_proj, material, equation, tree, time, mesh)

Subroutine to set face values to impose boundary conditions.

We set the "outer" state according to the configure boundary condition.

For all variables, where a Dirichlet condition is imposed, this value is fixed and simply set. It might be that a variable transformation is necessary, or we need to perform a transformation to nodal space, all of this is taken care of in atl_modg_1d_bnd, which is called in this routine.

For Neumann boundaries, the default approach is to just use the value at the boundary also for the "outer" face value, such that in the flux left and right state of the variable is always the same. However, this is sensitive to oscillations and may easily cause stability issues. Alternatively we can also compute a new value by modifying the polynomial in the element to have a zero gradient on the boundary enforced and then use this value for the extrapolated "outer" state instead. For details see the [Neumann boundary conditions](page/neumann_boundaries.md].

The subroutine is operating levelwise.

Todo

add other variables to private if necessary !!OMP PARALLEL & !!OMP PRIVATE(iBC, iDir, iAlign, iFace) & !!OMP DEFAULT(shared)

Todo

replace by subroutine call for OpenMP

Todo

replace by subroutine call for OpenMP !!OMP END PARALLEL

Arguments

Type IntentOptional Attributes Name
type(atl_boundary_type), intent(in) :: bc(:)

The global description of the boundaries.

type(atl_level_boundary_type), intent(in) :: boundary

The levelwise collection of boundary elements and boundary faces.

type(atl_facedata_type), intent(inout) :: facedata

The face data on the current level

type(atl_statedata_type), intent(inout) :: statedata

The state data on the current level

type(ply_poly_project_type), intent(inout) :: poly_proj

Data for the projection methods

type(atl_faceMaterialData_type), intent(in), optional :: material

Material description of the faces contained in boundary. One entry for each spatial direction, i.e. x,y.

type(atl_Equations_type), intent(in) :: equation

The underlying equation system

type(treelmesh_type), intent(in) :: tree

treelm mesh

type(tem_time_type), intent(in) :: time

The absolute time point.

type(atl_cube_elem_type), intent(in) :: mesh

The description of the mesh on the current level.