FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fei_BlockDescriptor.hpp
Go to the documentation of this file.
1 #ifndef _fei_BlockDescriptor_hpp_
2 #define _fei_BlockDescriptor_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 #include <vector>
15 
68  public:
70  virtual ~BlockDescriptor();
71 
73  void setGlobalBlockID(GlobalID blockID) {blockID_ = blockID;}
74 
77  int setNumNodesPerElement(int numNodes);
79 
80  int* fieldsPerNodePtr(); //length of this list = getNumNodesPerElement()
81 
83 
88  int** fieldIDsTablePtr() { return(nodalFieldIDs_); }
89 
90  bool containsField(int fieldID);
91 
93  void setNumDistinctFields(int nFields) { numDistinctFields_ = nFields; }
94 
96  void setInterleaveStrategy(int strat) {interleaveStrategy_ = strat;}
97 
98  int getLumpingStrategy() const {return(lumpingStrategy_);}
99  void setLumpingStrategy(int strat) {lumpingStrategy_ = strat;}
100 
101  int getNumElements() {return(numElements_);}
102  void setNumElements(int numElems) {numElements_ = numElems;}
103 
105  int setElemDofFieldIDs(int numFields, const int* fieldIDs);
106  std::vector<int>& getElemDofFieldIDs() { return(elemDofFieldIDs_); }
107 
110 
111  //elemDOFEqnNumbers is of length numElements.
112  std::vector<int>& elemDOFEqnNumbers() {return(elemDOFEqnNumbers_);}
113 
115  void setNumEqnsPerElement(int numEqns) {numEqnsPerElement_ = numEqns;}
116 
118  void setNumBlkEqnsPerElement(int numBlkEqns) {numBlkEqnsPerElement_ = numBlkEqns;};
119 
121  void setNumActiveNodes(int num) {numActiveNodes_ = num;}
122 
124  void setTotalNumEqns(int numEqns) {totalNumEqns_ = numEqns;}
125 
126  private:
129  nodalFieldIDs_(NULL), fieldIDsAllocated_(false),
134 
136  {
137  return(*this);
138  }
139 
140  void destroyFieldArrays();
141 
143 
145 
146  int* numFieldsPerNode_; //list: length = numNodesPerElement_
147 
148  int** nodalFieldIDs_; //table: number-of-rows = numNodesPerElement_
149  // length-of-row[i] = numFieldsPerNode_[i]
151 
153 
154  std::vector<int> elemDofFieldIDs_;
155 
158 
160  int numElemDOFPerElement_; //number of elem-dof in each element (all
161  //elems in block have the same number)
162 
163  std::vector<int> elemDOFEqnNumbers_; //list -- length = numElements_
164  //holds eqn number of each element's first elemDOF
165 
168 
171 };
172 
173 #endif
174 
BlockDescriptor(const BlockDescriptor &)
int GlobalID
Definition: fei_defs.h:60
int getInterleaveStrategy() const
void setNumEqnsPerElement(int numEqns)
void setLumpingStrategy(int strat)
int setElemDofFieldIDs(int numFields, const int *fieldIDs)
BlockDescriptor & operator=(const BlockDescriptor &)
void setNumElemDOFPerElement(int ndof)
std::vector< int > & elemDOFEqnNumbers()
void setGlobalBlockID(GlobalID blockID)
void setTotalNumEqns(int numEqns)
bool containsField(int fieldID)
int getNumNodesPerElement() const
void setInterleaveStrategy(int strat)
std::vector< int > elemDofFieldIDs_
std::vector< int > & getElemDofFieldIDs()
void setNumBlkEqnsPerElement(int numBlkEqns)
int getLumpingStrategy() const
size_t getNumElemDofFieldsPerElement()
std::vector< int > elemDOFEqnNumbers_
void setNumElements(int numElems)
void setNumActiveNodes(int num)
int setNumNodesPerElement(int numNodes)
void setNumDistinctFields(int nFields)