FEI Version of the Day
HexBeam.hpp
00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #ifndef _HexBeam_h_
00010 #define _HexBeam_h_
00011 
00012 #include <fei_base.hpp>
00013 
00024 class HexBeam {
00025  public:
00026   enum { OneD = 0, TwoD = 1, ThreeD = 2 };
00027 
00028   HexBeam(int W, int D, int DofPerNode,
00029     int decomp, int numProcs, int localProc);
00030   virtual ~HexBeam();
00031 
00032   virtual bool inErrorState() { return( inErrorState_ ); }
00033 
00034   virtual int numNodesPerElem() { return( nodesPerElem_ ); }
00035 
00036   virtual int numDofPerNode() { return( dofPerNode_ ); }
00037 
00038   virtual int numLocalElems() { return( localNumElems_ ); }
00039 
00040   virtual int numLocalNodes() { return( localNumNodes_ ); }
00041 
00042   virtual int firstLocalElem() { return( firstLocalElem_ ); }
00043 
00044   virtual int getElemConnectivity(int elemID, int* nodeIDs);
00045 
00046   virtual int getElemStiffnessMatrix(int elemID, double* elemMat);
00047 
00048   virtual int getElemLoadVector(int elemID, double* elemVec);
00049 
00050   virtual int getNumBCNodes();
00051 
00052   virtual int getBCNodes(int numNodes, int* nodeIDs);
00053 
00054   virtual int getBCValues(int numBCNodes, int* offsetsIntoField, double* vals);
00055 
00056   virtual int getNumSharedNodes();
00057 
00058   virtual int getSharedNodes(int numSharedNodes,
00059          int*& sharedNodes,
00060          int*& numSharingProcsPerNode,
00061          int**& sharingProcs);
00062 
00063   virtual int getNumCRs() { return( 0 ); }
00064 
00065   virtual int getNumNodesPerCR() { return( 0 ); }
00066 
00067   virtual int getCRNodes(int** nodeIDs) { (void)nodeIDs; return(0); }
00068 
00069   int W_;
00070   int D_;
00071   int decomp_;
00072   int numProcs_;
00073   int localProc_;
00074 
00075   int totalNumElems_;
00076   int totalNumNodes_;
00077   int localNumElems_;
00078   int localNumNodes_;
00079   int firstLocalElem_;
00080   int firstLocalNode_;
00081 
00082   int numElemsPerSlice_;
00083   int numNodesPerSlice_;
00084   int numLocalSlices_;
00085 
00086   bool inErrorState_;
00087 
00088   int nodesPerElem_;
00089   int dofPerNode_;
00090 
00091   int numLocalDOF_;
00092   int numGlobalDOF_;
00093 };
00094 
00095 namespace HexBeam_Functions {
00096 
00097 int init_elem_connectivities(FEI* fei, HexBeam& hexcube);
00098 
00099 int init_shared_nodes(FEI* fei, HexBeam& hexcube);
00100 
00101 int init_constraints(FEI* fei, HexBeam& hexcube, int& firstLocalCRID);
00102 
00103 int load_elem_data(FEI* fei, HexBeam& hexcube);
00104 
00105 int load_constraints(FEI* fei, HexBeam& hexcube, int firstLocalCRID);
00106 
00107 int load_BC_data(FEI* fei, HexBeam& hexcube);
00108 
00109 int print_cube_data(HexBeam& hexcube, int numProcs, int localProc);
00110 
00111 
00112 int init_elem_connectivities(fei::MatrixGraph* matrixGraph, HexBeam& hexcube);
00113 
00114 int init_shared_nodes(fei::MatrixGraph* matrixGraph, HexBeam& hexcube);
00115 
00116 int init_constraints(fei::MatrixGraph* matrixGraph, HexBeam& hexcube,
00117          int localProc, int& firstLocalCRID);
00118 
00119 int init_slave_constraints(fei::MatrixGraph* matrixGraph, HexBeam& hexcube);
00120 
00121 int load_elem_data(fei::MatrixGraph* matrixGraph,
00122        fei::Matrix* mat,
00123        fei::Vector* rhs,
00124        HexBeam& hexcube);
00125 
00126 int load_constraints(fei::LinearSystem* linSys, HexBeam& hexcube,
00127          int firstLocalCRID);
00128 
00129 int load_BC_data(fei::LinearSystem* linSys, HexBeam& hexcube);
00130 
00131 }//namespace HexBeam_Functions
00132 
00133 #endif // _HexBeam_h_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends