~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to dolfin/mesh/MeshEntity.h

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    /// *Arguments*
57
57
    ///     mesh (_Mesh_)
58
58
    ///         The mesh.
59
 
    ///     dim (uint)
 
59
    ///     dim (std::size_t)
60
60
    ///         The topological dimension.
61
 
    ///     index (uint)
 
61
    ///     index (std::size_t)
62
62
    ///         The index.
63
 
    MeshEntity(const Mesh& mesh, uint dim, uint index);
 
63
    MeshEntity(const Mesh& mesh, std::size_t dim, std::size_t index);
64
64
 
65
65
    /// Destructor
66
66
    virtual ~MeshEntity();
70
70
    /// *Arguments*
71
71
    ///     mesh (_Mesh_)
72
72
    ///         The mesh.
73
 
    ///     dim (uint)
 
73
    ///     dim (std::size_t)
74
74
    ///         The topological dimension.
75
 
    ///     index (uint)
 
75
    ///     index (std::size_t)
76
76
    ///         The index.
77
 
    void init(const Mesh& mesh, uint dim, uint index);
 
77
    void init(const Mesh& mesh, std::size_t dim, std::size_t index);
78
78
 
79
79
    /// Comparision Operator
80
80
    ///
111
111
    /// Return topological dimension
112
112
    ///
113
113
    /// *Returns*
114
 
    ///     uint
 
114
    ///     std::size_t
115
115
    ///         The dimension.
116
 
    uint dim() const
 
116
    std::size_t dim() const
117
117
    { return _dim; }
118
118
 
119
119
    /// Return index of mesh entity
120
120
    ///
121
121
    /// *Returns*
122
 
    ///     uint
 
122
    ///     std::size_t
123
123
    ///         The index.
124
 
    uint index() const
 
124
    std::size_t index() const
125
125
    { return _local_index; }
126
126
 
127
127
    /// Return global index of mesh entity
130
130
    ///     int
131
131
    ///         The global index. Set to -1 if global index has not been
132
132
    ///         computed
133
 
    uint global_index() const
 
133
    std::size_t global_index() const
134
134
    { return _mesh->topology().global_indices(_dim)[_local_index]; }
135
135
 
136
136
    /// Return local number of incident mesh entities of given topological dimension
137
137
    ///
138
138
    /// *Arguments*
139
 
    ///     dim (uint)
 
139
    ///     dim (std::size_t)
140
140
    ///         The topological dimension.
141
141
    ///
142
142
    /// *Returns*
143
 
    ///     uint
 
143
    ///     std::size_t
144
144
    ///         The number of local incident MeshEntity objects of given dimension.
145
 
    uint num_entities(uint dim) const
 
145
    std::size_t num_entities(std::size_t dim) const
146
146
    { return _mesh->topology()(_dim, dim).size(_local_index); }
147
147
 
148
148
    /// Return global number of incident mesh entities of given topological dimension
149
149
    ///
150
150
    /// *Arguments*
151
 
    ///     dim (uint)
 
151
    ///     dim (std::size_t)
152
152
    ///         The topological dimension.
153
153
    ///
154
154
    /// *Returns*
155
 
    ///     uint
 
155
    ///     std::size_t
156
156
    ///         The number of global incident MeshEntity objects of given dimension.
157
 
    uint num_global_entities(uint dim) const
 
157
    std::size_t num_global_entities(std::size_t dim) const
158
158
    { return _mesh->topology()(_dim, dim).size_global(_local_index); }
159
159
 
160
160
    /// Return array of indices for incident mesh entitites of given
161
161
    /// topological dimension
162
162
    ///
163
163
    /// *Arguments*
164
 
    ///     dim (uint)
 
164
    ///     dim (std::size_t)
165
165
    ///         The topological dimension.
166
166
    ///
167
167
    /// *Returns*
168
 
    ///     uint
 
168
    ///     std::size_t
169
169
    ///         The index for incident mesh entities of given dimension.
170
 
    const uint* entities(uint dim) const
 
170
    const std::size_t* entities(std::size_t dim) const
171
171
    { return _mesh->topology()(_dim, dim)(_local_index); }
172
172
 
173
173
    /// Return unique mesh ID
174
174
    ///
175
175
    /// *Returns*
176
 
    ///     uint
 
176
    ///     std::size_t
177
177
    ///         The unique mesh ID.
178
 
    uint mesh_id() const
 
178
    std::size_t mesh_id() const
179
179
    { return _mesh->id(); }
180
180
 
181
181
    /// Check if given entity is incident
247
247
    ///         The mesh entity.
248
248
    ///
249
249
    /// *Returns*
250
 
    ///     uint
 
250
    ///     std::size_t
251
251
    ///         The local index of given entity.
252
 
    uint index(const MeshEntity& entity) const;
 
252
    std::size_t index(const MeshEntity& entity) const;
253
253
 
254
254
    /// Compute midpoint of cell
255
255
    ///
288
288
    Mesh const * _mesh;
289
289
 
290
290
    // Topological dimension
291
 
    uint _dim;
 
291
    std::size_t _dim;
292
292
 
293
293
    // Local index of entity within topological dimension
294
 
    uint _local_index;
 
294
    std::size_t _local_index;
295
295
 
296
296
  };
297
297