line_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 line_ex2.cpp.

References demos::simple::f, SyFi::initSyFi(), SyFi::Line::integrate(), demos::crouzeixraviart::p0, SyFi::Line::repr(), SyFi::t, SyFi::x, SyFi::y, and SyFi::z.

00008            {
00009 
00010     initSyFi(3); 
00011 
00012     symbol x0("x0"), x1("x1"), y0("y0"), y1("y1"), z0("z0"), z1("z1");
00013 
00014     ex p0 = lst(x0,y0,z0);
00015     ex p1 = lst(x1,y1,z1);
00016 
00017     Line line(p0,p1);
00018 
00019     symbol t("t"); 
00020     ex l_repr = line.repr(t);
00021     cout <<"l.repr "<<l_repr<<endl; 
00022 
00023 
00024     for (int i=0; i< l_repr.nops(); i++) {
00025         cout <<"l_repr.op(" <<i<<"):  "<<l_repr.op(i)<<endl; 
00026     }
00027 
00028     ex f = x*x + y*y*y + z;
00029     ex intf = line.integrate(f); 
00030     cout <<"intf "<<intf<<endl; 
00031 
00032     // regression test
00033     /*
00034     
00035     archive ar; 
00036     ar.archive_ex(l_repr, "l_repr"); 
00037     ar.archive_ex(intf, "intf"); 
00038 
00039     ofstream vfile("line_ex2.gar.v"); 
00040     vfile << ar; vfile.close(); 
00041     if(!compare_archives("line_ex2.gar.v", "line_ex2.gar.r")) { 
00042             cerr << "Failure!" << endl;
00043             return -1;
00044     }
00045     */
00046 
00047     return 0; 
00048 }


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