lagrangian_set_Init Subroutine

private impure subroutine lagrangian_set_Init(this, name, block, parallel)

Initialize lagrangian objects related IO.

Type Bound

lagrangian_set

Arguments

Type IntentOptional Attributes Name
class(lagrangian_set), intent(inout) :: this

A set of Lagrangian objects

character(len=*), intent(in) :: name

Variable name

type(block_obj), intent(in), target :: block

A block object

type(parallel_obj), intent(in), target :: parallel

Parallel structure to link with


Calls

proc~~lagrangian_set_init~~CallsGraph proc~lagrangian_set_init lagrangian_set%lagrangian_set_Init SetObjectType SetObjectType proc~lagrangian_set_init->SetObjectType proc~lagrangian_set_creatempitype lagrangian_set%lagrangian_set_CreateMPIType proc~lagrangian_set_init->proc~lagrangian_set_creatempitype proc~lagrangian_set_resize lagrangian_set%lagrangian_set_Resize proc~lagrangian_set_init->proc~lagrangian_set_resize SetMPIDataTypeParams SetMPIDataTypeParams proc~lagrangian_set_creatempitype->SetMPIDataTypeParams mpi_type_commit mpi_type_commit proc~lagrangian_set_creatempitype->mpi_type_commit mpi_type_create_resized mpi_type_create_resized proc~lagrangian_set_creatempitype->mpi_type_create_resized mpi_type_create_struct mpi_type_create_struct proc~lagrangian_set_creatempitype->mpi_type_create_struct mpi_type_get_extent mpi_type_get_extent proc~lagrangian_set_creatempitype->mpi_type_get_extent mpi_type_size mpi_type_size proc~lagrangian_set_creatempitype->mpi_type_size

Source Code

    impure subroutine lagrangian_set_Init(this,name,block,parallel)
      !> Initialize lagrangian objects related IO.
      implicit none
      class(lagrangian_set), intent(inout) :: this                             !! A set of Lagrangian objects
      character(len=*),      intent(in)    :: name                             !! Variable name
      type(block_obj),       intent(in),    &
                                    target :: block                            !! A block object
      type(parallel_obj),    intent(in),    &
                                    target :: parallel                         !! Parallel structure to link with

      ! Point to the master objects
      this%parallel => parallel
      this%block    => block

      ! Allocate arrays
      allocate(this%count_proc(this%parallel%nproc))
      this%count_proc(:)=0

      ! Set name of variable
      this%name=trim(adjustl(name))

      ! Set sample type
       call this%SetObjectType()

      ! Initialize array with length zero
      call this%Resize(0)

      ! Create MPI type
      this%MPI_TYPE = MPI_DATATYPE_NULL
      call this%CreateMPIType

      ! Turn on flag
      this%is_initialized = .true.

      return
    end subroutine lagrangian_set_Init