00001 #ifndef ARGYRIS_H
00002 #define ARGYRIS_H
00003 
00004 #include "alias.h"
00005 
00006 struct matrix;
00007 struct vector;
00008 struct ivector;
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 class ArgyrisTriangle
00018 {
00019 
00020 public:
00021 
00022 
00023   ArgyrisTriangle(void);
00024 
00025   ~ArgyrisTriangle(void);
00026 
00027 
00028   double approx (vector &areacoord,vector &nodval);
00029   double approx_nat (double xi,double eta,vector &nodval);
00030   void bf_matrix (matrix &n,vector &x,vector &y,vector &areacoord);
00031   
00032   void geom_matrix (matrix &gm,vector &x,vector &y,vector &areacoord);
00033   
00034   void dmat (matrix &d,double t);
00035   void transf_matrix (ivector &nodes,matrix &tmat);
00036   void stiffness_matrix (long eid,long ri,long ci,matrix &sm,vector &x,vector &y);
00037   void res_stiffness_matrix (long eid,matrix &sm);
00038   void mass_matrix (long eid,matrix &mm,vector &x,vector &y);
00039   void res_mass_matrix (long eid,matrix &mm);
00040   void load_matrix (long eid,matrix &lm);
00041 
00042   void ip_strains (long lcid,long eid,long ri,long ci,vector &x,vector &y,vector &r);
00043   void res_ip_strains (long lcid,long eid);
00044   void nod_strains_ip (long lcid,long eid,long ri,long ci);
00045   void res_ip_stresses (long lcid,long eid);
00046   void nod_stresses_ip (long lcid,long eid,long ri,long ci);
00047 
00048   void strains (long lcid,long eid,long ri,long ci);
00049   
00050   void nodecoord (vector &xi,vector &eta);
00051   void appval (double xi,double eta,long fi,long nc,vector &eps,double **val);
00052   
00053   void stresses (long lcid,long eid,long ri,long ci);
00054 
00055   void internal_forces (long lcid,long eid,long ri,long ci,vector &ifor,vector &x,vector &y);
00056   void nonloc_internal_forces (long lcid,long eid,long ri,long ci,vector &ifor,vector &x,vector &y);
00057   void incr_internal_forces (long lcid,long eid,long ri,long ci,vector &ifor,vector &x,vector &y);
00058   void eigstrain_forces (long lcid,long eid,long ri,long ci,vector &nfor,vector &x,vector &y);
00059 
00060   void res_internal_forces (long lcid,long eid,vector &ifor);
00061   void res_nonloc_internal_forces (long lcid,long eid,vector &ifor);
00062   void res_incr_internal_forces (long lcid,long eid,vector &ifor);
00063   void res_eigstrain_forces (long lcid,long eid,vector &nfor);
00064 
00065   void compute_nlstress (long lcid,long eid,long ri,long ci);
00066   void compute_nlstressincr (long lcid,long eid,long ri,long ci);
00067   void local_values (long lcid,long eid,long ri,long ci);
00068   void compute_nonloc_nlstress (long lcid,long eid,long ri,long ci);
00069   void compute_eigstress (long lcid,long eid,long ri,long ci);
00070   void elem_integration (integratedquant iq,long lcid,long eid,long ri,long ci,vector &nv,vector &x,vector &y);
00071   
00072   void inicipval(long eid, long ri, long ci, matrix &nodval, inictype *ictn);
00073 
00074 
00075 
00076   long ndofe;
00077 
00078   long nne;
00079 
00080   long tncomp;
00081 
00082   long tnip;
00083 
00084   long napfun;
00085 
00086   long ned;
00087 
00088   long nned;
00089 
00090   long **intordsm;
00091 
00092   long **nip;
00093 
00094   long *ncomp;
00095 
00096   long *cncomp;
00097 
00098   long nb;
00099 
00100   long intordmm;
00101 
00102   strastrestate ssst;
00103 
00104 private:
00105             enum Derivatives { dX2, dY2, dXdY };
00106 
00107             void computeTriangleConstants( double* xCoords,  double* yCoords,  double* A,  double* L,  double* c1,  double* c2);
00108 
00109             
00110 
00111 
00112             double getEij(int i, double* L);
00113             double getEik(int i, double* L);
00114 
00115             double getFirstCommonExpressionValue(int i, Derivatives dType, double* omega, double* c1, double* c2);
00116             double getSecondCommonExpressionValue(int i, Derivatives dType, double* omega, double* c1, double* c2);
00117             double getThirdCommonExpressionValue(int i, Derivatives dType, double* omega, double* c1, double* c2);
00118             
00119             void computeAreaCoordinatesForPoint( double x,  double y,  double* xCoords,  double* yCoords,  double* omega);
00120             void convertAreaCoordinatesToNaturalCoordinates( double* xCoords,  double* yCoords,  double* omega,  double* pointX,  double* pointY);
00121 
00122             
00123             double get_Hi(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00124             double get_Hix(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00125             double get_Hiy(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00126             double get_Hixx(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00127             double get_Hiyy(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00128             double get_Hixy(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00129             double get_HjkNi(int i, double* xCoords, double* yCoords, double pointX, double pointY);
00130 
00131             
00132             double get_Hi(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY); 
00133             double get_Hix(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY);
00134             double get_Hiy(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY);
00135             double get_Hixx(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY);
00136             double get_Hiyy(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY);
00137             double get_Hixy(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY);
00138             double get_HjkNi(int i, Derivatives dType, double* xCoords, double* yCoords, double pointX, double pointY);
00139 
00140 };
00141 
00142 #endif
00143