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

# Dof Class Reference

`#include <Dof.h>`

List of all members.

## Public Member Functions
| Dof ()
| ~Dof ()
int | insert_dof (int e, int i, GiNaC::ex Li)
int | glob_dof (int e, int i)
int | glob_dof (GiNaC::ex Lj)
GiNaC::ex | glob_dof (int j)
int | size ()
vector< pair< int, int > > | glob2loc (int j)
void | clear ()
## Protected Attributes
int | counter
map< pair< int, int >, GiNaC::ex > | loc2dof
map< GiNaC::ex, int, GiNaC::ex_is_less > | dof2index
map< int, GiNaC::ex > | index2dof
map< GiNaC::ex, vector< pair< int, int > >, GiNaC::ex_is_less > | dof2loc

## Detailed Description

Definition at line 8 of file Dof.h.

## Constructor & Destructor Documentation

Dof::Dof | ( |  | ) | `[inline]`

| Definition at line 24 of file Dof.h. References counter.
    00024 { counter = 0; }

Dof::~Dof | ( |  | ) | `[inline]`

| Definition at line 25 of file Dof.h.
    00025 {}

## Member Function Documentation

void Dof::clear | ( |  | ) |

| Definition at line 3 of file Dof.cpp. References counter, dof2index, dof2loc, index2dof, and loc2dof.
    00003                 {
    00004   counter = -1;
    00005   loc2dof.clear();
    00006   dof2index.clear();
    00007   index2dof.clear();
    00008   dof2loc.clear();
    00009 }

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

| Definition at line 52 of file Dof.cpp. References dof2loc, and index2dof. Referenced by main().
    00052                                            {
    00053   GiNaC::ex Lj = index2dof[j];
    00054   return dof2loc[Lj];
    00055 }

GiNaC::ex Dof::glob_dof | ( | int | j | ) |

| Definition at line 48 of file Dof.cpp. References index2dof.
    00048                             {
    00049   return index2dof[j];
    00050 }

int Dof::glob_dof | ( | GiNaC::ex | Lj | ) |

| Definition at line 44 of file Dof.cpp. References dof2index.
    00044                              {
    00045   return dof2index[Lj];
    00046 }

int Dof::glob_dof | ( | int | e,
|  | int | i
| ) |

| Definition at line 37 of file Dof.cpp. References dof2index, and loc2dof. Referenced by compute_mixed_Poisson_element_matrix(), compute_nlconvdiff_element_matrix(), compute_Poisson_element_matrix(), compute_Stokes_element_matrix(), main(), poisson(), and poisson_reference().
    00037                                {
    00038   pair<int,int> index;
    00039   index.first = e;
    00040   index.second = i;
    00041   GiNaC::ex Li = loc2dof[index];
    00042   return dof2index[Li];
    00043 }

int Dof::insert_dof | ( | int | e,
|  | int | i,
|  | GiNaC::ex | Li
| ) |

| Definition at line 15 of file Dof.cpp. References counter, dof2index, dof2loc, index2dof, and loc2dof. Referenced by compute_mixed_Poisson_element_matrix(), compute_nlconvdiff_element_matrix(), compute_Poisson_element_matrix(), compute_Stokes_element_matrix(), and main().
    00015                                             {
    00016   // first we update loc2dof, which always should be updated
    00017   pair<int,int> index;
    00018   index.first = e;
    00019   index.second = i;
    00020   loc2dof[index] = Li;
    00021
    00022   // check if the dof is new, if so
    00023   // update counter, dof2index and create
    00024   // a new vector in dof2loc
    00025   if (dof2index.find(Li) == dof2index.end() ) {
    00026     counter++;
    00027     dof2index[Li] = counter;
    00028     index2dof[counter] = Li;
    00029     vector<pair<int,int> > v;
    00030     dof2loc[Li] = v;
    00031   }
    00032
    00033   // insert (e,i) in dof2loc[Li]
    00034   dof2loc[Li].insert(dof2loc[Li].end(), index);
    00035 }

int Dof::size | ( |  | ) |

| Definition at line 11 of file Dof.cpp. References counter. Referenced by main().
    00011                {
    00012   return counter;
    00013 }

## Member Data Documentation

int Dof::counter`[protected]`

| Definition at line 10 of file Dof.h. Referenced by clear(), Dof(), insert_dof(), and size().

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

| Definition at line 17 of file Dof.h. Referenced by clear(), glob_dof(), and insert_dof().

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

| Definition at line 21 of file Dof.h. Referenced by clear(), glob2loc(), and insert_dof().

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

| Definition at line 19 of file Dof.h. Referenced by clear(), glob2loc(), glob_dof(), and insert_dof().

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

| Definition at line 15 of file Dof.h. Referenced by clear(), glob_dof(), and insert_dof().

The documentation for this class was generated from the following files:

- Dof.h
- Dof.cpp