Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolcg committed Mar 27, 2024
1 parent d711efb commit df86051
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/CellDataTests/CellStatesTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,16 @@ r = r1*r2*h
#using Gridap.Visualization
#writevtk(x,"x",cellfields=["f"=>f,"g"=>g])

# Test for evaluating operations involving cellstates
model = CartesianDiscreteModel((0.0,1.0,0,1.0,0,1),(2,1,1))
Ω = Interior(model,[1,2])
Γ = Boundary(Ω)
= Measure(Ω,0)
= Measure(Γ,0)
a = CellState(1.0,dΩ)
b = CellState(1.0,dΓ)
id(z)=z
@test sum(((ida))dΩ) == sum((a)dΩ)
@test sum(((idb))dΓ) == sum((b)dΓ)

end # module

0 comments on commit df86051

Please sign in to comment.