tetrahedron_ex2.cpp File Reference

#include <SyFi.h>
#include <fstream>

Go to the source code of this file.

Functions

int main ()


Function Documentation

int main (  ) 

Definition at line 8 of file tetrahedron_ex2.cpp.

References 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.

00008            {
00009 
00010     initSyFi(3); 
00011 
00012     archive ar; 
00013 
00014     symbol x0("x0"), x1("x1"), y0("y0"), y1("y1"), z0("z0"), z1("z1"); 
00015 
00016     ex p0 = lst(x0,y0,z0);
00017     ex p1 = lst(x1,y0,z0);
00018     ex p2 = lst(x0,y1,z0);
00019     ex p3 = lst(x0,y0,z1);
00020 
00021     Tetrahedron tetrahedron(p0,p1,p2,p3);
00022 
00023     ex repr = tetrahedron.repr();
00024     cout <<"t.repr "<<repr<<endl; 
00025     ar.archive_ex(repr, "repr"); 
00026 
00027     ex f = x*y*z;
00028     ex intf = tetrahedron.integrate(f); 
00029     cout <<"intf "<<intf<<endl; 
00030     ar.archive_ex(intf, "intf"); 
00031 
00032     /*
00033     ofstream vfile("tetrahedron_ex2.gar.v"); 
00034     vfile << ar; vfile.close(); 
00035     if(!compare_archives("tetrahedron_ex2.gar.v", "tetrahedron_ex2.gar.r")) { 
00036             cerr << "Failure!" << endl;
00037             return -1;
00038     }
00039     */
00040 
00041     return 0; 
00042 }


Generated on Mon Aug 31 16:17:05 2009 for SyFi by  doxygen 1.5.9