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

Function OPS_getFixedNodes

SRC/interpreter/OpenSeesOutputCommands.cpp:1676–1702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674}
1675
1676int OPS_getFixedNodes()
1677{
1678 Domain* theDomain = OPS_GetDomain();
1679 if (theDomain == 0) return -1;
1680
1681 SP_ConstraintIter &spIter = theDomain->getDomainAndLoadPatternSPs();
1682 SP_Constraint *theSP;
1683
1684 std::vector <int> data;
1685
1686 while ((theSP = spIter()) != 0) {
1687 data.push_back(theSP->getNodeTag());
1688 }
1689
1690 // sort and make it unique
1691 sort( data.begin(), data.end() );
1692 data.erase( unique( data.begin(), data.end() ), data.end() );
1693
1694 int size = data.size();
1695
1696 if (OPS_SetIntOutput(&size, data.data(), false) < 0) {
1697 opserr << "WARNING failed to set output\n";
1698 return -1;
1699 }
1700
1701 return 0;
1702}
1703
1704int OPS_getFixedDOFs()
1705{

Callers 1

Py_ops_getFixedNodesFunction · 0.85

Calls 8

push_backMethod · 0.80
OPS_GetDomainFunction · 0.70
OPS_SetIntOutputFunction · 0.70
getNodeTagMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected