Lines Matching full:dim

8 static CeedScalar Eval(CeedInt dim, const CeedScalar x[]) {  in Eval()  argument
10 if (dim > 1) result += atan(x[1] + 0.2); in Eval()
11 if (dim > 2) result += exp(-(x[2] + 0.3) * (x[2] + 0.3)); in Eval()
15 static CeedScalar GetTolerance(CeedScalarType scalar_type, int dim) { in GetTolerance() argument
18 if (dim == 3) tol = 0.005; in GetTolerance()
31 for (CeedInt dim = 1; dim <= 3; dim++) { in main() local
34 …const CeedInt p = 9, q = 9, num_points = 4, x_dim = CeedIntPow(2, dim), p_dim = CeedIntPow(p, dim); in main()
37 CeedVectorCreate(ceed, x_dim * dim, &x); in main()
38 CeedVectorCreate(ceed, p_dim * dim, &x_nodes); in main()
39 CeedVectorCreate(ceed, num_points * dim, &x_points); in main()
41 CeedVectorCreate(ceed, num_points * dim, &u_points); in main()
43 CeedVectorCreate(ceed, num_points * dim, &ones); in main()
49 CeedBasisCreateTensorH1Lagrange(ceed, dim, dim, 2, p, CEED_GAUSS_LOBATTO, &basis_x); in main()
51 CeedScalar x_array[x_dim * dim]; in main()
53 for (CeedInt d = 0; d < dim; d++) { in main()
67 CeedScalar coord[dim]; in main()
69 for (CeedInt d = 0; d < dim; d++) coord[d] = x_array[d * p_dim + i]; in main()
70 u_array[i] = Eval(dim, coord); in main()
77 CeedBasisCreateTensorH1Lagrange(ceed, dim, 1, p, q, CEED_GAUSS, &basis_u); in main()
94 for (CeedInt i = 0; i < num_points * dim; i++) sum_2 += u_points_array[i]; in main()
104 CeedScalar tol = GetTolerance(scalar_type, dim); in main()
106 if (fabs(sum_1 - sum_2) > tol) printf("[%" CeedInt_FMT "] %f != %f\n", dim, sum_1, sum_2); in main()