resolve_panel_surface_sides Subroutine

public subroutine resolve_panel_surface_sides(mesh, policy, status, message, mesh_id)

Apply one policy to every element, or to the elements of one mesh_id.

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(inout) :: mesh
character(len=*), intent(in) :: policy
integer(kind=i32), intent(out) :: status
character(len=*), intent(out) :: message
integer(kind=i32), intent(in), optional :: mesh_id

Calls

proc~~resolve_panel_surface_sides~~CallsGraph proc~resolve_panel_surface_sides resolve_panel_surface_sides proc~lower_ascii lower_ascii proc~resolve_panel_surface_sides->proc~lower_ascii

Source Code

  subroutine resolve_panel_surface_sides(mesh, policy, status, message, mesh_id)
    type(mesh_type), intent(inout) :: mesh
    character(len=*), intent(in) :: policy
    integer(i32), intent(out) :: status
    character(len=*), intent(out) :: message
    integer(i32), intent(in), optional :: mesh_id
    integer(i32), allocatable :: elements(:)
    integer(i32) :: i
    real(dp) :: coordinate_scale

    status = panel_surface_side_ok
    message = ''
    if (present(mesh_id)) then
      elements = pack([(i, i=1_i32, mesh%nelem)], mesh%elem_mesh_id == mesh_id)
    else
      elements = [(i, i=1_i32, mesh%nelem)]
    end if
    if (size(elements) == 0) then
      status = panel_surface_side_invalid_policy
      message = 'surface side mesh_id selects no elements'
      return
    end if
    coordinate_scale = 0.0_dp
    if (is_outward_closed(policy)) coordinate_scale = mesh_coordinate_scale(mesh)
    call resolve_element_sides(mesh, policy, elements, coordinate_scale, status, message)
  end subroutine resolve_panel_surface_sides