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

Method SectionAggregator

SRC/material/section/SectionAggregator.cpp:220–281  ·  view source on GitHub ↗

constructors:

Source from the content-addressed store, hash-verified

218
219// constructors:
220SectionAggregator::SectionAggregator (int tag, SectionForceDeformation &theSec,
221 int numAdds, UniaxialMaterial **theAdds,
222 const ID &addCodes):
223 SectionForceDeformation(tag, SEC_TAG_Aggregator),
224 theSection(0), theAdditions(0), matCodes(0), numMats(numAdds),
225 e(0), s(0), ks(0), fs(0), theCode(0),
226 otherDbTag(0)
227{
228 theSection = theSec.getCopy();
229
230 if (!theSection) {
231 opserr << "SectionAggregator::SectionAggregator " << tag << " -- failed to get copy of section\n";
232 exit(-1);
233 }
234
235 if (!theAdds) {
236 opserr << "SectionAggregator::SectionAggregator " << tag << " -- null uniaxial material array passed\n";
237 exit(-1);
238 }
239 theAdditions = new UniaxialMaterial *[numMats];
240
241 if (!theAdditions) {
242 opserr << "SectionAggregator::SectionAggregator " << tag << " -- failed to allocate pointers\n";
243 exit(-1);
244 }
245 int i;
246
247 for (i = 0; i < numMats; i++) {
248 if (!theAdds[i]) {
249 opserr << "SectionAggregator::SectionAggregator " << tag << " -- null uniaxial material pointer passed\n";
250 exit(-1);
251 }
252 //theAdditions[i] = theAdds[i]->getCopy(this);
253 theAdditions[i] = theAdds[i]->getCopy();
254
255 if (!theAdditions[i]) {
256 opserr << "SectionAggregator::SectionAggregator " << tag << " -- failed to copy uniaxial material\n";
257 opserr << theAdds[i];
258 exit(-1);
259 }
260 }
261
262 int order = theSec.getOrder()+numAdds;
263
264 if (order > maxOrder) {
265 opserr << "SectionAggregator::SectionAggregator " << tag << " -- order too big, need to modify the #define in SectionAggregator.cpp to " <<
266 order << endln;
267 exit(-1);
268 }
269
270 theCode = new ID(codeArea, order);
271 e = new Vector(workArea, order);
272 s = new Vector(&workArea[maxOrder], order);
273 ks = new Matrix(&workArea[2*maxOrder], order, order);
274 fs = new Matrix(&workArea[maxOrder*(maxOrder+2)], order, order);
275 matCodes = new ID(addCodes);
276
277 if (theCode == 0 || e == 0 || s == 0 || ks == 0 || fs == 0 || matCodes == 0) {

Callers

nothing calls this directly

Calls 3

exitFunction · 0.85
getCopyMethod · 0.45
getOrderMethod · 0.45

Tested by

no test coverage detected