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

Method identify

SRC/analysis/analysis/PFEMAnalysis.cpp:144–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144int
145PFEMAnalysis::identify()
146{
147 Domain* theDomain = this->getDomainPtr();
148
149 if (theDomain->getNumPCs() == 0) return 0;
150
151 // disconnect pcs from structural elements
152 Pressure_ConstraintIter& thePCs = theDomain->getPCs();
153 Pressure_Constraint* thePC = 0;
154 while((thePC = thePCs()) != 0) {
155 thePC->disconnect();
156 }
157
158 // to connect pc to all elements
159 Element *elePtr;
160 ElementIter &theElemIter = theDomain->getElements();
161 while((elePtr = theElemIter()) != 0) {
162
163 const ID& nodeids = elePtr->getExternalNodes();
164 for(int i=0; i<nodeids.Size(); i++) {
165 Pressure_Constraint* thePC = theDomain->getPressure_Constraint(nodeids(i));
166 if(thePC != 0) {
167 thePC->connect(elePtr->getTag(), false);
168 }
169 }
170 }
171
172 // get all SPs and MPs
173 SP_ConstraintIter& theSPs = theDomain->getDomainAndLoadPatternSPs();
174 SP_Constraint* theSP = 0;
175 std::map<int,ID> sps;
176 while((theSP = theSPs()) != 0) {
177 sps[theSP->getNodeTag()].insert(theSP->getDOF_Number());
178 }
179
180 // get number of parameters
181 int numParams = theDomain->getNumParameters();
182
183 // move the isolated nodes
184 Pressure_ConstraintIter& thePCs1 = theDomain->getPCs();
185 while((thePC = thePCs1()) != 0) {
186
187 if(thePC->isIsolated()) {
188 int tag = thePC->getTag();
189 Node* node = theDomain->getNode(tag);
190 if(node == 0) {
191 opserr<<"WARNING: node "<<tag;
192 opserr<<" does not exist -- PFEMAnalysis::identify\n";
193 return -1;
194 }
195 std::map<int,ID>::iterator it = sps.find(tag);
196
197 // responses
198 const Vector& disp = node->getDisp();
199 const Vector& vel = node->getVel();
200 const Vector& accel = node->getAccel();
201 Vector ndisp = disp;

Callers 1

analyzeMethod · 0.95

Calls 15

getDomainPtrMethod · 0.45
getNumPCsMethod · 0.45
disconnectMethod · 0.45
getElementsMethod · 0.45
SizeMethod · 0.45
connectMethod · 0.45
getTagMethod · 0.45
insertMethod · 0.45
getNodeTagMethod · 0.45
getDOF_NumberMethod · 0.45
getNumParametersMethod · 0.45

Tested by

no test coverage detected