MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / update

Method update

SRC/element/zeroLength/ZeroLengthVG_HG.cpp:608–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606
607
608int
609ZeroLengthVG_HG::update(void)
610{
611 double strain;
612 double strainRate;
613
614 // ************NEW CODE for JASON *******************
615
616 // determine if spring active or not
617 const Vector &disp2T = theNodes[1]->getTrialDisp();
618 const Vector &disp3T = node3Ptr->getTrialDisp();
619 double dvT = disp2T[1]-disp3T[1];
620
621 if (dvT < tol) {
622 springActive = true;
623
624 const Vector &disp2C = theNodes[1]->getDisp();
625 const Vector &disp3C = node3Ptr->getDisp();
626 double dvC = disp2C[1]-disp3C[1];
627
628 if (dvC > tol) {
629 Vector disp2New(disp2T);
630 disp2New[0] = 0.0;
631 theNodes[1]->setTrialDisp(disp2New);
632 }
633
634 } else
635 springActive = false;
636
637 // ********* END NEW CODE for JASON *****************
638
639 // get trial displacements and take difference
640 const Vector& disp1 = theNodes[0]->getTrialDisp();
641 const Vector& disp2 = theNodes[1]->getTrialDisp();
642 Vector diff = disp2-disp1;
643
644 const Vector& vel1 = theNodes[0]->getTrialVel();
645 const Vector& vel2 = theNodes[1]->getTrialVel();
646 Vector diffv = vel2-vel1;
647
648
649 if (d0 != 0)
650 diff -= *d0;
651
652 if (v0 != 0)
653 diffv -= *v0;
654
655
656 // loop over 1d materials
657
658 // Matrix& tran = *t1d;
659 int ret = 0;
660 for (int mat=0; mat<numMaterials1d; mat++) {
661 // compute strain and rate; set as current trial for material
662 strain = this->computeCurrentStrain1d(mat,diff );
663 strainRate = this->computeCurrentStrain1d(mat,diffv);
664 ret += theMaterial1d[mat]->setTrialStrain(strain,strainRate);
665 if (useRayleighDamping == 2) {

Callers 1

Calls 4

getDispMethod · 0.45
setTrialDispMethod · 0.45
setTrialStrainMethod · 0.45

Tested by

no test coverage detected