egg Derived Type

type, public, extends(sdf_base) :: egg

Egg SDF


Components

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

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

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

Transform to apply to SDF.


Constructor

public interface egg

Interface to egg SDF initialising function

  • private function egg_init(r1, r2, h, optProp, layer, transform) result(out)

    Initalising function for egg SDF. makes a Moss egg. ref.

    Arguments

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

    R1 controls "fatness" of the egg. Actually controls the base circle radius.

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

    R2 contorls the pointiness of the egg. Actually controls radius of top circle.

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

    h controls the height of the egg. Actually controls y position of top circle.

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


Type-Bound Procedures

procedure, public :: evaluate => evaluate_egg

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

    Evaluation function for Egg SDF. ref

    Arguments

    Type IntentOptional Attributes Name
    class(egg), 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) :: egg
        real(kind=wp) :: r1, r2, h
        contains
        procedure :: evaluate => evaluate_egg
    end type egg