Allocates Cell array in Eulerian object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
impure subroutine eulerian_obj_Allocate(this) !> Allocates Cell array in Eulerian object. implicit none class(eulerian_obj_base), intent(inout) :: this !! An Eulerian object ! Work variables integer :: ierr associate (lo => this%block%lo, hi => this%block%hi, ngc=> this%block%ngc) select type (this) type is (eulerian_obj_r) allocate(this%cell(lo(1)-ngc:hi(1)+ngc,lo(2)-ngc:hi(2)+ngc,lo(3)-ngc:hi(3)+ngc), & source = 0.0_wp, stat=ierr) if (ierr.ne.0) call this%parallel%Stop('Unable to allocate Eulerian object '//this%name) type is (eulerian_obj_i) allocate(this%cell(lo(1)-ngc:hi(1)+ngc,lo(2)-ngc:hi(2)+ngc,lo(3)-ngc:hi(3)+ngc), & source = 0, stat=ierr) if (ierr.ne.0) call this%parallel%Stop('Unable to allocate Eulerian object '//this%name) end select end associate return end subroutine eulerian_obj_Allocate