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