pbesol Derived Type

type, public, extends(base) :: pbesol

1D PBE solution class.


Inherits

type~~pbesol~~InheritsGraph type~pbesol pbesol type~base base type~pbesol->type~base

Contents

Source Code


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

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

vector(npoints) of time points

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

array(ncells,npoints) of

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

array(nenvs,npoints) of

integer, public :: nfev = 0

number of evaluations of

logical, public :: success = .false.

flag indicating if integration was successfull


Constructor

public interface pbesol

  • private pure function pbesol_init(npoints, ncells, nenvs) result(res)

    Initialize pbesol object.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: npoints

    number of time points, i.e. size(times)

    integer, intent(in) :: ncells

    number of grid cells, i.e. size(u)

    integer, intent(in) :: nenvs

    number of environment variables, i.e. size(y)

    Return Value type(pbesol)


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) :: write => pbesol_write

  • private subroutine pbesol_write(self, basename)

    Write content of pbesolto file.

    Arguments

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

    object

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

    base name

Source Code

   type, extends(base) :: pbesol
   !! 1D PBE solution class.
      real(rk), allocatable :: t(:)
         !! vector(npoints) of time points
      real(rk), allocatable :: u(:, :)
         !! array(ncells,npoints) of \( \bar{u}_i(t_k) \)
      real(rk), allocatable :: y(:, :)
         !! array(nenvs,npoints) of \( {y}_j(t_k) \)
      integer :: nfev = 0
         !! number of evaluations of \( d\bar{\textbf{u}}/dt \)
      logical :: success = .false.
         !! flag indicating if integration was successfull
   contains
      procedure, pass(self), public :: write => pbesol_write
   end type pbesol