Home
last modified time | relevance | path

Searched +full:- +full:f (Results 1 – 25 of 248) sorted by relevance

12345678910

/libCEED/backends/magma/tuning/
H A Dgenerate_tuning.py3 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
4 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
6 # SPDX-License-Identifier: BSD-2-Clause
24 ceed_magma_h = f"{script_dir}/../ceed-magma.h"
26 with open(ceed_magma_h, "r") as f:
27 data = f.read()
33 with open(ceed_magma_h, "w") as f:
34 f.write(data)
36 ceed_magma_gemm_selector_cpp = f"{script_dir}/../ceed-magma-gemm-selector.cpp"
41 with open(ceed_magma_gemm_selector_cpp, "r") as f:
[all …]
/libCEED/examples/nek/boxes/
H A Db1e.rea6 -100.000 p002 VISCOS
16 -0.500000E-02 p012 DT
22 0.00000 p018 GRID < 0 --> # cells on screen
25 0.100000E-05 p021 DIVERGENCE
26 0.100000E-07 p022 HELMHOLTZ
28 0.100000E-09 p024 TOLREL
29 0.100000E-09 p025 TOLABS
33 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0
45 0.00000 p041 1-->multiplicative SEMG
48 0.00000 p044 0=E-based/1=A-based prec.
[all …]
/libCEED/tests/
H A Djunit_common.py19 sys.path.insert(0, str(Path(__file__).parent / "junit-xml"))
35 raise ValueError(f"{type} must be an Enum")
65 csv_rtol: float = -1
66 csv_ztol: float = -1
67 cgns_tol: float = -1
88 def get_source_path(self, test: str) -> Path:
100 def get_run_path(self, test: str) -> Path:
112 def get_output_path(self, test: str, output_file: str) -> Path:
125 def test_failure_artifacts_path(self) -> Path:
132 return getattr(self, '_cgns_tol', 1.0e-12)
[all …]
H A Dt122-vector.c36 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()
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()
62 …printf("Error in w = x .* w at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read_array[i… in main()
78 if (fabs(read_array[i] - i * i) > 1e-14) { in main()
80 …printf("Error in y = y .* y at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read_array[i… in main()
H A Dt108-vector.c22 for (CeedInt i = 0; i < len; i++) array[i] = i * (i % 2 ? 1 : -1); in main()
33 if (len > 0 && fabs(norm - 45.) > 100. * CEED_EPSILON) printf("Error: L1 norm %f != 45.\n", norm); in main()
34 else if (len == 0 && fabs(norm) > CEED_EPSILON) printf("Error: L1 norm %f != 0.\n", norm); in main()
37 …if (len > 0 && fabs(norm - sqrt(285.)) > 100. * CEED_EPSILON) printf("Error: L2 norm %f != sqrt(28… in main()
38 else if (len == 0 && fabs(norm) > CEED_EPSILON) printf("Error: L2 norm %f != 0.\n", norm); in main()
41 if (len > 0 && fabs(norm - 9.) > 100. * CEED_EPSILON) printf("Error: Max norm %f != 9.\n", norm); in main()
42 else if (len == 0 && fabs(norm) > CEED_EPSILON) printf("Error: Max norm %f != 0.\n", norm); in main()
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"
29 …if (fabs(div[i] - div_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", div[i], div_in_basi… 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()
60 …if (fabs(num_qpts * 0.25 - u_array[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", 2.0, u_array[i]… in main()
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"
29 …if (fabs(interp[i] - interp_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", interp[i], in… 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()
63 if (fabs(sum) > 100. * CEED_EPSILON) printf("sum of array %f != %f\n", sum, 0.0); in main()
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"
29 …if (fabs(curl[i] - curl_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", curl[i], curl_in_… 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()
73 …if (fabs(column_sum[i] - u_array[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", column_sum[i], u_… in main()
H A Dt341-basis.c2 /// Test interpolation with a 2D Simplex non-tensor H(curl) basis
3 /// \test Test interpolation with a 2D Simplex non-tensor H(curl) basis
7 #include "t340-basis.h"
29 …if (fabs(interp[i] - interp_in_basis[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", interp[i], in… 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()
73 …if (fabs(column_sum[i] - u_array[i]) > 100. * CEED_EPSILON) printf("%f != %f\n", column_sum[i], u_… in main()
H A Dt302-basis.c26 if (fabs(collocated_gradient_1d[j + p * i] - gradient_1d[j + p * i]) > 100 * CEED_EPSILON) { in main()
28 …printf("Error in collocated gradient %f != %f\n", collocated_gradient_1d[j + p * i], gradient_1d[j… in main()
46 …if (fabs(sum - 2 * q_ref[i]) > 100 * CEED_EPSILON) printf("Error in collocated gradient %f != %f\n… in main()
61 …if (fabs(sum - 2 * q_ref[i]) > 100 * CEED_EPSILON) printf("Error in collocated gradient %f != %f\n… in main()
H A Djunit.py5 def create_argparser() -> argparse.ArgumentParser:
13 '-c',
14 '--ceed-backends',
20 '-m',
21 '--mode',
26 parser.add_argument('-n', '--nproc', type=int, default=1, help='number of MPI processes')
27 …parser.add_argument('-b', '--junit-batch', type=str, default='', help='Name of JUnit batch for out…
28 …parser.add_argument('-np', '--pool-size', type=int, default=1, help='Number of test cases to run i…
29 parser.add_argument('-s', '--search', type=str, default='.*',
31 parser.add_argument('-v', '--verbose', action='store_true', default=False,
[all …]
H A Dt127-vector.c20 CeedVectorSetValueStrided(x, start, -1, step, 42.0); in main()
26 CeedScalar value = (i - start) % step == 0 ? 42.0 : 1.0; in main()
30 …printf("Error in setting value in x at index %" CeedInt_FMT ", computed: %f actual: %f\n", i, read… in main()
39 CeedVectorCopyStrided(x, start, -1, step, y); 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()
H A Dt351-basis.c11 result *= tanh(x[d] - center); in Eval()
39 …0; i < x_dim; i++) x_array[d * x_dim + i] = (i % CeedIntPow(2, d + 1)) / CeedIntPow(2, d) ? 1 : -1; in main()
64 …CeedScalar x_array[12] = {-0.33, -0.65, 0.16, 0.99, -0.65, 0.16, 0.99, -0.33, 0.16, 0.99, -0.33, - in main()
80 if (fabs(v_array[i] - fx) > 1E-4) { in main()
82 printf("[%" CeedInt_FMT "] %f != %f = f(%f", dim, v_array[i], fx, coord[0]); in main()
83 for (CeedInt d = 1; d < dim; d++) printf(", %f", coord[d]); in main()
/libCEED/
H A D.gitlab-ci.yml1 # ----------------------------------------------------------------------------------------
3 # ----------------------------------------------------------------------------------------
5 - test:cpu-and-tidy
6 - test:gpu-and-float
13 # ----------------------------------------------------------------------------------------
15 # ----------------------------------------------------------------------------------------
16 noether-asan:
17 stage: test:cpu-and-tidy
19 - cpu
24 - export COVERAGE=0 CC=gcc CXX=g++ FC=gfortran
[all …]
/libCEED/examples/
H A Dbps.md6 :start-after: <!-- bps-inclusion -->
7 :end-before: <!-- bps-exclusion -->
10 (mass-operator)=
17 \langle v,u \rangle = \langle v,f \rangle ,
18 $$ (eq-general-weak-form)
20 …ngle v,f\rangle$ express the continuous bilinear and linear forms, respectively, defined on $V^p$,…
23 …u \rangle &:= \int_{\Omega} \, v \, u \, dV ,\\ \langle v,f \rangle &:= \int_{\Omega} \, v \, f \,…
33 $$ (eq-nodal-values)
36 Inserting the expressions {eq}`eq-nodal-values` into {eq}`eq-general-weak-form`, we obtain the inne…
39 \langle v,u \rangle = \bm v^T M \bm u , \qquad \langle v,f\rangle = \bm v^T \bm b \,.
[all …]
/libCEED/examples/solids/
H A Dindex.md1 (example-petsc-elasticity)=
3 # Solid mechanics mini-app
6 It solves the steady-state static momentum balance equations using unstructured high-order finite/s…
7 As for the {ref}`example-petsc-navier-stokes` case, the solid mechanics elasticity example has been…
9 …ini-app, we consider three formulations used in solid mechanics applications: linear elasticity, N…
11 The stress-strain relationship (constitutive law) for each of the material models is provided.
12 Due to the nonlinearity of material models in Neo-Hookean hyperelasticity, the Newton linearization…
15 Linear elasticity and small-strain hyperelasticity can both by obtained from the finite-strain hype…
16 …, while $\bm S$ and $\bm E$ are their finite-strain generalizations (second Piola-Kirchoff tensor …
22 {\overbrace{\bm S = \mathsf C \bm E}^{\text{St. Venant-Kirchoff}}} \\
[all …]
/libCEED/examples/python/
H A Dex2_surface.py2 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
3 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
5 # SPDX-License-Identifier: BSD-2-Clause
14 # python ex2_surface.py -c /cpu/self
15 # python ex2_surface.py -c /gpu/cuda
51 print(f" Ceed specification [-c] : {args.ceed}")
52 print(f" Mesh dimension [-d] : {dim}")
53 print(f" Mesh degree [-m] : {mesh_degree}")
54 print(f" Solution degree [-p] : {sol_degree}")
55 print(f" Num. 1D quadr. pts [-q] : {num_qpts}")
[all …]
H A Dex1_volume.py2 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
3 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
5 # SPDX-License-Identifier: BSD-2-Clause
14 # python ex1_volume -c /cpu/self
15 # python ex1_volume -c /gpu/cuda
50 print(f" Ceed specification [-c] : {args.ceed}")
51 print(f" Mesh dimension [-d] : {dim}")
52 print(f" Mesh degree [-m] : {mesh_degree}")
53 print(f" Solution degree [-p] : {sol_degree}")
54 print(f" Num. 1D quadr. pts [-q] : {num_qpts}")
[all …]
H A Dex3_volume.py2 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
3 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
5 # SPDX-License-Identifier: BSD-2-Clause
14 # python ex3_volume -c /cpu/self
15 # python ex3_volume -c /gpu/cuda
50 print(f" Ceed specification [-c] : {args.ceed}")
51 print(f" Mesh dimension [-d] : {dim}")
52 print(f" Mesh degree [-m] : {mesh_degree}")
53 print(f" Solution degree [-p] : {sol_degree}")
54 print(f" Num. 1D quadr. pts [-q] : {num_qpts}")
[all …]
/libCEED/examples/fluids/
H A Dpytorch_pkgconfig.py17 file.write(f"{variable}={value}\n")
21 file.write(f"{key}: {value}\n")
32 keywords['Cflags'] += f'-I{include_path} '
38 with torchCMakePath.open('r') as f:
39 for line in f:
48 keywords['Libs'] += f'-L{lib_path} '
49 keywords['Libs'] += '-lc10 -ltorch_cpu '
51 keywords['Libs'] += '-lc10_cuda -ltorch_cuda '
58 keywords['Libs'] += f'-Wl,--no-as-needed,"{torch_cuda_path.as_posix()}" '
59 keywords['Libs'] += '-ltorch '
/libCEED/examples/nek/
H A Dnek-examples.sh4 # the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
8 # libraries and APIs for efficient high-order finite element and spectral
12 # The CEED research is supported by the Exascale Computing Project (17-SC-20-SC)
48 if [[ "${#BASH_ARGV[@]}" -ne "$#" ]]; then
72 -h|-help Print this usage information and exit
73 -c|-ceed Ceed backend to be used for the run (optional, default: /cpu/self)
74 -e|-example Example name (optional, default: bp1)
75 -n|-np Specify number of MPI ranks for the run (optional, default: 1)
76 -t|-test Run in test mode (not on by default)
77 -b|-box Box case in boxes sub-directory found along with this script (default: 2x2x2)
[all …]
/libCEED/interface/
H A Dceed-qfunction.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>
11 #include <ceed/jit-tools.h>
37 CeedQFunctionUser f; member
43 /// ----------------------------------------------------------------------------
45 /// ----------------------------------------------------------------------------
56 @param[in] f Function pointer to evaluate action at quadrature points.
60 @return An error code: 0 - success, otherwise - failure
[all …]
/libCEED/examples/fluids/problems/
H A Dblasius.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
23 PetscScalar *r, f[4], h[4]; in CompressibleBlasiusResidual() local
24 PetscInt N = blasius->n_cheb; in CompressibleBlasiusResidual()
25 State S_infty = blasius->S_infty; in CompressibleBlasiusResidual()
29 …PetscScalar Ma = Mach(&blasius->newtonian_ctx, S_infty.Y.temperature, U_infty), Pr = Prandtl(&blas… in CompressibleBlasiusResidual()
30 gamma = HeatCapacityRatio(&blasius->newtonian_ctx); in CompressibleBlasiusResidual()
36 // Left boundary conditions f = f' = 0 in CompressibleBlasiusResidual()
37 ChebyshevEval(N, Tf, -1., blasius->eta_max, f); in CompressibleBlasiusResidual()
[all …]
/libCEED/examples/mfem/
H A Dbp3.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
15 // object constructed based on a command line argument. (-ceed).
27 // ./bp3 -ceed /cpu/self
28 // ./bp3 -ceed /gpu/cuda
29 // ./bp3 -m ../../../mfem/data/fichera.mesh -o 4
30 // ./bp3 -m ../../../mfem/data/square-disc-nurbs.mesh -o 6
31 // ./bp3 -m ../../../mfem/data/inline-segment.mesh -o 8
44 static const double x[3] = {-0.32, 0.15, 0.24}; in solution()
[all …]
/libCEED/examples/fluids/qfunctions/
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
32 …alar Tf_cheb[BLASIUS_MAX_N_CHEBYSHEV]; // !< Chebyshev coefficient for f
33 …CeedScalar Th_cheb[BLASIUS_MAX_N_CHEBYSHEV - 1]; // !< Chebyshev coefficien…
40 …QFUNCTION_HELPER void ChebyshevEval(int N, const double *Tf, double x, double eta_max, double *f) { in ChebyshevEval() argument
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()
[all …]

12345678910