26
26
Float f (const point& x) { return 1+(0.5/N)*(x[0]*(1-x[0])+x[1]*(1-x[1])+x[2]*(1-x[2])); }
27
27
int main(int argc, char**argv) {
30
30
Float prec = (argc > 2) ? atof(argv[2]) : 1e-10;
33
33
field fh = interpolate(Vh, f);
38
38
#ifndef _RHEOLEF_HAVE_MPI
40
40
#else // _RHEOLEF_HAVE_MPI
41
41
Float dis_sum = mpi::all_reduce (fh.comm(), sum, std::plus<Float>());
43
43
#endif // _RHEOLEF_HAVE_MPI