Finalizes the block object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(block_obj), | intent(inout) | :: | this |
A block object |
impure subroutine block_obj_Final(this) !> Finalizes the block object. implicit none class(block_obj), intent(inout) :: this !! A block object ! Work variables integer :: dir integer :: ierr ! Finalize axes do dir=1,3 call this%axis(dir)%Finalize() end do ! Nullify the convenience pointers ! nodal points ; midp points ; spacing this%x => null(); this%xm => null(); this%dxm => null() this%y => null(); this%ym => null(); this%dym => null() this%z => null(); this%zm => null(); this%dzm => null() ! Nullify pointer to master parallel object this%parallel => null() this%hdf5 => null() ! Finalize partition axes do dir=1,3 call this%axis_partition(dir)%Finalize() end do ! Restore defaults this%ngc = 2 this%periods(3) = .false. this%is_partitioned = .false. ! Free up MPI derived types if (this%is_initialized .eqv. .true.) then do dir=1,3 if (this%gc_slab_r(dir).ne.MPI_DATATYPE_NULL) & call MPI_TYPE_FREE(this%gc_slab_r(dir),ierr) if (this%gc_slab_i(dir).ne.MPI_DATATYPE_NULL) & call MPI_TYPE_FREE(this%gc_slab_i(dir),ierr) end do end if this%is_initialized = .false. return end subroutine block_obj_Final