robust.cpp File Reference

#include <SyFi.h>
#include <fstream>

Go to the source code of this file.

Functions

int main ()


Function Documentation

int main (  ) 

Definition at line 8 of file robust.cpp.

References SyFi::compare_archives(), SyFi::Robust::compute_basis_functions(), SyFi::div(), demos::crouzeixraviart::fe, SyFi::initSyFi(), SyFi::istr(), SyFi::StandardFE::N(), and SyFi::StandardFE::nbf().

00008            {
00009 
00010     initSyFi(2); 
00011 
00012     ReferenceTriangle triange; 
00013     Robust fe(triange); 
00014     fe.compute_basis_functions(); 
00015 
00016     for (int i=0; i< fe.nbf(); i++) { 
00017 
00018         cout <<"fe.N("<<i<<")= "<<fe.N(i)<<endl; 
00019         cout <<"div(fe.N("<<i<<"))= "<<(div(fe.N(i))).expand()<<endl; 
00020 
00021     }
00022 
00023 
00024     // regression test
00025     archive ar; 
00026 
00027     for (int i=0; i< fe.nbf(); i++) { 
00028         ar.archive_ex(fe.N(i), istr("N",i).c_str()); 
00029         ar.archive_ex((div(fe.N(i))).expand(), istr("divN",i).c_str()); 
00030     }
00031 
00032     ofstream vfile("robust.gar.v"); 
00033     vfile << ar; vfile.close(); 
00034     if(!compare_archives("robust.gar.v", "robust.gar.r")) { 
00035             cerr << "Failure!" << endl;
00036             return -1;
00037     }
00038 
00039 
00040 
00041     return 0; 
00042 
00043 }


Generated on Mon Aug 31 16:16:49 2009 for SyFi by  doxygen 1.5.9