copy the type sgrid, copies sf <= tocopy ... call sf%copy(tocopy)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sGrid), | intent(inout) | :: | sf |
self |
||
| class(c_sgrid), | intent(in) | :: | tocopy |
SUBROUTINE sGrid_copy( sf , tocopy) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(c_sgrid), INTENT(IN) :: tocopy !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES CLASS(t_sgrid), INTENT(INOUT) :: sf !! self !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES !=================================================================================================================================== SELECT TYPE(tocopy); TYPE IS(t_sgrid) IF(.NOT.tocopy%initialized) THEN CALL abort(__STAMP__, & "sgrid_copy: not initialized sgrid from which to copy!") END IF IF(sf%initialized) THEN SWRITE(UNIT_stdOut,'(A)')'WARNING!! reinit of sGrid copy!' CALL sf%free() END IF CALL sf%init(tocopy%nElems,tocopy%grid_type,tocopy%sp) END SELECT !TYPE END SUBROUTINE sGrid_copy