triprism Derived Type

type, public, extends(sdf_base) :: triprism

Triprisim SDF


Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: h1
real(kind=wp), public :: h2
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.


Constructor

public interface triprism

Interface to triprisim SDF initialising function

  • private function triprism_init(h1, h2, optProp, layer, transform) result(out)

    Initalising function for triprisim SDF.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: h1

    Height of triprisim

    real(kind=wp), intent(in) :: h2

    length of triprisim

    type(opticalProp_t), intent(in) :: optProp

    Optical properties of the SDF

    integer, intent(in) :: layer

    ID number of sdf

    real(kind=wp), intent(in), optional :: transform(4,4)

    Optional transform to apply to SDF

    Return Value type(triprism)


Type-Bound Procedures

procedure, public :: evaluate => evaluate_triprism

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

    Evaluation function for Triprisim SDF.

    Arguments

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

    vector position to evaluate SDF at

    Return Value real(kind=wp)

Source Code

    type, extends(sdf_base) :: triprism
        real(kind=wp) :: h1, h2
        contains
        procedure :: evaluate => evaluate_triprism
    end type triprism