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

Function OPS_getFixedDOFs

SRC/interpreter/OpenSeesOutputCommands.cpp:1704–1742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1702}
1703
1704int OPS_getFixedDOFs()
1705{
1706
1707 if (OPS_GetNumRemainingInputArgs() < 1) {
1708 opserr << "WARNING want - getFixedDOFs fNodeTag?\n";
1709 return -1;
1710 }
1711
1712 int tag;
1713 int numdata = 1;
1714
1715 if (OPS_GetIntInput(&numdata, &tag) < 0) {
1716 opserr << "WARNING getFixedDOFs fNodeTag? \n";
1717 return -1;
1718 }
1719
1720 Domain* theDomain = OPS_GetDomain();
1721 if (theDomain == 0) return -1;
1722
1723 SP_ConstraintIter &spIter = theDomain->getDomainAndLoadPatternSPs();
1724 SP_Constraint *theSP;
1725
1726 std::vector <int> data;
1727
1728 while ((theSP = spIter()) != 0) {
1729 if (theSP->getNodeTag() == tag) {
1730 data.push_back(theSP->getDOF_Number() + 1);
1731 }
1732 }
1733
1734 int size = data.size();
1735
1736 if (OPS_SetIntOutput(&size, data.data(), false) < 0) {
1737 opserr << "WARNING failed to set output\n";
1738 return -1;
1739 }
1740
1741 return 0;
1742}
1743
1744int OPS_getConstrainedNodes()
1745{

Callers 1

Py_ops_getFixedDOFsFunction · 0.85

Calls 9

push_backMethod · 0.80
OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
OPS_SetIntOutputFunction · 0.70
getNodeTagMethod · 0.45
getDOF_NumberMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected