SyFi  0.3
tetrahedron_ex3.cpp
Go to the documentation of this file.
00001 #include <SyFi.h>
00002 
00003 using namespace GiNaC; 
00004 using namespace SyFi; 
00005 using namespace std; 
00006 
00007 int main() {
00008 
00009 
00010     initSyFi(3); 
00011 
00012     //example that check scaling
00013 
00014     numeric h(1,100); //1.0/100 
00015     numeric a(1,2); 
00016     ex p0 = lst(a,a,a);
00017     ex p1 = lst(a+h,a,a);
00018     ex p2 = lst(a,a+h,a);
00019     ex p3 = lst(a,a,a+h);
00020 
00021     Tetrahedron tetrahedron(p0,p1,p2,p3);
00022 
00023 
00024     ex f = 1;
00025     ex intf = tetrahedron.integrate(f); 
00026     cout <<"intf "<<intf<<endl; 
00027     EQUAL_OR_DIE(intf, "1/6000000"); 
00028 
00029     return 0; 
00030 }
00031 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator