00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _NODE_H
00014 #define _NODE_H
00015
00016 #include "gbldefs.h"
00017
00018
00019
00020
00021 class cNode;
00022 class cList;
00023 class cElement;
00024
00025
00026
00027
00028 typedef struct _suppnode
00029 {
00030 cNode *node;
00031 int dx,dy,dz;
00032 int rx,ry,rz;
00033 } sSuppNode;
00034
00035 typedef struct _eqconst
00036 {
00037 int ncn;
00038 int *dir;
00039 double *coef;
00040 cNode **node;
00041 } sEqConst;
00042
00043 typedef struct _nodeval
00044 {
00045 cNode *node;
00046 int dir;
00047 double val;
00048 } sNodeVal;
00049
00050
00051
00052
00053 class cNode
00054 {
00055 private:
00056 static cNode **NodePtr;
00057 static cNode *NodeHead;
00058 cNode *next;
00059 cNode *prev;
00060
00061 protected:
00062 static int _iNumMeshNodes;
00063 static int _iNumDofMeshNodes;
00064 static int _iNumSprings;
00065 static int _iNumConcLoads;
00066 static int _iNumPrscDisps;
00067 static int _iNumSuppNodes;
00068 static int _iNumEqConst;
00069 static int _iNumNodeTemp;
00070 static sSuppNode *_psSuppNode;
00071 static sEqConst *_psEqConst;
00072 static sNodeVal *_psSpring;
00073 static sNodeVal *_psConcLoad;
00074 static sNodeVal *_psPrscDisp;
00075 int _iId;
00076 int _iNumDofNode;
00077 int _iNumAdjElms;
00078 int _iNodeEqs[6];
00079 double _dDValue[6];
00080 double _dRValue[6];
00081 double *_dTemp;
00082 double _dThickness;
00083 sNodeCoord _sNodeCoords0;
00084 sNodeCoord _sNodeCoords;
00085 sVector _sV3;
00086 sVector _sV1;
00087 sVector _sV2;
00088 cList *_pcLst;
00089
00090 private:
00091 static void ProcessNodeCoord ( void );
00092 static void ProcessNodeSupport ( void );
00093 static void ProcessNodeConstraint( void );
00094 static void ProcessNodalThickness( void );
00095 static void ProcessNodalVectors ( void );
00096 static void ProcessNodalSprings ( void );
00097 static void ProcessNodalForces ( void );
00098 static void ProcessNodalDispls ( void );
00099 static void ProcessNodalTemps ( void );
00100
00101 public:
00102 cNode ( int );
00103 virtual ~cNode ( void );
00104 static cNode *ReadAll ( void );
00105 static void FreeAll ( void );
00106 static cNode *GetNode ( int );
00107 static cNode *GetNodeHead ( void ){ return NodeHead; }
00108 cNode *GetNextNode ( void ){ return next; }
00109 static int GetNumDofMeshNodes( void );
00110 static int GetNumMeshNodes ( void ){ return _iNumMeshNodes; }
00111 static int GetNumSuppNodes ( void ){ return _iNumSuppNodes; }
00112 static int GetNumEqualConst ( void ){ return _iNumEqConst; }
00113 static int GetNumSprings ( void ){ return _iNumSprings; }
00114 static int GetNumConcLoads ( void ){ return _iNumConcLoads; }
00115 static int GetNumPrscDisps ( void ){ return _iNumPrscDisps; }
00116 static int GetNumNodalTemps ( void ){ return _iNumNodeTemp; }
00117 static sNodeVal GetSpring ( int i ){return _psSpring[i]; }
00118 static sNodeVal GetConcLoad ( int i ){return _psConcLoad[i]; }
00119 static sNodeVal GetPrscDisp ( int i ){return _psPrscDisp[i]; }
00120 static sSuppNode GetSuppNode ( int i ){return _psSuppNode[i]; }
00121 static void GetNodeValues ( double * );
00122 static void GetConstMatrix ( double ** );
00123 int GetNodeId ( void ) { return _iId; }
00124 int GetNodeEq ( int i ) { return _iNodeEqs[i]; }
00125 int GetNumDofNode ( void ) { return _iNumDofNode; }
00126 int GetNumAdjElms ( void ) { return _iNumAdjElms; }
00127 sNodeCoord GetNodeCoord ( void ) { return _sNodeCoords; }
00128 double GetNodeDValue ( int i ) { return _dDValue[i]; }
00129 double GetNodeRValue ( int i ) { return _dRValue[i]; }
00130 cList *AdjacentElmHead ( void ) { return _pcLst; }
00131 void SetThickness ( double t ) { _dThickness = t; }
00132 void PutNumDofNode ( int dof ){ _iNumDofNode = dof; }
00133 void PutNodeDValue ( int i, double value )
00134 { _dDValue[i] = value; }
00135 void PutNodeRValue ( int i, double value )
00136 { _dRValue[i] = value; }
00137 void PutNodeEq ( int i, int value )
00138 { _iNodeEqs[i] = value; }
00139 void AddNodeDValue ( int i, double value )
00140 { _dDValue[i] += value; }
00141 void AddNodeRValue ( int i, double value )
00142 { _dRValue[i] += value; }
00143 double GetThickness ( void ) { return _dThickness; }
00144 sVector GetVector ( void ) { return _sV3; }
00145 void GetVectors ( sVector *v1, sVector *v2,
00146 sVector *v3 )
00147 { *v1=_sV1; *v2=_sV2; *v3=_sV3; }
00148 int GetTemp ( double * );
00149 int SetTemp ( double * );
00150 void UpdateCoord ( double u, double v, double w );
00151 void AdjacentElmPut ( cElement * );
00152 void AdjacentElmFree ( void );
00153 void SPRNodeTen ( int *, sTensor *);
00154 void REPNodeTen ( int *, sTensor *);
00155 void WANodeTen ( double, int *, sTensor *);
00156 void DerivStress ( int *, double ** );
00157 };
00158
00159 #endif