Am Montag, 13. Mai 2022, finden Wartungsarbeiten am Gitlab-Server (Update auf neue Version statt). Der Dienst wird daher am Montag für einige Zeit nicht verfügbar sein.
On Monday, May 13th 2022, the Gitlab server will be updated. The service will therefore not be accessible for some time on Monday.

DofComm.cc 1.34 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.


#include "DofComm.h"

namespace AMDiS {

  using namespace std;

  void DofComm::removeEmpty()
  {
21
22
    DataIter dit = data.begin();
    while (dit != data.end()) {
23
24
25
26
27
28
29
30
31
      FeMapIter it = dit->second.begin();
      while (it != dit->second.end()) {
	if (it->second.size() == 0) {
	  const FiniteElemSpace *fe = it->first;
	  ++it;
	  dit->second.erase(fe);
	} else
	  ++it;
      }
32
33
34
35
36
      
      if (dit->second.size() == 0)
	data.erase(dit++);
      else
	++dit;
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    }
  }

  
  void DofComm::Iterator::setNextFeMap()
  {
    if (dataIter != dofComm.data.end()) {
      feMapIter = dataIter->second.begin();
      
      if (traverseFeSpace != NULL) {
	TEST_EXIT_DBG(dataIter->second.count(traverseFeSpace))
	  ("Should not happen!\n");
	
	while (feMapIter->first != traverseFeSpace &&
	       feMapIter != dataIter->second.end())
	  ++feMapIter;
	
	TEST_EXIT_DBG(feMapIter != dataIter->second.end() &&
		      feMapIter->first == traverseFeSpace)
	  ("Should not happen!\n");
      }
      
      if (feMapIter != dataIter->second.end())
	dofIter = feMapIter->second.begin();
      
      dofCounter = 0;
    }
  }

}