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

Method checkEleRemoval

SRC/recorder/RemoveRecorder.cpp:865–967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865int
866// changed
867RemoveRecorder::checkEleRemoval(Element* theEle, Response *eleResponse, int &theComponent,const Vector &criteria)
868{
869 if (eleResponse == 0)
870 return 0;
871
872 int secFlag = 0;
873
874 Information &theInfo = eleResponse->getInformation();
875
876 for (int k =0; k<numRules; k++) {
877 double currentValue = 0;
878 double checkwallvalue1=0;
879 // changed
880 // if (int(criteria[2*k] != 0 && criteria[2*k] != 7)) {
881 // if (theEle->getRemCriteria(theComponent, int(criteria[2*k]), currentValue) != 0) {
882 // opserr<<" RemoveRecorder::checkRemoval() - failed to retrieve information from element "<<theEle->getTag()<<endln;
883 // return -1;
884 // }
885 // }
886 // new
887
888 if (int(criteria[2*k] == 7)) {
889
890 static ID idData(6);
891 idData(0) = theComponent;
892 idData(1) = int(criteria[2*k]);
893 idData(2) = nTagbotn;
894 idData(3) = nTagmidn;
895 idData(4) = nTagtopn;
896 idData(5) = globgrav;;
897 theInfo.setID(idData);
898
899 eleResponse->getResponse();
900
901 Vector *result = theInfo.theVector;
902 currentValue = (*result)(0);
903 checkwallvalue1 = (*result)(1);
904 }
905 //
906
907 switch (int(criteria[2*k])) {
908
909 case 0:
910 // no removal,for comparison;
911 break;
912
913 case 1:
914 // min strain (maximum compressive), notice the inequality direction
915 if (currentValue <= criteria [2*k+1])
916 secFlag ++;
917 break;
918
919 case 2:
920 // max strain
921 if (currentValue >= criteria [2*k+1])
922 secFlag ++;

Callers 1

recordMethod · 0.95

Calls 2

setIDMethod · 0.45
getResponseMethod · 0.45

Tested by

no test coverage detected