Allocate all energy arrays for the mesh.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_t), | intent(in) | :: | mesh | |||
| type(energy_fields_t), | intent(inout) | :: | energy |
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