SyFi
0.3
|
Go to the source code of this file.
Functions | |
void | example_of_use (FE &fe) |
int | main () |
void example_of_use | ( | FE & | fe | ) |
Definition at line 8 of file fe_ex1.cpp.
References SyFi::FE::dof(), SyFi::grad(), SyFi::FE::N(), and SyFi::FE::nbf().
Referenced by main().
int main | ( | ) |
Definition at line 24 of file fe_ex1.cpp.
References SyFi::compare_archives(), SyFi::Lagrange::compute_basis_functions(), SyFi::StandardFE::dof(), example_of_use(), SyFi::initSyFi(), SyFi::istr(), SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::set_order(), and SyFi::StandardFE::set_polygon().
{ initSyFi(2); int order = 1; Triangle triangle(lst(0,0), lst(1,0), lst(0,1)); Lagrange fe; fe.set_order(order); fe.set_polygon(triangle); fe.compute_basis_functions(); example_of_use(fe); // regression test archive ar; for (unsigned int i=0; i< fe.nbf(); i++) { ar.archive_ex(fe.N(i) , istr("N",i).c_str()); ar.archive_ex(fe.dof(i) , istr("D",i).c_str()); } ofstream vfile("fe_ex1.gar.v"); vfile << ar; vfile.close(); if(!compare_archives("fe_ex1.gar.v", "fe_ex1.gar.r")) { cerr << "Failure!" << endl; return -1; } return 0; }