subroutine Free_Points_t(this)
implicit none
class(Points_t),intent(inout) :: this
if(allocated(this%x)) deallocate(this%x)
if(associated(this%elements)) deallocate(this%elements)
if(associated(this%coordinates)) deallocate(this%coordinates)
if(associated(this%lS_cache)) deallocate(this%lS_cache)
if(associated(this%lT_cache)) deallocate(this%lT_cache)
if(associated(this%lU_cache)) deallocate(this%lU_cache)
this%elements => null()
this%coordinates => null()
this%lS_cache => null()
this%lT_cache => null()
this%lU_cache => null()
this%nPoints = 0
this%nDim = 0
this%nCached = 0
endsubroutine Free_Points_t