apply_panel_surface_config Subroutine

public subroutine apply_panel_surface_config(cfg, mesh)

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(in) :: cfg
type(mesh_type), intent(inout) :: mesh

Calls

proc~~apply_panel_surface_config~~CallsGraph proc~apply_panel_surface_config apply_panel_surface_config proc~mesh_part_config_path mesh_part_config_path proc~apply_panel_surface_config->proc~mesh_part_config_path proc~resolve_panel_surface_sides_by_mesh_id resolve_panel_surface_sides_by_mesh_id proc~apply_panel_surface_config->proc~resolve_panel_surface_sides_by_mesh_id proc~lower_ascii lower_ascii proc~resolve_panel_surface_sides_by_mesh_id->proc~lower_ascii

Called by

proc~~apply_panel_surface_config~~CalledByGraph proc~apply_panel_surface_config apply_panel_surface_config proc~build_mesh_from_config build_mesh_from_config proc~build_mesh_from_config->proc~apply_panel_surface_config proc~load_or_init_run_state load_or_init_run_state proc~load_or_init_run_state->proc~build_mesh_from_config program~main main program~main->proc~load_or_init_run_state

Source Code

  subroutine apply_panel_surface_config(cfg, mesh)
    type(app_config), intent(in) :: cfg
    type(mesh_type), intent(inout) :: mesh
    integer(i32) :: i, mesh_id, status, failed_mesh_id
    integer(i32), allocatable :: part_index(:)
    character(len=256) :: message

    if (any(mesh%panel_area <= 0.0_dp)) then
      error stop 'triangle_p0 requires finite, non-degenerate triangles.'
    end if
    ! Enabled parts own mesh_id 1, 2, ... in list order (build_parts_mesh).
    allocate (part_index(cfg%n_mesh_parts))
    mesh_id = 0_i32
    do i = 1, cfg%n_mesh_parts
      if (.not. cfg%mesh_parts(i)%enabled) cycle
      mesh_id = mesh_id + 1_i32
      part_index(mesh_id) = i
    end do
    call resolve_panel_surface_sides_by_mesh_id( &
      mesh, cfg%mesh_parts(part_index(1:mesh_id))%surface_side_policy, status, message, failed_mesh_id &
      )
    if (status /= panel_surface_side_ok) then
      error stop mesh_part_config_path(int(part_index(failed_mesh_id)))//'.surface_side: '//trim(message)
    end if
    if (any(abs(mesh%elem_vacuum_sign) /= 1_i32)) then
      error stop 'triangle_p0 requires a resolved vacuum side for every element.'
    end if
  end subroutine apply_panel_surface_config