FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HexBeam.hpp
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _HexBeam_h_
10 #define _HexBeam_h_
11 
12 #include <fei_base.hpp>
13 
24 class HexBeam {
25  public:
26  enum { OneD = 0, TwoD = 1, ThreeD = 2 };
27 
28  HexBeam(int W, int D, int DofPerNode,
29  int decomp, int numProcs, int localProc);
30  virtual ~HexBeam();
31 
32  virtual bool inErrorState() { return( inErrorState_ ); }
33 
34  virtual int numNodesPerElem() { return( nodesPerElem_ ); }
35 
36  virtual int numDofPerNode() { return( dofPerNode_ ); }
37 
38  virtual int numLocalElems() { return( localNumElems_ ); }
39 
40  virtual int numLocalNodes() { return( localNumNodes_ ); }
41 
42  virtual int firstLocalElem() { return( firstLocalElem_ ); }
43 
44  virtual int getElemConnectivity(int elemID, int* nodeIDs);
45 
46  virtual int getElemStiffnessMatrix(int elemID, double* elemMat);
47 
48  virtual int getElemLoadVector(int elemID, double* elemVec);
49 
50  virtual int getNumBCNodes();
51 
52  virtual int getBCNodes(int numNodes, int* nodeIDs);
53 
54  virtual int getBCValues(int numBCNodes, int* offsetsIntoField, double* vals);
55 
56  virtual int getNumSharedNodes();
57 
58  virtual int getSharedNodes(int numSharedNodes,
59  int*& sharedNodes,
60  int*& numSharingProcsPerNode,
61  int**& sharingProcs);
62 
63  virtual int getNumCRs() { return( 0 ); }
64 
65  virtual int getNumNodesPerCR() { return( 0 ); }
66 
67  virtual int getCRNodes(int** nodeIDs) { (void)nodeIDs; return(0); }
68 
69  int W_;
70  int D_;
71  int decomp_;
72  int numProcs_;
73  int localProc_;
74 
75  int totalNumElems_;
76  int totalNumNodes_;
77  int localNumElems_;
78  int localNumNodes_;
79  int firstLocalElem_;
80  int firstLocalNode_;
81 
82  int numElemsPerSlice_;
83  int numNodesPerSlice_;
84  int numLocalSlices_;
85 
86  bool inErrorState_;
87 
88  int nodesPerElem_;
89  int dofPerNode_;
90 
91  int numLocalDOF_;
92  int numGlobalDOF_;
93 };
94 
95 namespace HexBeam_Functions {
96 
97 int init_elem_connectivities(FEI* fei, HexBeam& hexcube);
98 
99 int init_shared_nodes(FEI* fei, HexBeam& hexcube);
100 
101 int init_constraints(FEI* fei, HexBeam& hexcube, int& firstLocalCRID);
102 
103 int load_elem_data(FEI* fei, HexBeam& hexcube);
104 
105 int load_constraints(FEI* fei, HexBeam& hexcube, int firstLocalCRID);
106 
107 int load_BC_data(FEI* fei, HexBeam& hexcube);
108 
109 int print_cube_data(HexBeam& hexcube, int numProcs, int localProc);
110 
111 
112 int init_elem_connectivities(fei::MatrixGraph* matrixGraph, HexBeam& hexcube);
113 
114 int init_shared_nodes(fei::MatrixGraph* matrixGraph, HexBeam& hexcube);
115 
116 int init_constraints(fei::MatrixGraph* matrixGraph, HexBeam& hexcube,
117  int localProc, int& firstLocalCRID);
118 
119 int init_slave_constraints(fei::MatrixGraph* matrixGraph, HexBeam& hexcube);
120 
121 int load_elem_data(fei::MatrixGraph* matrixGraph,
122  fei::Matrix* mat,
123  fei::Vector* rhs,
124  HexBeam& hexcube);
125 
126 int load_constraints(fei::LinearSystem* linSys, HexBeam& hexcube,
127  int firstLocalCRID);
128 
129 int load_BC_data(fei::LinearSystem* linSys, HexBeam& hexcube);
130 
131 }//namespace HexBeam_Functions
132 
133 #endif // _HexBeam_h_
Definition: FEI.hpp:144