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

Method addDOF_Group

SRC/analysis/model/AnalysisModel.cpp:176–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174// Method to add an element to the model.
175
176bool
177AnalysisModel::addDOF_Group(DOF_Group *theGroup)
178{
179
180 // check we don't add a null pointer or this is a subclass trying
181 // to use a method it shouldn't be using
182 if (theGroup == 0 || theDOFs == 0)
183 return false;
184
185
186 // check if an Element with a similar tag already exists in the Domain
187 int tag = theGroup->getTag();
188 TaggedObject *other = theDOFs->getComponentPtr(tag);
189 if (other != 0) {
190 opserr << "AnalysisModel::addDOF_Group - group with tag " << tag << "already exists in model\n";
191 return false;
192 }
193
194 // add the element to the container object for the elements
195 bool result = theDOFs->addComponent(theGroup);
196 if (result == true) {
197 numDOF_Grp++;
198 return true; // o.k.
199 } else
200 return false;
201}
202
203void
204AnalysisModel::clearAll(void)

Callers 5

handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45

Calls 3

getTagMethod · 0.45
getComponentPtrMethod · 0.45
addComponentMethod · 0.45

Tested by

no test coverage detected