| 846 | } |
| 847 | |
| 848 | int |
| 849 | SSPquadUP::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() |
nothing calls this directly
no test coverage detected