FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Poisson_Elem.hpp
Go to the documentation of this file.
1 #ifndef __Poisson_Elem_H
2 #define __Poisson_Elem_H
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 class Poisson_Elem {
13 
14  public:
15  Poisson_Elem();
16  ~Poisson_Elem();
17 
18 
19  GlobalID getElemID() const {return globalElemID_;};
20  void setElemID(GlobalID gNID) {globalElemID_ = gNID;
21  ID_IsSet_ = true;};
22 
23  int numElemRows() const {return numElemRows_;};
24  void numElemRows(int gNERows) {numElemRows_ = gNERows;};
25 
26  int numElemNodes() const {return numElemNodes_;};
27  void numElemNodes(int gNodes) {numElemNodes_ = gNodes;};
28 
29  double getElemLength() const {return elemLength_;};
30  void setElemLength(double len) {elemLength_ = len;
31  elemLengthIsSet_ = true;};
32 
33  double getTotalLength() const {return totalLength_;};
34  void setTotalLength(double len) {totalLength_ = len;
35  totalLengthIsSet_ = true;};
36 
37  int allocateInternals(int DOF);
38  int allocateLoad(int DOF);
39  int allocateStiffness(int DOF);
40 
41  GlobalID* getElemConnPtr(int& size);
42 
43  void calculateLoad();
44  double* getElemLoad(int& size);
45 
46  void calculateStiffness();
47  double** getElemStiff(int& size);
48 
49  double* getNodalX(int& size) {size = numElemNodes_; return(nodalX_);};
50  double* getNodalY(int& size) {size = numElemNodes_; return(nodalY_);};
51 
52  void calculateCoords();
53 
54  void messageAbort(const char* str);
55 
56  void deleteMemory();
57 
58 //$ temporary output for debugging...
59 
60  void dumpToScreen();
61 
62 
63  private:
64  GlobalID globalElemID_; // global ID number for this element
65  bool ID_IsSet_; // whether ID has been set or not.
66  int numElemNodes_; // number of nodes associated with this element
67  int numElemRows_; // number of rows in the element matrices
68 
69  GlobalID *nodeList_; // list of nodes associated with this element
70  double* nodalX_; // list of nodal x-coordinates
71  double* nodalY_; // list of nodal y-coordinates
72 
73  double **elemStiff_; // stiffness matrix for this element
74  double *elemLoad_; // load vector for this element
76 
77  double elemLength_; // length of a side of this 2D element
78  double totalLength_; // total length of a side of the square region
79  // that this element is in.
80  bool elemLengthIsSet_; // indicates whether length has been set.
81  bool totalLengthIsSet_; // indicates whether length has been set.
82 
85 };
86 
87 #endif
88 
int numElemNodes() const
double * getElemLoad(int &size)
double * getNodalY(int &size)
double totalLength_
double * getNodalX(int &size)
int GlobalID
Definition: fei_defs.h:60
int numElemRows() const
double getElemLength() const
bool internalsAllocated_
double * elemLoad_
void messageAbort(const char *str)
double ** elemStiff_
GlobalID globalElemID_
void numElemNodes(int gNodes)
bool elemLengthIsSet_
double ** getElemStiff(int &size)
double getTotalLength() const
GlobalID * getElemConnPtr(int &size)
void calculateStiffness()
void calculateCoords()
void calculateLoad()
bool stiffAllocated_
bool totalLengthIsSet_
int allocateInternals(int DOF)
void numElemRows(int gNERows)
int allocateStiffness(int DOF)
double * nodalX_
void setElemID(GlobalID gNID)
GlobalID getElemID() const
void deleteMemory()
void setElemLength(double len)
double elemLength_
void setTotalLength(double len)
double * nodalY_
void dumpToScreen()
int allocateLoad(int DOF)
GlobalID * nodeList_