SyFi
0.3
|
00001 #include <SyFi.h> 00002 00003 using namespace SyFi; 00004 using namespace std; 00005 00006 void print_out(FE& fe) { 00007 for (unsigned int i=0; i< fe.nbf(); i++) { 00008 cout <<"fe.N("<<i<<") = "<<fe.N(i)<<endl; 00009 } 00010 } 00011 00012 int main() { 00013 00014 initSyFi(2); 00015 00016 ReferenceTriangle triangle; 00017 Nedelec fe; 00018 fe.set_polygon(triangle); 00019 fe.set_order(0); 00020 fe.compute_basis_functions(); 00021 cout <<"-------- 0 order ---------- 2D "<<endl; 00022 print_out(fe); 00023 00024 fe.set_order(1); 00025 fe.compute_basis_functions(); 00026 cout <<"-------- 1 order ---------- 2D"<<endl; 00027 print_out(fe); 00028 00029 fe.set_order(2); 00030 fe.compute_basis_functions(); 00031 cout <<"-------- 2 order ---------- 2D"<<endl; 00032 print_out(fe); 00033 00034 fe.set_order(3); 00035 fe.compute_basis_functions(); 00036 cout <<"-------- 2 order ---------- 2D"<<endl; 00037 print_out(fe); 00038 00039 00040 00041 00042 00043 initSyFi(3); 00044 00045 ReferenceTetrahedron tetrahedon; 00046 fe.set_polygon(tetrahedon); 00047 fe.set_order(0); 00048 fe.compute_basis_functions(); 00049 cout <<"-------- 0 order ---------- 3D "<<endl; 00050 print_out(fe); 00051 00052 fe.set_order(1); 00053 fe.compute_basis_functions(); 00054 cout <<"-------- 1 order ---------- 3D "<<endl; 00055 print_out(fe); 00056 00057 fe.set_order(2); 00058 fe.compute_basis_functions(); 00059 cout <<"-------- 2 order ---------- 3D "<<endl; 00060 print_out(fe); 00061 00062 fe.set_order(3); 00063 fe.compute_basis_functions(); 00064 cout <<"-------- 2 order ---------- 3D "<<endl; 00065 print_out(fe); 00066 00067 00068 return 0; 00069 00070 00071 } 00072 00073