output_m.f90 Source File


This file depends on

sourcefile~~output_m.f90~~EfferentGraph sourcefile~output_m.f90 output_m.f90 sourcefile~input_m.f90 input_m.f90 sourcefile~output_m.f90->sourcefile~input_m.f90 sourcefile~t_cell_collection_m.f90 t_cell_collection_m.f90 sourcefile~output_m.f90->sourcefile~t_cell_collection_m.f90 sourcefile~distribution_m.f90 distribution_m.f90 sourcefile~t_cell_collection_m.f90->sourcefile~distribution_m.f90

Files dependent on this one

sourcefile~~output_m.f90~~AfferentGraph sourcefile~output_m.f90 output_m.f90 sourcefile~matcha_m.f90 matcha_m.f90 sourcefile~matcha_m.f90->sourcefile~output_m.f90 sourcefile~output_s.f90 output_s.f90 sourcefile~output_s.f90->sourcefile~output_m.f90 sourcefile~main.f90 main.f90 sourcefile~main.f90->sourcefile~matcha_m.f90 sourcefile~matcha_s.f90 matcha_s.F90 sourcefile~matcha_s.f90->sourcefile~matcha_m.f90

Source Code

! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt
module output_m
  !! Output data abstraction
  use input_m, only : input_t
  use t_cell_collection_m, only : t_cell_collection_t
  implicit none
  
  private
  public :: output_t
  
  type output_t
    !! Encapsulate an input/result pair
    private
    type(input_t) input_
    type(t_cell_collection_t), allocatable :: history_(:)
  contains
    procedure :: simulated_distribution
    procedure :: my_num_cells
  end type
  
  interface output_t

    pure module function construct(input, history) result(output)
      !! Construct a new output_t object
      implicit none
      type(input_t), intent(in) :: input
      type(t_cell_collection_t), intent(in) :: history(:)
      type(output_t) :: output
    end function

  end interface

  interface
    
    module function simulated_distribution(self) result(output_distribution)
      !! The result is a histogram calculated from the simulation output
      implicit none
      class(output_t), intent(in) :: self
      double precision, allocatable :: output_distribution(:,:)
    end function
    
    pure module function my_num_cells(self) result(num_cells)
      implicit none
      class(output_t), intent(in) :: self
      integer num_cells
    end function
    
  end interface
  
end module output_m