twist Derived Type

type, public, extends(sdf_base) :: twist

Twist a SDF


Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: k
integer, public :: layer

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

class(sdf_base), public, pointer :: prim
real(kind=wp), public :: transform(4,4)

Transform to apply to SDF.


Constructor

public interface twist

  • private function twist_init(prim, k) result(out)

    Initialise the twist modifier for a SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(sdf_base), target :: prim

    SDF to modify

    real, intent(in) :: k

    Twist parameter.

    Return Value type(twist)


Type-Bound Procedures

procedure, public :: evaluate => eval_twist

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

    Evaluation function for Twist modifier.

    Arguments

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

    Position to evaluate the modifier at

    Return Value real(kind=wp)

Source Code

    type, extends(sdf_base) :: twist
        real(kind=wp) :: k
        class(sdf_base), pointer :: prim
        contains
        procedure :: evaluate => eval_twist
    end type twist