SyFi  0.3
triangle_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 triangle_ex3.cpp.

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

           {

    initSyFi(3); 

    // example that check scaling

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

    Triangle triangle(p0,p1,p2);


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

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