setup_update Subroutine

public subroutine setup_update(control, scheme, flow, dims)

Allocate memory to variables required based on the time-integration scheme.

Arguments

Type IntentOptional AttributesName
type(controltype), intent(in) :: control

Control parameters

type(schemetype), intent(in) :: scheme

finite-volume Schemes

type(flowtype), intent(in) :: flow

Information about fluid flow: freestream-speed, ref-viscosity,etc.

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx


Calls

proc~~setup_update~~CallsGraph proc~setup_update setup_update interface~alloc alloc proc~setup_update->interface~alloc proc~setup_lusgs setup_lusgs proc~setup_update->proc~setup_lusgs proc~setup_plusgs setup_plusgs proc~setup_update->proc~setup_plusgs proc~alloc_rank2_real alloc_rank2_real interface~alloc->proc~alloc_rank2_real proc~alloc_rank4_real alloc_rank4_real interface~alloc->proc~alloc_rank4_real proc~alloc_rank3_real alloc_rank3_real interface~alloc->proc~alloc_rank3_real proc~alloc_rank2_integer alloc_rank2_integer interface~alloc->proc~alloc_rank2_integer proc~alloc_rank1_integer alloc_rank1_integer interface~alloc->proc~alloc_rank1_integer proc~alloc_rank6_real alloc_rank6_real interface~alloc->proc~alloc_rank6_real proc~alloc_rank5_real alloc_rank5_real interface~alloc->proc~alloc_rank5_real proc~alloc_rank3_integer alloc_rank3_integer interface~alloc->proc~alloc_rank3_integer proc~alloc_rank1_real alloc_rank1_real interface~alloc->proc~alloc_rank1_real proc~setup_lusgs->interface~alloc proc~setup_plusgs->interface~alloc

Called by

proc~~setup_update~~CalledByGraph proc~setup_update setup_update proc~setup_solver setup_solver proc~setup_solver->proc~setup_update proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

      subroutine setup_update(control, scheme,flow, dims)
        !< Allocate memory to variables required based 
        !< on the time-integration scheme.
        implicit none
        type(controltype), intent(in) :: control
        !< Control parameters
        type(schemetype), intent(in) :: scheme
        !< finite-volume Schemes
        type(flowtype), intent(in) :: flow
        !< Information about fluid flow: freestream-speed, ref-viscosity,etc.
        type(extent), intent(in) :: dims
        !< Extent of the domain:imx,jmx,kmx

        imx = dims%imx
        jmx = dims%jmx
        kmx = dims%kmx

        n_var = control%n_var

        call alloc(u1,1,n_var)
        call alloc(u2,1,n_var)
        call alloc(R ,1,n_var)
        call alloc(aux,-2,imx+2,-2,jmx+2,-2,kmx+2,1,n_var)

        select case (scheme%time_step_accuracy)
          case ("none")
            ! Do nothing
            continue
          case ("RK2", "RK4")
            call alloc(U_store,-2,imx+2,-2,jmx+2,-2,kmx+2,1,n_var)
            call alloc(R_store, 1,imx-1, 1,jmx-1, 1,kmx-1,1,n_var)
          case ("TVDRK2", "TVDRK3")
            call alloc(U_store,-2,imx+2,-2,jmx+2,-2,kmx+2,1,n_var)
          case ("implicit")
            call setup_lusgs(control, scheme, flow, dims)
          case ("plusgs")
            call setup_plusgs(control, scheme, flow, dims)
          case default
            Fatal_error
        end select

      end subroutine setup_update