Searched refs:gradsum (Results 1 – 2 of 2) sorted by relevance
| /petsc/src/dm/impls/swarm/tests/ |
| H A D | ex2.c | 446 PetscScalar *interpolant, *gradsum; in InterpolateGradient() local 482 …PetscCall(PetscMalloc6(coordDim * numComponents * 2, &gradsum, coordDim * numComponents, &interpol… in InterpolateGradient() 489 PetscCall(PetscArrayzero(gradsum, coordDim * numComponents)); in InterpolateGradient() 493 PetscScalar *grad = &gradsum[coordDim * numComponents]; in InterpolateGradient() 528 for (d = 0; d < coordDim; ++d) gradsum[fc * coordDim + d] += grad[fc * coordDim + d]; in InterpolateGradient() 542 PetscCall(DMPlexVecSetClosure(dmC, NULL, locC, v, gradsum, INSERT_VALUES)); in InterpolateGradient() 544 PetscCall(PetscFree6(gradsum, interpolant, coords, fegeom.detJ, fegeom.J, fegeom.invJ)); in InterpolateGradient()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexfem.c | 2284 PetscScalar *interpolant, *gradsum; in DMPlexComputeGradientClementInterpolant() local 2321 …PetscCall(PetscMalloc6(coordDim * numComponents * 2, &gradsum, coordDim * numComponents, &interpol… in DMPlexComputeGradientClementInterpolant() 2329 PetscCall(PetscArrayzero(gradsum, coordDim * numComponents)); in DMPlexComputeGradientClementInterpolant() 2333 PetscScalar *grad = &gradsum[coordDim * numComponents]; in DMPlexComputeGradientClementInterpolant() 2377 for (d = 0; d < coordDim; ++d) gradsum[fc * coordDim + d] += grad[fc * coordDim + d]; in DMPlexComputeGradientClementInterpolant() 2392 for (d = 0; d < coordDim; ++d) gradsum[fc * coordDim + d] /= volsum; in DMPlexComputeGradientClementInterpolant() 2395 PetscCall(DMPlexVecSetClosure(dmC, NULL, locC, v, gradsum, INSERT_VALUES)); in DMPlexComputeGradientClementInterpolant() 2397 PetscCall(PetscFree6(gradsum, interpolant, coords, fegeom.detJ, fegeom.J, fegeom.invJ)); in DMPlexComputeGradientClementInterpolant()
|