Lines Matching refs:mom
224 PetscReal mom[3] = {0.0, 0.0, 0.0}; in computeParticleMoments() local
245 mom[0] += PetscRealPart(w[idx * Nc + c]); in computeParticleMoments()
246 mom[1] += PetscRealPart(w[idx * Nc + c]) * x[0]; in computeParticleMoments()
247 … for (PetscInt d = 0; d < dim; ++d) mom[2] += PetscRealPart(w[idx * Nc + c]) * PetscSqr(x[d]); in computeParticleMoments()
255 …PetscCallMPI(MPIU_Allreduce(mom, moments, 3, MPIU_REAL, MPI_SUM, PetscObjectComm((PetscObject)sw))… in computeParticleMoments()
284 PetscScalar mom; in computeFieldMoments() local
289 mom = 0.; in computeFieldMoments()
290 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFieldMoments()
291 moments[0] = PetscRealPart(mom); in computeFieldMoments()
293 mom = 0.; in computeFieldMoments()
294 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFieldMoments()
295 moments[1] = PetscRealPart(mom); in computeFieldMoments()
297 mom = 0.; in computeFieldMoments()
298 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFieldMoments()
299 moments[2] = PetscRealPart(mom); in computeFieldMoments()