00001 #include <SyFi.h>
00002
00003 using namespace GiNaC;
00004
00005 int main() {
00006
00007 ReferenceTriangle domain;
00008
00009
00010
00011 RaviartThomas v_fe;
00012 v_fe.set(1);
00013 v_fe.set(domain);
00014 v_fe.compute_basis_functions();
00015
00016 P0 p_fe;
00017 p_fe.set(domain);
00018 p_fe.compute_basis_functions();
00019
00020 usage(v_fe, p_fe);
00021
00022 Dof dof;
00023 std::map<std::pair<int,int>, ex> A;
00024 compute_mixed_Poisson_element_matrix(v_fe, p_fe, dof, A);
00025 print(A);
00026
00027
00028
00029 int order = 3;
00030 RaviartThomas v_fe2;
00031 v_fe2.set(order);
00032 v_fe2.set(domain);
00033 v_fe2.compute_basis_functions();
00034
00035 DiscontinuousLagrangeFE p_fe2;
00036 p_fe2.set(order);
00037 p_fe2.set(domain);
00038 p_fe2.compute_basis_functions();
00039
00040 usage(v_fe2, p_fe2);
00041
00042 Dof dof2;
00043 std::map<std::pair<int,int>, ex> A2;
00044 compute_mixed_Poisson_element_matrix(v_fe2, p_fe2, dof2, A2);
00045 print(A2);
00046
00047
00048
00049 }
00050