SyFi  0.3
integral_ex1.cpp File Reference
#include <SyFi.h>
#include <ginac/ginac.h>

Go to the source code of this file.

Functions

void check_integral (ex &f)
int main ()

Function Documentation

void check_integral ( ex &  f)

Definition at line 8 of file integral_ex1.cpp.

                          {
}
int main ( )

Definition at line 11 of file integral_ex1.cpp.

References SyFi::Lagrange::compute_basis_functions(), SyFi::EQUAL_OR_DIE(), SyFi::initSyFi(), SyFi::ReferenceLine::integrate(), SyFi::StandardFE::N(), SyFi::StandardFE::set_order(), and SyFi::StandardFE::set_polygon().

           {

    initSyFi(1); 

    ReferenceLine line; 
    Lagrange fe; 
    fe.set_polygon(line);
    fe.set_order(3); 
    fe.compute_basis_functions(); 
    ex integrand = fe.N(0)*fe.N(1);  
    cout <<integrand<<endl; 
    ex integral1 = line.integrate(integrand); 
    cout <<"Integral " <<integral1<<endl; 
    EQUAL_OR_DIE(integral1, "33/560"); 


}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator