Count the rank-local elements currently carrying the requested flag value (SELF_AMR_REFINE / SELF_AMR_KEEP / SELF_AMR_COARSEN). Provided as a convenience for drivers and tests; a global count across MPI ranks is the caller's responsibility.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(RefinementIndicator2D_t), | intent(in) | :: | this | |||
| integer, | intent(in) | :: | flagValue |
function CountFlagged_RefinementIndicator2D_t(this,flagValue) result(n)
!! Count the rank-local elements currently carrying the requested flag value
!! (SELF_AMR_REFINE / SELF_AMR_KEEP / SELF_AMR_COARSEN). Provided as a convenience for
!! drivers and tests; a global count across MPI ranks is the caller's responsibility.
implicit none
class(RefinementIndicator2D_t),intent(in) :: this
integer,intent(in) :: flagValue
integer :: n
! Local
integer :: iel
n = 0
do iel = 1,this%nElem
if(this%flag(iel) == flagValue) n = n+1
enddo
endfunction CountFlagged_RefinementIndicator2D_t