Dof Class Reference

#include <Dof.h>

List of all members.

Public Member Functions

 Dof ()
 ~Dof ()
int insert_dof (int e, int i, ex Li)
int glob_dof (int e, int i)
int glob_dof (ex Lj)
ex glob_dof (int j)
int size ()
vector< pair< int, int > > glob2loc (int j)

Protected Attributes

int counter
map< pair< int, int >, ex > loc2dof
map< ex, int, ex_is_less > dof2index
map< int, ex > index2dof
map< ex, vector< pair< int,
int > >, ex_is_less > 
dof2loc


Detailed Description

Definition at line 10 of file Dof.h.


Constructor & Destructor Documentation

Dof::Dof  )  [inline]
 

Definition at line 26 of file Dof.h.

References counter.

00026 { counter = 0; }

Dof::~Dof  )  [inline]
 

Definition at line 27 of file Dof.h.

00027 {}


Member Function Documentation

vector< pair< int, int > > Dof::glob2loc int  j  ) 
 

Definition at line 45 of file Dof.cpp.

References dof2loc, and index2dof.

Referenced by main().

00045                                            { 
00046   ex Lj = index2dof[j]; 
00047   return dof2loc[Lj]; 
00048 }

ex Dof::glob_dof int  j  ) 
 

Definition at line 41 of file Dof.cpp.

References index2dof.

00041                        {
00042   return index2dof[j];
00043 }

int Dof::glob_dof ex  Lj  ) 
 

Definition at line 37 of file Dof.cpp.

References dof2index.

00037                         {
00038   return dof2index[Lj]; 
00039 }

int Dof::glob_dof int  e,
int  i
 

Definition at line 30 of file Dof.cpp.

References dof2index, and loc2dof.

Referenced by main(), poisson(), and poisson_reference().

00030                                { 
00031   pair<int,int> index; 
00032   index.first = e; 
00033   index.second = i; 
00034   ex Li = loc2dof[index]; 
00035   return dof2index[Li]; 
00036 }

int Dof::insert_dof int  e,
int  i,
ex  Li
 

Definition at line 7 of file Dof.cpp.

References counter, dof2index, dof2loc, index2dof, and loc2dof.

Referenced by main().

00007                                        {
00008   // first we update loc2dof, which always should be updated  
00009   pair<int,int> index; 
00010   index.first = e; 
00011   index.second = i; 
00012   loc2dof[index] = Li; 
00013 
00014   // check if the dof is new, if so
00015   // update counter, dof2index and create
00016   // a new vector in dof2loc  
00017   if (dof2index.find(Li) == dof2index.end() ) { 
00018     int d =  (*dof2index.find(Li)).second;  
00019     counter++; 
00020     dof2index[Li] = counter; 
00021     index2dof[counter] = Li; 
00022     vector<pair<int,int> > v; 
00023     dof2loc[Li] = v;  
00024   }
00025   
00026   // insert (e,i) in dof2loc[Li]  
00027   dof2loc[Li].insert(dof2loc[Li].end(), index); 
00028 }

int Dof::size  ) 
 

Definition at line 3 of file Dof.cpp.

References counter.

Referenced by main().

00003                {
00004   return counter; 
00005 }


Member Data Documentation

int Dof::counter [protected]
 

Definition at line 12 of file Dof.h.

Referenced by Dof(), insert_dof(), and size().

map<ex,int,ex_is_less> Dof::dof2index [protected]
 

Definition at line 19 of file Dof.h.

Referenced by glob_dof(), and insert_dof().

map<ex, vector<pair<int,int> >,ex_is_less > Dof::dof2loc [protected]
 

Definition at line 23 of file Dof.h.

Referenced by glob2loc(), and insert_dof().

map<int,ex> Dof::index2dof [protected]
 

Definition at line 21 of file Dof.h.

Referenced by glob2loc(), glob_dof(), and insert_dof().

map<pair<int,int>, ex> Dof::loc2dof [protected]
 

Definition at line 17 of file Dof.h.

Referenced by glob_dof(), and insert_dof().


The documentation for this class was generated from the following files:
Generated on Tue Nov 22 11:10:23 2005 for SyFi by  doxygen 1.4.4