include "test.idp" cout << functionDEFINITION << "mean" << endl; real t; cout << parameterDEFINITION << "complex" << endl; { complex c = 4 + 2i; t = clock(); complex res = mean(c); t = clock() - t; cout << timeELAPSED << t << endl; test(res == 4 + 2i); } cout << parameterDEFINITION << "real" << endl; { real r = 42; t = clock(); real res = mean(r); t = clock() - t; cout << timeELAPSED << t << endl; test(res == 42); } cout << parameterDEFINITION << "varf" << endl; { mesh Th = square(10, 10); fespace Uh(Th, P1); varf vTest (u, v) = intalledges(Th)( mean(u) * v ) + on(1, 2, 3, 4, u=1) ; matrix Test = vTest(Uh, Uh); real[int] TestRHS = vTest(0, Uh); Uh u; u[] = Test^-1 * TestRHS; test(u[].linfty == 1); }