DispBeamColumn2d::DispBeamColumn2d(int tag, int nd1, int nd2, int numSec, SectionForceDeformation **s, BeamIntegration& bi, CrdTransf &coordTransf, double r, int cm) :Element (tag, ELE_TAG_DispBeamColumn2d), numSections(numSec), theSections(0), crdTransf(0), beamInt(0), connectedExternalNodes(2), Q(6), q(3), rho(r), cMass(cm), parameterID(0) { // Allocate arrays of pointers to SectionForceDeformations theSections = new SectionForceDeformation *[numSections]; if (theSections == 0) { opserr << "DispBeamColumn2d::DispBeamColumn2d - failed to allocate section model pointer\n"; exit(-1); } for (int i = 0; i < numSections; i++) { // Get copies of the material model for each integration point theSections[i] = s[i]->getCopy(); // Check allocation if (theSections[i] == 0) { opserr << "DispBeamColumn2d::DispBeamColumn2d -- failed to get a copy of section model\n"; exit(-1); } } beamInt = bi.getCopy(); if (beamInt == 0) { opserr << "DispBeamColumn2d::DispBeamColumn2d - failed to copy beam integration\n"; exit(-1); } crdTransf = coordTransf.getCopy2d(); if (crdTransf == 0) { opserr << "DispBeamColumn2d::DispBeamColumn2d - failed to copy coordinate transformation\n"; exit(-1); } // Set connected external node IDs connectedExternalNodes(0) = nd1; connectedExternalNodes(1) = nd2; theNodes[0] = 0; theNodes[1] = 0; q0[0] = 0.0; q0[1] = 0.0; q0[2] = 0.0; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0; }
DistHingeIntegration::DistHingeIntegration(double lpi, double lpj, BeamIntegration &bi): BeamIntegration(BEAM_INTEGRATION_TAG_DistHinge), lpI(lpi), lpJ(lpj), beamInt(0), parameterID(0) { beamInt = bi.getCopy(); if (beamInt == 0) { opserr << "DistHingeIntegration::DistHingeIntegration -- failed to get copy of BeamIntegration" << endln; } }
RegularizedHingeIntegration::RegularizedHingeIntegration(BeamIntegration &bi, double lpi, double lpj, double epsi, double epsj): BeamIntegration(BEAM_INTEGRATION_TAG_RegularizedHinge), beamInt(0), lpI(lpi), lpJ(lpj), epsI(epsi), epsJ(epsj), wf(0), parameterID(0) { beamInt = bi.getCopy(); if (beamInt == 0) { opserr << "RegularizedHingeIntegration::RegularizedHingeIntegration -- failed to get copy of BeamIntegration" << endln; } }
// constructor which takes the unique element tag, sections, // and the node ID's of it's nodal end points. // allocates the necessary space needed by each object ElasticForceBeamColumn2d::ElasticForceBeamColumn2d (int tag, int nodeI, int nodeJ, int numSec, SectionForceDeformation **sec, BeamIntegration &bi, CrdTransf &coordTransf, double massDensPerUnitLength): Element(tag,ELE_TAG_ElasticForceBeamColumn2d), connectedExternalNodes(2), beamIntegr(0), numSections(numSec), crdTransf(0), rho(massDensPerUnitLength), initialFlag(0), numEleLoads(0), parameterID(0) { theNodes[0] = 0; theNodes[1] = 0; connectedExternalNodes(0) = nodeI; connectedExternalNodes(1) = nodeJ; beamIntegr = bi.getCopy(); if (beamIntegr == 0) { opserr << "Error: ElasticForceBeamColumn2d::ElasticForceBeamColumn2d: could not create copy of beam integration object" << endln; } // get copy of the transformation object crdTransf = coordTransf.getCopy2d(); if (crdTransf == 0) { opserr << "Error: ElasticForceBeamColumn2d::ElasticForceBeamColumn2d: could not create copy of coordinate transformation object" << endln; } if (numSections > maxNumSections) { opserr << "Error: ElasticForceBeamColumn2d::ElasticForceBeamColumn2d: numSections " << numSections << " exceeds max allowed, " << maxNumSections << endln; numSections = maxNumSections; } int i; for (i = 0; i < numSections; i++) { sections[i] = sec[i]->getCopy(); if (sections[i] == 0) { opserr << "Error: ElasticForceBeamColumn2d::ElasticForceBeamColumn2d: could not create copy of section object " << i << endln; } } for ( ; i < maxNumSections; i++) sections[i] = 0; }
Timoshenko2d::Timoshenko2d(int tag, int nd1, int nd2, int numSec, SectionForceDeformation **s, CrdTransf &coordTransf, BeamIntegration& bi, double r, double SCF, int noIter) :Element (tag, ELE_TAG_Timoshenko2d), numSections(numSec), theSections(0), crdTransf(0), beamInt(0), connectedExternalNodes(2), Rslt(3), Defo(3), Q(6), q(3), rho(r), shearCF(SCF), iterSwitch(noIter) { // Allocate arrays of pointers to SectionForceDeformations theSections = new SectionForceDeformation *[numSections]; if (theSections == 0) { opserr << "Timoshenko2d::Timoshenko2d - failed to allocate section model pointer\n"; exit(-1); } for (int i = 0; i< numSections; i++){ // Get copies of the material model for each integration point SectionForceDeformation *theSection = s[i]->getCopy(); switch (s[i]->getClassTag()) { case SEC_TAG_TimoshenkoSection2d: theSections[i] = (TimoshenkoSection2d *)theSection; break; default: opserr << "Timoshenko2d::Timoshenko2d() --default secTag at sec " << i+1 << endln; theSections[i] = theSection; break; } Omega[i]=0.0; } crdTransf = coordTransf.getCopy2d(); if (crdTransf == 0) { opserr << "Timoshenko2d::Timoshenko2d - failed to copy coordinate transformation\n"; exit(-1); } beamInt = bi.getCopy(); if (beamInt == 0) { opserr << "Timoshenko2d::Timoshenko2d() - failed to copy beam integration\n"; exit(-1); } // Set connected external node IDs connectedExternalNodes(0) = nd1; connectedExternalNodes(1) = nd2; theNodes[0] = 0; theNodes[1] = 0; q0[0] = 0.0; q0[1] = 0.0; q0[2] = 0.0; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0; if (nd == 0) nd = new Matrix [maxNumSections]; if (bd == 0) bd = new Matrix [maxNumSections]; if (!nd || !bd ) { opserr << "Timoshenko2d::Timoshenko2d() -- failed to allocate static section arrays"; exit(-1); } // AddingSensitivity:BEGIN ///////////////////////////////////// parameterID = 0; // AddingSensitivity:END ////////////////////////////////////// }