subroutine freeKMat() implicit none call kMatLin%freeMemory() call kMatSq%freeMemory() if (allocated(kMatProjEContrib)) deallocate(kMatProjEContrib) end subroutine freeKMat