13 static LoggerPtr elastoplasticLogger(Logger::getLogger(
"pz.material.pzElastoPlastic"));
14 static LoggerPtr updatelogger(Logger::getLogger(
"pz.material.pzElastoPlastic.update"));
15 static LoggerPtr ceckconvlogger(Logger::getLogger(
"checkconvmaterial"));
19 template <
class T,
class TMEM>
29 if(elastoplasticLogger->isDebugEnabled())
31 std::stringstream sout;
32 sout <<
">>> TPZMatElastoPlastic<T,TMEM>() constructor called ***";
33 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
39 template <
class T,
class TMEM>
51 if (elastoplasticLogger->isDebugEnabled())
53 std::stringstream sout;
54 sout <<
">>> TPZMatElastoPlastic<T,TMEM>(int id) constructor called with id = " <<
id <<
" ***";
55 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
61 template <
class T,
class TMEM>
67 if(elastoplasticLogger->isDebugEnabled())
69 std::stringstream sout;
70 sout <<
">>> TPZMatElastoPlastic<T,TMEM>() copy constructor called ***";
71 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
78 template <
class T,
class TMEM>
82 if(elastoplasticLogger->isDebugEnabled())
84 std::stringstream sout;
85 sout <<
">>> TPZMatElastoPlastic<T,TMEM>::SetPlasticityModel " << std::endl;
86 sout <<
"\n with plasticity argument: " << std::endl;
87 plasticity.Print(sout);
88 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
95 memory.m_elastoplastic_state = plastloc.GetState();
96 plastloc.ApplyStrainComputeSigma(memory.m_elastoplastic_state.m_eps_t, memory.m_sigma);
99 if(elastoplasticLogger->isDebugEnabled())
101 std::stringstream sout;
102 sout <<
"<< TPZMatElastoPlastic<T,TMEM>::SetPlasticityModel " << std::endl;
103 sout <<
"\n Computed Sigma: " << std::endl;
104 sout << memory.m_sigma;
105 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
111 template <
class T,
class TMEM>
117 template <
class T,
class TMEM>
123 template <
class T,
class TMEM>
128 template <
class T,
class TMEM>
133 template <
class T,
class TMEM>
138 template <
class T,
class TMEM>
144 template <
class T,
class TMEM>
149 out <<
"\n Base material Data:\n";
151 out <<
"\n Localy defined members:";
152 out <<
"\n Body Forces: " <<
m_force;
155 out <<
"\n Tolerance for internal post processing iterations: " <<
m_tol;
157 out <<
"\n Internal plasticity <T> member:\n";
161 template <
class T,
class TMEM>
164 out << __PRETTY_FUNCTION__ << std::endl;
167 out <<
"\n Body Forces: " <<
m_force;
170 out <<
"\n Tolerance for internal post processing iterations: " <<
m_tol;
172 out <<
"\n Internal plasticity <T> member:\n";
176 template <
class T,
class TMEM>
200 PZError <<
"TPZMatElastoPlastic<T,TMEM>:: VariableIndex Error\n";
204 template <
class T,
class TMEM>
228 if(var == 100)
return 1;
232 template <
class T,
class TMEM>
237 Out[0] = Dir[0] * vectorTensor(
_XX_,0) + Dir[1] * vectorTensor(
_XY_,0) + Dir[2] * vectorTensor(
_XZ_,0);
238 Out[1] = Dir[0] * vectorTensor(
_XY_,0) + Dir[1] * vectorTensor(
_YY_,0) + Dir[2] * vectorTensor(
_YZ_,0);
239 Out[2] = Dir[0] * vectorTensor(
_XZ_,0) + Dir[1] * vectorTensor(
_YZ_,0) + Dir[2] * vectorTensor(
_ZZ_,0);
242 template <
class T,
class TMEM>
250 for (
int i = 0; i < 3; ++i) {
251 Solout[i] = data.
sol[0][i];
260 TMEM &Memory = this->
MemItem(intPt);
262 plasticloc.SetState(Memory.m_elastoplastic_state);
266 for (
int i = 0; i < 3; i++) {
267 Solout[i] = Memory.m_u[i];
274 Solout[0] = eps_t.
XX();
275 Solout[1] = eps_t.
XY();
276 Solout[2] = eps_t.
XZ();
277 Solout[3] = eps_t.
XY();
278 Solout[4] = eps_t.
YY();
279 Solout[5] = eps_t.
YZ();
280 Solout[6] = eps_t.
XZ();
281 Solout[7] = eps_t.
YZ();
282 Solout[8] = eps_t.
ZZ();
288 Solout[0] = sigma.
XX();
289 Solout[1] = sigma.
XY();
290 Solout[2] = sigma.
XZ();
291 Solout[3] = sigma.
XY();
292 Solout[4] = sigma.
YY();
293 Solout[5] = sigma.
YZ();
294 Solout[6] = sigma.
XZ();
295 Solout[7] = sigma.
YZ();
296 Solout[8] = sigma.
ZZ();
302 eps_e -= Memory.m_elastoplastic_state.m_eps_p;
303 Solout[0] = eps_e.
XX();
304 Solout[1] = eps_e.
XY();
305 Solout[2] = eps_e.
XZ();
306 Solout[3] = eps_e.
XY();
307 Solout[4] = eps_e.
YY();
308 Solout[5] = eps_e.
YZ();
309 Solout[6] = eps_e.
XZ();
310 Solout[7] = eps_e.
YZ();
311 Solout[8] = eps_e.
ZZ();
317 Solout[0] = eps_p.
XX();
318 Solout[1] = eps_p.
XY();
319 Solout[2] = eps_p.
XZ();
320 Solout[3] = eps_p.
XY();
321 Solout[4] = eps_p.
YY();
322 Solout[5] = eps_p.
YZ();
323 Solout[6] = eps_p.
XZ();
324 Solout[7] = eps_p.
YZ();
325 Solout[8] = eps_p.
ZZ();
333 for (
int i = 0; i < 3; i++)Solout[i] = eigensystem.fEigenvalues[i];
341 for (
int i = 0; i < 3; i++)Solout[i] = eigensystem.fEigenvalues[i];
347 eps_e -= Memory.m_elastoplastic_state.m_eps_p;
350 for (
int i = 0; i < 3; i++) Solout[i] = eigensystem.fEigenvalues[i];
358 for (
int i = 0; i < 3; i++) Solout[i] = eigensystem.fEigenvalues[i];
364 Solout[0] = eps_t.
I1();
370 Solout[0] = sigma.
I1();
376 eps_e -= Memory.m_elastoplastic_state.m_eps_p;
377 Solout[0] = eps_e.
I1();
383 Solout[0] = eps_p.
I1();
389 Solout[0] = eps_t.
J2();
395 Solout[0] = sigma.
J2();
401 eps_e -= Memory.m_elastoplastic_state.m_eps_p;
402 Solout[0] = eps_e.
J2();
408 Solout[0] = eps_p.
J2();
415 epsElastic -= Memory.m_elastoplastic_state.m_eps_p;
416 plasticloc.Phi(epsElastic, Solout);
421 int m_type = Memory.m_elastoplastic_state.m_m_type;
432 template <
class T,
class TMEM>
437 if(elastoplasticLogger->isDebugEnabled())
439 std::stringstream sout;
440 sout <<
">>> TPZMatElastoPlastic<T,TMEM>::Contribute ***";
442 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
453 axesT.Multiply(dphi,dphiXYZ);
455 const int phr = phi.
Rows();
466 REAL
val,val2,val3,val4,val5,val6,val7,val8,val9,val10;
475 for(in = 0; in < phr; in++) {
480 val -= Stress(
_XX_,0) * dphiXYZ(0,in);
481 val -= Stress(
_XY_,0) * dphiXYZ(1,in);
482 val -= Stress(
_XZ_,0) * dphiXYZ(2,in);
483 ef(in*nstate+0,0) += weight *
val;
487 val -= Stress(
_XY_,0) * dphiXYZ(0,in);
488 val -= Stress(
_YY_,0) * dphiXYZ(1,in);
489 val -= Stress(
_YZ_,0) * dphiXYZ(2,in);
490 ef(in*nstate+1,0) += weight *
val;
494 val -= Stress(
_XZ_,0) * dphiXYZ(0,in);
495 val -= Stress(
_YZ_,0) * dphiXYZ(1,in);
496 val -= Stress(
_ZZ_,0) * dphiXYZ(2,in);
497 ef(in*nstate+2,0) += weight *
val;
499 for(
int jn = 0; jn < phr; jn++ ) {
506 for(
int ud = 0; ud < 3; ud++){
507 for(
int vd = 0; vd < 3; vd++){
508 Deriv(vd,ud) = dphiXYZ(vd,in)*dphiXYZ(ud,jn);
520 val2 = 2. * Dep(
_XX_,
_XX_) * Deriv(0,0);
521 val2 += Dep(
_XX_,
_XY_) * Deriv(0,1);
522 val2 += Dep(
_XX_,
_XZ_) * Deriv(0,2);
523 val2 += 2. * Dep(
_XY_,
_XX_) * Deriv(1,0);
524 val2 += Dep(
_XY_,
_XY_) * Deriv(1,1);
525 val2 += Dep(
_XY_,
_XZ_) * Deriv(1,2);
526 val2 += 2. * Dep(
_XZ_,
_XX_) * Deriv(2,0);
527 val2 += Dep(
_XZ_,
_XY_) * Deriv(2,1);
528 val2 += Dep(
_XZ_,
_XZ_) * Deriv(2,2);
530 ek(in*nstate+0,jn*nstate+0) += weight * val2;
533 val3 += 2. * Dep(
_XX_,
_YY_) * Deriv(0,1);
534 val3 += Dep(
_XX_,
_YZ_) * Deriv(0,2);
535 val3 += Dep(
_XY_,
_XY_) * Deriv(1,0);
536 val3 += 2. * Dep(
_XY_,
_YY_) * Deriv(1,1);
537 val3 += Dep(
_XY_,
_YZ_) * Deriv(1,2);
538 val3 += Dep(
_XZ_,
_XY_) * Deriv(2,0);
539 val3 += 2. * Dep(
_XZ_,
_YY_) * Deriv(2,1);
540 val3 += Dep(
_XZ_,
_YZ_) * Deriv(2,2);
542 ek(in*nstate+0,jn*nstate+1) += weight * val3;
545 val4 += Dep(
_XX_,
_YZ_) * Deriv(0,1);
546 val4 += 2. * Dep(
_XX_,
_ZZ_) * Deriv(0,2);
547 val4 += Dep(
_XY_,
_XZ_) * Deriv(1,0);
548 val4 += Dep(
_XY_,
_YZ_) * Deriv(1,1);
549 val4 += 2. * Dep(
_XY_,
_ZZ_) * Deriv(1,2);
550 val4 += Dep(
_XZ_,
_XZ_) * Deriv(2,0);
551 val4 += Dep(
_XZ_,
_YZ_) * Deriv(2,1);
552 val4 += 2. * Dep(
_XZ_,
_ZZ_) * Deriv(2,2);
554 ek(in*nstate+0,jn*nstate+2) += weight * val4;
557 val5 = 2. * Dep(
_XY_,
_XX_) * Deriv(0,0);
558 val5 += Dep(
_XY_,
_XY_) * Deriv(0,1);
559 val5 += Dep(
_XY_,
_XZ_) * Deriv(0,2);
560 val5 += 2. * Dep(
_YY_,
_XX_) * Deriv(1,0);
561 val5 += Dep(
_YY_,
_XY_) * Deriv(1,1);
562 val5 += Dep(
_YY_,
_XZ_) * Deriv(1,2);
563 val5 += 2. * Dep(
_YZ_,
_XX_) * Deriv(2,0);
564 val5 += Dep(
_YZ_,
_XY_) * Deriv(2,1);
565 val5 += Dep(
_YZ_,
_XZ_) * Deriv(2,2);
567 ek(in*nstate+1,jn*nstate+0) += weight * val5;
570 val6 += 2. * Dep(
_XY_,
_YY_) * Deriv(0,1);
571 val6 += Dep(
_XY_,
_YZ_) * Deriv(0,2);
572 val6 += Dep(
_YY_,
_XY_) * Deriv(1,0);
573 val6 += 2. * Dep(
_YY_,
_YY_) * Deriv(1,1);
574 val6 += Dep(
_YY_,
_YZ_) * Deriv(1,2);
575 val6 += Dep(
_YZ_,
_XY_) * Deriv(2,0);
576 val6 += 2. * Dep(
_YZ_,
_YY_) * Deriv(2,1);
577 val6 += Dep(
_YZ_,
_YZ_) * Deriv(2,2);
579 ek(in*nstate+1,jn*nstate+1) += weight * val6;
582 val7 += Dep(
_XY_,
_YZ_) * Deriv(0,1);
583 val7 += 2. * Dep(
_XY_,
_ZZ_) * Deriv(0,2);
584 val7 += Dep(
_YY_,
_XZ_) * Deriv(1,0);
585 val7 += Dep(
_YY_,
_YZ_) * Deriv(1,1);
586 val7 += 2. * Dep(
_YY_,
_ZZ_) * Deriv(1,2);
587 val7 += Dep(
_YZ_,
_XZ_) * Deriv(2,0);
588 val7 += Dep(
_YZ_,
_YZ_) * Deriv(2,1);
589 val7 += 2. * Dep(
_YZ_,
_ZZ_) * Deriv(2,2);
591 ek(in*nstate+1,jn*nstate+2) += weight * val7;
594 val8 = 2. * Dep(
_XZ_,
_XX_) * Deriv(0,0);
595 val8 += Dep(
_XZ_,
_XY_) * Deriv(0,1);
596 val8 += Dep(
_XZ_,
_XZ_) * Deriv(0,2);
597 val8 += 2. * Dep(
_YZ_,
_XX_) * Deriv(1,0);
598 val8 += Dep(
_YZ_,
_XY_) * Deriv(1,1);
599 val8 += Dep(
_YZ_,
_XZ_) * Deriv(1,2);
600 val8 += 2. * Dep(
_ZZ_,
_XX_) * Deriv(2,0);
601 val8 += Dep(
_ZZ_,
_XY_) * Deriv(2,1);
602 val8 += Dep(
_ZZ_,
_XZ_) * Deriv(2,2);
604 ek(in*nstate+2,jn*nstate+0) += weight * val8;
607 val9 += 2. * Dep(
_XZ_,
_YY_) * Deriv(0,1);
608 val9 += Dep(
_XZ_,
_YZ_) * Deriv(0,2);
609 val9 += Dep(
_YZ_,
_XY_) * Deriv(1,0);
610 val9 += 2. * Dep(
_YZ_,
_YY_) * Deriv(1,1);
611 val9 += Dep(
_YZ_,
_YZ_) * Deriv(1,2);
612 val9 += Dep(
_ZZ_,
_XY_) * Deriv(2,0);
613 val9 += 2. * Dep(
_ZZ_,
_YY_) * Deriv(2,1);
614 val9 += Dep(
_ZZ_,
_YZ_) * Deriv(2,2);
616 ek(in*nstate+2,jn*nstate+1) += weight * val9;
618 val10 = Dep(
_XZ_,
_XZ_) * Deriv(0,0);
619 val10 += Dep(
_XZ_,
_YZ_) * Deriv(0,1);
620 val10 += 2. * Dep(
_XZ_,
_ZZ_) * Deriv(0,2);
621 val10 += Dep(
_YZ_,
_XZ_) * Deriv(1,0);
622 val10 += Dep(
_YZ_,
_YZ_) * Deriv(1,1);
623 val10 += 2. * Dep(
_YZ_,
_ZZ_) * Deriv(1,2);
624 val10 += Dep(
_ZZ_,
_XZ_) * Deriv(2,0);
625 val10 += Dep(
_ZZ_,
_YZ_) * Deriv(2,1);
626 val10 += 2. * Dep(
_ZZ_,
_ZZ_) * Deriv(2,2);
628 ek(in*nstate+2,jn*nstate+2) += weight * val10;
634 if(elastoplasticLogger->isDebugEnabled())
636 std::stringstream sout;
637 sout <<
"<<< TPZMatElastoPlastic<T,TMEM>::Contribute ***";
639 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
644 template <
class T,
class TMEM>
652 if(elastoplasticLogger->isDebugEnabled())
654 std::stringstream sout;
655 sout <<
">>> TPZMatElastoPlastic<T,TMEM>::ContributeBC *** with bc.Type()=" << bc.
Type();
656 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
661 const REAL BIGNUMBER = 1.e16;
666 const int phr = phi.Rows();
669 v2[0] = bc.
Val2()(0,0);
670 v2[1] = bc.
Val2()(1,0);
671 v2[2] = bc.
Val2()(2,0);
679 for(in = 0 ; in < phr; in++) {
680 ef(nstate*in+0,0) += BIGNUMBER * (v2[0] - data.
sol[0][0]) * phi(in,0) * weight;
681 ef(nstate*in+1,0) += BIGNUMBER * (v2[1] - data.
sol[0][1]) * phi(in,0) * weight;
682 ef(nstate*in+2,0) += BIGNUMBER * (v2[2] - data.
sol[0][2]) * phi(in,0) * weight;
683 for (jn = 0 ; jn < phr; jn++) {
684 ek(nstate*in+0,nstate*jn+0) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight;
685 ek(nstate*in+1,nstate*jn+1) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight;
686 ek(nstate*in+2,nstate*jn+2) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight;
692 for(in = 0 ; in < phi.Rows(); in++) {
693 ef(nstate*in+0,0) += v2[0] * phi(in,0) * weight;
694 ef(nstate*in+1,0) += v2[1] * phi(in,0) * weight;
695 ef(nstate*in+2,0) += v2[2] * phi(in,0) * weight;
700 for(in = 0 ; in < phi.Rows(); in++) {
701 ef(nstate*in+0,0) += v2[0] * phi(in,0) * weight;
702 ef(nstate*in+1,0) += v2[1] * phi(in,0) * weight;
703 ef(nstate*in+2,0) += v2[2] * phi(in,0) * weight;
704 for(jn=0; jn<phi.Rows(); jn++)
706 for(idf=0; idf<3; idf++)
for(jdf=0; jdf<3; jdf++)
708 ek(nstate*in+idf,nstate*jn+jdf) += bc.
Val1()(
idf,jdf);
715 for(in = 0 ; in < phr; in++) {
716 ef(nstate*in+0,0) += BIGNUMBER * (0. - data.
sol[0][0]) * v2[0] * phi(in,0) * weight;
717 ef(nstate*in+1,0) += BIGNUMBER * (0. - data.
sol[0][1]) * v2[1] * phi(in,0) * weight;
718 ef(nstate*in+2,0) += BIGNUMBER * (0. - data.
sol[0][2]) * v2[2] * phi(in,0) * weight;
719 for (jn = 0 ; jn < phr; jn++) {
720 ek(nstate*in+0,nstate*jn+0) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight * v2[0];
721 ek(nstate*in+1,nstate*jn+1) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight * v2[1];
722 ek(nstate*in+2,nstate*jn+2) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight * v2[2];
728 for(in = 0; in < dim; in ++)
729 v2[in] = - ( v1(in,0) * data.
normal[0] +
730 v1(in,1) * data.
normal[1] +
731 v1(in,2) * data.
normal[2] );
734 for(in = 0 ; in < phi.Rows(); in++) {
735 ef(nstate*in+0,0) += v2[0] * phi(in,0) * weight;
736 ef(nstate*in+1,0) += v2[1] * phi(in,0) * weight;
737 ef(nstate*in+2,0) += v2[2] * phi(in,0) * weight;
744 for(in = 0 ; in < phi.Rows(); in++)
746 ef(nstate*in+0,0) += v2[0] * phi(in,0) * weight * (data.
normal[0]);
747 ef(nstate*in+1,0) += v2[0] * phi(in,0) * weight * (data.
normal[1]);
748 ef(nstate*in+2,0) += v2[0] * phi(in,0) * weight * (data.
normal[2]);
755 v_null[0] = bc.
Val1()(0,0);
756 v_null[1] = bc.
Val1()(1,1);
757 v_null[2] = bc.
Val1()(2,2);
759 for(in = 0 ; in < phr; in++) {
760 ef(nstate*in+0,0) += BIGNUMBER * (v2[0] - data.
sol[0][0]) * v_null[0] * phi(in,0) * weight;
761 ef(nstate*in+1,0) += BIGNUMBER * (v2[1] - data.
sol[0][1]) * v_null[1] * phi(in,0) * weight;
762 ef(nstate*in+2,0) += BIGNUMBER * (v2[2] - data.
sol[0][2]) * v_null[2] * phi(in,0) * weight;
763 for (jn = 0 ; jn < phr; jn++) {
764 ek(nstate*in+0,nstate*jn+0) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight * v_null[0];
765 ek(nstate*in+1,nstate*jn+1) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight * v_null[1];
766 ek(nstate*in+2,nstate*jn+2) += BIGNUMBER * phi(in,0) * phi(jn,0) * weight * v_null[2];
774 std::stringstream sout;
775 sout <<
"<<< TPZMatElastoPlastic<T,TMEM>::ContributeBC *** WRONG BOUNDARY CONDITION TYPE = " << bc.
Type();
776 LOGPZ_ERROR(elastoplasticLogger,sout.str().c_str());
779 PZError <<
"TPZMatElastoPlastic::ContributeBC error - Wrong boundary condition type" << std::endl;
784 template <
class T,
class TMEM>
788 if(elastoplasticLogger->isDebugEnabled())
790 std::stringstream sout;
791 sout <<
">>> TPZMatElastoPlastic<T,TMEM>::Contribute ***";
793 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
804 axesT.Multiply(dphi,dphiXYZ);
805 const int phr = phi.
Rows();
825 for(in = 0; in < phr; in++) {
830 val -= Stress(
_XX_,0) * dphiXYZ(0,in);
831 val -= Stress(
_XY_,0) * dphiXYZ(1,in);
832 val -= Stress(
_XZ_,0) * dphiXYZ(2,in);
833 ef(in*nstate+0,0) += weight *
val;
837 val -= Stress(
_XY_,0) * dphiXYZ(0,in);
838 val -= Stress(
_YY_,0) * dphiXYZ(1,in);
839 val -= Stress(
_YZ_,0) * dphiXYZ(2,in);
840 ef(in*nstate+1,0) += weight *
val;
844 val -= Stress(
_XZ_,0) * dphiXYZ(0,in);
845 val -= Stress(
_YZ_,0) * dphiXYZ(1,in);
846 val -= Stress(
_ZZ_,0) * dphiXYZ(2,in);
847 ef(in*nstate+2,0) += weight *
val;
852 if(elastoplasticLogger->isDebugEnabled())
854 std::stringstream sout;
855 sout <<
"<<< TPZMatElastoPlastic<T,TMEM>::Contribute ***";
857 LOGPZ_DEBUG(elastoplasticLogger,sout.str().c_str());
862 template <
class T,
class TMEM>
871 template <
class T,
class TMEM>
880 for(i = 0; i < 3; i++) L2 += (u[i] - u_exact[i]) * (u[i] - u_exact[i]);
884 for(i = 0; i < 3; i++)
for(j = 0; j < 3; j++) SemiH1 += (dudx(i,j) - du_exact(i,j)) * (dudx(i,j) - du_exact(i,j));
887 REAL H1 = L2 + SemiH1;
900 template <
class T,
class TMEM>
908 for( i = 0; i < 6; i++ )Strain(i,0) = Strain(i,0) + EpsT.
fData[i];
911 template <
class T,
class TMEM>
916 cout <<
"\n data dsol \n";
918 DeltaStrain.
Redim(6,1);
919 DeltaStrain(
_XX_,0) = DSolXYZ(0,0);
920 DeltaStrain(
_YY_,0) = DSolXYZ(1,1);
921 DeltaStrain(
_ZZ_,0) = DSolXYZ(2,2);
922 DeltaStrain(
_XY_,0) = 0.5 * ( DSolXYZ(1,0) + DSolXYZ(0,1) );
923 DeltaStrain(
_XZ_,0) = 0.5 * ( DSolXYZ(2,0) + DSolXYZ(0,2) );
924 DeltaStrain(
_YZ_,0) = 0.5 * ( DSolXYZ(2,1) + DSolXYZ(1,2) );
927 template <
class T,
class TMEM>
938 template <
class T,
class TMEM>
943 plasticloc.SetState(this->
MemItem(intPt).m_elastoplastic_state);
950 TPZTensor<REAL> Alfa1DeltaEps, Alfa2DeltaEps,Eps(plasticloc.GetState().m_eps_t);
951 Alfa1DeltaEps.
CopyFrom(DeltaStrain);
952 Alfa2DeltaEps.
CopyFrom(DeltaStrain);
956 Alfa2DeltaEps*=alfa2;
959 plasticloc.ApplyStrainComputeSigma(temp,part1);
960 plasticloc.ApplyStrainComputeDep(Eps,part2,DEP);
964 tempAlfa1DeltaEps(i,0)=Alfa1DeltaEps.
fData[i];
966 DEP.
Multiply(tempAlfa1DeltaEps, part3temp);
979 plasticloc.ApplyStrainComputeSigma(temp,part1);
982 tempAlfa1DeltaEps(i,0)=Alfa2DeltaEps.
fData[i];
984 DEP.
Multiply(tempAlfa1DeltaEps, part3temp);
992 if(ceckconvlogger->isDebugEnabled())
994 std::stringstream sout;
996 plasticloc.Phi(Eps,phi);
997 sout <<
"DEP "<< DEP << std::endl;
998 sout <<
"tempAlfa1DeltaEps "<< tempAlfa1DeltaEps << std::endl;
999 sout <<
"Phi "<< phi << std::endl;
1000 sout <<
"Integration Point "<< intPt << std::endl;
1001 sout <<
"n = " << n << std::endl;
1010 template <class T, class TMEM>
1019 plasticloc.SetState(this->
MemItem(intPt).m_elastoplastic_state);
1022 eps_t.
Add(plasticloc.GetState().m_eps_t, 1.);
1029 plasticloc.SetElasticResponse(this->
MemItem(intPt).m_ER);
1032 plasticloc.ApplyStrainComputeSigma(eps_t, sigma, &Dep);
1038 this->
MemItem(intPt).m_sigma = sigma;
1039 this->
MemItem(intPt).m_elastoplastic_state = plasticloc.GetState();
1040 this->
MemItem(intPt).m_plastic_steps = plasticloc.IntegrationSteps();
1041 this->
MemItem(intPt).m_ER = plasticloc.GetElasticResponse();
1042 int solsize = data.
sol[0].
size();
1043 for(
int i=0; i<solsize; i++)
1045 this->
MemItem(intPt).m_u[i] += data.
sol[0][i];
1051 template <
class T,
class TMEM>
1058 template <
class T,
class TMEM>
1067 plasticloc.SetState(this->
MemItem(intPt).m_elastoplastic_state);
1070 eps_t.
Add(plasticloc.GetState().m_eps_t, 1.);
1077 plasticloc.SetElasticResponse(this->
MemItem(intPt).m_ER);
1080 plasticloc.ApplyStrainComputeSigma(eps_t, sigma);
1085 this->
MemItem(intPt).m_sigma = sigma;
1086 this->
MemItem(intPt).m_elastoplastic_state = plasticloc.GetState();
1087 this->
MemItem(intPt).m_plastic_steps = plasticloc.IntegrationSteps();
1088 this->
MemItem(intPt).m_ER = plasticloc.GetElasticResponse();
1089 int solsize = data.
sol[0].
size();
1090 for(
int i=0; i<solsize; i++)
1092 this->
MemItem(intPt).m_u[i] += data.
sol[0][i];
1097 template <
class T,
class TMEM>
1103 int64_t numiterations = 1000;
1107 if (result ==
false){
1108 PZError << __PRETTY_FUNCTION__ <<
" - ERROR! - result = false - numiterations = " << numiterations <<
" - tol = " <<
m_tol << std::endl;
1111 std::stringstream sout;
1112 sout <<
"<<< TPZMatElastoPlastic<T,TMEM>::EigenValues *** not solved within " << numiterations <<
" iterations";
1113 sout <<
"\n vectorTensor = " << vectorTensor;
1114 LOGPZ_ERROR(elastoplasticLogger,sout.str().c_str());
1123 template <
class T,
class TMEM>
1132 int64_t numiterations = 1000;
1135 if (result ==
false){
1136 PZError << __PRETTY_FUNCTION__ <<
" - ERROR! - result = false - numiterations = " << numiterations <<
" - tol = " <<
m_tol << std::endl;
1139 std::stringstream sout;
1140 sout <<
"<<< TPZMatElastoPlastic<T,TMEM>::EigenVectors *** not solved within " << numiterations <<
" iterations";
1141 sout <<
"\n vectorTensor = " << vectorTensor;
1142 LOGPZ_ERROR(elastoplasticLogger,sout.str().c_str());
1150 for(
int i = 0; i < 3; i++) Solout[i] = Eigenvectors(direction,i);
1153 template <
class T,
class TMEM>
1169 template <
class T,
class TMEM>
1171 return "TPZMatElastoPlastic<T,TMEM>";
1174 template <
class T,
class TMEM>
1184 template <
class T,
class TMEM>
1196 template <
class T,
class TMEM>
1202 template <
class T,
class TMEM>
1208 template <
class T,
class TMEM>
1216 template <
class T,
class TMEM>
1226 template <
class T,
class TMEM>
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
void Print(std::ostream &out=std::cout)
Prints the structural information of the vector object to the output stream. This method will not p...
virtual bool SolveEigenvaluesJacobi(int64_t &numiterations, REAL &tol, TPZVec< TVar > *Sort=0)
Transforms this matrix in a diagonal matrix, where the diagonal values are its eigenvalues. This method is efficient only for small matrices.
void CopyTo(TPZTensor< T1 > &target) const
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
void Add(const TPZTensor< T1 > &tensor, const T2 &constant)
void CopyFrom(const TPZFMatrix< T > &source)
TPZManVector< REAL, 3 > m_PostProcessDirection
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
TPZManVector< REAL, 3 > m_force
clarg::argBool bc("-bc", "binary checkpoints", false)
bool fNeedsNeighborCenter
TPZManVector< T, 6 > fData
virtual void SetBulkDensity(REAL &RhoB)
virtual std::string Name() override
virtual void Write(TPZStream &buf, int withclassid) const override
virtual bool SolveEigensystemJacobi(int64_t &numiterations, REAL &tol, TPZVec< TVar > &Eigenvalues, TPZFMatrix< TVar > &Eigenvectors) const
Compute Eigenvalues and Eigenvectors of this matrix. This method is efficient only for small matrice...
virtual void SetPlasticityModel(T &plasticity)
virtual ~TPZMatElastoPlastic()
void SetPlasticModel(T &plasticity_model)
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
void ApplyDeltaStrain(TPZMaterialData &data, TPZFMatrix< REAL > &DeltaStrain, TPZFMatrix< REAL > &Stress)
void Write(TPZStream &buf, int withclassid) const override
virtual void SetDefaultMem(TMEM &defaultMem)
Sets the default memory settings for initialization.
REAL val(STATE &number)
Returns value of the variable.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< REAL > &Solout) override
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< REAL > &ek, TPZFMatrix< REAL > &ef, TPZBndCond &bc) override
void ComputeDeltaStrainVector(TPZMaterialData &data, TPZFMatrix< REAL > &DeltaStrain)
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
Implements an abstract class implementing the memory features.
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
virtual int NSolutionVariables(int var) override
virtual TPZMaterial * NewMaterial() override
virtual void Read(TPZStream &buf, void *context) override
void ComputeStrainVector(TPZMaterialData &data, TPZFMatrix< REAL > &Strain)
virtual int Dimension() const override
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
virtual TPZPorousElasticResponse & GetPorousElasticity(TPZPorousElasticResponse &PER)
This abstract class defines the behaviour which each derived class needs to implement.
virtual void UpdateMaterialCoeficients(TPZVec< REAL > &x, T &plasticity)
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual void SetTol(const REAL &tol)
int64_t size() const
Returns the number of elements of the vector.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< REAL > &ek, TPZFMatrix< REAL > &ef) override
virtual void Print(std::ostream &out, const int memory)
void EigenValues(TPZFMatrix< REAL > &vectorTensor, TPZVec< REAL > &ev)
void CopyToTensor(TPZFMatrix< T > &Tensor) const
virtual void Write(const bool val)
void EigenVectors(TPZFMatrix< REAL > &vectorTensor, TPZVec< REAL > &Solout, int direction)
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
virtual int NStateVariables() const override
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void EigenSystem(TPZDecomposed &eigensystem) const
This class defines the boundary condition for TPZMaterial objects.
virtual void Errors(TPZVec< REAL > &x, TPZVec< REAL > &u, TPZFMatrix< REAL > &dudx, TPZFMatrix< REAL > &axes, TPZVec< REAL > &flux, TPZVec< REAL > &u_exact, TPZFMatrix< REAL > &du_exact, TPZVec< REAL > &values) override
void ComputeStressVector(TPZMaterialData &data, TPZFMatrix< REAL > &Stress)
int64_t Rows() const
Returns number of rows.
void Read(TPZStream &buf, void *context) override
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
TPZFMatrix< STATE > & Val1()
int intGlobPtIndex
global point index
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
virtual void SetPorousElasticity(TPZPorousElasticResponse &PER)
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
virtual void FillBoundaryConditionDataRequirement(int type, TPZMaterialData &data) override
bool m_use_non_linear_elasticity_Q
void ApplyDirection(TPZFMatrix< REAL > &vectorTensor, TPZVec< REAL > &Out)
void CheckConvergence(TPZMaterialData &data, TPZFMatrix< REAL > &DeltaStrain)
virtual void Multiply(const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const
It mutiplies itself by TPZMatrix<TVar>A putting the result in res.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ log10
virtual int VariableIndex(const std::string &name) override
Defines the interface for saving and reading data. Persistency.
void vectorToTensor(const TPZFMatrix< REAL > &vectorTensor, TPZFMatrix< REAL > &Tensor)
virtual void PrintMem(std::ostream &out=std::cout, const int memory=0)
Prints out the data associated with the material.
virtual T & GetPlasticModel()
virtual TMEM & MemItem(const int i) const
void ApplyDeltaStrainComputeDep(TPZMaterialData &data, TPZFMatrix< REAL > &DeltaStrain, TPZFMatrix< REAL > &Stress, TPZFMatrix< REAL > &Dep)
TPZSolVec sol
vector of the solutions at the integration point
TPZElasticResponse EvaluateElasticResponse(const TPZTensor< STATE > &epsilon) const
Computes a linear elastic response from function evaluation of non linear expressions.
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
TPZPorousElasticResponse m_PER
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void FillDataRequirements(TPZMaterialData &data) override
virtual void Read(bool &val)