eval_onion Function

private pure elemental function eval_onion(this, pos) result(res)

Evaluation function for Onion modifier.

Type Bound

onion

Arguments

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

Position to evaluate the modifier at

Return Value real(kind=wp)


Source Code

    pure elemental function eval_onion(this, pos) result(res)
        !! Evaluation function for Onion modifier.

        class(onion), intent(in) :: this
        !> Position to evaluate the modifier at
        type(vector), intent(IN) :: pos
        real(kind=wp) :: res

        res = abs(this%prim%evaluate(pos)) - this%thickness

    end function eval_onion