allocate_energy Subroutine

public subroutine allocate_energy(mesh, energy)

Allocate all energy arrays for the mesh.

Arguments

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

Calls

proc~~allocate_energy~~CallsGraph proc~allocate_energy mod_energy::allocate_energy proc~finalize_energy mod_energy::finalize_energy proc~allocate_energy->proc~finalize_energy

Called by

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

Source Code

   subroutine allocate_energy(mesh, energy)
      type(mesh_t), intent(in) :: mesh
      type(energy_fields_t), intent(inout) :: energy

      call finalize_energy(energy)

      allocate(energy%T(mesh%ncells))
      allocate(energy%T_old(mesh%ncells))
      allocate(energy%h(mesh%ncells))
      allocate(energy%h_old(mesh%ncells))
      allocate(energy%qrad(mesh%ncells))
      allocate(energy%cp(mesh%ncells))
      allocate(energy%lambda(mesh%ncells))
      allocate(energy%rho_thermo(mesh%ncells))

      energy%T = zero
      energy%T_old = zero
      energy%h = zero
      energy%h_old = zero
      energy%qrad = zero
      energy%cp = zero
      energy%lambda = zero
      energy%rho_thermo = zero
      energy%initialized = .true.
   end subroutine allocate_energy