Lines Matching refs:cdim
198 PetscInt coneSize, f, dim, cdim, d; in CheckGaussLaw() local
202 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CheckGaussLaw()
203 if (dim != cdim) PetscFunctionReturn(PETSC_SUCCESS); in CheckGaussLaw()
213 for (d = 0; d < cdim; ++d) integral[d] += sgn * area * normal[d]; in CheckGaussLaw()
215 for (d = 0; d < cdim; ++d) in CheckGaussLaw()
224 PetscInt dim, depth, cdim; in CheckCell() local
229 PetscCall(DMGetCoordinateDim(dm, &cdim)); in CheckCell()
230 if (v0Ex) PetscCall(CheckFEMGeometry(dm, cell, cdim, v0Ex, JEx, invJEx, detJEx)); in CheckCell()
232 PetscCall(CheckFVMGeometry(dm, cell, cdim, centroidEx, normalEx, volEx)); in CheckCell()
253 …PetscCall(PetscMalloc5(cdim, &v0ExT, cdim * cdim, &JExT, cdim * cdim, &invJExT, cdim, ¢roidExT… in CheckCell()
254 PetscCall(PetscMalloc2(cdim, &faceCentroidExT, cdim, &faceNormalExT)); in CheckCell()
257 numCorners = coordSize / cdim; in CheckCell()
278 for (d = 0; d < cdim; ++d) PetscCall(PetscRandomGetValue(r, &trans[d])); in CheckCell()
279 switch (cdim) { in CheckCell()
302 …ctComm((PetscObject)dm), PETSC_ERR_ARG_WRONG, "Invalid coordinate dimension %" PetscInt_FMT, cdim); in CheckCell()
306 for (d = 0; d < cdim; ++d) { in CheckCell()
308 for (e = 0; e < cdim; ++e) { in CheckCell()
309 JExT[d * cdim + e] = JEx[d * cdim + e]; in CheckCell()
310 invJExT[d * cdim + e] = invJEx[d * cdim + e]; in CheckCell()
313 for (d = 0; d < cdim; ++d) { in CheckCell()
318 JExT[d * cdim + e] *= scale; in CheckCell()
319 invJExT[d * cdim + e] /= scale; in CheckCell()
324 for (d = 0; d < cdim; ++d) { in CheckCell()
325 for (e = 0, rot[d] = 0.0; e < cdim; ++e) rot[d] += R[d * cdim + e] * v0ExT[e]; in CheckCell()
327 for (d = 0; d < cdim; ++d) v0ExT[d] = rot[d]; in CheckCell()
328 for (d = 0; d < cdim; ++d) { in CheckCell()
329 for (e = 0; e < cdim; ++e) { in CheckCell()
330 …for (f = 0, rotM[d * cdim + e] = 0.0; f < cdim; ++f) rotM[d * cdim + e] += R[d * cdim + f] * JExT[… in CheckCell()
333 for (d = 0; d < cdim; ++d) { in CheckCell()
334 for (e = 0; e < cdim; ++e) JExT[d * cdim + e] = rotM[d * cdim + e]; in CheckCell()
336 for (d = 0; d < cdim; ++d) { in CheckCell()
337 for (e = 0; e < cdim; ++e) { in CheckCell()
338 …for (f = 0, rotM[d * cdim + e] = 0.0; f < cdim; ++f) rotM[d * cdim + e] += invJExT[d * cdim + f] *… in CheckCell()
341 for (d = 0; d < cdim; ++d) { in CheckCell()
342 for (e = 0; e < cdim; ++e) invJExT[d * cdim + e] = rotM[d * cdim + e]; in CheckCell()
347 for (d = 0; d < cdim; ++d) { in CheckCell()
351 for (d = 0; d < cdim; ++d) { in CheckCell()
359 for (d = 0; d < cdim; ++d) { in CheckCell()
360 for (e = 0, rot[d] = 0.0; e < cdim; ++e) rot[d] += R[d * cdim + e] * centroidExT[e]; in CheckCell()
362 for (d = 0; d < cdim; ++d) centroidExT[d] = rot[d]; in CheckCell()
363 for (d = 0; d < cdim; ++d) { in CheckCell()
364 for (e = 0, rot[d] = 0.0; e < cdim; ++e) rot[d] += R[d * cdim + e] * normalExT[e]; in CheckCell()
366 for (d = 0; d < cdim; ++d) normalExT[d] = rot[d]; in CheckCell()
367 for (d = 0, norm = 0.0; d < cdim; ++d) norm += PetscSqr(normalExT[d]); in CheckCell()
370 for (d = 0; d < cdim; ++d) normalExT[d] /= norm; in CheckCell()
372 for (d = 0; d < cdim; ++d) { in CheckCell()
374 newCoords[p * cdim + d] *= scale; in CheckCell()
375 newCoords[p * cdim + d] += trans[d]; in CheckCell()
379 for (d = 0; d < cdim; ++d) { in CheckCell()
380 …for (e = 0, rot[d] = 0.0; e < cdim; ++e) rot[d] += R[d * cdim + e] * PetscRealPart(newCoords[p * c… in CheckCell()
382 for (d = 0; d < cdim; ++d) newCoords[p * cdim + d] = rot[d]; in CheckCell()
385 PetscCall(ChangeCoordinates(dm, cdim, newCoords)); in CheckCell()
386 if (v0Ex) PetscCall(CheckFEMGeometry(dm, 0, cdim, v0ExT, JExT, invJExT, detJExT)); in CheckCell()
388 PetscCall(CheckFVMGeometry(dm, cell, cdim, centroidExT, normalExT, volExT)); in CheckCell()
394 PetscInt off = c * cdim; in CheckCell()
397 for (d = 0; d < cdim; ++d) { in CheckCell()
401 for (d = 0; d < cdim; ++d) { in CheckCell()
408 for (d = 0; d < cdim; ++d) { in CheckCell()
409 … for (e = 0, rot[d] = 0.0; e < cdim; ++e) rot[d] += R[d * cdim + e] * faceCentroidExT[e]; in CheckCell()
411 for (d = 0; d < cdim; ++d) faceCentroidExT[d] = rot[d]; in CheckCell()
412 for (d = 0; d < cdim; ++d) { in CheckCell()
413 for (e = 0, rot[d] = 0.0; e < cdim; ++e) rot[d] += R[d * cdim + e] * faceNormalExT[e]; in CheckCell()
415 for (d = 0; d < cdim; ++d) faceNormalExT[d] = rot[d]; in CheckCell()
416 for (d = 0, norm = 0.0; d < cdim; ++d) norm += PetscSqr(faceNormalExT[d]); in CheckCell()
418 for (d = 0; d < cdim; ++d) faceNormalExT[d] /= norm; in CheckCell()
420 … PetscCall(CheckFVMGeometry(dm, cone[c], cdim, faceCentroidExT, faceNormalExT, faceVolExT)); in CheckCell()