scalar_source Derived Type

type, public :: scalar_source

Coefficients/dimensions for a PDE source term with linear dependence on a scalar_field (SRC = sc + sp*phi_P)


Inherits

type~~scalar_source~~InheritsGraph type~scalar_source scalar_source type~dimensions dimensions type~scalar_source->type~dimensions dim

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
type(dimensions), private :: dim
real(kind=psb_dpk_), private :: sc

source offset (constant term)

real(kind=psb_dpk_), private :: sp

source scaling coefficient (multiplies scalar_field)


Type-Bound Procedures

generic, public :: create_source => create_scalar_source

generic, public :: dim_ => get_scalar_source_dim

generic, public :: nemo_sizeof => nemo_scalar_source_sizeof

generic, public :: sc_ => get_scalar_source_sc

generic, public :: sp_ => get_scalar_source_sp

procedure, private :: create_scalar_source

  • interface

    private module subroutine create_scalar_source(src, input_file, sec, dim)

    Define scalar source term

    Arguments

    Type IntentOptional AttributesName
    class(scalar_source), intent(inout) :: src
    character(len=*), intent(in) :: input_file
    character(len=*), intent(in) :: sec
    type(dimensions), intent(in) :: dim

procedure, private :: get_scalar_source_dim

  • interface

    private module function get_scalar_source_dim(src)

    result specifieds source dimensions

    Arguments

    Type IntentOptional AttributesName
    class(scalar_source), intent(in) :: src

    Return Value type(dimensions)

procedure, private :: get_scalar_source_sc

  • interface

    private module function get_scalar_source_sc(src)

    result is the source offset (constant term)

    Arguments

    Type IntentOptional AttributesName
    class(scalar_source), intent(in) :: src

    Return Value real(kind=psb_dpk_)

procedure, private :: get_scalar_source_sp

  • interface

    private module function get_scalar_source_sp(src)

    result is the source scaling coefficient

    Arguments

    Type IntentOptional AttributesName
    class(scalar_source), intent(in) :: src

    Return Value real(kind=psb_dpk_)

procedure, private :: nemo_scalar_source_sizeof

  • interface

    private module function nemo_scalar_source_sizeof(src)

    Arguments

    Type IntentOptional AttributesName
    class(scalar_source), intent(in) :: src

    Return Value integer(kind=nemo_int_long_)

Source Code

    TYPE scalar_source
      !! Coefficients/dimensions for a PDE source term with linear dependence on a scalar_field (SRC = sc + sp*phi_P)
        PRIVATE
        TYPE(dimensions) :: dim
        REAL(psb_dpk_) :: sc !! source offset (constant term)
        REAL(psb_dpk_) :: sp !! source scaling coefficient (multiplies scalar_field)
    CONTAINS
        PROCEDURE, PRIVATE :: create_scalar_source
        GENERIC, PUBLIC :: create_source => create_scalar_source
        PROCEDURE, PRIVATE :: get_scalar_source_sc, get_scalar_source_sp  ! Getters
        GENERIC, PUBLIC :: sc_ => get_scalar_source_sc
        GENERIC, PUBLIC :: sp_ => get_scalar_source_sp
        PROCEDURE, PRIVATE :: get_scalar_source_dim
        GENERIC, PUBLIC :: dim_ => get_scalar_source_dim   ! Getter
        PROCEDURE, PRIVATE :: nemo_scalar_source_sizeof
        GENERIC, PUBLIC :: nemo_sizeof => nemo_scalar_source_sizeof
    END TYPE scalar_source