destroy_gradients Subroutine

public subroutine destroy_gradients()

Deallocate memoery and nullify pointers to the gradient variables.

Arguments

None

Calls

proc~~destroy_gradients~~CallsGraph proc~destroy_gradients destroy_gradients proc~destroy_sst_grad destroy_sst_grad proc~destroy_gradients->proc~destroy_sst_grad proc~destroy_memory destroy_memory proc~destroy_gradients->proc~destroy_memory proc~destroy_sa_grad destroy_sa_grad proc~destroy_gradients->proc~destroy_sa_grad proc~destroy_kkl_grad destroy_kkl_grad proc~destroy_gradients->proc~destroy_kkl_grad debugcall debugcall proc~destroy_gradients->debugcall proc~destroy_laminar_grad destroy_laminar_grad proc~destroy_gradients->proc~destroy_laminar_grad proc~destroy_lctm2015_grad destroy_lctm2015_grad proc~destroy_gradients->proc~destroy_lctm2015_grad proc~destroy_sst_grad->debugcall proc~destroy_memory->debugcall interface~dealloc dealloc proc~destroy_memory->interface~dealloc proc~destroy_sa_grad->debugcall proc~destroy_kkl_grad->debugcall proc~destroy_laminar_grad->debugcall proc~destroy_lctm2015_grad->debugcall proc~dealloc_rank2_real dealloc_rank2_real interface~dealloc->proc~dealloc_rank2_real proc~dealloc_rank4_real dealloc_rank4_real interface~dealloc->proc~dealloc_rank4_real proc~dealloc_rank1_integer dealloc_rank1_integer interface~dealloc->proc~dealloc_rank1_integer proc~dealloc_rank2_integer dealloc_rank2_integer interface~dealloc->proc~dealloc_rank2_integer proc~dealloc_rank1_real dealloc_rank1_real interface~dealloc->proc~dealloc_rank1_real proc~dealloc_rank3_integer dealloc_rank3_integer interface~dealloc->proc~dealloc_rank3_integer proc~dealloc_rank3_real dealloc_rank3_real interface~dealloc->proc~dealloc_rank3_real proc~dealloc_rank5_real dealloc_rank5_real interface~dealloc->proc~dealloc_rank5_real proc~dealloc_rank6_real dealloc_rank6_real interface~dealloc->proc~dealloc_rank6_real

Called by

proc~~destroy_gradients~~CalledByGraph proc~destroy_gradients destroy_gradients proc~destroy_all destroy_all proc~destroy_all->proc~destroy_gradients proc~destroy_solver destroy_solver proc~destroy_solver->proc~destroy_gradients proc~finish_run finish_run proc~finish_run->proc~destroy_solver proc~abort_run abort_run proc~abort_run->proc~destroy_solver program~main main program~main->proc~finish_run

Contents

Source Code


Source Code

    subroutine destroy_gradients
      !< Deallocate memoery and nullify pointers
      !< to the gradient variables.
      
      implicit none

      DebugCall("destroy_gradients")

      if(mu_ref/=0)then

        call destroy_memory()

        ! unlink laminar grad pointer
        call destroy_laminar_grad()

        !unlink turublent grad pointer
        select case (trim(turbulence))
          
          case('none')
            !do nothing
            continue

          case('sa', 'saBC')
            call destroy_sa_grad()

          case('sst', 'sst2003')
            call destroy_sst_grad()

          case('kkl')
            call destroy_kkl_grad()

          case DEFAULT
           ! call turbulence_read_error()
           Fatal_error

        end select

        !Transition modeling
        select case(trim(transition))

          case('lctm2015')
            call destroy_lctm2015_grad()

          case('none','bc')
            !do nothing
            continue

          case DEFAULT
            Fatal_error

        end Select

      end if

    end subroutine destroy_gradients