Lines Matching refs:grad
493 PetscScalar *grad = &gradsum[coordDim * numComponents]; in InterpolateGradient() local
504 PetscCall(PetscArrayzero(grad, coordDim * numComponents)); in InterpolateGradient()
521 …for (d = 0; d < coordDim; ++d) grad[fc * coordDim + d] += interpolant[fc * dim + d] * wt * fegeom.… in InterpolateGradient()
528 for (d = 0; d < coordDim; ++d) gradsum[fc * coordDim + d] += grad[fc * coordDim + d]; in InterpolateGradient()
535 … PetscCall(PetscPrintf(PETSC_COMM_SELF, "%g", (double)PetscRealPart(grad[fc * coordDim + d]))); in InterpolateGradient()
554 Vec f, rhs, fhat, grad; /* Particle field f, \int phi_i f, FEM field */ in TestFieldGradientProjection() local
565 PetscCall(DMGetGlobalVector(dm, &grad)); in TestFieldGradientProjection()
582 PetscCall(InterpolateGradient(dm, fhat, grad)); in TestFieldGradientProjection()
587 PetscCall(KSPSolve(ksp, rhs, grad)); in TestFieldGradientProjection()
593 PetscCall(computeFEMMoments(dm, grad, fmoments, user)); in TestFieldGradientProjection()
604 PetscCall(DMRestoreGlobalVector(dm, &grad)); in TestFieldGradientProjection()