eval_elongate Function

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

Evaluation function for Elongate modifier.

Type Bound

elongate

Arguments

Type IntentOptional Attributes Name
class(elongate), 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_elongate(this, pos) result(res)
        !! Evaluation function for Elongate modifier.

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

        real(kind=wp) :: w
        type(vector) :: q

        q = abs(pos) - this%size
        w = min(max(q%x, max(q%y, q%z)), 0._wp)

        res = this%prim%evaluate(max(q, 0._wp)) + w

    end function eval_elongate