📄 geoelast.cpp
字号:
#include "geoelast.h"#include "matrix.h"#include "vector.h"#include "global.h"#include "intpoints.h"#include "vecttens.h"#include "tensor.h"geoelastmat::geoelastmat (void){ keu = 0.0;}geoelastmat::~geoelastmat (void){}void geoelastmat::read (XFILE *in){ xfscanf (in,"%lf", &keu);}void geoelastmat::matstiff (matrix &d, long ipp,long ido){ Mm->matstiff(d, ipp, 1, ido);}void geoelastmat::nlstresses (long ipp, long im, long ido){ long i, n = Mm->ip[ipp].ncompstr; vector eps(n),sig(n); matrix d(n,n), sigt(3,3); double i1s; // compute plasticity Mm->computenlstresses(ipp, im+1, ido+1); // extract computed stresses Mm->givestress (0, ipp, sig); vector_tensor (sig, sigt, Mm->ip[ipp].ssst, stress); i1s = first_invar (sigt)/3; if (i1s <= Mm->ip[ipp].eqother[ido]) // loading state { Mm->storestress(0, ipp, sig); // update reached pressure Mm->ip[ipp].other[ido]=i1s; } else // unloading state { // assembling unloading matrix cmulm(keu, d); // give total strains Mm->givestrain(0, ipp, eps); // elastic strain = total strain - plastic strain for (i=0; i<n; i++) eps[i] -= Mm->ip[ipp].eqother[ido+1+i]; mxv(d, eps, sig); Mm->storestress(0, ipp, sig); // copy reached pressure to current state Mm->ip[ipp].other[ido] = Mm->ip[ipp].eqother[ido]; }}void geoelastmat::updateval (long ipp, long im, long ido){ // update reached pressure Mm->ip[ipp].eqother[ido] = Mm->ip[ipp].other[ido]; // update values of plasticity model Mm->updateipvalmat (ipp,im+1,ido+1);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -