//return mass matrix const XC::Matrix& XC::Twenty_Node_Brick::getMass(void) const { int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; if(isDead()) mass*=dead_srf; return mass ; }
//return mass matrix const Matrix& BbarBrick::getMass( ) { int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; return mass ; }
//return mass matrix const Matrix& NineNodeMixedQuad::getMass( ) { int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; return mass ; }
//return mass matrix const Matrix& ShellMITC9::getMass( ) { int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; return mass ; }
const Matrix& TwentyEightNodeBrickUP::getMass( ) { int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; return mass ; }
const Matrix& Twenty_Node_Brick::getMass( ) { int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; return mass ; }
int NineNodeMixedQuad::addInertiaLoadToUnbalance(const Vector &accel) { static const int numberGauss = 9 ; static const int numberNodes = 9 ; static const int ndf = 2 ; int i; // check to see if have mass int haveRho = 0; for (i = 0; i < numberGauss; i++) { if (materialPointers[i]->getRho() != 0.0) haveRho = 1; } if (haveRho == 0) return 0; // Compute mass matrix int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; // store computed RV fro nodes in resid vector int count = 0; for (i=0; i<numberNodes; i++) { const Vector &Raccel = nodePointers[i]->getRV(accel); for (int j=0; j<ndf; j++) resid(count++) = Raccel(i); } // create the load vector if one does not exist if (load == 0) load = new Vector(numberNodes*ndf); // add -M * RV(accel) to the load vector load->addMatrixVector(1.0, mass, resid, -1.0); return 0; }
//get residual with inertia terms const Vector& ShellMITC9::getResistingForceIncInertia( ) { static Vector res(54); int tang_flag = 0 ; //don't get the tangent //do tangent and residual here formResidAndTangent( tang_flag ) ; formInertiaTerms( tang_flag ) ; res = resid; // add the damping forces if rayleigh damping if (alphaM != 0.0 || betaK != 0.0 || betaK0 != 0.0 || betaKc != 0.0) res += this->getRayleighDampingForces(); // subtract external loads if (load != 0) res -= *load; return res; }
//get residual with inertia terms const Vector& ConstantPressureVolumeQuad :: getResistingForceIncInertia( ) { int tang_flag = 0 ; //don't get the tangent static Vector res(8); //do tangent and residual here formResidAndTangent( tang_flag ) ; //inertia terms formInertiaTerms( tang_flag ) ; res = resid; // subtract external loads if (load != 0) res -= *load; // add the damping forces if rayleigh damping if (alphaM != 0.0 || betaK != 0.0 || betaK0 != 0.0 || betaKc != 0.0) res += this->getRayleighDampingForces(); return res ; }
int XC::Twenty_Node_Brick::addInertiaLoadToUnbalance(const XC::Vector &accel) { static XC::Vector ra(60); // printf("calling addInertiaLoadToUnbalance()\n"); ra.Zero(); for(int i = 0;i < nenu;i++) { const XC::Vector &Raccel = theNodes[i]->getRV(accel); if(3 != Raccel.Size()) { std::cerr << "XC::Twenty_Node_Brick::addInertiaLoadToUnbalance matrix and vector sizes are incompatable\n"; return -1; } ra[i*3] = Raccel(0); ra[i*3+1] = Raccel(1); ra[i*3+2] = Raccel(2); } // Compute mass matrix int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; // create the load vector if one does not exist if(load.isEmpty()) load.reset(60); // add -M * RV(accel) to the load vector load.addMatrixVector(1.0, mass, ra, -1.0); //for( i = 0; i < 60; i++) { // for( j = 0; j < 60; j++) // load(i) += -mass(i,j)*ra[j]; //} return 0; }
int TwentyEightNodeBrickUP::addInertiaLoadToUnbalance(const Vector &accel) { static Vector ra(68); int i, j, ik; ra.Zero(); for( i = 0; i < nenu; i++) { const Vector &Raccel = nodePointers[i]->getRV(accel); if ((i<nenp && 4 != Raccel.Size()) || (i>=nenp && 3 != Raccel.Size())) { opserr << "TwentyEightNodeBrickUP::addInertiaLoadToUnbalance matrix and vector sizes are incompatable\n"; return -1; } if (i<nenp) ik = i*4; else ik = nenp*4 + (i-nenp)*3; ra[ik] = Raccel(0); ra[ik+1] = Raccel(1); ra[ik+2] = Raccel(2); } // Compute mass matrix int tangFlag = 1 ; formInertiaTerms( tangFlag ) ; // create the load vector if one does not exist if (load == 0) load = new Vector(68); // add -M * RV(accel) to the load vector load->addMatrixVector(1.0, mass, ra, -1.0); //for( i = 0; i < 68; i++) { // for( j = 0; j < 68; j++) // load(i) += -mass(i,j)*ra[j]; //} return 0; }