include "test.idp" cout << functionDEFINITION << "int1d" << endl; real t; mesh Th = square(10, 10); real res; t = clock(); res = int1d(Th, 1)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(res == 1); t = clock(); res = int1d(Th, 1)(x); t = clock() - t; cout << timeELAPSED << t << endl; test(res == (1./2.)); t = clock(); res = int1d(Th, 1, levelset=y)(x); t = clock() - t; cout << timeELAPSED << t << endl; test(res == (1./2.)); t = clock(); res = int1d(Th, 1, 2)(x + y); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(2 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qfe=qf1pE)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(res == 1); t = clock(); res = int1d(Th, 1, qforder=2)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(res == 1); t = clock(); res = int1d(Th, 1, qfe=qf2pE)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qforder=3)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qfe=qf3pE)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qforder=6)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qforder=8)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qfe=qf4pE)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qfe=qf5pE)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qforder=10)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qforder=2)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR); t = clock(); res = int1d(Th, 1, qfe=qf1pElump)(1.); t = clock() - t; cout << timeELAPSED << t << endl; test(abs(1 - res) < HWERROR);