00001 #include "winpast.h"
00002 #include "stochdriver.h"
00003 #include "global.h"
00004 #include "intpoints.h"
00005
00006 winpast::winpast (void)
00007 {
00008 allocv (3,c1); allocv (3,c2);
00009 }
00010 winpast::~winpast (void)
00011 {
00012 destrv (c1); destrv (c2);
00013 }
00014
00015 void winpast::read (XFILE *in)
00016 {
00017 xfscanf (in,"%lf %lf %lf",&c1[0],&c1[1],&c1[2]);
00018 xfscanf (in,"%lf %lf %lf",&c2[0],&c2[1],&c2[2]);
00019 }
00020
00021 void winpast::matstiff (matrix &d,long ipp)
00022 {
00023 switch (Mm->ip[ipp].ssst){
00024 case plbeam:{
00025 matstiff_soilplbeam (d);
00026 break;
00027 }
00028 case spacebeam:{
00029 matstiff_soilbeam (d);
00030 break;
00031 }
00032 case platek:{
00033 matstiff_soilplate (d);
00034 break;
00035 }
00036 case plates:{
00037 matstiff_soilplate (d);
00038 break;
00039 }
00040 case spacestress:{
00041
00042
00043 }
00044 default:{
00045 fprintf (stderr,"\n unknown number of components of stress tensor is required");
00046 fprintf (stderr,"\n in function winpast::matstiff (%s, line %d).\n",__FILE__,__LINE__);
00047 }
00048 }
00049 }
00050
00051 void winpast::elmatstiff (matrix &d,long ipp)
00052 {
00053 switch (Mm->ip[ipp].ssst){
00054 case plbeam:{
00055 matstiff_soilplbeam (d);
00056 break;
00057 }
00058 case spacebeam:{
00059 matstiff_soilbeam (d);
00060 break;
00061 }
00062 case platek:{
00063 matstiff_soilplate (d);
00064 break;
00065 }
00066 case plates:{
00067 matstiff_soilplate (d);
00068 break;
00069 }
00070 case spacestress:{
00071
00072
00073 }
00074 default:{
00075 fprintf (stderr,"\n unknown number of components of stress tensor is required");
00076 fprintf (stderr,"\n in function winpast::elmatstiff (%s, line %d).\n",__FILE__,__LINE__);
00077 }
00078 }
00079 }
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 void winpast::matstiff_soilplbeam (matrix &d)
00090 {
00091
00092 d[0][0] = c1[0];
00093 d[1][1] = c1[1];
00094 d[2][2] = c2[0];
00095
00096 }
00097 void winpast::matstiff_soilbeam (matrix &d)
00098 {
00099
00100 d[0][0] = c1[0];
00101 d[1][1] = c1[1];
00102 d[2][2] = c1[2];
00103 d[3][3] = c2[0];
00104 d[4][4] = c2[1];
00105 d[5][5] = c2[2];
00106
00107 }
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 void winpast::matstiff_soilplate (matrix &d)
00119 {
00120
00121
00122 d[0][0]=c1[0]; d[0][1]=0.0; d[0][2]=0.0;
00123 d[1][0]=d[0][1]; d[1][1]=c2[0]; d[1][2]=0.0;
00124 d[2][0]=0.0; d[2][1]=0.0; d[2][2]=c2[0];
00125
00126 }
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 void winpast::matstiff_soilspacestr (matrix &d)
00137 {
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 }
00153
00154
00155 void winpast::nlstresses (long ipp)
00156 {
00157 long i, n = Mm->ip[ipp].ncompstr;
00158 vector eps(n),sig(n);
00159 strastrestate ssst = Mm->ip[ipp].ssst;
00160 matrix d(n,n);
00161
00162
00163 for (i=0;i<n;i++){
00164 eps[i]=Mm->ip[ipp].strain[i];
00165 }
00166
00167 matstiff (d,ssst);
00168 mxv (d,eps,sig);
00169
00170 for (i=0;i<n;i++){
00171 Mm->ip[ipp].stress[i]=sig[i];
00172 }
00173
00174 }
00175