Evaluate the model
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(model), | intent(in) | :: | this | |||
type(vector), | intent(in) | :: | pos |
Vector position to evaluate at |
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