Lines Matching refs:dim
7 static PetscErrorCode ViewResults(PetscViewer viewer, PetscInt N, PetscInt dim, PetscScalar *B, Pet… in ViewResults() argument
13 PetscCall(PetscScalarView(N * dim, D, viewer)); in ViewResults()
15 PetscCall(PetscScalarView(N * dim * dim, H, viewer)); in ViewResults()
20 PetscCall(PetscRealView(N * dim, rD, viewer)); in ViewResults()
22 PetscCall(PetscRealView(N * dim * dim, rH, viewer)); in ViewResults()
29 PetscInt dim, i, nc; in TestEvaluate() local
41 PetscCall(DMGetDimension(dm, &dim)); in TestEvaluate()
42 …PetscCall(VecCreateFromOptions(PetscObjectComm((PetscObject)field), NULL, 1, n * dim, PETSC_DETERM… in TestEvaluate()
43 PetscCall(VecSetBlockSize(points, dim)); in TestEvaluate()
45 for (i = 0; i < n * dim; i++) PetscCall(PetscRandomGetValue(rand, &array[i])); in TestEvaluate()
47 …alloc6(n * nc, &B, n * nc, &rB, n * nc * dim, &D, n * nc * dim, &rD, n * nc * dim * dim, &H, n * n… in TestEvaluate()
54 PetscCall(ViewResults(viewer, n * nc, dim, B, D, H, rB, rD, rH)); in TestEvaluate()
64 PetscInt dim, i, nc, nq; in TestEvaluateFE() local
77 PetscCall(DMGetDimension(dm, &dim)); in TestEvaluateFE()
90 …PetscCall(PetscMalloc6(N, &B, N, &rB, N * dim, &D, N * dim, &rD, N * dim * dim, &H, N * dim * dim,… in TestEvaluateFE()
98 PetscCall(ViewResults(viewer, N, dim, B, D, H, rB, rD, rH)); in TestEvaluateFE()
108 PetscInt dim, i, nc; in TestEvaluateFV() local
121 PetscCall(DMGetDimension(dm, &dim)); in TestEvaluateFV()
133 …PetscCall(PetscMalloc6(N, &B, N, &rB, N * dim, &D, N * dim, &rD, N * dim * dim, &H, N * dim * dim,… in TestEvaluateFV()
139 PetscCall(ViewResults(viewer, N, dim, B, D, H, rB, rD, rH)); in TestEvaluateFV()
146 static PetscErrorCode radiusSquared(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf,… in radiusSquared() argument
152 for (i = 0; i < dim; i++) r2 += PetscSqr(x[i]); in radiusSquared()
161 PetscInt dim; in TestShellEvaluate() local
168 PetscCall(VecGetBlockSize(points, &dim)); in TestShellEvaluate()
176 for (j = 0; j < dim; j++) r2 += PetscSqr(PetscRealPart(x[i * dim + j])); in TestShellEvaluate()
188 … for (k = 0; k < dim; k++) ((PetscScalar *)D)[(i * Nc + j) * dim + k] = 2. * m * x[i * dim + k]; in TestShellEvaluate()
190 …for (k = 0; k < dim; k++) ((PetscReal *)D)[(i * Nc + j) * dim + k] = 2. * m * PetscRealPart(x[i * … in TestShellEvaluate()
195 for (k = 0; k < dim; k++) in TestShellEvaluate()
196 …for (l = 0; l < dim; l++) ((PetscScalar *)H)[((i * Nc + j) * dim + k) * dim + l] = (k == l) ? 2. *… in TestShellEvaluate()
198 for (k = 0; k < dim; k++) in TestShellEvaluate()
199 …for (l = 0; l < dim; l++) ((PetscReal *)H)[((i * Nc + j) * dim + k) * dim + l] = (k == l) ? 2. * m… in TestShellEvaluate()
225 PetscInt dim = 2; in main() local
240 PetscCall(PetscOptionsRangeInt("-dim", "DM intrinsic dimension", "ex1.c", dim, &dim, NULL, 1, 3)); in main()
249 …PetscCheck(dim <= 3, comm, PETSC_ERR_ARG_OUTOFRANGE, "This examples works for dim <= 3, not %" Pet… in main()
273 PetscCall(DMGetDimension(dm, &dim)); in main()
275 if (simplex) PetscCall(PetscDTStroudConicalQuadrature(dim, 1, pointsPerEdge, -1.0, 1.0, &quad)); in main()
276 else PetscCall(PetscDTGaussTensorQuadrature(dim, 1, pointsPerEdge, -1.0, 1.0, &quad)); in main()
292 PetscCall(PetscFECreateDefault(PETSC_COMM_SELF, dim, nc, simplex, NULL, PETSC_DEFAULT, &fe)); in main()
314 switch (dim) { in main()
327 PetscCall(PetscMalloc1(nc * (1 << dim), &cv)); in main()
328 for (i = 0; i < nc * (1 << dim); i++) { in main()
336 PetscCall(PetscDTGaussTensorQuadrature(dim, 1, pointsPerEdge, -1.0, 1.0, &quad)); in main()