/* $Header: /usr/home/sanjay/Feap/Elem/Ec/RCS/stif13.c,v 1.3 2000/01/28 20:55:02 sanjay Exp $ */ #include /* define s(nst,nst) as a zero index array (column major)*/ #define s(a,b) (*(sf+(a)+((b)*nst))) #define xl(a,b) (*(xlf+(a)+((b)*ndm))) struct { double hr[1]; int mr[1000]; } _BLNK__; struct { int numnp,numel,nummat,nen,neq,ipr; } cdata_; struct { char o[4], head[80]; } bdata_; struct { double dm; int n,ma,mct,iel,nel; } eldata_; struct { double tt[100]; } elplot_; struct { int nh1, nh2, nh3; } hdata_; struct { int ior, iow; } iofile_; struct { int nph, ner; double erav; } prstrs_; struct { double ttim,dt,c1,c2,c3,c4,c5; } tdata_; static char stress_header[] = "\nElement Material Stress-11 Stress-22\ Stress-33 Stress-12 Stress-23 Stress-13\nx-coord y-coord\ Strain-11 Strain-22 Strain-33 Strain-12 Strain-23 Strain-13\n"; static char stress_format[] ="%7d%10d%11.3e%11.3e%11.3e%11.3e%11.3e%11.3e\n\ %7.4f%9.4f%12.3e%11.3e%11.3e%11.3e%11.3e%11.3e\n"; void stif13(double (* d), double (* ul), double (* xlf), int (* ix),double (* tl), double (* sf ), double (* p ), int ndf, int ndm, int nst, int isw) { /* c------------------------------------------------------- c * * F E A P * * A Finite Element Analysis Program c Copyright (c) 1984-1994: Robert L. Taylor c c C Language Example Element for FEAP c Copyright (c) 2000 : Sanjay Govindjee c c Input: c d, ul, xlf, ix, tl, ndf, ndm, nst, isw c c Output: (various) c p, s c c------------------------------------------------------- */ double sg[4][3]; /* swapped order from fortran */ double shps[4][4][3]; /* swapped order from fortran */ double ds[6][6], sigav[6], sigl[4][6], xsj[4]; double sig[6], eps[4][6], deps[4][6], dvol; double bbd[4][2], epsav[6], xx1, xx2; int tmp1,tmp2,tmp3,FALSE=0; int nhv,lint,l,hpl; int j,j1,i,i1,jj; char iow_str[1600]; int len; switch(isw) { case 3: case 6: case 4: case 8: /* c Integration points and weights */ tmp1 = 2; /* Gauss points per direction */ lint = 4; /* Gauss points in element */ int2d_(&tmp1,&lint,*sg); /* c Get shape functions and jacobians c And linear strains c Note the pointer-pointer arithmetic on sg and shps c so be careful if you need to modify these calls */ for(l=0; l