torus Derived Type

type, public, extends(sdf_base) :: torus

Torus SDF


Components

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

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

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

Transform to apply to SDF.


Constructor

public interface torus

Interface to torus SDF initialising function

  • private function torus_init(oradius, iradius, optProp, layer, transform) result(out)

    Initalising function for Torus SDF.

    Arguments

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

    Outer radius of Torus

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

    Inner radius of Torus

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


Type-Bound Procedures

procedure, public :: evaluate => evaluate_torus

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

    Evaluation function for Torus SDF.

    Arguments

    Type IntentOptional Attributes Name
    class(torus), 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) :: torus
        real(kind=wp) :: oradius, iradius
        contains
        procedure :: evaluate => evaluate_torus
    end type torus