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…
15 // The example has no dependencies, and is designed to be self-contained.
18 // All libCEED objects use a Ceed device object constructed based on a command line argument (-ceed…
22 // make ex3-volume [CEED_DIR=</path/to/libceed>]
24 // Sample runs:
26 // ./ex3-volume
27 // ./ex3-volume -ceed /cpu/self
28 // ./ex3-volume -ceed /gpu/cuda
30 // Test in 1D-3D
31 //TESTARGS(name="1D User QFunction") -ceed {ceed_resource} -d 1 -t
32 //TESTARGS(name="2D User QFunction") -ceed {ceed_resource} -d 2 -t
33 //TESTARGS(name="3D User QFunction") -ceed {ceed_resource} -d 3 -t
38 #include "ex3-volume.h"
61 CeedInt prob_size = -1; // approximate problem size in main()
68 if (!strcmp(argv[ia], "-h")) { in main()
70 } else if (!strcmp(argv[ia], "-c") || !strcmp(argv[ia], "-ceed")) { in main()
72 } else if (!strcmp(argv[ia], "-d")) { in main()
75 } else if (!strcmp(argv[ia], "-m")) { in main()
77 } else if (!strcmp(argv[ia], "-p")) { in main()
79 } else if (!strcmp(argv[ia], "-q")) { in main()
81 } else if (!strcmp(argv[ia], "-s")) { in main()
83 } else if (!strcmp(argv[ia], "-b")) { in main()
85 } else if (!strcmp(argv[ia], "-t")) { in main()
100 printf(" Ceed specification [-c] : %s\n", ceed_spec); in main()
101 printf(" Mesh dimension [-d] : %" CeedInt_FMT "\n", dim); in main()
102 printf(" Mesh degree [-m] : %" CeedInt_FMT "\n", mesh_degree); in main()
103 printf(" Solution degree [-p] : %" CeedInt_FMT "\n", sol_degree); in main()
104 printf(" Num. 1D quadrature pts [-q] : %" CeedInt_FMT "\n", num_qpts); in main()
105 printf(" Approx. # unknowns [-s] : %" CeedInt_FMT "\n", prob_size); in main()
108 printf("Test/quiet mode is %s\n", (test ? "ON" : "OFF (use -t to enable)")); in main()
115 // Select appropriate backend and logical device based on the (-ceed) command line argument. in main()
126 // Determine the mesh size based on the given approximate problem size. in main()
217 // Create auxiliary solution-size vectors. in main()
229 // Benchmark runs in main()
232 printf(" Executing %d benchmarking runs...\n", benchmark); in main()
256 printf("Volume error : % .14g\n", volume - exact_volume); in main()
259 CeedScalar tol = (dim == 1 ? 200. * CEED_EPSILON : dim == 2 ? 1E-5 : 1E-5); in main()
261 if (fabs(volume - exact_volume) > tol) printf("Volume error : % .1e\n", volume - exact_volume); in main()
300 r--; in GetCartesianMeshSize()
316 nd[d] = num_xyz[d] * (p - 1) + 1; in BuildCartesianRestriction()
320 // elem: 0 1 n-1 in BuildCartesianRestriction()
321 // |---*-...-*---|---*-...-*---|- ... -|--...--| in BuildCartesianRestriction()
322 // num_nodes: 0 1 p-1 p p+1 2*p n*p in BuildCartesianRestriction()
338 g_nodes += (e_xyz[d] * (p - 1) + r_nodes % p) * g_nodes_stride; in BuildCartesianRestriction()
361 nd[d] = num_xyz[d] * (p - 1) + 1; in SetCartesianMeshCoords()
370 CeedLobattoQuadrature(p, nodes, NULL); // nodes are in [-1,1] in SetCartesianMeshCoords()
377 coords[gs_nodes + scalar_size * d] = ((d_1d / (p - 1)) + nodes[d_1d % (p - 1)]) / num_xyz[d]; in SetCartesianMeshCoords()
399 coords[i] = 0.5 + 1. / sqrt(3.) * sin((2. / 3.) * M_PI * (coords[i] - 0.5)); in TransformMeshCoords()