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

Method recvSelf

SRC/element/UWelements/SSPquadUP.cpp:848–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846}
847
848int
849SSPquadUP::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
850{
851 int res = 0;
852 int dataTag = this->getDbTag();
853
854 // SSPquadUP creates a Vector, receives the Vector and then sets the
855 // internal data with the data in the Vector
856 static Vector data(15);
857 res += theChannel.recvVector(dataTag, commitTag, data);
858 if (res < 0) {
859 opserr << "WARNING SSPquadUP::recvSelf() - failed to receive Vector\n";
860 return res;
861 }
862
863 this->setTag((int)data(0));
864 mThickness = data(1);
865 fBulk = data(2);
866 fDens = data(3);
867 perm[0] = data(4);
868 perm[1] = data(5);
869 mPorosity = data(6);
870 b[0] = data(7);
871 b[1] = data(8);
872 //LM change
873 P[0] = data(9);
874 P[1] = data(10);
875 P[2] = data(11);
876 P[3] = data(12);
877 //LM change
878
879 // SSPquadUP now receives the tags of its four external nodes
880 res += theChannel.recvID(dataTag, commitTag, mExternalNodes);
881 if (res < 0) {
882 opserr << "WARNING SSPquadUP::recvSelf() - " << this->getTag() << " failed to receive ID\n";
883 return res;
884 }
885
886 // finally, SSPquadUP creates a material object of the correct type, sets its
887 // database tag, and asks this new object to receive itself
888 //LM change
889 int matClass = (int)data(13);
890 int matDb = (int)data(14);
891 //LM change
892
893 // check if material object exists and that it is the right type
894 if ((theMaterial == 0) || (theMaterial->getClassTag() != matClass)) {
895
896 // if old one, delete it
897 if (theMaterial != 0)
898 delete theMaterial;
899
900 // create new material object
901 NDMaterial *theMatCopy = theBroker.getNewNDMaterial(matClass);
902 theMaterial = (NDMaterial *)theMatCopy;
903
904 if (theMaterial == 0) {
905 opserr << "WARNING SSPquadUP::recvSelf() - " << this->getTag()

Callers

nothing calls this directly

Calls 8

getDbTagMethod · 0.45
recvVectorMethod · 0.45
setTagMethod · 0.45
recvIDMethod · 0.45
getTagMethod · 0.45
getClassTagMethod · 0.45
getNewNDMaterialMethod · 0.45
setDbTagMethod · 0.45

Tested by

no test coverage detected