Home
last modified time | relevance | path

Searched +full:- +full:y (Results 1 – 25 of 177) sorted by relevance

12345678

/libCEED/examples/fluids/qfunctions/
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
28 StatePrimitive Y; member
37 CEED_QFUNCTION_HELPER void UnpackState_Y(StatePrimitive s, CeedScalar Y[5]) { in UnpackState_Y()
38 Y[0] = s.pressure; in UnpackState_Y()
39 for (int i = 0; i < 3; i++) Y[i + 1] = s.velocity[i]; in UnpackState_Y()
40 Y[4] = s.temperature; in UnpackState_Y()
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()
[all …]
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
19 NewtonianIdealGasContext gas = &context->gas; in ChildStatsCollection()
20 CeedScalar delta_t = context->solution_time - context->previous_time; 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()
[all …]
H A Driemann_solver.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
10 // The left and right states are specified from the perspective of an outward-facing normal vector …
14 // |------------| /
16 // | Left |----> Right
18 // |------------|
41 …CeedScalar r_right = (sqrt_left / (2 * sqrt_right * square_sum_root)) * drho_right - (sqrt_right /… in RoeSetup_fwd()
42 …CeedScalar r_left = (sqrt_right / (2 * sqrt_left * square_sum_root)) * drho_left - (sqrt_left / (… in RoeSetup_fwd()
62 …F_hll[i] = (s_right * F_left[i] - s_left * F_right[i] + s_left * s_right * (U_right[i] - U_left[i]… in Flux_HLL()
[all …]
H A Dblasius.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
9 /// Operator for Navier-Stokes example using PETSc
33 …CeedScalar Th_cheb[BLASIUS_MAX_N_CHEBYSHEV - 1]; // !< Chebyshev coefficien…
43 // Chebyshev polynomials T_0, T_1, T_2 of the first kind in (-1,1) in ChebyshevEval()
44 {1, x, 2 * x * x - 1}, in ChebyshevEval()
50 // i-th derivative of f in ChebyshevEval()
54 // T_n(x) = 2xT_{n-1}(x) - T_{n-2}(x) in ChebyshevEval()
55 table[0][i % 3] = 2 * x * table[0][(i - 1) % 3] - table[0][(i - 2) % 3]; in ChebyshevEval()
[all …]
/libCEED/tests/
H A Dt122-vector.c14 CeedVector x, y, w; in main() local
22 CeedVectorCreate(ceed, len, &y); in main()
29 CeedVectorSetArray(y, CEED_MEM_HOST, CEED_COPY_VALUES, array); in main()
33 CeedVectorPointwiseMult(w, x, y); in main()
36 if (fabs(read_array[i] - i * i) > 1e-14) { in main()
38 …printf("Error in w = x .* y at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read_array[i… in main()
45 CeedVectorPointwiseMult(w, w, y); in main()
48 if (fabs(read_array[i] - i * i * i) > 1e-14) { in main()
50 …printf("Error in w = w .* y at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read_array[i… in main()
60 if (fabs(read_array[i] - i * i * i * i) > 1e-14) { in main()
[all …]
H A Dt125-vector.c3 /// \test Test y = alpha x + beta y
14 CeedVector x, y; in main() local
21 CeedVectorCreate(ceed, len, &y); in main()
27 CeedVectorSetArray(y, CEED_MEM_HOST, CEED_COPY_VALUES, array); in main()
33 CeedVectorSyncArray(y, type); in main()
35 CeedVectorAXPBY(y, -0.5, 1.0, x); in main()
40 CeedVectorGetArrayRead(y, CEED_MEM_HOST, &read_array); in main()
42 if (fabs(read_array[i] - (10.0 + i) * 0.5) > 1e-14) { in main()
44 …printf("Error in alpha x + y at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read_array[… in main()
48 CeedVectorRestoreArrayRead(y, &read_array); in main()
[all …]
H A Dt121-vector.c14 CeedVector x, y; in main() local
21 CeedVectorCreate(ceed, len, &y); in main()
27 CeedVectorSetArray(y, CEED_MEM_HOST, CEED_COPY_VALUES, array); in main()
33 CeedVectorSyncArray(y, type); in main()
35 CeedVectorAXPY(y, -0.5, x); in main()
40 CeedVectorGetArrayRead(y, CEED_MEM_HOST, &read_array); in main()
42 if (fabs(read_array[i] - (10.0 + i) / 2) > 1e-14) { in main()
44 …printf("Error in alpha x + y at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read_array[… in main()
48 CeedVectorRestoreArrayRead(y, &read_array); in main()
52 CeedVectorDestroy(&y); in main()
H A Dt131-vector.c10 static CeedScalar expected_usage(CeedSize length) { return length * sizeof(CeedScalar) * 1e-6; } in expected_usage()
14 CeedVector x, y, z; in main() local
21 CeedGetWorkVector(ceed, 20, &y); in main()
26 …if (fabs(usage_mb - expected_usage(60)) > 100. * CEED_EPSILON) printf("Wrong usage: %0.8g MB != %0… in main()
33 // - Remove x in main()
34 // - Leave y, since it is still in use in main()
35 // - Leave z, since it is length 30 in main()
38 …if (fabs(usage_mb - expected_usage(50)) > 100. * CEED_EPSILON) printf("Wrong usage: %0.8g MB != %0… in main()
41 // - Leave y, since it is still in use in main()
42 // - Remove z in main()
[all …]
H A Dt127-vector.c10 CeedVector x, y; in main() local
16 CeedVectorCreate(ceed, len, &y); in main()
20 CeedVectorSetValueStrided(x, start, -1, step, 42.0); in main()
26 CeedScalar value = (i - start) % step == 0 ? 42.0 : 1.0; in main()
38 CeedVectorSetValue(y, 0.0); in main()
39 CeedVectorCopyStrided(x, start, -1, step, y); in main()
43 CeedVectorGetArrayRead(y, CEED_MEM_HOST, &read_array); in main()
45 CeedScalar value = (i - start) % step == 0 ? 42.0 : 0.0; in main()
49 …printf("Error in copying value to y at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read… in main()
53 CeedVectorRestoreArrayRead(y, &read_array); in main()
[all …]
H A Dt200-elemrestriction-f.f901 !-----------------------------------------------------------------------
7 integer x,y variable
28 a(i)=10+i-1
35 ind(2*i-1)=i-1
42 call ceedvectorcreate(ceed,2*ne,y,err);
43 call ceedvectorsetvalue(y,0.d0,err);
44 call ceedelemrestrictionapply(r,ceed_notranspose,x,y,&
47 call ceedvectorgetarrayread(y,ceed_mem_host,yy,yoffset,err)
49 diff=10+i/2-yy(i+yoffset)
50 if (abs(diff) > 1.0D-15) then
[all …]
H A Dt201-elemrestriction-f.f901 !-----------------------------------------------------------------------
7 integer x,y variable
29 a(i)=10+i-1
38 call ceedvectorcreate(ceed,2*ne,y,err)
39 call ceedvectorsetvalue(y,0.d0,err)
40 call ceedelemrestrictionapply(r,ceed_notranspose,x,y,&
43 call ceedvectorgetarrayread(y,ceed_mem_host,yy,yoffset,err)
47 do k=0,ne-1
49 diff=diff-a(i*strides(1)+j*strides(2)+k*strides(3)+1)
50 if (abs(diff) > 1.0D-15) then
[all …]
H A Dt103-vector-f.f901 !-----------------------------------------------------------------------
7 integer x,y,i,n variable
21 call ceedvectorcreate(ceed,n,y,err)
31 call ceedvectorsetarray(y,ceed_mem_host,ceed_copy_values,xx,xoffset,err)
34 call ceedvectorgetarrayread(y,ceed_mem_host,yy,yoffset,err)
37 diff=yy(i+yoffset)-10-i
38 if (abs(diff)>1.0D-15) then
40 write(*,*) 'Error reading array y(',i,')=',yy(i+yoffset)
45 call ceedvectorrestorearrayread(y,yy,yoffset,err)
47 call ceedvectordestroy(y,err)
[all …]
/libCEED/examples/solids/qfunctions/
H A Dmanufactured-force.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
25 // -----------------------------------------------------------------------------
27 // -----------------------------------------------------------------------------
37 const CeedScalar E = context->E; in SetupMMSForce()
38 const CeedScalar nu = context->nu; in SetupMMSForce()
43 CeedScalar x = coords[i + 0 * Q], y = coords[i + 1 * Q], z = coords[i + 2 * Q]; in SetupMMSForce() local
47 // -- Component 1 in SetupMMSForce()
48 …orce[i + 0 * Q] = (-(E * (cos(x * 2.0) * cos(y * 3.0) * exp(z * 4.0) * 4.0 - cos(z * 4.0) * sin(y in SetupMMSForce()
[all …]
/libCEED/include/ceed/jit-source/cuda/
H A Dcuda-shared-basis-tensor-at-points.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
12 #include "cuda-shared-basis-read-write-templates.h"
13 #include "cuda-shared-basis-tensor-at-points-templates.h"
14 #include "cuda-shared-basis-tensor-templates.h"
16 //------------------------------------------------------------------------------
18 //------------------------------------------------------------------------------
20 //------------------------------------------------------------------------------
22 //------------------------------------------------------------------------------
[all …]
H A Dcuda-shared-basis-nontensor.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
9 /// Internal header for CUDA shared memory non-tensor basis
12 #include "cuda-shared-basis-nontensor-templates.h"
13 #include "cuda-shared-basis-read-write-templates.h"
15 //------------------------------------------------------------------------------
17 //------------------------------------------------------------------------------
23 data.t_id_y = threadIdx.y; in Interp()
25 data.t_id = threadIdx.x + threadIdx.y * blockDim.x + threadIdx.z * blockDim.y * blockDim.x; in Interp()
[all …]
/libCEED/include/ceed/jit-source/hip/
H A Dhip-shared-basis-tensor-at-points.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
12 #include "hip-shared-basis-read-write-templates.h"
13 #include "hip-shared-basis-tensor-at-points-templates.h"
14 #include "hip-shared-basis-tensor-templates.h"
16 //------------------------------------------------------------------------------
18 //------------------------------------------------------------------------------
20 //------------------------------------------------------------------------------
22 //------------------------------------------------------------------------------
[all …]
H A Dhip-shared-basis-nontensor.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
9 /// Internal header for HIP shared memory non-tensor basis
12 #include "hip-shared-basis-nontensor-templates.h"
13 #include "hip-shared-basis-read-write-templates.h"
15 //------------------------------------------------------------------------------
17 //------------------------------------------------------------------------------
24 data.t_id_y = threadIdx.y; in __launch_bounds__()
26 data.t_id = threadIdx.x + threadIdx.y * blockDim.x + threadIdx.z * blockDim.y * blockDim.x; in __launch_bounds__()
[all …]
/libCEED/interface/
H A Dceed-vector.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
8 #include <ceed-impl.h>
36 /// ----------------------------------------------------------------------------
38 /// ----------------------------------------------------------------------------
48 @return An error code: 0 - success, otherwise - failure
62 @return An error code: 0 - success, otherwise - failure
73 /// ----------------------------------------------------------------------------
75 /// ----------------------------------------------------------------------------
[all …]
/libCEED/examples/solids/src/
H A Dmatops.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
19 // -----------------------------------------------------------------------------
21 // -----------------------------------------------------------------------------
23 PetscErrorCode ApplyLocalCeedOp(Vec X, Vec Y, UserMult user) { in ApplyLocalCeedOp() argument
24 PetscScalar *x, *y; in ApplyLocalCeedOp() local
29 // Global-to-local in ApplyLocalCeedOp()
30 PetscCall(DMGlobalToLocal(user->dm, X, INSERT_VALUES, user->X_loc)); in ApplyLocalCeedOp()
31 PetscCall(VecZeroEntries(user->Y_loc)); in ApplyLocalCeedOp()
[all …]
H A Dboundary.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
16 // -----------------------------------------------------------------------------
18 // -----------------------------------------------------------------------------
21 // BCMMS - boundary function
25 PetscScalar y = coords[1]; in BCMMS() local
30 u[0] = exp(2 * x) * sin(3 * y) * cos(4 * z) / 1e8 * load_increment; in BCMMS()
31 u[1] = exp(3 * y) * sin(4 * z) * cos(2 * x) / 1e8 * load_increment; in BCMMS()
32 u[2] = exp(4 * z) * sin(2 * x) * cos(3 * y) / 1e8 * load_increment; in BCMMS()
[all …]
/libCEED/doc/img/
H A DL-vector-AMR.svg1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 …ox="0 0 9754 8128" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke
6 <rect x="0" y="0" width="9754" height="8128"/>
9 <rect x="9" y="8" width="9735" height="8112"/>
13 <font id="EmbeddedFont_1" horiz-adv-x="2048">
14 …<font-face font-family="Open Sans embedded" units-per-em="2048" font-weight="normal" font-style="n…
15 <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
16 …t" horiz-adv-x="641" d="M 530,117 C 559,117 588,119 615,124 642,128 664,132 680,137 L 680,10 C 662…
17 …<glyph unicode="s" horiz-adv-x="781" d="M 883,299 C 883,197 845,118 769,63 693,8 586,-20 449,-20 3…
[all …]
H A DT-vector.svg1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 …ox="0 0 9246 7620" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke
6 <rect x="0" y="0" width="9246" height="7620"/>
9 <rect x="9" y="7" width="9228" height="7605"/>
13 <font id="EmbeddedFont_1" horiz-adv-x="2048">
14 …<font-face font-family="Open Sans embedded" units-per-em="2048" font-weight="normal" font-style="n…
15 <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
16 …t" horiz-adv-x="641" d="M 530,117 C 559,117 588,119 615,124 642,128 664,132 680,137 L 680,10 C 662…
17 …<glyph unicode="s" horiz-adv-x="781" d="M 883,299 C 883,197 845,118 769,63 693,8 586,-20 449,-20 3…
[all …]
H A DE-vector.svg1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 …ox="0 0 9754 8128" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke
6 <rect x="0" y="0" width="9754" height="8128"/>
9 <rect x="9" y="8" width="9735" height="8112"/>
13 <font id="EmbeddedFont_1" horiz-adv-x="2048">
14 …<font-face font-family="Open Sans embedded" units-per-em="2048" font-weight="normal" font-style="n…
15 <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
16 …t" horiz-adv-x="641" d="M 530,117 C 559,117 588,119 615,124 642,128 664,132 680,137 L 680,10 C 662…
17 …<glyph unicode="s" horiz-adv-x="781" d="M 883,299 C 883,197 845,118 769,63 693,8 586,-20 449,-20 3…
[all …]
H A DL-vector.svg1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 …ox="0 0 9754 8128" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke
6 <rect x="0" y="0" width="9754" height="8128"/>
9 <rect x="9" y="8" width="9735" height="8112"/>
13 <font id="EmbeddedFont_1" horiz-adv-x="2048">
14 …<font-face font-family="Open Sans embedded" units-per-em="2048" font-weight="normal" font-style="n…
15 <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
16 …t" horiz-adv-x="641" d="M 530,117 C 559,117 588,119 615,124 642,128 664,132 680,137 L 680,10 C 662…
17 …<glyph unicode="s" horiz-adv-x="781" d="M 883,299 C 883,197 845,118 769,63 693,8 586,-20 449,-20 3…
[all …]
/libCEED/examples/python/
H A Dtutorial-2-elemrestriction.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 …documentation](https://libceed.org/en/latest/libCEEDapi.html#finite-element-operator-decomposition…
55 "# x -- x -- x -- x\n",
56 "# 10 -- 11 -- 12 -- 13\n",
59 "# x -- x | x -- x | x -- x\n",
60 "# 10 -- 11 | 11 -- 12 | 12 -- 13\n",
77 "y = ceed.Vector(2*num_elem)\n",
78 "y.set_value(0)\n",
[all …]

12345678