Lines Matching refs:mom
327 PetscReal mom[3] = {0.0, 0.0, 0.0}; in computeParticleMoments() local
346 mom[0] += PetscRealPart(w[idx]); in computeParticleMoments()
347 mom[1] += PetscRealPart(w[idx]) * c[0]; in computeParticleMoments()
348 for (d = 0; d < dim; ++d) mom[2] += PetscRealPart(w[idx]) * c[d] * c[d]; in computeParticleMoments()
355 …PetscCallMPI(MPIU_Allreduce(mom, moments, 3, MPIU_REAL, MPI_SUM, PetscObjectComm((PetscObject)sw))… in computeParticleMoments()
380 PetscScalar mom; in computeFEMMoments() local
385 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFEMMoments()
386 moments[0] = PetscRealPart(mom); in computeFEMMoments()
388 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFEMMoments()
389 moments[1] = PetscRealPart(mom); in computeFEMMoments()
391 PetscCall(DMPlexComputeIntegralFEM(dm, u, &mom, user)); in computeFEMMoments()
392 moments[2] = PetscRealPart(mom); in computeFEMMoments()