| /libCEED/julia/LibCEED.jl/src/ |
| H A D | CeedVector.jl | 37 destroy(v::CeedVector) = C.CeedVectorDestroy(v.ref) # COV_EXCL_LINE 38 Base.getindex(v::CeedVector) = v.ref[] 40 Base.summary(io::IO, v::CeedVector) = print(io, length(v), "-element CeedVector") 41 function Base.show(io::IO, ::MIME"text/plain", v::CeedVector) 42 summary(io, v) 44 witharray_read(v, MEM_HOST) do arr 48 Base.show(io::IO, v::CeedVector) = witharray_read(a -> show(io, a), v, MEM_HOST) 50 function Base.length(::Type{T}, v::CeedVector) where {T} 52 C.CeedVectorGetLength(v[], len) 58 Base.axes(v::CeedVector) = (Base.OneTo(length(v)),) [all …]
|
| H A D | Misc.jl | 42 @inline function setvoigt!(V, J, ::CeedDim{1}) argument 43 @inbounds V[1] = J[1] 46 @inline function setvoigt!(V, J, ::CeedDim{2}) argument 48 V[1] = J[1] 49 V[2] = J[4] 50 V[3] = J[2] 54 @inline function setvoigt!(V, J, ::CeedDim{3}) argument 56 V[1] = J[1] 57 V[2] = J[5] 58 V[3] = J[9] [all …]
|
| /libCEED/examples/ |
| H A D | bps.md | 14 …, posed as a weak form on a Hilbert space $V^p \subset H^1$, i.e., find $u \in V^p$ such that for … 17 \langle v,u \rangle = \langle v,f \rangle , 20 …v,u\rangle$ and $\langle v,f\rangle$ express the continuous bilinear and linear forms, respectivel… 23 \begin{aligned} \langle v,u \rangle &:= \int_{\Omega} \, v \, u \, dV ,\\ \langle v,f \rangle &:= \… 31 v(\bm x) &= \sum_{i=1}^n v_i \, \phi_i(\bm x) . 35 The coefficients $\{u_j\}$ and $\{v_i\}$ are the nodal values of $u$ and $v$, respectively. 39 \langle v,u \rangle = \bm v^T M \bm u , \qquad \langle v,f\rangle = \bm v^T \bm b \,. 54 …ned via the following variational formulation, i.e., find $u \in V^p$ such that for all $v \in V^p$ 57 a(v,u) = \langle v,f \rangle , \, 60 where now $a (v,u)$ expresses the continuous bilinear form defined on $V^p$ for sufficiently regula… [all …]
|
| /libCEED/examples/fluids/qfunctions/ |
| H A D | turb_spanstats.h | 16 CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in ChildStatsCollection() local 28 v[TURB_MEAN_DENSITY][i] = wdetJ * s.U.density; in ChildStatsCollection() 29 v[TURB_MEAN_PRESSURE][i] = wdetJ * s.Y.pressure; in ChildStatsCollection() 30 v[TURB_MEAN_PRESSURE_SQUARED][i] = wdetJ * Square(s.Y.pressure); in ChildStatsCollection() 31 v[TURB_MEAN_PRESSURE_VELOCITY_X][i] = wdetJ * s.Y.pressure * s.Y.velocity[0]; in ChildStatsCollection() 32 v[TURB_MEAN_PRESSURE_VELOCITY_Y][i] = wdetJ * s.Y.pressure * s.Y.velocity[1]; in ChildStatsCollection() 33 v[TURB_MEAN_PRESSURE_VELOCITY_Z][i] = wdetJ * s.Y.pressure * s.Y.velocity[2]; in ChildStatsCollection() 34 v[TURB_MEAN_DENSITY_TEMPERATURE][i] = wdetJ * s.U.density * s.Y.temperature; in ChildStatsCollection() 35 …v[TURB_MEAN_DENSITY_TEMPERATURE_FLUX_X][i] = wdetJ * s.U.density * s.Y.temperature * s.Y.velocity[… in ChildStatsCollection() 36 …v[TURB_MEAN_DENSITY_TEMPERATURE_FLUX_Y][i] = wdetJ * s.U.density * s.Y.temperature * s.Y.velocity[… in ChildStatsCollection() [all …]
|
| H A D | utils.h | 47 CEED_QFUNCTION_HELPER CeedScalar DotN(const CeedScalar *u, const CeedScalar *v, const CeedInt N) { in DotN() argument 49 CeedPragmaSIMD for (CeedInt i = 0; i < N; i++) output += u[i] * v[i]; in DotN() 54 …dScalar Dot3(const CeedScalar *u, const CeedScalar *v) { return u[0] * v[0] + u[1] * v[1] + u[2] *… in Dot3() argument 57 CEED_QFUNCTION_HELPER void Cross3(const CeedScalar u[3], const CeedScalar v[3], CeedScalar w[3]) { in Cross3() 58 w[0] = (u[1] * v[2]) - (u[2] * v[1]); in Cross3() 59 w[1] = (u[2] * v[0]) - (u[0] * v[2]); in Cross3() 60 w[2] = (u[0] * v[1]) - (u[1] * v[0]); in Cross3() 64 CEED_QFUNCTION_HELPER void Curl3(const CeedScalar gradient[3][3], CeedScalar v[3]) { in Curl3() 65 v[0] = gradient[2][1] - gradient[1][2]; in Curl3() 66 v[1] = gradient[0][2] - gradient[2][0]; in Curl3() [all …]
|
| H A D | newtonian_state.h | 43 CEED_QFUNCTION_HELPER void UnpackState_V(StateEntropy s, CeedScalar V[5]) { in UnpackState_V() 44 V[0] = s.S_density; in UnpackState_V() 45 for (int i = 0; i < 3; i++) V[i + 1] = s.S_momentum[i]; in UnpackState_V() 46 V[4] = s.S_energy; in UnpackState_V() 99 StateEntropy V; in StateEntropyFromPrimitive() local 106 V.S_density = (gamma - entropy) / (gamma - 1) - rho_div_p * e_kinetic; in StateEntropyFromPrimitive() 107 for (int i = 0; i < 3; i++) V.S_momentum[i] = rho_div_p * Y.velocity[i]; in StateEntropyFromPrimitive() 108 V.S_energy = -rho_div_p; in StateEntropyFromPrimitive() 109 return V; in StateEntropyFromPrimitive() 130 …ION_HELPER StatePrimitive StatePrimitiveFromEntropy(NewtonianIdealGasContext gas, StateEntropy V) { in StatePrimitiveFromEntropy() argument [all …]
|
| /libCEED/doc/img/ |
| H A D | libCEED-decomposition.svg | 46 d="M 0,0 H 960 V 540 H 0 Z" /></clipPath><clipPath 51 d="M 733.2,461.3 H 927.4 V 521 H 733.2 Z" /></clipPath><clipPath 56 d="M 0,0 H 960 V 540 H 0 Z" /></clipPath><mask 64 …V+xtN1ftzwlMNJiyWbZ2ZaxbORwAxuwxLUU788eY+rzM294DgCXPsrbU6Tl+tiote+EUVWOkybNPFR48ymrg+J4dX3lUfHATAP… 145 d="M 0,539.9 H 960 V -0.1 H 0 Z" /><path 148 d="M 0,539.9 H 960 V -0.1 H 0 Z" 155 d="m 761.2,508.7 v 0 0 l -14.8,-7.5 14.8,-8.6 14.9,8.6 z m 0,0 z" /><g 159 d="m 761.2,508.7 v 0 0 l -14.8,-7.5 14.8,-8.6 14.9,8.6 z" /></g><g 166 d="m 761.2,475.4 v 0 0 l 14.1,8.9 0.8,16.9 -11.1,-6.4 -3.8,-2.2 V 488 Z m 0,0 z" /><g 170 d="m 761.2,475.4 v 0 0 l 14.1,8.9 0.8,16.9 -11.1,-6.4 -3.8,-2.2 V 488 Z" /></g><g [all …]
|
| H A D | libCEEDBackends.svg | 46 d="M 0,68.03218 V 90.7097 H 45.35506 V 68.03218 Z" 82 d="M 0,34.01608 V 56.6936 H 45.35506 V 34.01608 Z" 118 d="M 0,0 V 22.67752 H 45.35506 V 0 Z" 154 d="m 0,-34.01648 v 22.67752 h 45.35506 v -22.67752 z" 190 d="m 90.7097,17.00783 v 22.67752 h 45.35506 V 17.00783 Z" 226 d="m 181.4194,119.0565 v 22.67752 h 56.69362 V 119.0565 Z" 262 d="m 181.4194,85.04042 v 22.67752 h 56.69362 V 85.04042 Z" 298 d="m 181.4194,51.02391 v 22.67752 h 56.69362 V 51.02391 Z" 334 d="m 181.4194,17.00783 v 22.67752 h 56.69362 V 17.00783 Z" 370 d="M 181.4194,-17.00824 V 5.66927 h 56.69362 v -22.67751 z" [all …]
|
| H A D | libceed_schematic_op_setup_mass.svg | 133 d="M 0,0 H 1920 V 1080 H 0 Z" 140 d="m 0,472.0757 h 425.9606 v 53.4749 H 0 Z" 147 d="M 0,0 H 1920 V 1080 H 0 Z" 154 d="m 129.1846,355.1184 h 218.6466 v 54.88002 H 129.1846 Z" 161 d="M 0,0 H 1920 V 1080 H 0 Z" 168 d="m 505.0689,336.6184 h 218.6466 v 91.88002 H 505.0689 Z" 175 d="M 0,0 H 1920 V 1080 H 0 Z" 182 d="m 120.0307,838.6081 h 377.6465 v 100 H 120.0307 Z" 189 d="M 0,0 H 1920 V 1080 H 0 Z" 196 d="m 674.3774,827.3474 h 472.3852 V 949.8689 H 674.3774 Z" [all …]
|
| /libCEED/examples/ceed/ |
| H A D | index.md | 24 \sum_e \int_{\Omega_e} v(x) 1 \, dV 27 with $v(x) \in \mathcal{V}_p = \{ v \in H^{1}(\Omega_e) \,|\, v \in P_p(\bm{I}), e=1,\ldots,N_e \}$… 51 let us multiply by a test function $v$ and integrate by parts to obtain 54 \int_\Omega \nabla v \cdot \nabla u \, dV - \int_{\partial \Omega} v \nabla u \cdot \hat{\bm n}\, d… 57 …uch that $\nabla u \cdot \hat{\bm n} = 1$, the boundary integrand is $v 1 \equiv v$. Hence, simila… 60 \int_\Omega \nabla v \cdot \nabla u \, dV \approx \sum_e \int_{\partial \Omega_e} v(x) 1 \, dS . 81 \sum_e \int_{\Omega_e}\left( v(x) 1 + \nabla v(x) \cdot 0 \right) \, dV 84 with $v(x) \in \mathcal{V}_p = \{ v \in H^{1}(\Omega_e) \,|\, v \in P_p(\bm{I}), e=1,\ldots,N_e \}$…
|
| /libCEED/julia/LibCEED.jl/test/ |
| H A D | runtests.jl | 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) [all …]
|
| /libCEED/tests/ |
| H A D | t505-operator.c | 17 CeedVector q_data, x, u, v; in main() local 31 CeedVectorCreate(ceed, num_nodes_u, &v); in main() 64 CeedQFunctionAddOutput(qf_mass, "v", 1, CEED_EVAL_INTERP); in main() 75 CeedOperatorSetField(op_mass, "v", elem_restriction_u, basis_u, CEED_VECTOR_ACTIVE); in main() 79 // Apply with V = 0 in main() 81 CeedVectorSetValue(v, 0.0); in main() 82 CeedOperatorApplyAdd(op_mass, u, v, CEED_REQUEST_IMMEDIATE); in main() 89 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 91 CeedVectorRestoreArrayRead(v, &v_array); in main() 95 // Apply with V = 1 in main() [all …]
|
| H A D | t411-qfunction.c | 11 CeedVector u, v; in main() local 21 CeedVectorCreate(ceed, q, &v); in main() 22 CeedVectorSetValue(v, 0); in main() 27 out[0] = v; in main() 35 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 37 …if (fabs(v_array[i] - u_array[i]) > 1e-14) printf("[%" CeedInt_FMT "] v %f != u %f\n", i, v_array[… in main() 39 CeedVectorRestoreArrayRead(v, &v_array); in main() 43 CeedVectorDestroy(&v); in main()
|
| H A D | t409-qfunction.c | 13 CeedVector u, v; in main() local 24 CeedVectorCreate(ceed, q, &v); in main() 25 CeedVectorSetValue(v, 0.0); in main() 29 CeedQFunctionAddOutput(qf, "v", 1, CEED_EVAL_INTERP); in main() 37 out[0] = v; in main() 44 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 48 printf("v[%" CeedInt_FMT "] %f != 2.0\n", i, v_array[i]); in main() 52 CeedVectorRestoreArrayRead(v, &v_array); in main() 80 out[0] = v; in main() 86 CeedVectorDestroy(&v); in main()
|
| H A D | t412-qfunction.c | 11 CeedVector u, v; in main() local 21 CeedVectorCreate(ceed, q * size, &v); in main() 22 CeedVectorSetValue(v, 0); in main() 27 out[0] = v; in main() 35 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 37 …if (fabs(v_array[i] - u_array[i]) > 1e-12) printf("[%" CeedInt_FMT "] v %f != u %f\n", i, v_array[… in main() 39 CeedVectorRestoreArrayRead(v, &v_array); in main() 43 CeedVectorDestroy(&v); in main()
|
| H A D | t332-basis.c | 12 CeedVector u, v; in main() local 35 CeedVectorCreate(ceed, num_qpts, &v); in main() 36 CeedVectorSetValue(v, 0.0); in main() 38 CeedBasisApply(basis, 1, CEED_NOTRANSPOSE, CEED_EVAL_DIV, u, v); in main() 43 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 47 CeedVectorRestoreArrayRead(v, &v_array); in main() 50 CeedVectorSetValue(v, 1.0); in main() 53 CeedBasisApply(basis, 1, CEED_TRANSPOSE, CEED_EVAL_DIV, v, u); in main() 67 CeedVectorDestroy(&v); in main()
|
| H A D | t405-qfunction.c | 12 CeedVector q_data, w, u, v; in main() local 33 CeedVectorCreate(ceed, q, &v); in main() 34 CeedVectorSetValue(v, 0); in main() 50 CeedQFunctionAddOutput(qf_mass, "v", 1, CEED_EVAL_INTERP); in main() 54 out[0] = v; in main() 62 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 64 …if (2 * v_true[i] != v_array[i]) printf("[%" CeedInt_FMT "] v %f != vv %f\n", i, 2 * v_true[i], v_… in main() 66 CeedVectorRestoreArrayRead(v, &v_array); in main() 71 CeedVectorDestroy(&v); in main()
|
| H A D | t400-qfunction.c | 12 CeedVector q_data, w, u, v; in main() local 33 CeedVectorCreate(ceed, q, &v); in main() 34 CeedVectorSetValue(v, 0); in main() 50 CeedQFunctionAddOutput(qf_mass, "v", 1, CEED_EVAL_INTERP); in main() 54 out[0] = v; in main() 62 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 64 …if (v_array[i] != v_true[i]) printf("[%" CeedInt_FMT "] v %f != v_true %f\n", i, v_array[i], v_tru… in main() 66 CeedVectorRestoreArrayRead(v, &v_array); in main() 71 CeedVectorDestroy(&v); in main()
|
| H A D | t331-basis.c | 12 CeedVector u, v; in main() local 35 CeedVectorCreate(ceed, dim * num_qpts, &v); in main() 36 CeedVectorSetValue(v, 0.0); in main() 38 CeedBasisApply(basis, 1, CEED_NOTRANSPOSE, CEED_EVAL_INTERP, u, v); in main() 43 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 47 CeedVectorRestoreArrayRead(v, &v_array); in main() 50 CeedVectorSetValue(v, 1.0); in main() 53 CeedBasisApply(basis, 1, CEED_TRANSPOSE, CEED_EVAL_INTERP, v, u); in main() 69 CeedVectorDestroy(&v); in main()
|
| H A D | t360-basis.c | 14 CeedVector u, u_q, v, v_q, w_q; in main() local 19 CeedVectorCreate(ceed, p_dim, &v); in main() 21 CeedVectorSetValue(v, 0.0); in main() 32 CeedBasisApply(basis, 1, CEED_TRANSPOSE, CEED_EVAL_INTERP, v_q, v); in main() 34 CeedBasisApplyAdd(basis, 1, CEED_TRANSPOSE, CEED_EVAL_INTERP, v_q, v); in main() 41 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main() 44 CeedVectorRestoreArrayRead(v, &v_array); in main() 48 CeedVectorDestroy(&v); in main()
|
| H A D | t505-operator-f.f90 | 17 integer qdata,x,u,v 78 call ceedqfunctionaddoutput(qf_mass,'v',1,ceed_eval_interp,err) 100 call ceedoperatorsetfield(op_mass,'v',erestrictu,bu,& 107 call ceedvectorcreate(ceed,nu,v,err) 108 call ceedvectorsetvalue(v,0.d0,err) 110 call ceedoperatorapplyadd(op_mass,u,v,ceed_request_immediate,err) 112 call ceedvectorgetarrayread(v,ceed_mem_host,hv,voffset,err) 122 call ceedvectorrestorearrayread(v,hv,voffset,err) 124 call ceedvectorsetvalue(v,1.d0,err) 125 call ceedoperatorapplyadd(op_mass,u,v,ceed_request_immediate,err) [all …]
|
| /libCEED/backends/magma/tuning/ |
| H A D | tuning.cpp | 52 CeedVector u, v; in main() local 68 CeedVectorCreate(ceed, Q * N, &v); in main() 72 CeedVectorSetValue(v, 0.0); in main() 73 ierr = CeedBasisApply(basis, N, CEED_NOTRANSPOSE, CEED_EVAL_INTERP, u, v); in main() 77 CeedBasisApply(basis, N, CEED_NOTRANSPOSE, CEED_EVAL_INTERP, u, v); in main() 84 CeedVectorSetValue(v, 0.0); in main() 85 ierr = CeedBasisApply(basis, N, CEED_TRANSPOSE, CEED_EVAL_INTERP, v, u); in main() 89 CeedBasisApply(basis, N, CEED_TRANSPOSE, CEED_EVAL_INTERP, v, u); in main() 95 CeedVectorDestroy(&v); in main() 101 CeedVectorCreate(ceed, dim * Q * N, &v); in main() [all …]
|
| /libCEED/julia/LibCEED.jl/examples/ |
| H A D | ex1-volume.jl | 19 v = coords[i+num_nodes] 21 v = pi/2*v 22 coords[i] = u*cos(v) 23 coords[i+num_nodes] = u*sin(v) 111 (v, :out, EVAL_INTERP), 113 v .= qdata*u 127 (:v, sol_rstr, sol_basis, CeedVectorActive()), 136 v = CeedVector(ceed, sol_size) 139 # Apply the mass operator: 'u' -> 'v'. 140 apply!(oper, u, v) [all …]
|
| H A D | ex3-volume.jl | 19 v = coords[i+num_nodes] 21 v = pi/2*v 22 coords[i] = u*cos(v) 23 coords[i+num_nodes] = u*sin(v) 129 (v, :out, EVAL_INTERP), 132 # Apply mass: v = qdata[1] * u 133 v .= qdata[1].*u 165 (:v, sol_rstr, sol_basis, CeedVectorActive()), 175 v = CeedVector(ceed, sol_size) 178 # Apply the mass+diffusion operator: 'u' -> 'v'. [all …]
|
| /libCEED/examples/python/ |
| H A D | tutorial-4-qfunction.ipynb | 93 "v = ceed.Vector(q)\n", 94 "v.set_value(0)\n", 97 "outputs = [ v ]\n", 100 "print('v =', v)" 138 "v = ceed.Vector(q)\n", 139 "v.set_value(0)\n", 148 "outputs = [ v ]\n", 151 "print('v =', v)" 179 "v = ceed.Vector(q*fields)\n", 180 "v.set_value(0)\n", [all …]
|