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

Method compute

SRC/material/nD/ASDConcrete3DMaterial.cpp:781–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781int ASDConcrete3DMaterial::StressDecomposition::compute(const Vector& S, double cdf)
782{
783 // copy S in V
784 V(0, 0) = S(0);
785 V(1, 1) = S(1);
786 V(2, 2) = S(2);
787 V(0, 1) = V(1, 0) = S(3);
788 V(1, 2) = V(2, 1) = S(4);
789 V(0, 2) = V(2, 0) = S(5);
790
791 // solve
792 if (Eigen3(Si, V) < 0)
793 return EC_Eigen_Error;
794
795 // construct matrices PT and PC
796 static Matrix pjj(6, 6);
797 PT.Zero();
798 PC.Zero();
799
800 // method 1: compute PT = sum(H(sj)*pjj) --- PC = I - PT
801 //for (int j = 0; j < 3; j++) {
802 // double hsj = Heavyside(Si(j));
803 // if (hsj > 0.0) {
804 // computePjj(V, j, pjj);
805 // PT.addMatrix(1.0, pjj, hsj);
806 // }
807 //}
808 //for (int i = 0; i < 6; ++i)
809 // PC(i, i) = 1.0;
810 //PC.addMatrix(1.0, PT, -1.0);
811
812 // method 2: compute PT = sum(H(sj)*pjj) --- PC = sum(H(-sj)*pjj)
813 // then PO = I - PT - PC
814 // finally PT += PO/2 --- PC += PO/2
815 for (int j = 0; j < 3; j++) {
816 computePjj(V, j, pjj);
817 double hsj = Heavyside(Si(j));
818 if(hsj > 0.0)
819 PT.addMatrix(1.0, pjj, hsj);
820 hsj = Heavyside(-Si(j));
821 if (hsj > 0.0)
822 PC.addMatrix(1.0, pjj, hsj);
823 }
824
825 static Matrix PO(6, 6); // PO = I - PT - PC
826 PO.addMatrix(0.0, PT, -1.0);
827 PO.addMatrix(1.0, PC, -1.0);
828 for (int i = 0; i < 6; ++i)
829 PO(i, i) += 1.0;
830 PT.addMatrix(1.0, PO, 0.5);
831 PC.addMatrix(1.0, PO, 0.5);
832
833 // compute positive and negative parts of the stress
834 ST.addMatrixVector(0.0, PT, S, 1.0);
835 SC.addMatrixVector(0.0, PC, S, 1.0);
836
837 // R factor
838 R = 0.0;

Callers

nothing calls this directly

Calls 15

Eigen3Function · 0.85
computePjjFunction · 0.85
getInitialTangentFunction · 0.85
setCurrentNormalMethod · 0.80
HeavysideFunction · 0.70
ZeroMethod · 0.45
addMatrixMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected