SyFi  0.3
tetrahedron_ex3.cpp File Reference
#include <SyFi.h>

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 7 of file tetrahedron_ex3.cpp.

References SyFi::EQUAL_OR_DIE(), run_tests::f, SyFi::initSyFi(), and SyFi::Tetrahedron::integrate().

           {


    initSyFi(3); 

    //example that check scaling

    numeric h(1,100); //1.0/100 
    numeric a(1,2); 
    ex p0 = lst(a,a,a);
    ex p1 = lst(a+h,a,a);
    ex p2 = lst(a,a+h,a);
    ex p3 = lst(a,a,a+h);

    Tetrahedron tetrahedron(p0,p1,p2,p3);


    ex f = 1;
    ex intf = tetrahedron.integrate(f); 
    cout <<"intf "<<intf<<endl; 
    EQUAL_OR_DIE(intf, "1/6000000"); 

    return 0; 
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator