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

Function CheckTransformation

SRC/runtime/commands/modeling/element/frames.cpp:114–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112extern BeamIntegrationRule* GetHingeStencil(int argc, TCL_Char ** const argv);
113
114static inline int
115CheckTransformation(Domain& domain, int iNode, int jNode, CrdTransf& transform)
116{
117 Node* ni = domain.getNode(iNode);
118 Node* nj = domain.getNode(jNode);
119 if (ni == nullptr || nj == nullptr) {
120 opserr << OpenSees::PromptValueError << "nodes not found with tags "
121 << iNode << " and " << jNode
122 << OpenSees::SignalMessageEnd;
123 }
124
125 if (transform.initialize(ni, nj) != 0) {
126 if (transform.getInitialLength() <= 0.0) {
127 opserr << OpenSees::PromptValueError
128 << "element has zero or negative initial length "
129 << transform.getInitialLength()
130 << "; check for duplicate nodes"
131 << OpenSees::SignalMessageEnd;
132 }
133 else {
134 opserr << OpenSees::PromptValueError
135 << "transformation with tag " << transform.getTag()
136 << " could not be initialized with nodes "
137 << iNode << " and " << jNode
138 << "; check orientation"
139 << OpenSees::SignalMessageEnd;
140 }
141 return TCL_ERROR;
142 }
143 return TCL_OK;
144}
145
146
147

Callers 1

CreateFrameFunction · 0.85

Calls 4

getNodeMethod · 0.45
initializeMethod · 0.45
getInitialLengthMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected