SyFi
0.3
|
Go to the source code of this file.
Functions | |
int | main () |
int main | ( | ) |
Definition at line 8 of file triangle_ex1.cpp.
References SyFi::compare_archives(), run_tests::f, SyFi::initSyFi(), SyFi::Triangle::integrate(), SyFi::Triangle::repr(), SyFi::x, SyFi::y, and SyFi::z.
{ initSyFi(3); ex p0 = lst(0.0,0.0,1.0); ex p1 = lst(1.0,0.0,1.0); ex p2 = lst(0.0,1.0,1.0); Triangle triangle(p0,p1,p2); ex repr = triangle.repr(); cout <<"t.repr "<<repr<<endl; ex f = x*y*z; ex intf = triangle.integrate(f); cout <<"intf "<<intf<<endl; // regression test archive ar; ar.archive_ex(intf, "intf"); ar.archive_ex(repr, "repr"); ofstream vfile("triangle_ex1.gar.v"); vfile << ar; vfile.close(); if(!compare_archives("triangle_ex1.gar.v", "triangle_ex1.gar.r")) { cerr << "Failure!" << endl; return -1; } return 0; }