FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_ConnectivityTable.hpp
1 #ifndef _fei_ConnectivityTable_hpp_
2 #define _fei_ConnectivityTable_hpp_
3 
4 /*--------------------------------------------------------------------*/
5 /* Copyright 2005 Sandia Corporation. */
6 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
7 /* non-exclusive license for use of this work by or on behalf */
8 /* of the U.S. Government. Export of this program may require */
9 /* a license from the United States Government. */
10 /*--------------------------------------------------------------------*/
11 
12 #include "fei_macros.hpp"
13 #include "fei_defs.h"
14 
15 #include <vector>
16 #include <map>
17 
23  public:
24  ConnectivityTable() : numRows(0), elemIDs(), elemNumbers(),
25  elem_conn_ids(NULL), elem_conn_ptrs(NULL),
26  connectivities(NULL), numNodesPerElem(0) {}
27 
28  virtual ~ConnectivityTable() {
29  for(int i=0; i<numRows; i++) delete connectivities[i];
30  if (numRows > 0) {
31  delete [] connectivities;
32  }
33 
34  delete elem_conn_ids;
35  delete elem_conn_ptrs;
36  }
37 
38  int numRows;
39  std::map<GlobalID,int> elemIDs;
40  std::vector<int> elemNumbers;
41  std::vector<GlobalID>* elem_conn_ids;
42  std::vector<NodeDescriptor*>* elem_conn_ptrs;
43  std::vector<GlobalID>** connectivities;
44  int numNodesPerElem;
45 
46  private:
47  ConnectivityTable(const ConnectivityTable& /*src*/);
48 
49  ConnectivityTable& operator=(const ConnectivityTable& /*src*/);
50 };
51 
52 
53 #endif