00001 #include "damplast.h"
00002 #include "matrix.h"
00003 #include "vector.h"
00004 #include "elastisomat.h"
00005 #include "global.h"
00006 #include "intpoints.h"
00007 #include "vecttens.h"
00008 #include <math.h>
00009
00010
00011
00012
00013 damplast::damplast (void)
00014 {
00015
00016 }
00017
00018
00019
00020
00021 damplast::~damplast (void)
00022 {
00023
00024 }
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 void damplast::matstiff (matrix &d,long ipp)
00037 {
00038 double dp;
00039 long ncompo = Mm->givencompother(ipp, 1);
00040
00041 switch (Mp->nlman->stmat)
00042 {
00043 case initial_stiff:
00044 Mm->elmatstiff (d,ipp);
00045 break;
00046 case tangent_stiff:
00047 Mm->elmatstiff (d,ipp);
00048 dp=Mm->ip[ipp].eqother[ncompo+1];
00049 if (dp > 0.999999)
00050 dp = 0.999999;
00051 cmulm (1.0-dp,d);
00052 break;
00053 default:
00054 print_err("unknown type of stifness matrix is required", __FILE__, __LINE__, __func__);
00055 }
00056 }
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 void damplast::nlstresses (long ipp)
00071 {
00072 long i;
00073 long ncompo = Mm->givencompother(ipp, 1);
00074 long ncomp = Mm->ip[ipp].ncompstr;
00075 vector epsback(ncomp);
00076 vector kappa(1);
00077 vector sigma(ncomp);
00078
00079
00080 Mm->computenlstresses(ipp, 1, 0);
00081
00082
00083 for (i=0;i<ncomp;i++){
00084 epsback[i] = Mm->ip[ipp].strain[i];
00085 }
00086
00087 for (i=0;i<ncomp;i++){
00088 Mm->ip[ipp].strain[i] -= Mm->ip[ipp].other[i];
00089 }
00090
00091 kappa[0] = Mm->ip[ipp].eqother[ncompo+0];
00092
00093
00094
00095 Mm->computenlstresses(ipp, 2, ncompo);
00096
00097
00098 for (i=0;i<ncomp;i++){
00099 Mm->ip[ipp].strain[i] = epsback[i];
00100 }
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 }
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122 void damplast::updateval (long ipp)
00123 {
00124
00125 Mm->updateipvalmat (ipp,1,0);
00126
00127 Mm->updateipvalmat (ipp,2,Mm->givencompother(ipp,1));
00128 }
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 double damplast::give_actual_ft(long ipp, long im, long ido)
00145 {
00146 double ft;
00147 long ncompo;
00148 ncompo = Mm->givencompeqother(ipp, im+1);
00149 ft = Mm->give_actual_ft(ipp, im+2, ido);
00150 return ft;
00151 }