sdf Derived Type

type, public, extends(sdf_base) :: sdf

Container type that allows the use of arrays of different SDF shapes


Components

Type Visibility Attributes Name Initial
integer, public :: layer

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

real(kind=wp), public :: transform(4,4)

Transform to apply to SDF.

class(sdf_base), public, allocatable :: value

Container for any SDF that inherits from SDF_base


Constructor

public interface sdf

  • private function sdf_new(rhs) result(lhs)

    sdf initializer

    Arguments

    Type IntentOptional Attributes Name
    class(sdf_base), intent(in) :: rhs

    Return Value type(sdf)


Type-Bound Procedures

generic, public :: assignment(=) => sdf_assign

  • private subroutine sdf_assign(lhs, rhs)

    sdf initializer

    Arguments

    Type IntentOptional Attributes Name
    class(sdf), intent(inout) :: lhs
    class(sdf_base), intent(in) :: rhs

procedure, public :: evaluate => sdf_evaluate

  • private pure elemental function sdf_evaluate(this, pos) result(res)

    Evaluate the SDF at a given position.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf), intent(in) :: this
    type(vector), intent(in) :: pos

    Return Value real(kind=wp)

procedure, public :: getAlbedo

  • private function getAlbedo(this) result(res)

    Return albedo for the current SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf) :: this

    Return Value real(kind=wp)

procedure, public :: getG2 => getg2

  • private function getg2(this) result(res)

    Return factor for the current SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf) :: this

    Return Value real(kind=wp)

procedure, public :: getKappa

  • private function getKappa(this) result(res)

    Return for the current SDF

    Arguments

    Type IntentOptional Attributes Name
    class(sdf) :: this

    Return Value real(kind=wp)

procedure, public :: getMua

  • private function getMua(this) result(res)

    Return for the current SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf) :: this

    Return Value real(kind=wp)

procedure, public :: getN

  • private function getN(this) result(res)

    Return refractive index for the current SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf) :: this

    Return Value real(kind=wp)

procedure, public :: gethgg

  • private function gethgg(this) result(res)

    Return g-factor for the current SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf) :: this

    Return Value real(kind=wp)

procedure, private :: sdf_assign

  • private subroutine sdf_assign(lhs, rhs)

    sdf initializer

    Arguments

    Type IntentOptional Attributes Name
    class(sdf), intent(inout) :: lhs
    class(sdf_base), intent(in) :: rhs

Source Code

    type, extends(sdf_base) :: sdf
        !> Container for any SDF that inherits from SDF_base
        class(sdf_base), allocatable :: value
        contains
            procedure :: getKappa
            procedure :: getAlbedo
            procedure :: getMua, gethgg, getG2, getN
            procedure :: evaluate => sdf_evaluate
            procedure, private :: sdf_assign
            generic :: assignment(=) => sdf_assign
    end type sdf