capsule Derived Type

type, public, extends(sdf_base) :: capsule

Capsule SDF


Components

Type Visibility Attributes Name Initial
type(vector), public :: a
type(vector), public :: b
integer, public :: layer

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

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

Transform to apply to SDF.


Constructor

public interface capsule

Interface to capsule SDF initialising function

  • private function capsule_init(a, b, r, optProp, layer, transform) result(out)

    Initalising function for capsule SDF.

    Arguments

    Type IntentOptional Attributes Name
    type(vector), intent(in) :: a

    Capsule startpoint

    type(vector), intent(in) :: b

    Capsule endpoint

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

    Capsule radius

    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(capsule)


Type-Bound Procedures

procedure, public :: evaluate => evaluate_capsule

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

    Evaluation function for Capsule SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(capsule), 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) :: capsule
        type(vector)  :: a, b
        real(kind=wp) :: r
        contains
        procedure :: evaluate => evaluate_capsule
    end type capsule