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

Method removeParameter

SRC/domain/domain/Domain.cpp:1370–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1368
1369
1370Parameter *
1371Domain::removeParameter(int tag)
1372{
1373 Parameter *theParam = (Parameter*) theParameters->getComponentPtr(tag);
1374
1375 if (theParam != 0) {
1376
1377 // Find where RV is located
1378 int index;
1379 for (index = 0; index < numParameters; index++) {
1380 if (paramIndex[index] == tag)
1381 break;
1382 }
1383
1384 // Shift indices down by one
1385 for (int i = index; i < numParameters-1; i++) {
1386 paramIndex[i] = paramIndex[i+1];
1387 Parameter *otherParam = this->getParameterFromIndex(i);
1388 otherParam->setGradIndex(i);
1389 }
1390
1391 // Now remove the component
1392 theParameters->removeComponent(tag);
1393
1394 numParameters--;
1395 }
1396
1397 return 0;
1398
1399 /*
1400 // remove the object from the container
1401 TaggedObject *mc = theParameters->removeComponent(tag);
1402
1403 // if not there return 0
1404 if (mc == 0)
1405 return 0;
1406
1407 // otherwise mark the domain as having changed
1408 this->domainChange();
1409
1410 // perform a downward cast to an Element (safe as only Element added to
1411 // this container, 0 the Elements DomainPtr and return the result of the cast
1412 Parameter *result = (Parameter *)mc;
1413 // result->setDomain(0);
1414 return result;
1415 */
1416}
1417
1418LoadPattern *
1419Domain::removeLoadPattern(int tag)

Callers 8

OPS_updateMaterialStageFunction · 0.45
OPS_removeObjectFunction · 0.45
OPS_setParameterFunction · 0.45
removeObjectFunction · 0.45
setParameterFunction · 0.45
removeObjectFunction · 0.45

Calls 4

getParameterFromIndexMethod · 0.95
getComponentPtrMethod · 0.45
setGradIndexMethod · 0.45
removeComponentMethod · 0.45

Tested by

no test coverage detected