Lines Matching refs:coords

37   (*ctx)->coords = NULL;  in DMInterpolationCreate()
251 PetscCall(VecCreate(comm, &ctx->coords)); in DMInterpolationSetUp()
252 PetscCall(VecSetSizes(ctx->coords, ctx->n * ctx->dim, PETSC_DECIDE)); in DMInterpolationSetUp()
253 PetscCall(VecSetBlockSize(ctx->coords, ctx->dim)); in DMInterpolationSetUp()
254 PetscCall(VecSetType(ctx->coords, VECSTANDARD)); in DMInterpolationSetUp()
255 PetscCall(VecGetArray(ctx->coords, &a)); in DMInterpolationSetUp()
272 PetscCall(VecRestoreArray(ctx->coords, &a)); in DMInterpolationSetUp()
309 …PetscCheck(ctx->coords, ctx->comm, PETSC_ERR_ARG_WRONGSTATE, "The interpolation context has not be… in DMInterpolationGetCoordinates()
310 *coordinates = ctx->coords; in DMInterpolationGetCoordinates()
336 …PetscCheck(ctx->coords, ctx->comm, PETSC_ERR_ARG_WRONGSTATE, "The interpolation context has not be… in DMInterpolationGetVector()
361 …PetscCheck(ctx->coords, ctx->comm, PETSC_ERR_ARG_WRONGSTATE, "The interpolation context has not be… in DMInterpolationRestoreVector()
371 const PetscScalar *coords; in DMInterpolate_Segment_Private() local
377 PetscCall(VecGetArrayRead(ctx->coords, &coords)); in DMInterpolate_Segment_Private()
381 xir[0] = invJ * PetscRealPart(coords[p] - v0); in DMInterpolate_Segment_Private()
390 PetscCall(VecRestoreArrayRead(ctx->coords, &coords)); in DMInterpolate_Segment_Private()
398 const PetscScalar *coords; in DMInterpolate_Triangle_Private() local
405 PetscCall(VecGetArrayRead(ctx->coords, &coords)); in DMInterpolate_Triangle_Private()
413 …f < ctx->dim; ++f) xi[d] += invJ[d * ctx->dim + f] * 0.5 * PetscRealPart(coords[p * ctx->dim + f] … in DMInterpolate_Triangle_Private()
418 PetscCall(VecRestoreArrayRead(ctx->coords, &coords)); in DMInterpolate_Triangle_Private()
429 const PetscScalar *coords; in DMInterpolate_Tetrahedron_Private() local
435 PetscCall(VecGetArrayRead(ctx->coords, &coords)); in DMInterpolate_Tetrahedron_Private()
443 …f < ctx->dim; ++f) xi[d] += invJ[d * ctx->dim + f] * 0.5 * PetscRealPart(coords[p * ctx->dim + f] … in DMInterpolate_Tetrahedron_Private()
448 PetscCall(VecRestoreArrayRead(ctx->coords, &coords)); in DMInterpolate_Tetrahedron_Private()
537 const PetscScalar *coords; in DMInterpolate_Quad_Private() local
579 PetscCall(VecGetArrayRead(ctx->coords, &coords)); in DMInterpolate_Quad_Private()
587 xi[0] = coords[p * ctx->dim + 0]; in DMInterpolate_Quad_Private()
588 xi[1] = coords[p * ctx->dim + 1]; in DMInterpolate_Quad_Private()
613 PetscCall(VecRestoreArrayRead(ctx->coords, &coords)); in DMInterpolate_Quad_Private()
770 const PetscScalar *coords; in DMInterpolate_Hex_Private() local
798 PetscCall(VecGetArrayRead(ctx->coords, &coords)); in DMInterpolate_Hex_Private()
807 xi[0] = coords[p * ctx->dim + 0]; in DMInterpolate_Hex_Private()
808 xi[1] = coords[p * ctx->dim + 1]; in DMInterpolate_Hex_Private()
809 xi[2] = coords[p * ctx->dim + 2]; in DMInterpolate_Hex_Private()
828 PetscCall(VecRestoreArrayRead(ctx->coords, &coords)); in DMInterpolate_Hex_Private()
883 const PetscScalar *coords; in DMInterpolationEvaluate() local
888 PetscCall(VecGetArrayRead(ctx->coords, &coords)); in DMInterpolationEvaluate()
896 for (d = 0; d < cdim; ++d) pcoords[d] = PetscRealPart(coords[p * cdim + d]); in DMInterpolationEvaluate()
938 PetscCall(VecRestoreArrayRead(ctx->coords, &coords)); in DMInterpolationEvaluate()
986 PetscCall(VecDestroy(&(*ctx)->coords)); in DMInterpolationDestroy()