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

# Dof.h

Go to the documentation of this file.

    00001 #ifndef DOF_IS_INCLUDED
    00002 #define DOF_IS_INCLUDED
    00003
    00004 #include <FE.h>
    00005
    00006
    00007
    00008 class Dof {
    00009   protected:
    00010   int counter;
    00011   // the structures loc2dof, dof2index, and doc2loc  are completely dynamic
    00012   // they are all initialized and updated by insert_dof(int e, int i, ex Li)
    00013
    00014   // (int e, int i) -> ex Li
    00015   map<pair<int,int>, GiNaC::ex>          loc2dof;
    00016   // (ex Lj)    -> int j
    00017   map<GiNaC::ex,int,GiNaC::ex_is_less>          dof2index;
    00018   // (int j)        -> ex Lj
    00019   map<int,GiNaC::ex>                     index2dof;
    00020   // (ex j)    -> vector< pair<e1, i1>, ..  pair<en, in> >
    00021   map <GiNaC::ex, vector<pair<int,int> >,GiNaC::ex_is_less >  dof2loc;
    00022
    00023   public:
    00024   Dof() { counter = 0; }
    00025   ~Dof() {}
    00026   int insert_dof(int e, int i, GiNaC::ex Li);  // to update the internal structures
    00027
    00028   // Helper functions to be used when the dofs have been set
    00029   // These do not modify the internal structure
    00030   int glob_dof(int e, int i);
    00031   int glob_dof(GiNaC::ex Lj);
    00032   GiNaC::ex  glob_dof(int j);
    00033   int size();
    00034   vector<pair<int, int> > glob2loc(int j);
    00035   void clear();
    00036 };
    00037
    00038
    00039 #endif
    00040