Coefficients/dimensions for a PDE source term with linear dependence on a scalar_field (SRC = sc + sp*phi_P)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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) |
Define scalar source term
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scalar_source), | intent(inout) | :: | src | |||
| character(len=*), | intent(in) | :: | input_file | |||
| character(len=*), | intent(in) | :: | sec | |||
| type(dimensions), | intent(in) | :: | dim |
result specifieds source dimensions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scalar_source), | intent(in) | :: | src |
result is the source offset (constant term)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scalar_source), | intent(in) | :: | src |
result is the source scaling coefficient
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scalar_source), | intent(in) | :: | src |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scalar_source), | intent(in) | :: | src |
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