211 {
212 const std::size_t max_size = std::numeric_limits<std::size_t>::max();
213
214
215
216 CouplingMatrix::rc_type::iterator lb =
220 --lb;
221 else
223
224
225
227 {
228 if (new_value == true)
231 }
232 else
233 {
234 const std::size_t firstloc = lb->first;
235 const std::size_t lastloc = lb->second;
236 libmesh_assert_less_equal(firstloc, lastloc);
237 libmesh_assert_less_equal(firstloc,
_location);
238
239#ifdef DEBUG
240 {
241 CouplingMatrix::rc_type::const_iterator next = lb;
242 next++;
244 {
245
246 libmesh_assert_greater(next->first, lastloc+1);
247 }
248 }
249#endif
250
251
252
253 if (new_value == false)
254 {
256 {
258 {
260 }
261 else
262 {
263 libmesh_assert_less (lb->first, lastloc);
264 lb->first++;
265 }
266 }
268 {
269 libmesh_assert_less (firstloc, lb->second);
270
271 lb->second--;
272 }
274 {
275 libmesh_assert_less_equal(
_location+1, lastloc);
276
278
279 libmesh_assert_less_equal(firstloc,
_location-1);
280
282 }
283 }
284
285
286
287 else
288 {
289 CouplingMatrix::rc_type::iterator next = lb;
290 next++;
291 const std::size_t nextloc =
293 std::numeric_limits<std::size_t>::max() :
294 next->first;
295
296
297 libmesh_assert_greater(nextloc, lastloc+1);
298
300 {
302 {
304 {
305 next->first = firstloc;
307 }
308 else
309 lb->second++;
310 }
311 else
312 {
314 next->first--;
315 else
317 }
318 }
319 }
320 }
321
322 return *this;
323 }