#include <SyFi.h>
#include <fstream>
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(), demos::simple::f, SyFi::initSyFi(), SyFi::Tetrahedron::integrate(), demos::crouzeixraviart::p0, SyFi::Tetrahedron::repr(), demos::geom_test::tetrahedron, SyFi::x, SyFi::y, and SyFi::z.
00009 { 00010 00011 initSyFi(3); 00012 00013 archive ar; 00014 00015 ex p0 = lst(0.0,0.0,0.0); 00016 ex p1 = lst(1.0,0.0,0.0); 00017 ex p2 = lst(0.0,1.0,0.0); 00018 ex p3 = lst(0.0,0.0,1.0); 00019 00020 Tetrahedron tetrahedron(p0,p1,p2,p3); 00021 00022 ex repr = tetrahedron.repr(); 00023 cout <<"t.repr "<<repr<<endl; 00024 ar.archive_ex(repr, "repr"); 00025 00026 ex f = x*y*z; 00027 ex intf = tetrahedron.integrate(f); 00028 cout <<"intf "<<intf<<endl; 00029 ar.archive_ex(intf, "intf"); 00030 00031 ofstream vfile("tetrahedron_ex1.gar.v"); 00032 vfile << ar; vfile.close(); 00033 if(!compare_archives("tetrahedron_ex1.gar.v", "tetrahedron_ex1.gar.r")) { 00034 cerr << "Failure!" << endl; 00035 return -1; 00036 } 00037 00038 return 0; 00039 }