# Logical line comparison of a operation cell field and float number

**URL:** https://discourse.julialang.org/t/logical-line-comparison-of-a-operation-cell-field-and-float-number/101919
**Category:** New to Julia
**Tags:** question, gridap
**Created:** [July 22, 2023, 6:34am UTC](https://discourse.julialang.org/t/logical-line-comparison-of-a-operation-cell-field-and-float-number/101919 "2023-07-22T06:34:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mary/32/53139_2.png) [@mary](https://discourse.julialang.org/u/mary)
#### Post date: [July 22, 2023, 6:34am UTC](https://discourse.julialang.org/t/logical-line-comparison-of-a-operation-cell-field-and-float-number/101919/1 "2023-07-22T06:34:57Z")

</div>

Hi, I want to do below if line code but left hand side is an operationcellfield while right hand side is float. do you know how can i make this comparison? actually i need to get the final value of summation over operation cell field to make comparison but i dont know how to do this in gridap. dv is elements volume vector

```julia
pfh = FEFunction(fem_params.Pf, pf_vec)
        pth = (pf -> Threshold(pf; β, η)) ∘ pfh
        if sum∘(pth⊙dv) > 0.55*sum(dv)

```

I’ll appreciate any suggestion.

---

<div class="post-metadata">

### Author: ![mary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mary/32/53139_2.png) [@mary](https://discourse.julialang.org/u/mary)
#### Post date: [July 22, 2023, 10:46pm UTC](https://discourse.julialang.org/t/logical-line-comparison-of-a-operation-cell-field-and-float-number/101919/2 "2023-07-22T22:46:26Z")

</div>

i have written below code to find that but it seems the output is not correct. as i need the value of cell. i just evaluate values at nodes but it is the same in each cell for 3 nodes

```julia
pfh = FEFunction(fem_params.Pf, pf_vec)
        pth = (pf -> Threshold(pf; β, η)) ∘ pfh
        pthxtr = evaluate(pth⊙dv,getpoints)
        if sum(pthxtr)[1]> 0.5*sum(dv)

```

i really need your knowledge in julia and gridap  
thanks
