mbe_base_destroy Subroutine

private subroutine mbe_base_destroy(this)

Clean up base class resources

Type Bound

many_body_expansion_t

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(inout) :: this

Calls

proc~~mbe_base_destroy~~CallsGraph proc~mbe_base_destroy many_body_expansion_t%mbe_base_destroy proc~system_destroy system_geometry_t%system_destroy proc~mbe_base_destroy->proc~system_destroy

Called by

proc~~mbe_base_destroy~~CalledByGraph proc~mbe_base_destroy many_body_expansion_t%mbe_base_destroy proc~gmbe_destroy gmbe_context_t%gmbe_destroy proc~gmbe_destroy->proc~mbe_base_destroy proc~mbe_destroy mbe_context_t%mbe_destroy proc~mbe_destroy->proc~mbe_base_destroy

Source Code

   subroutine mbe_base_destroy(this)
      !! Clean up base class resources
      class(many_body_expansion_t), intent(inout) :: this

      if (allocated(this%sys_geom)) then
         call this%sys_geom%destroy()
         deallocate (this%sys_geom)
      end if
      if (allocated(this%node_leader_ranks)) deallocate (this%node_leader_ranks)

      ! Clear pointers (don't deallocate - we don't own these)
      this%resources => null()
      this%driver_config => null()

      ! Reset scalars
      this%num_nodes = 1
      this%calc_type = 0
   end subroutine mbe_base_destroy