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

Function OPS_ConstraintHandler

SRC/interpreter/OpenSeesCommands.cpp:1581–1621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579}
1580
1581int OPS_ConstraintHandler()
1582{
1583 if (OPS_GetNumRemainingInputArgs() < 1) {
1584 opserr << "WARNING insufficient args: constraints type ...\n";
1585 return -1;
1586 }
1587
1588 const char* type = OPS_GetString();
1589
1590 // create handler
1591 ConstraintHandler* theHandler = 0;
1592 if (strcmp(type,"Plain") == 0) {
1593
1594 theHandler = (ConstraintHandler*)OPS_PlainHandler();
1595
1596 } else if (strcmp(type,"Penalty") == 0) {
1597
1598 theHandler = (ConstraintHandler*)OPS_PenaltyConstraintHandler();
1599
1600 } else if (strcmp(type,"Lagrange") == 0) {
1601
1602 theHandler = (ConstraintHandler*)OPS_LagrangeConstraintHandler();
1603
1604 } else if (strcmp(type,"Transformation") == 0) {
1605 theHandler = (ConstraintHandler*)OPS_TransformationConstraintHandler();
1606
1607 } else if (strcmp(type,"Auto") == 0) {
1608 theHandler = (ConstraintHandler*)OPS_AutoConstraintHandler();
1609
1610 } else {
1611 opserr<<"WARNING unknown ConstraintHandler type "<<type<<"\n";
1612 return -1;
1613 }
1614
1615 // set handler
1616 if (cmds != 0) {
1617 cmds->setHandler(theHandler);
1618 }
1619
1620 return 0;
1621}
1622
1623int OPS_CTest()
1624{

Callers 2

Tcl_ops_constraintsFunction · 0.85
Py_ops_constraintsFunction · 0.85

Calls 8

OPS_PlainHandlerFunction · 0.85
setHandlerMethod · 0.80
OPS_GetStringFunction · 0.70

Tested by

no test coverage detected