Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Search for

# crouzeixraviart_ex.cpp

Go to the documentation of this file.

    00001 #include <SyFi.h>
    00002
    00003 using namespace GiNaC;
    00004
    00005
    00006 void check_CrouzeixRaviart() {
    00007
    00008   cout <<"2D ----------------------------"<<endl;
    00009   ReferenceTriangle triangle;
    00010   CrouzeixRaviart fe;
    00011   fe.set(triangle);
    00012   fe.compute_basis_functions();
    00013
    00014   usage(fe);
    00015
    00016   Dof dof;
    00017   std::map<std::pair<int,int>, ex> A;
    00018   compute_Poisson_element_matrix(fe, dof, A);
    00019   print(A);
    00020
    00021
    00022
    00023   cout <<"3D ----------------------------"<<endl;
    00024   ReferenceTetrahedron tetrahedron;
    00025   CrouzeixRaviart fe2;
    00026   fe2.set(tetrahedron);
    00027   fe2.compute_basis_functions();
    00028   usage(fe2);
    00029
    00030   Dof dof2;
    00031   std::map<std::pair<int,int>, ex> A2;
    00032   compute_Poisson_element_matrix(fe2, dof2, A2);
    00033   print(A);
    00034
    00035
    00036
    00037
    00038
    00039 }
    00040
    00041
    00042 int main() {
    00043   check_CrouzeixRaviart();
    00044 }
    00045
    00046
    00047