57TrPlaneStrRot :: TrPlaneStrRot(
int n,
Domain *aDomain) :
67TrPlaneStrRot :: computeGaussPoints()
96 for (
int i = 1; i <= 3; i++ ) {
97 int j = i + 1 - i / 3 * 3;
98 int k = j + 1 - j / 3 * 3;
99 b.at(i) = y.
at(j) - y.
at(k);
100 c.
at(i) = x.at(k) - x.at(j);
115 double detJ = 1.0 / ( 2.0 *
area );
117 for (
int i = 1; i <= 3; i++ ) {
118 answer.
at(1, 3 * i - 2) = b.at(i) * detJ;
119 answer.
at(1, 3 * i - 0) = nx.
at(i) * detJ;
121 answer.
at(2, 3 * i - 1) = c.
at(i) * detJ;
122 answer.
at(2, 3 * i - 0) = ny.
at(i) * detJ;
126 answer.
at(3, 3 * i - 2) = c.
at(i) * detJ;
127 answer.
at(3, 3 * i - 1) = b.at(i) * detJ;
128 answer.
at(3, 3 * i - 0) = ( nxRed.
at(i) + nyRed.
at(i) ) * detJ;
131 answer.
at(4, 3 * i - 2) = -1. * c.
at(i) * 1.0 / 4.0 /
area;
132 answer.
at(4, 3 * i - 1) = b.at(i) * 1.0 / 4.0 /
area;
133 answer.
at(4, 3 * i - 0) = ( -4. *
area * shapeFunct.
at(i) + nxRed.
at(i) - nyRed.
at(i) ) * 1.0 / 4.0 /
area;
147 for (
int i = 1; i <= 3; i++ ) {
148 int j = i + 1 - i / 3 * 3;
149 int k = j + 1 - j / 3 * 3;
150 b.at(i) = y.
at(j) - y.
at(k);
151 c.
at(i) = x.at(k) - x.at(j);
167 if ( ( size < 0 ) || ( size > 4 ) ) {
180 if ( ( li <= 1 ) && ( ui >= 1 ) ) {
181 for (
int i = 1; i <= 3; i++ ) {
182 answer.
at(1, 3 * i - 2) = b.at(i) * 1. / ( 2. *
area );
183 answer.
at(1, 3 * i - 0) = nx.
at(i) * 1. / ( 2. *
area );
189 if ( ( li <= 2 ) && ( ui >= 2 ) ) {
190 for (
int i = 1; i <= 3; i++ ) {
191 answer.
at(2, 3 * i - 1) = c.
at(i) * 1. / ( 2. *
area );
192 answer.
at(2, 3 * i - 0) = ny.
at(i) * 1. / ( 2. *
area );
199 if ( ( li <= 3 ) && ( ui >= 3 ) ) {
206 for (
int i = 1; i <= 3; i++ ) {
207 answer.
at(3, 3 * i - 2) = c.
at(i) * 1. / ( 2. *
area );
208 answer.
at(3, 3 * i - 1) = b.at(i) * 1. / ( 2. *
area );
209 answer.
at(3, 3 * i - 0) = ( nx.
at(i) + ny.
at(i) ) * 1. / ( 2. *
area );
215 if ( ( li <= 4 ) && ( ui >= 4 ) ) {
224 shapeFunct.
at(1) = center.
at(1);
225 shapeFunct.
at(2) = center.
at(2);
226 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
228 for (
int i = 1; i <= 3; i++ ) {
229 answer.
at(ind, 3 * i - 2) = -1. * c.
at(i) * 1.0 / 4.0 /
area;
230 answer.
at(ind, 3 * i - 1) = b.at(i) * 1.0 / 4.0 /
area;
231 answer.
at(ind, 3 * i - 0) = ( -4. *
area * shapeFunct.
at(i) + nx.
at(i) - ny.
at(i) ) * 1.0 / 4.0 /
area;
255 for (
int i = 1; i <= 3; i++ ) {
256 int j = i + 1 - i / 3 * 3;
257 int k = j + 1 - j / 3 * 3;
258 b.at(i) = y.
at(j) - y.
at(k);
259 c.at(i) = x.at(k) - x.at(j);
260 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
267 double l1, l2, l3, f11, f12, f13, f21, f22, f23;
269 l1 = iLocCoord.
at(1);
270 l2 = iLocCoord.
at(2);
273 f11 = d.
at(2) / 2. *l1 *l3 *sin( angles.
at(2) ) - d.
at(3) / 2. *l2 *l1 *sin( angles.
at(3) );
274 f12 = d.
at(3) / 2. *l2 *l1 *sin( angles.
at(3) ) - d.
at(1) / 2. *l3 *l2 *sin( angles.
at(1) );
275 f13 = d.
at(1) / 2. *l3 *l2 *sin( angles.
at(1) ) - d.
at(2) / 2. *l1 *l3 *sin( angles.
at(2) );
277 f21 = d.
at(3) / 2. *l2 *l1 *cos( angles.
at(3) ) - d.
at(2) / 2. *l1 *l3 *cos( angles.
at(2) );
278 f22 = d.
at(1) / 2. *l3 *l2 *cos( angles.
at(1) ) - d.
at(3) / 2. *l2 *l1 *cos( angles.
at(3) );
279 f23 = d.
at(2) / 2. *l1 *l3 *cos( angles.
at(2) ) - d.
at(1) / 2. *l3 *l2 *cos( angles.
at(1) );
285 answer.
at(1, 1) = l1;
286 answer.
at(1, 3) = f11;
287 answer.
at(1, 4) = l2;
288 answer.
at(1, 6) = f12;
289 answer.
at(1, 7) = l3;
290 answer.
at(1, 9) = f13;
292 answer.
at(2, 2) = l1;
293 answer.
at(2, 3) = f21;
294 answer.
at(2, 5) = l2;
295 answer.
at(2, 6) = f22;
296 answer.
at(2, 8) = l3;
297 answer.
at(2, 9) = f23;
299 answer.
at(3, 3) = l1;
300 answer.
at(3, 6) = l2;
301 answer.
at(3, 9) = l3;
306TrPlaneStrRot :: giveArea()
319 double x1, x2, x3, y1, y2, y3;
328 return (
area = fabs( 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 ) ) );
336 const auto &nc1 = this->
giveNode(1)->giveCoordinates();
337 const auto &nc2 = this->
giveNode(2)->giveCoordinates();
338 const auto &nc3 = this->
giveNode(3)->giveCoordinates();
357TrPlaneStrRot :: GivePitch()
367 for (
int i = 0; i < 3; i++ ) {
368 int j = i + 1 - i / 2 * 3;
369 int k = j + 1 - j / 2 * 3;
370 if ( x(k) == x(j) ) {
372 angles.
at(i + 1) =
M_PI / 2.;
374 angles.
at(i + 1) =
M_PI * 3. / 2.;
379 if ( y(k) >= y(j) ) {
380 angles.
at(i + 1) = atan( ( y(k) - y(j) ) / ( x(k) - x(j) ) );
382 angles.
at(i + 1) = 2. *
M_PI - atan( ( y(j) - y(k) ) / ( x(k) - x(j) ) );
387 if ( y(k) >= y(j) ) {
388 angles.
at(i + 1) =
M_PI - atan( ( y(k) - y(j) ) / ( x(j) - x(k) ) );
390 angles.
at(i + 1) =
M_PI + atan( ( y(j) - y(k) ) / ( x(j) - x(k) ) );
409 for (
int i = 1; i <= 3; i++ ) {
410 int j = i + 1 - i / 3 * 3;
411 int k = j + 1 - j / 3 * 3;
412 b.at(i) = y.
at(j) - y.
at(k);
413 c.at(i) = x.at(k) - x.at(j);
414 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
422 shapeFunct.
at(1) = lCoords.
at(1);
423 shapeFunct.
at(2) = lCoords.
at(2);
424 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
429 for (
int i = 1; i <= 3; i++ ) {
430 int j = i + 1 - i / 3 * 3;
431 int k = j + 1 - j / 3 * 3;
432 nx.
at(i) = ( d.
at(j) / 2. * ( b.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * b.at(i) ) * sin( angles.
at(j) ) -
433 d.
at(k) / 2. * ( b.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * b.at(j) ) * sin( angles.
at(k) ) );
450 for (
int i = 1; i <= 3; i++ ) {
451 int j = i + 1 - i / 3 * 3;
452 int k = j + 1 - j / 3 * 3;
453 b.at(i) = y.
at(j) - y.
at(k);
454 c.at(i) = x.at(k) - x.at(j);
455 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
463 shapeFunct.
at(1) = lCoords.
at(1);
464 shapeFunct.
at(2) = lCoords.
at(2);
465 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
470 for (
int i = 1; i <= 3; i++ ) {
471 int j = i + 1 - i / 3 * 3;
472 int k = j + 1 - j / 3 * 3;
473 nx.
at(i) = ( d.
at(j) / 2. * ( b.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * b.at(i) ) * cos( angles.
at(j) ) -
474 d.
at(k) / 2. * ( b.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * b.at(j) ) * cos( angles.
at(k) ) ) * ( -1.0 );
491 for (
int i = 1; i <= 3; i++ ) {
492 int j = i + 1 - i / 3 * 3;
493 int k = j + 1 - j / 3 * 3;
494 b.at(i) = y.
at(j) - y.
at(k);
495 c.at(i) = x.at(k) - x.at(j);
496 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
504 shapeFunct.
at(1) = lCoords.
at(1);
505 shapeFunct.
at(2) = lCoords.
at(2);
506 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
511 for (
int i = 1; i <= 3; i++ ) {
512 int j = i + 1 - i / 3 * 3;
513 int k = j + 1 - j / 3 * 3;
514 ny.
at(i) = ( d.
at(j) / 2. * ( c.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * c.at(i) ) * sin( angles.
at(j) ) -
515 d.
at(k) / 2. * ( c.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * c.at(j) ) * sin( angles.
at(k) ) );
532 for (
int i = 1; i <= 3; i++ ) {
533 int j = i + 1 - i / 3 * 3;
534 int k = j + 1 - j / 3 * 3;
535 b.at(i) = y.
at(j) - y.
at(k);
536 c.at(i) = x.at(k) - x.at(j);
537 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
545 shapeFunct.
at(1) = lCoords.
at(1);
546 shapeFunct.
at(2) = lCoords.
at(2);
547 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
552 for (
int i = 1; i <= 3; i++ ) {
553 int j = i + 1 - i / 3 * 3;
554 int k = j + 1 - j / 3 * 3;
555 ny.
at(i) = ( d.
at(j) / 2. * ( c.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * c.at(i) ) * cos( angles.
at(j) ) -
556 d.
at(k) / 2. * ( c.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * c.at(j) ) * cos( angles.
at(k) ) ) * ( -1.0 );
567 TrPlaneStress2d :: initializeFrom(ir, priority);
572TrPlaneStrRot :: postInitialize()
574 TrPlaneStress2d :: postInitialize();
585 OOFEM_ERROR(
"numberOfRotGaussPoints size mismatch - must be equal to one");
593 answer = cs->giveMembraneRotStiffMtrx(rMode, gp, tStep);
601 answer = cs->giveGeneralizedStress_MembraneRot(strain, gp, tStep);
606TrPlaneStrRot :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
608 answer = {D_u, D_v, R_w};
620 double dens, dV, load;
640 load = force.
at(1) * dens * dV / 3.0;
645 load = force.
at(2) * dens * dV / 3.0;
661TrPlaneStrRot :: giveCharacteristicLength(
const FloatArray &normalToCrackPlane)
674 if ( type == IST_StressTensor ) {
676 answer =
Vec6(help.
at(1), help.
at(2), 0., 0., 0., help.
at(3));
678 }
else if ( type == IST_StrainTensor ) {
680 answer =
Vec6(help.
at(1), help.
at(2), 0., 0., 0., help.
at(3));
683 return TrPlaneStress2d :: giveIPValue(answer, gp, type, tStep);
#define REGISTER_Element(class)
Node * giveNode(int i) const
virtual bool computeGtoLRotationMatrix(FloatMatrix &answer)
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
double giveCharacteristicLengthForPlaneElements(const FloatArray &normalToCrackPlane)
CrossSection * giveCrossSection()
Domain * giveDomain() const
int number
Component number.
Index giveSize() const
Returns the size of receiver.
void zero()
Zeroes all coefficients of receiver.
void rotatedWith(FloatMatrix &r, char mode)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
int SetUpPointsOnTriangle(int nPoints, MaterialMode mode) override
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
virtual bcGeomType giveBCGeoType() const
virtual bcValType giveBCValType() const
GaussPoint * getIntegrationPoint(int n)
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
double computeVolumeAround(GaussPoint *gp) override
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
FloatArray GiveDerivativeUX(const FloatArray &lCoords)
static ParamKey IPK_TrPlaneStrRot_niprot
int numberOfRotGaussPoints
virtual void giveNodeCoordinates(FloatArray &x, FloatArray &y)
FloatArray GiveDerivativeVY(const FloatArray &lCoords)
double giveArea() override
FloatArray GiveDerivativeUY(const FloatArray &lCoords)
FloatArray GiveDerivativeVX(const FloatArray &lCoords)
TrPlaneStress2d(int n, Domain *d)
static FloatArray Vec2(const double &a, const double &b)
@ BodyLoadBGT
Distributed body load.
static FloatArray Vec6(const double &a, const double &b, const double &c, const double &d, const double &e, const double &f)
static FloatArray Vec3(const double &a, const double &b, const double &c)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)