Perform minor checks on consistency of flags
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | geq | |||
logical, | intent(in) | :: | eeq | |||
logical, | intent(in) | :: | peq | |||
logical, | intent(in) | :: | leq | |||
logical, | intent(in) | :: | deq | |||
logical, | intent(in) | :: | ideq | |||
logical, | intent(in) | :: | ceq | |||
logical, | intent(in) | :: | gs2deq | |||
logical, | intent(in) | :: | teq | |||
integer, | intent(in) | :: | bishop |
subroutine check(geq, eeq, peq, leq, deq, ideq, ceq, gs2deq, teq, bishop)
use mp, only: mp_abort
implicit none
logical, intent(in) :: geq, eeq, peq, leq, deq, ideq, ceq, gs2deq, teq
integer, intent(in) :: bishop
integer :: nflag_set
if (.not.(geq .or. ideq) .and. bishop == 0) & !Possibly also need use_large_aspect if bishop == 0?
call mp_abort('bishop = 0 only compatible with geq or ideq',.true.)
nflag_set = count([geq, ceq, eeq, gs2deq, peq, teq, leq, deq, ideq])
if (nflag_set == 0) then
call mp_abort('Must set at least one equilibrium flag to true', .true.)
else if (nflag_set > 1) then
call mp_abort('More than one equilibrium flag to true, not allowed', .true.)
end if
end subroutine check