compare to sf grid with input grid to see if they are the same
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sGrid), | intent(in) | :: | sf |
self |
||
| class(c_sgrid), | intent(in) | :: | tocompare | |||
| logical, | intent(out) | :: | is_same |
SUBROUTINE sGrid_compare( sf , tocompare,is_same) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_sgrid), INTENT(IN ) :: sf !! self CLASS(c_sgrid), INTENT(IN ) :: tocompare !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES LOGICAL , INTENT( OUT) :: is_same ! !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES LOGICAL :: cond(2) !=================================================================================================================================== SELECT TYPE(tocompare); TYPE IS(t_sgrid) IF(.NOT.tocompare%initialized) THEN CALL abort(__STAMP__, & "sgrid_compare: tried to compare with a not initialized sgrid!") END IF cond(1)=(sf%nElems.EQ.tocompare%nElems) cond(2)=(sf%grid_type.EQ.tocompare%grid_type) is_same=ALL(cond) !IF(.NOT.is_same) WRITE(*,*)'DEBUG,grid is not same... nElems ',cond(1),', grid_type', cond(2) END SELECT !TYPE END SUBROUTINE sGrid_compare