1
// Copyright (C) 2007 Anders Logg.
2
// Licensed under the GNU LGPL Version 2.1.
4
// Modifies by Garth N. Wells, 2007.
6
// First added: 2007-01-17
7
// Last changed: 2007-05-24
9
#ifndef __DOF_MAP_SET_H
10
#define __DOF_MAP_SET_H
17
#include <dolfin/common/types.h>
27
/// This class provides storage and caching of (precomputed) dof
28
/// maps and enables reuse of already computed dof maps with equal
35
/// Create empty set of dof maps
38
/// Create set of dof maps
39
DofMapSet(const Form& form, Mesh& mesh);
41
/// Create set of dof maps
42
DofMapSet(const ufc::form& form, Mesh& mesh);
47
/// Update set of dof maps for given form
48
void update(const Form& form, Mesh& mesh);
50
/// Update set of dof maps for given form
51
void update(const ufc::form& form, Mesh& mesh);
53
/// Return number of dof maps
56
/// Return dof map for argument function i
57
DofMap& operator[] (uint i) const;
61
// Consistency checking
62
void check(const ufc::form& form, Mesh& mesh);
64
// Cached precomputed dof maps
66
std::map<std::string, std::pair<ufc::dof_map*, DofMap*> > dof_map_cache;
68
std::map<const std::string, std::pair<ufc::dof_map*, DofMap*> > dof_map_cache;
71
// Array of dof maps for current form
72
std::vector<DofMap*> dof_map_set;
76
typedef std::map<std::string, std::pair<ufc::dof_map*, DofMap*> >::iterator map_iterator;
78
typedef std::map<const std::string, std::pair<ufc::dof_map*, DofMap*> >::iterator map_iterator;