Set the locality of each object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(cell_type), | intent(inout) | :: | self | |||
class(pc_type), | intent(in) | :: | pc |
subroutine c_set_locality(self, pc)
use kt_grids, only: aky, akx
implicit none
class(cell_type), intent(inout) :: self
class(pc_type), intent(in) :: pc
!Set our locality. Note here we assume all rb have same size
if(size(self%rb)>0)then
self%is_empty=self%rb(1)%nrow==0
self%is_all_local=self%rb(1)%nrow==self%nrow
else
self%is_empty=.true.
self%is_all_local=.false.
endif
!/Also ignore the ky=kx=0 mode
self%is_empty=(self%is_empty.or.(abs(aky(self%ik_ind))<epsilon(0.0).and.abs(akx(self%it_ind))<epsilon(0.0)))
self%is_local=pc%is_local(self%it_ind,self%ik_ind)==1
end subroutine c_set_locality