sGrid_copy Subroutine

private subroutine sGrid_copy(sf, tocopy)

copy the type sgrid, copies sf <= tocopy ... call sf%copy(tocopy)

Type Bound

t_sGrid

Arguments

Type IntentOptional Attributes Name
class(t_sGrid), intent(inout) :: sf

self

class(c_sgrid), intent(in) :: tocopy

Calls

proc~~sgrid_copy~~CallsGraph proc~sgrid_copy t_sGrid%sGrid_copy proc~sgrid_init t_sGrid%sGrid_init proc~sgrid_copy->proc~sgrid_init swrite swrite proc~sgrid_copy->swrite proc~sgrid_init->swrite proc~sgrid_test sGrid_test proc~sgrid_init->proc~sgrid_test proc~sgrid_test->proc~sgrid_init proc~sgrid_test->swrite proc~sgrid_compare t_sGrid%sGrid_compare proc~sgrid_test->proc~sgrid_compare proc~sgrid_find_elem t_sGrid%sGrid_find_elem proc~sgrid_test->proc~sgrid_find_elem

Called by

proc~~sgrid_copy~~CalledByGraph proc~sgrid_copy t_sGrid%sGrid_copy proc~transform_sfl_new transform_sfl_new proc~transform_sfl_new->proc~sgrid_copy

Source Code

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