Lines Matching full:v
66 v = CeedVector(c, n)
67 @test size(v) == (n,)
68 @test length(v) == n
69 @test axes(v) == (1:n,)
70 @test ndims(v) == 1
73 v[] = 0.0
74 @test @witharray(a = v, all(a .== 0.0))
80 v[] = v1
82 @test norm(v, p) ≈ norm(v1, p)
84 @test_throws Exception norm(v, 3)
85 @test witharray_read(sum, v) == sum(v1)
86 reciprocal!(v)
87 @test @witharray(a = v, mtype = MEM_HOST, all(a .== CeedScalar(1.0)./v1))
89 witharray(x -> x .= 1.0, v)
90 @test @witharray(a = v, all(a .== 1.0))
92 @test summarystr(v) == "$n-element CeedVector"
93 @test sprint(show, v) == @witharray_read(a = v, sprint(show, a))
95 summary(io, v)
97 @witharray_read(a = v, Base.print_array(io, a))
99 @test showstr(v) == s1
101 setarray!(v, MEM_HOST, USE_POINTER, v1)
102 syncarray!(v, MEM_HOST)
103 @test @witharray_read(a = v, a == v1)
104 p = takearray!(v, MEM_HOST)
191 v = rand(CeedScalar, 2)
192 vq = apply(b3, v)
193 vd = apply(b3, v; emode=EVAL_GRAD)
194 @test vq ≈ b1d*v
195 @test vd ≈ d1d*v
211 V = zeros(CeedScalar, dim*(dim + 1)÷2)
212 setvoigt!(V, J, D)
213 @test V == setvoigt(J, D)
215 getvoigt!(J2, V, D)
243 v = rand(CeedScalar, n)
244 v1 = CeedVector(c, v)
337 v = rand(CeedScalar, Q)
338 v1 = CeedVector(c, v)
341 @test @witharray(a = v2, a == v)
346 @test @witharray(a = v2, a == v)