ParMooN
 All Classes Functions Variables Friends Pages
Collection.h
1 
11 #ifndef __COLLECTION__
12 #define __COLLECTION__
13 
14 #include <BaseCell.h>
15 #include <JointCollection.h>
16 
19 {
20  protected:
22  int N_Cells;
23 
26 
29 
31  int *Index;
32 
33  #ifdef _MPI
34 
36 
39  #endif
40 
41  public:
43  TCollection(int n_cells, TBaseCell **cells);
44 
46  int GetN_Cells() const
47  { return N_Cells; }
48 
50  TBaseCell *GetCell(int i) const
51  { return Cells[i]; }
52 
54  ~TCollection();
55 
57  int GetHminHmax(double *hmin, double *hmax);
58 
60  int GetIndex(TBaseCell *cell);
61 
64 
67 
69  void GenerateCellVertNeibs();
70 
72  int GetIndex(TVertex **Array, int Length, TVertex *Element);
73 
74 #ifdef _MPI
75  void SetN_OwnCells(int n_OwnCells)
76  { N_OwnCells = n_OwnCells; }
77 
78  int GetN_OwnCells()
79  { return N_OwnCells; }
80 
81  int GetN_HaloCells()
82  { return (N_Cells - N_OwnCells); }
83 
84  int *GetGlobalIndex()
85  {
86  return GlobalIndex;
87  }
88 #endif
89 
90  void Replace_Coll(int n_cells, TBaseCell **cells)
91  {
92  N_Cells = n_cells;
93  Cells = cells;
94  }
95 
96  private:
98  void GenerateSortedArrays();
99 
101  int GetSortedIndex(TBaseCell *cell);
102 
103 };
104 
105 #endif
int MarkBoundaryVertices()
mark the vertices that are on the boundary
Definition: Collection.C:152
TBaseCell * GetCell(int i) const
return Cell with index i in Cells-array
Definition: Collection.h:50
int * GlobalIndex
array for Globalcell number in Cells
Definition: Collection.h:38
store cells in an array, used by cell iterators
Definition: Collection.h:18
int GetIndex(TBaseCell *cell)
return Index of cell in Cells-array
Definition: Collection.C:115
int GetN_Cells() const
return number of cells
Definition: Collection.h:46
Definition: JointCollection.h:20
int N_OwnCells
Number of own cells (excluding Halo cells)
Definition: Collection.h:35
TBaseCell ** SortedCells
array with all cells sorted by pointer
Definition: Collection.h:28
int * Index
array with index of SortedCells in Cells
Definition: Collection.h:31
TCollection(int n_cells, TBaseCell **cells)
constructor
Definition: Collection.C:22
void GenerateCellVertNeibs()
Generate Vertex Neibs for all cells in the collection.
Definition: Collection.C:395
information for finite element data structure
Definition: BaseCell.h:25
TBaseCell ** Cells
array containing the pointers to the cells
Definition: Collection.h:25
TJointCollection * GetJointCollection()
return Index of joints in Cells-array
Definition: Collection.C:329
Definition: Vertex.h:19
int N_Cells
number of cells stored
Definition: Collection.h:22
int GetHminHmax(double *hmin, double *hmax)
get maximal and minimal diameter
Definition: Collection.C:65
~TCollection()
destructor: delete arrays
Definition: Collection.C:57