build_periodic_zero_mode_plan Subroutine

public subroutine build_periodic_zero_mode_plan(mesh, area_xy, plan, status, message)

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
real(kind=dp), intent(in) :: area_xy
type(periodic_zero_mode_plan_type), intent(out) :: plan
integer(kind=i32), intent(out) :: status
character(len=*), intent(out) :: message

Calls

proc~~build_periodic_zero_mode_plan~~CallsGraph proc~build_periodic_zero_mode_plan build_periodic_zero_mode_plan proc~build_periodic_zero_mode_height_plan build_periodic_zero_mode_height_plan proc~build_periodic_zero_mode_plan->proc~build_periodic_zero_mode_height_plan

Source Code

  subroutine build_periodic_zero_mode_plan(mesh, area_xy, plan, status, message)
    type(mesh_type), intent(in) :: mesh
    real(dp), intent(in) :: area_xy
    type(periodic_zero_mode_plan_type), intent(out) :: plan
    integer(i32), intent(out) :: status
    character(len=*), intent(out) :: message
    real(dp), allocatable :: heights(:, :)
    integer(i32) :: elem

    status = periodic_zero_mode_invalid
    message = ''
    if (mesh%nelem <= 0_i32) then
      message = 'periodic zero-mode mesh must contain at least one element'
      return
    end if

    allocate (heights(3, mesh%nelem))
    do elem = 1, mesh%nelem
      heights(:, elem) = [mesh%v0(3, elem), mesh%v1(3, elem), mesh%v2(3, elem)]
    end do
    call build_periodic_zero_mode_height_plan(heights, area_xy, plan, status, message)
  end subroutine build_periodic_zero_mode_plan