Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Search for

# 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 5 of file triangle_ex3.cpp. References EQUAL_OR_DIE(), and Triangle::integrate().
    00005            {
    00006
    00007   // example that check scaling
    00008
    00009   numeric h(1,100); // 1.0/100
    00010   numeric a(1,2); // 1.0/2
    00011   ex p0 = lst(a,a,a);
    00012   ex p1 = lst(a+h,a,a);
    00013   ex p2 = lst(a,a+h,a);
    00014
    00015   Triangle triangle(p0,p1,p2);
    00016
    00017
    00018   ex f = 1;
    00019   ex intf = triangle.integrate(f);
    00020   cout <<"intf "<<intf<<endl;
    00021   EQUAL_OR_DIE(intf, "1/20000");
    00022
    00023   return 0;
    00024 }