FEI Package Browser (Single Doxygen Collection)  Version of the Day
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 
Poisson_Elem::totalLengthIsSet_
bool totalLengthIsSet_
Definition: Poisson_Elem.hpp:81
Poisson_Elem::allocateInternals
int allocateInternals(int DOF)
Definition: Poisson_Elem.cpp:71
Poisson_Elem::elemStiff_
double ** elemStiff_
Definition: Poisson_Elem.hpp:73
Poisson_Elem::dumpToScreen
void dumpToScreen()
Definition: Poisson_Elem.cpp:259
Poisson_Elem::allocateLoad
int allocateLoad(int DOF)
Definition: Poisson_Elem.cpp:95
Poisson_Elem::setElemID
void setElemID(GlobalID gNID)
Definition: Poisson_Elem.hpp:20
Poisson_Elem::totalLength_
double totalLength_
Definition: Poisson_Elem.hpp:78
Poisson_Elem::getNodalY
double * getNodalY(int &size)
Definition: Poisson_Elem.hpp:50
Poisson_Elem
Definition: Poisson_Elem.hpp:12
Poisson_Elem::numElemNodes
int numElemNodes() const
Definition: Poisson_Elem.hpp:26
Poisson_Elem::elemLengthIsSet_
bool elemLengthIsSet_
Definition: Poisson_Elem.hpp:80
Poisson_Elem::loadAllocated_
bool loadAllocated_
Definition: Poisson_Elem.hpp:83
Poisson_Elem::getTotalLength
double getTotalLength() const
Definition: Poisson_Elem.hpp:33
Poisson_Elem::getElemStiff
double ** getElemStiff(int &size)
Definition: Poisson_Elem.cpp:156
Poisson_Elem::getElemLoad
double * getElemLoad(int &size)
Definition: Poisson_Elem.cpp:143
Poisson_Elem::messageAbort
void messageAbort(const char *str)
Definition: Poisson_Elem.cpp:213
Poisson_Elem::numElemNodes
void numElemNodes(int gNodes)
Definition: Poisson_Elem.hpp:27
Poisson_Elem::getElemConnPtr
GlobalID * getElemConnPtr(int &size)
Definition: Poisson_Elem.cpp:130
Poisson_Elem::~Poisson_Elem
~Poisson_Elem()
Definition: Poisson_Elem.cpp:43
Poisson_Elem::nodalX_
double * nodalX_
Definition: Poisson_Elem.hpp:70
Poisson_Elem::elemLoad_
double * elemLoad_
Definition: Poisson_Elem.hpp:74
Poisson_Elem::calculateCoords
void calculateCoords()
Definition: Poisson_Elem.cpp:169
Poisson_Elem::getElemID
GlobalID getElemID() const
Definition: Poisson_Elem.hpp:19
Poisson_Elem::elemLength_
double elemLength_
Definition: Poisson_Elem.hpp:77
Poisson_Elem::globalElemID_
GlobalID globalElemID_
Definition: Poisson_Elem.hpp:64
Poisson_Elem::Poisson_Elem
Poisson_Elem()
Definition: Poisson_Elem.cpp:18
Poisson_Elem::numElemRows
void numElemRows(int gNERows)
Definition: Poisson_Elem.hpp:24
Poisson_Elem::allocateStiffness
int allocateStiffness(int DOF)
Definition: Poisson_Elem.cpp:107
Poisson_Elem::calculateLoad
void calculateLoad()
Definition: Poisson_Elem.cpp:219
GlobalID
int GlobalID
Definition: fei_defs.h:60
Poisson_Elem::numElemNodes_
int numElemNodes_
Definition: Poisson_Elem.hpp:66
Poisson_Elem::stiffAllocated_
bool stiffAllocated_
Definition: Poisson_Elem.hpp:84
Poisson_Elem::deleteMemory
void deleteMemory()
Definition: Poisson_Elem.cpp:48
Poisson_Elem::nodeList_
GlobalID * nodeList_
Definition: Poisson_Elem.hpp:69
Poisson_Elem::calculateStiffness
void calculateStiffness()
Definition: Poisson_Elem.cpp:230
Poisson_Elem::numElemRows_
int numElemRows_
Definition: Poisson_Elem.hpp:67
Poisson_Elem::setElemLength
void setElemLength(double len)
Definition: Poisson_Elem.hpp:30
Poisson_Elem::ID_IsSet_
bool ID_IsSet_
Definition: Poisson_Elem.hpp:65
Poisson_Elem::setTotalLength
void setTotalLength(double len)
Definition: Poisson_Elem.hpp:34
Poisson_Elem::nodalY_
double * nodalY_
Definition: Poisson_Elem.hpp:71
Poisson_Elem::internalsAllocated_
bool internalsAllocated_
Definition: Poisson_Elem.hpp:75
Poisson_Elem::numElemRows
int numElemRows() const
Definition: Poisson_Elem.hpp:23
Poisson_Elem::getElemLength
double getElemLength() const
Definition: Poisson_Elem.hpp:29
Poisson_Elem::getNodalX
double * getNodalX(int &size)
Definition: Poisson_Elem.hpp:49