00001 #include "geoelast.h"
00002 #include "matrix.h"
00003 #include "vector.h"
00004 #include "global.h"
00005 #include "intpoints.h"
00006 #include "vecttens.h"
00007 #include "tensor.h"
00008
00009
00010
00011
00012
00013
00014
00015
00016 geoelastmat::geoelastmat (void)
00017 {
00018 keu = 0.0;
00019 }
00020
00021
00022
00023
00024
00025
00026
00027
00028 geoelastmat::~geoelastmat (void)
00029 {
00030
00031 }
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 void geoelastmat::read (XFILE *in)
00046 {
00047 xfscanf (in,"%lf", &keu);
00048 }
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 void geoelastmat::matstiff (matrix &d, long ipp,long ido)
00064 {
00065 Mm->elmatstiff (d,ipp);
00066 }
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 void geoelastmat::nlstresses (long ipp, long im, long ido)
00083 {
00084 long i, n = Mm->ip[ipp].ncompstr;
00085 vector eps(n),sig(n);
00086 matrix d(n,n), sigt(3,3);
00087 double i1s;
00088
00089
00090 Mm->computenlstresses(ipp, im+1, ido+1);
00091
00092 Mm->givestress (0, ipp, sig);
00093 vector_tensor (sig, sigt, Mm->ip[ipp].ssst, stress);
00094 i1s = first_invar (sigt)/3;
00095 if (i1s <= Mm->ip[ipp].eqother[ido])
00096
00097 {
00098 Mm->storestress(0, ipp, sig);
00099
00100 Mm->ip[ipp].other[ido]=i1s;
00101 }
00102 else
00103
00104 {
00105
00106 cmulm(keu, d);
00107
00108 Mm->givestrain(0, ipp, eps);
00109
00110 for (i=0; i<n; i++)
00111 eps[i] -= Mm->ip[ipp].eqother[ido+1+i];
00112 mxv(d, eps, sig);
00113 Mm->storestress(0, ipp, sig);
00114
00115 Mm->ip[ipp].other[ido] = Mm->ip[ipp].eqother[ido];
00116 }
00117 }
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 void geoelastmat::updateval (long ipp, long im, long ido)
00134 {
00135
00136 Mm->ip[ipp].eqother[ido] = Mm->ip[ipp].other[ido];
00137
00138 Mm->updateipvalmat (ipp,im+1,ido+1);
00139 }