distribution_m.f90 Source File


Files dependent on this one

sourcefile~~distribution_m.f90~~AfferentGraph sourcefile~distribution_m.f90 distribution_m.f90 sourcefile~distribution_s.f90 distribution_s.F90 sourcefile~distribution_s.f90->sourcefile~distribution_m.f90 sourcefile~do_concurrent_m.f90 do_concurrent_m.f90 sourcefile~distribution_s.f90->sourcefile~do_concurrent_m.f90 sourcefile~matcha_m.f90 matcha_m.f90 sourcefile~matcha_m.f90->sourcefile~distribution_m.f90 sourcefile~t_cell_collection_m.f90 t_cell_collection_m.f90 sourcefile~matcha_m.f90->sourcefile~t_cell_collection_m.f90 sourcefile~output_m.f90 output_m.f90 sourcefile~matcha_m.f90->sourcefile~output_m.f90 sourcefile~matcha_s.f90 matcha_s.F90 sourcefile~matcha_s.f90->sourcefile~distribution_m.f90 sourcefile~matcha_s.f90->sourcefile~matcha_m.f90 sourcefile~matcha_s.f90->sourcefile~t_cell_collection_m.f90 sourcefile~t_cell_collection_m.f90->sourcefile~distribution_m.f90 sourcefile~do_concurrent_m.f90->sourcefile~t_cell_collection_m.f90 sourcefile~main.f90 main.f90 sourcefile~main.f90->sourcefile~matcha_m.f90 sourcefile~output_m.f90->sourcefile~t_cell_collection_m.f90 sourcefile~output_s.f90 output_s.f90 sourcefile~output_s.f90->sourcefile~t_cell_collection_m.f90 sourcefile~output_s.f90->sourcefile~do_concurrent_m.f90 sourcefile~output_s.f90->sourcefile~output_m.f90 sourcefile~t_cell_collection_s.f90 t_cell_collection_s.F90 sourcefile~t_cell_collection_s.f90->sourcefile~t_cell_collection_m.f90 sourcefile~do_concurrent_s.f90 do_concurrent_s.f90 sourcefile~do_concurrent_s.f90->sourcefile~do_concurrent_m.f90

Source Code

! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt
module distribution_m
  implicit none
  
  private
  public :: distribution_t
  
  type distribution_t
    private
    double precision, allocatable, dimension(:) :: vel_, cumulative_distribution_
  contains
    procedure :: cumulative_distribution
    procedure :: velocities
  end type  

  interface distribution_t
  
   pure module function construct(sample_distribution) result(distribution)
      implicit none
      double precision, intent(in) :: sample_distribution(:,:)
      type(distribution_t) distribution
    end function
    
  end interface
  
  interface
  
    pure module function cumulative_distribution(self) result(my_cumulative_distribution)
      implicit none
      class(distribution_t), intent(in) :: self
      double precision, allocatable :: my_cumulative_distribution(:)
    end function
    
    pure module function velocities(self, speeds, directions) result(my_velocities)
      !! Return the t_cell_collection_t object's velocity vectors
      implicit none
      class(distribution_t), intent(in) :: self
      double precision, intent(in) :: speeds(:,:), directions(:,:,:)
      double precision, allocatable :: my_velocities(:,:,:)
    end function velocities

  end interface

end module distribution_m