growthterm Derived Type

type, public, extends(pbeterm) :: growthterm

Growth term class.


Inherits

type~~growthterm~~InheritsGraph type~growthterm growthterm type~pbeterm pbeterm type~growthterm->type~pbeterm weno weno type~growthterm->weno wenorec grid1 grid1 type~pbeterm->grid1 grid type~base base type~pbeterm->type~base

Inherited by

type~~growthterm~~InheritedByGraph type~growthterm growthterm type~pbe pbe type~pbe->type~growthterm growth

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: name

object name

character(len=:), public, allocatable :: msg

error message

integer, public :: ierr = 0

error code

logical, public :: inited = .false.

initialization flag

type(grid1), public, pointer :: grid => null()

pointer to grid object

real(kind=rk), public, allocatable :: udot(:)

net rate of change,


Constructor

public interface growthterm

  • private function growthterm_init(grid, g, k, name) result(self)

    Initialize growthterm object.

    Arguments

    Type IntentOptional Attributes Name
    type(grid1), intent(in) :: grid

    grid1 object

    procedure(gfnc_t) :: g

    growth rate function,

    integer, intent(in) :: k

    order of the WENO reconstruction (default=3)

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

    name (default="growth-term")

    Return Value type(growthterm)


Type-Bound Procedures

procedure, public, pass(self) :: set_name

  • private pure subroutine set_name(self, name, default)

    Setter method for name.

    Arguments

    Type IntentOptional Attributes Name
    class(base), intent(inout) :: self

    object

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

    name

    character(len=*), intent(in), optional :: default

    default name

procedure, public, pass(self) :: error_msg

  • private pure subroutine error_msg(self, msg)

    Error method.

    Arguments

    Type IntentOptional Attributes Name
    class(base), intent(inout) :: self

    object

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

    message

procedure, public, pass(self) :: check_inited

  • private pure subroutine check_inited(self)

    Check initialization method.

    Arguments

    Type IntentOptional Attributes Name
    class(base), intent(inout) :: self

    object

procedure, public, pass(self) :: set_grid

  • private subroutine set_grid(self, grid)

    Setter method for grid.

    Arguments

    Type IntentOptional Attributes Name
    class(pbeterm), intent(inout) :: self

    object

    type(grid1), intent(in), target :: grid

    grid1 object

procedure, public, pass(self) :: pbeterm_allocations

  • private pure subroutine pbeterm_allocations(self)

    Allocator for arrays of pbeterm class.

    Arguments

    Type IntentOptional Attributes Name
    class(pbeterm), intent(inout) :: self

    object

procedure, public, pass(self) :: eval => growthterm_eval

  • private pure subroutine growthterm_eval(self, u, y, udot)

    Evaluate rate of particle growth at a given instant .

    Arguments

    Type IntentOptional Attributes Name
    class(growthterm), intent(inout) :: self

    object

    real(kind=rk), intent(in) :: u(:)

    cell-average number density,

    real(kind=rk), intent(in) :: y(:)

    environment vector,

    real(kind=rk), intent(out), optional :: udot(:)

    net rate of change,

Source Code

   type, extends(pbeterm) :: growthterm
   !! Growth term class.
      private
      procedure(gfnc_t), nopass, pointer :: gfnc => null()
         !! growth rate function
      type(weno) :: wenorec
         !! WENO reconstruction
      real(rk), allocatable :: uleft(:)
         !! left reconstruction of number density function
      real(rk), allocatable :: uright(:)
         !! right reconstruction of number density function
      real(rk), allocatable :: flux_edges(:)
         !! flux at grid edges
   contains
      procedure, pass(self), public :: eval => growthterm_eval
   end type growthterm