lattice_deconstructor Subroutine

public subroutine lattice_deconstructor(this)

Arguments

Type IntentOptional Attributes Name
class(lattice), pointer :: this

Contents

Source Code


Source Code

    subroutine lattice_deconstructor(this)
        ! routine to nullify the pointer to a lattice class
        class(lattice), pointer :: this

        ! first be sure that no sites are allocated
        call this%deallocate_sites()

        nullify (this)

        select type (this)
        class is (aim)
            deallocate(this%impurity_sites)
            deallocate(this%bath_sites)
        end select

    end subroutine lattice_deconstructor