Home
last modified time | relevance | path

Searched +full:- +full:v (Results 1 – 25 of 392) sorted by relevance

12345678910>>...16

/libCEED/examples/
H A Dbps.md6 :start-after: <!-- bps-inclusion -->
7 :end-before: <!-- bps-exclusion -->
10 (mass-operator)=
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 ,
18 $$ (eq-general-weak-form)
20v,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) .
33 $$ (eq-nodal-values)
[all …]
/libCEED/julia/LibCEED.jl/src/
H A DMisc.jl18 @inline det(J, ::CeedDim{2}) = @inbounds J[1]*J[4] - J[3]*J[2]
21 J[1]*(J[5]*J[9] - J[6]*J[8]) -
22 J[2]*(J[4]*J[9] - J[6]*J[7]) +
23 J[3]*(J[4]*J[8] - J[5]*J[7])
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]
[all …]
H A DCeedVector.jl37 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 …]
/libCEED/doc/img/
H A DlibCEED-decomposition.svg1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17 sodipodi:docname="libCEED-2-trim.svg"
18 inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"><sodipodi:namedview
27 inkscape:window-width="1916"
28 inkscape:window-height="1076"
34 inkscape:window-x="0"
35 inkscape:window-y="0"
36 inkscape:window-maximized="1"
[all …]
H A DlibCEEDBackends.svg1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!-- Created with Inkscape (http://www.inkscape.org/) -->
22 style="stop-opacity:1;stop-color:#e9b7b7"
26 style="stop-opacity:1;stop-color:#e9b7b7"
30 style="stop-opacity:1;stop-color:#f1d2d2"
34 style="stop-opacity:1;stop-color:#faeded"
38 style="stop-opacity:1;stop-color:#faeded"
46 d="M 0,68.03218 V 90.7097 H 45.35506 V 68.03218 Z"
47 transform="matrix(1.3333333,0,0,-1.3333333,4.3786667,219.77067)"
58 style="stop-opacity:1;stop-color:#e9b7b7"
[all …]
H A Dlibceed_schematic_op_setup_mass.svg1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!-- Created with Inkscape (http://www.inkscape.org/) -->
11 inkscape:version="1.1.2 (b8e25be8, 2022-02-05)"
13 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
25 inkscape:document-units="mm"
30 inkscape:window-width="1312"
31 inkscape:window-height="847"
32 inkscape:window-x="44"
33 inkscape:window-y="25"
34 inkscape:window-maximized="0"
[all …]
/libCEED/examples/fluids/qfunctions/
H A Dturb_spanstats.h1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 // SPDX-License-Identifier: BSD-2-Clause
16 CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in ChildStatsCollection() local
19 NewtonianIdealGasContext gas = &context->gas; in ChildStatsCollection()
20 CeedScalar delta_t = context->solution_time - context->previous_time; in ChildStatsCollection()
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()
[all …]
H A Dutils.h1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 // SPDX-License-Identifier: BSD-2-Clause
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()
[all …]
H A Dnewtonian_state.h1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 // SPDX-License-Identifier: BSD-2-Clause
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()
49 …ION_HELPER CeedScalar HeatCapacityRatio(NewtonianIdealGasContext gas) { return gas->cp / gas->cv; } in HeatCapacityRatio()
51 CEED_QFUNCTION_HELPER CeedScalar GasConstant(NewtonianIdealGasContext gas) { return gas->cp - gas->… in GasConstant()
53 …TION_HELPER CeedScalar Prandtl(NewtonianIdealGasContext gas) { return gas->cp * gas->mu / gas->k; } in Prandtl()
[all …]
/libCEED/examples/ceed/
H A Dindex.md3 The following three examples have no dependencies, and are designed to be self-contained.
6 (ex1-volume)=
8 ## Ex1-Volume
11 It illustrates a simple usage of libCEED to compute the volume of a given body using a matrix-free …
19 $$ (eq-ex1-volume)
21 Using the same notation as in {ref}`theoretical-framework`, we write here the vector $u(x)\equiv 1$…
24 \sum_e \int_{\Omega_e} v(x) 1 \, dV
25 $$ (volume-sum)
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 \}$…
29 (ex2-surface)=
[all …]
/libCEED/julia/LibCEED.jl/test/
H A Druntests.jl23 const run_dev_tests = !isrelease() || ("--run-dev-tests" in ARGS)
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)
[all …]
/libCEED/tests/
H A Dt505-operator.c9 #include "t500-operator.h"
17 CeedVector q_data, x, u, v; in main() local
19 CeedInt num_nodes_x = num_elem + 1, num_nodes_u = num_elem * (p - 1) + 1; in main()
27 for (CeedInt i = 0; i < num_nodes_x; i++) x_array[i] = (CeedScalar)i / (num_nodes_x - 1); in main()
31 CeedVectorCreate(ceed, num_nodes_u, &v); in main()
43 ind_u[p * i + j] = i * (p - 1) + j; 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()
[all …]
H A Dt505-operator-f.f901 !-----------------------------------------------------------------------
5 include 't500-operator-f.h'
6 !-----------------------------------------------------------------------
17 integer qdata,x,u,v
24 parameter(nu=nelem*(p-1)+1)
40 do i=0,nx-1
41 arrx(i+1)=i/(nx-1.d0)
43 do i=0,nelem-1
51 do i=0,nelem-1
52 do j=0,p-1
[all …]
H A Dt411-qfunction-f.f901 !-----------------------------------------------------------------------
7 integer u,v variable
22 do i=0,q-1
29 call ceedvectorcreate(ceed,q,v,err)
30 call ceedvectorsetvalue(v,0.d0,err)
35 &v,ceed_null,ceed_null,ceed_null,ceed_null,ceed_null,&
39 call ceedvectorgetarrayread(v,ceed_mem_host,vv,voffset,err)
41 if (abs(vv(i+voffset)-(i-1)*(i-1)) > 1.0D-14) then
43 write(*,*) 'v(i)=',vv(i+voffset),', u(i)=',(i-1)*(i-1)
47 call ceedvectorrestorearrayread(v,vv,voffset,err)
[all …]
H A Dt412-qfunction-f.f901 !-----------------------------------------------------------------------
7 integer u,v variable
23 do i=0,q*s-1
30 call ceedvectorcreate(ceed,q*s,v,err)
31 call ceedvectorsetvalue(v,0.d0,err)
36 &v,ceed_null,ceed_null,ceed_null,ceed_null,ceed_null,&
40 call ceedvectorgetarrayread(v,ceed_mem_host,vv,voffset,err)
42 if (abs(vv(i+voffset)-(i-1)*(i-1)) > 1.0D-12) then
44 write(*,*) 'v(i)=',vv(i+voffset),', u(i)=',(i-1)*(i-1)
48 call ceedvectorrestorearrayread(v,vv,voffset,err)
[all …]
H A Dt332-basis.c2 /// Test div with a 2D Quad non-tensor H(div) basis
3 /// \test Test div with a 2D Quad non-tensor H(div) basis
8 #include "t330-basis.h"
12 CeedVector u, v; in main() local
29 …if (fabs(div[i] - div_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", div[i], div_in_basi… in main()
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()
45 if (fabs(p * 0.25 - v_array[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", 2.0, v_array[i]); in main()
[all …]
H A Dt331-basis.c2 /// Test interpolation with a 2D Quad non-tensor H(div) basis
3 /// \test Test interpolation with a 2D Quad non-tensor H(div) basis
8 #include "t330-basis.h"
12 CeedVector u, v; in main() local
29 …if (fabs(interp[i] - interp_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", interp[i], in… in main()
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()
45 … if (fabs(q_ref[i] - v_array[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", q_ref[i], v_array[i]); in main()
[all …]
H A Dt406-qfunction.c4 #include "t406-qfunction.h"
15 CeedVector q_data, w, u, v; in main() local
25 memcpy(&file_path[last_slash - file_path], "/test-include/", 15); in main()
36 CeedScalar x = 2. * i / (q - 1) - 1; in main()
37 w_array[i] = 1 - x * x; in main()
44 CeedVectorCreate(ceed, q, &v); in main()
45 CeedVectorSetValue(v, 0); in main()
61 CeedQFunctionAddOutput(qf_mass, "v", 1, CEED_EVAL_INTERP); in main()
65 out[0] = v; in main()
73 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main()
[all …]
H A Dt342-basis.c2 /// Test curl with a 2D Simplex non-tensor H(curl) basis
3 /// \test Test curl with a 2D Simplex non-tensor H(curl) basis
7 #include "t340-basis.h"
11 CeedVector u, v; in main() local
29 …if (fabs(curl[i] - curl_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", curl[i], curl_in_… in main()
48 CeedVectorCreate(ceed, q, &v); in main()
49 CeedVectorSetValue(v, 0.0); in main()
51 CeedBasisApply(basis, 1, CEED_NOTRANSPOSE, CEED_EVAL_CURL, u, v); in main()
56 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main()
58 …if (fabs(row_sum[i] - v_array[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", row_sum[i], v_array[… in main()
[all …]
H A Dt362-basis.c2 /// Test integration ApplyAdd with a 2D Simplex non-tensor H^1 basis
3 /// \test Test integration ApplyAdd with a 2D Simplex non-tensor H^1 basis
8 #include "t320-basis.h"
13 CeedVector u, v, u_q, v_q, w_q; in main() local
22 CeedVectorCreate(ceed, p, &v); in main()
24 CeedVectorSetValue(v, 0.0); in main()
36 CeedBasisApply(basis, 1, CEED_TRANSPOSE, CEED_EVAL_INTERP, v_q, v); in main()
38 CeedBasisApplyAdd(basis, 1, CEED_TRANSPOSE, CEED_EVAL_INTERP, v_q, v); in main()
45 CeedVectorGetArrayRead(v, CEED_MEM_HOST, &v_array); in main()
47 if (fabs(area - 1.0) > 1E-6) printf("Incorrect area computed %f != %f\n", area, 1.0); in main()
[all …]
/libCEED/backends/magma/tuning/
H A Dtuning.cpp1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 // SPDX-License-Identifier: BSD-2-Clause
16 // clang-format off
18 // and quadrature rules of degree 2p and 2p - 2. These can be expanded to more element types and qu…
26 // clang-format on
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()
[all …]
/libCEED/backends/ref/
H A Dceed-ref-basis.c1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 // SPDX-License-Identifier: BSD-2-Clause
14 #include "ceed-ref.h"
16 //------------------------------------------------------------------------------
18 //------------------------------------------------------------------------------
20 CeedVector V) { in CeedBasisApplyCore_Ref() argument
24 CeedScalar *v; in CeedBasisApplyCore_Ref() local
37 // Clear v if operating in transpose in CeedBasisApplyCore_Ref()
38 if (apply_add) CeedCallBackend(CeedVectorGetArray(V, CEED_MEM_HOST, &v)); in CeedBasisApplyCore_Ref()
[all …]
/libCEED/examples/python/
H A Dtutorial-4-qfunction.ipynb9 …ithub.com/CEED/libCEED/), the low-level API library for efficient high-order discretization method…
11 …"While libCEED's focus is on high-order finite/spectral element method implementations, the approa…
29 "! python -m pip install libceed"
38-wise functions describing the physics at the quadrature points (see [the API documentation](https…
42 …"[QFunctionSchematic]: ./img/QFunctionSketch.svg \"Schematic of point-wise QFunctions, defined at …
49 …espectively, of the mass operator in 1D) from the gallery of available built-in QFunctions in libC…
74 "* In the following example, we create and evaluate a built-in identity QFunction."
93 "v = ceed.Vector(q)\n",
94 "v.set_value(0)\n",
97 "outputs = [ v ]\n",
[all …]
/libCEED/julia/LibCEED.jl/examples/
H A Dex1-volume.jl10 coords[i] = 0.5 + 1.0/sqrt(3.0)*sin((2.0/3.0)*pi*(coords[i] - 0.5))
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)
67 # Create the Q-function that builds the mass operator (i.e. computes its
105 # Create the Q-function that defines the action of the mass operator.
111 (v, :out, EVAL_INTERP),
113 v .= qdata*u
127 (:v, sol_rstr, sol_basis, CeedVectorActive()),
[all …]
H A Dex3-volume.jl10 coords[i] = 0.5 + 1.0/sqrt(3.0)*sin((2.0/3.0)*pi*(coords[i] - 0.5))
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)
77 …#Create the Q-function that builds the mass+diffusion operator ( i.e it computes the quadrature da…
122 # Create the Q-function that defines the action of the mass+diffusion operator.
129 (v, :out, EVAL_INTERP),
132 # Apply mass: v = qdata[1] * u
133 v .= qdata[1].*u
[all …]

12345678910>>...16