subroutine Free_SEMQuad(myGeom)
implicit none
class(SEMQuad),intent(inout) :: myGeom
call myGeom%x%Free()
call myGeom%dxds%Free()
call myGeom%dsdx%Free()
call myGeom%nHat%Free()
call myGeom%nScale%Free()
call myGeom%J%Free()
! Cached GenerateFromMesh scratch (Stage 6c).
if(myGeom%scratchReady) then
call myGeom%xMesh%Free()
call myGeom%meshToModel%Free()
deallocate(myGeom%meshToModel)
myGeom%meshToModel => null()
myGeom%scratchReady = .false.
myGeom%scratchNGeo = -1
endif
endsubroutine Free_SEMQuad