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

Method buildMap

DEVELOPER/core/Subdomain.cpp:882–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880
881
882int
883Subdomain::buildMap(void)
884{
885 if (mapBuilt == false) {
886 // determine the mapping between local dof and subdomain ana dof
887 int numDOF = this->getNumDOF();
888 if (map == 0)
889 map = new ID(numDOF);
890 if (map->Size() != numDOF) {
891 delete map;
892 map = new ID(numDOF);
893 }
894
895 // int numExt = theAnalysis->getNumExternalEqn();
896 int numInt = theAnalysis->getNumInternalEqn();
897
898 const ID &theExtNodes = this->getExternalNodes();
899 int numExtNodes = theExtNodes.Size();
900 int locInMap =0;
901 for (int i=0; i<numExtNodes; i++) {
902 Node *nodePtr = this->getNode(theExtNodes(i));
903 int numNodeDOF = nodePtr->getNumberDOF();
904 DOF_Group *theDOF = nodePtr->getDOF_GroupPtr();
905 const ID &theLocalID = theDOF->getID();
906 for (int j=0; j<numNodeDOF; j++){
907 int locInSubdomainExt = theLocalID(j)-numInt;
908 (*map)(locInMap)=locInSubdomainExt;
909 locInMap++;
910 }
911 }
912 mapBuilt = true;
913
914 if (mappedVect == 0)
915 mappedVect = new Vector(numDOF);
916 if (mappedVect->Size() != numDOF) {
917 delete mappedVect;
918 mappedVect = new Vector(numDOF);
919 }
920
921 if (mappedMatrix == 0)
922 mappedMatrix = new Matrix(numDOF,numDOF);
923 if (mappedMatrix->noRows() != numDOF) {
924 delete mappedMatrix;
925 mappedMatrix = new Matrix(numDOF,numDOF);
926 }
927 }
928
929 return 0;
930}
931
932
933DomainDecompositionAnalysis *

Callers 1

Subdomain.cppFile · 0.45

Calls 8

getNumDOFMethod · 0.95
getNodeMethod · 0.95
getIDMethod · 0.80
SizeMethod · 0.45
getNumInternalEqnMethod · 0.45
getNumberDOFMethod · 0.45
getDOF_GroupPtrMethod · 0.45
noRowsMethod · 0.45

Tested by

no test coverage detected