Lines Matching +full:runs +full:- +full:on

1 // 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 …es a simple usage of libCEED to compute the volume of a 3D body using matrix-free application of a…
13 // The example has no dependencies, and is designed to be self-contained.
16 // All libCEED objects use a Ceed device object constructed based on a command line argument (-ceed…
20 // make ex1-volume [CEED_DIR=</path/to/libceed>]
22 // Sample runs:
24 // ./ex1-volume
25 // ./ex1-volume -ceed /cpu/self
26 // ./ex1-volume -ceed /gpu/cuda
28 // Test in 1D-3D
29 //TESTARGS(name="1D User QFunction") -ceed {ceed_resource} -d 1 -t
30 //TESTARGS(name="2D User QFunction") -ceed {ceed_resource} -d 2 -t
31 //TESTARGS(name="3D User QFunction") -ceed {ceed_resource} -d 3 -t
32 //TESTARGS(name="1D Gallery QFunction") -ceed {ceed_resource} -d 1 -t -g
33 //TESTARGS(name="2D Gallery QFunction") -ceed {ceed_resource} -d 2 -t -g
34 //TESTARGS(name="3D Gallery QFunction") -ceed {ceed_resource} -d 3 -t -g
39 #include "ex1-volume.h"
62 CeedInt prob_size = -1; // approximate problem size in main()
69 if (!strcmp(argv[ia], "-h")) { in main()
71 } else if (!strcmp(argv[ia], "-c") || !strcmp(argv[ia], "-ceed")) { in main()
73 } else if (!strcmp(argv[ia], "-d")) { in main()
76 } else if (!strcmp(argv[ia], "-m")) { in main()
78 } else if (!strcmp(argv[ia], "-p")) { in main()
80 } else if (!strcmp(argv[ia], "-q")) { in main()
82 } else if (!strcmp(argv[ia], "-s")) { in main()
84 } else if (!strcmp(argv[ia], "-b")) { in main()
86 } else if (!strcmp(argv[ia], "-t")) { in main()
88 } else if (!strcmp(argv[ia], "-g")) { in main()
103 printf(" Ceed specification [-c] : %s\n", ceed_spec); in main()
104 printf(" Mesh dimension [-d] : %" CeedInt_FMT "\n", dim); in main()
105 printf(" Mesh degree [-m] : %" CeedInt_FMT "\n", mesh_degree); in main()
106 printf(" Solution degree [-p] : %" CeedInt_FMT "\n", sol_degree); in main()
107 printf(" Num. 1D quadrature pts [-q] : %" CeedInt_FMT "\n", num_qpts); in main()
108 printf(" Approx. # unknowns [-s] : %" CeedInt_FMT "\n", prob_size); in main()
109 printf(" QFunction source [-g] : %s\n", gallery ? "gallery" : "header"); in main()
111 printf("Test/quiet mode is %s\n", (test ? "ON" : "OFF (use -t to enable)")); in main()
118 // Select appropriate backend and logical device based on the (-ceed) command line argument. in main()
129 // Determine the mesh size based on the given approximate problem size. in main()
228 // Create auxiliary solution-size vectors. in main()
240 // Benchmark runs in main()
243 printf(" Executing %d benchmarking runs...\n", benchmark); in main()
267 printf("Volume error : % .14g\n", volume - exact_volume); in main()
270 CeedScalar tol = (dim == 1 ? 200. * CEED_EPSILON : dim == 2 ? 1E-5 : 1E-5); in main()
272 if (fabs(volume - exact_volume) > tol) printf("Volume error : % .1e\n", volume - exact_volume); in main()
311 r--; in GetCartesianMeshSize()
327 nd[d] = num_xyz[d] * (p - 1) + 1; in BuildCartesianRestriction()
331 // elem: 0 1 n-1 in BuildCartesianRestriction()
332 // |---*-...-*---|---*-...-*---|- ... -|--...--| in BuildCartesianRestriction()
333 // num_nodes: 0 1 p-1 p p+1 2*p n*p in BuildCartesianRestriction()
349 g_nodes += (e_xyz[d] * (p - 1) + r_nodes % p) * g_nodes_stride; in BuildCartesianRestriction()
370 nd[d] = num_xyz[d] * (p - 1) + 1; in SetCartesianMeshCoords()
379 CeedLobattoQuadrature(p, nodes, NULL); // nodes are in [-1,1] in SetCartesianMeshCoords()
387 coords[gs_nodes + scalar_size * d] = ((d_1d / (p - 1)) + nodes[d_1d % (p - 1)]) / num_xyz[d]; in SetCartesianMeshCoords()
409 coords[i] = 0.5 + 1. / sqrt(3.) * sin((2. / 3.) * M_PI * (coords[i] - 0.5)); in TransformMeshCoords()