eval_model Function

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

Evaluate the model

Type Bound

model

Arguments

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

Vector position to evaluate at

Return Value real(kind=wp)


Source Code

    pure elemental function eval_model(this, pos) result(res)
        !! Evaluate the model

        class(model), intent(in) :: this
        !> Vector position to evaluate at
        type(vector), intent(in) :: pos
        real(kind=wp) :: res

        integer :: i

        res = this%array(1)%value%evaluate(pos)
        do i = 2, size(this%array)
            res = this%func(res, this%array(i)%value%evaluate(pos), this%k)
        end do

    end function eval_model