finalize_energy Subroutine

public subroutine finalize_energy(energy)

Deallocate all energy arrays.

Arguments

Type IntentOptional Attributes Name
type(energy_fields_t), intent(inout) :: energy

Called by

proc~~finalize_energy~~CalledByGraph proc~finalize_energy mod_energy::finalize_energy proc~allocate_energy mod_energy::allocate_energy proc~allocate_energy->proc~finalize_energy program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~finalize_energy proc~initialize_energy mod_energy::initialize_energy program~lowmach_react_hex->proc~initialize_energy proc~initialize_energy->proc~allocate_energy

Source Code

   subroutine finalize_energy(energy)
      type(energy_fields_t), intent(inout) :: energy

      if (allocated(energy%T)) deallocate(energy%T)
      if (allocated(energy%T_old)) deallocate(energy%T_old)
      if (allocated(energy%h)) deallocate(energy%h)
      if (allocated(energy%h_old)) deallocate(energy%h_old)
      if (allocated(energy%qrad)) deallocate(energy%qrad)
      if (allocated(energy%cp)) deallocate(energy%cp)
      if (allocated(energy%lambda)) deallocate(energy%lambda)
      if (allocated(energy%rho_thermo)) deallocate(energy%rho_thermo)

      energy%initialized = .false.
   end subroutine finalize_energy