Poisson_Elem.hpp

00001 #ifndef __Poisson_Elem_H
00002 #define __Poisson_Elem_H
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2005 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 class Poisson_Elem {
00013 
00014   public:
00015     Poisson_Elem();
00016     ~Poisson_Elem();
00017 
00018 
00019     GlobalID getElemID() const {return globalElemID_;};
00020     void setElemID(GlobalID gNID) {globalElemID_ = gNID;
00021                                    ID_IsSet_ = true;};
00022 
00023     int numElemRows() const {return numElemRows_;};
00024     void numElemRows(int gNERows) {numElemRows_ = gNERows;};
00025 
00026     int numElemNodes() const {return numElemNodes_;};
00027     void numElemNodes(int gNodes) {numElemNodes_ = gNodes;};
00028 
00029     double getElemLength() const {return elemLength_;};
00030     void setElemLength(double len) {elemLength_ = len;
00031                                     elemLengthIsSet_ = true;};
00032 
00033     double getTotalLength() const {return totalLength_;};
00034     void setTotalLength(double len) {totalLength_ = len;
00035                                     totalLengthIsSet_ = true;};
00036 
00037     int allocateInternals(int DOF);
00038     int allocateLoad(int DOF);
00039     int allocateStiffness(int DOF);
00040 
00041     GlobalID* getElemConnPtr(int& size);
00042 
00043     void calculateLoad();
00044     double* getElemLoad(int& size);
00045 
00046     void calculateStiffness();
00047     double** getElemStiff(int& size);
00048 
00049     double* getNodalX(int& size) {size = numElemNodes_; return(nodalX_);};
00050     double* getNodalY(int& size) {size = numElemNodes_; return(nodalY_);};
00051 
00052     void calculateCoords();
00053 
00054     void messageAbort(const char* str);
00055 
00056     void deleteMemory();
00057 
00058 //$ temporary output for debugging...
00059 
00060     void dumpToScreen();
00061 
00062 
00063   private:
00064     GlobalID globalElemID_; // global ID number for this element
00065     bool ID_IsSet_;         // whether ID has been set or not.
00066     int numElemNodes_;      // number of nodes associated with this element
00067     int numElemRows_;       // number of rows in the element matrices
00068     
00069     GlobalID *nodeList_;      // list of nodes associated with this element
00070     double* nodalX_;          // list of nodal x-coordinates
00071     double* nodalY_;          // list of nodal y-coordinates
00072 
00073     double **elemStiff_;      // stiffness matrix for this element
00074     double *elemLoad_;        // load vector for this element
00075     bool internalsAllocated_;
00076 
00077     double elemLength_;       // length of a side of this 2D element
00078     double totalLength_;      // total length of a side of the square region
00079                               // that this element is in.
00080     bool elemLengthIsSet_;    // indicates whether length has been set.
00081     bool totalLengthIsSet_;    // indicates whether length has been set.
00082 
00083     bool loadAllocated_;
00084     bool stiffAllocated_;
00085 };
00086  
00087 #endif
00088 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:08:24 2011 for FEI by  doxygen 1.6.3