compare sf with the input type fBase
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_fBase), | intent(in) | :: | sf |
self |
||
| type(t_fBase), | intent(in) | :: | tocompare | |||
| logical, | intent(out), | optional | :: | is_same | ||
| logical, | intent(out), | optional | :: | cond_out(:) |
SUBROUTINE fBase_compare( sf , tocompare,is_same, cond_out) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_fBase), INTENT(IN ) :: sf !! self TYPE(t_fBase), INTENT(IN ) :: tocompare !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES LOGICAL,OPTIONAL,INTENT( OUT) :: is_same LOGICAL,OPTIONAL,INTENT( OUT) :: cond_out(:) !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES LOGICAL :: cond(5) !=================================================================================================================================== IF(.NOT.tocompare%initialized) THEN CALL abort(__STAMP__, & "fBase_compare: tried to compare with non-initialized fBase!") END IF cond(1)= ALL( sf%mn_max(:) .EQ. tocompare%mn_max(:) ) cond(2)= ( sf%nfp .EQ. tocompare%nfp ) cond(3)= ( sf%modes .EQ. tocompare%modes ) cond(4)= ( sf%sin_cos .EQ. tocompare%sin_cos ) cond(5)= ( sf%exclude_mn_zero.EQV. tocompare%exclude_mn_zero ) IF(PRESENT(is_same)) is_same=ALL(cond) IF(PRESENT(cond_out)) cond_out(1:5)=cond END SUBROUTINE fBase_compare