60TR_SHELL11 :: computeGaussPoints()
80 for (
int i = 1; i <= 3; i++ ) {
81 int j = i + 1 - i / 3 * 3;
82 int k = j + 1 - j / 3 * 3;
83 b.at(i) = y.
at(j) - y.
at(k);
84 c.at(i) = x.at(k) - x.at(j);
85 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
93 shapeFunct.
at(1) = lCoords.
at(1);
94 shapeFunct.
at(2) = lCoords.
at(2);
95 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
100 for (
int i = 1; i <= 3; i++ ) {
101 int j = i + 1 - i / 3 * 3;
102 int k = j + 1 - j / 3 * 3;
103 nx.
at(i) = ( d.
at(j) / 2. * ( b.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * b.at(i) ) * sin( angles.
at(j) ) -
104 d.
at(k) / 2. * ( b.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * b.at(j) ) * sin( angles.
at(k) ) );
121 for (
int i = 1; i <= 3; i++ ) {
122 int j = i + 1 - i / 3 * 3;
123 int k = j + 1 - j / 3 * 3;
124 b.at(i) = y.
at(j) - y.
at(k);
125 c.at(i) = x.at(k) - x.at(j);
126 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
134 shapeFunct.
at(1) = lCoords.
at(1);
135 shapeFunct.
at(2) = lCoords.
at(2);
136 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
141 for (
int i = 1; i <= 3; i++ ) {
142 int j = i + 1 - i / 3 * 3;
143 int k = j + 1 - j / 3 * 3;
144 nx.
at(i) = ( d.
at(j) / 2. * ( b.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * b.at(i) ) * cos( angles.
at(j) ) -
145 d.
at(k) / 2. * ( b.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * b.at(j) ) * cos( angles.
at(k) ) ) * ( -1.0 );
162 for (
int i = 1; i <= 3; i++ ) {
163 int j = i + 1 - i / 3 * 3;
164 int k = j + 1 - j / 3 * 3;
165 b.at(i) = y.
at(j) - y.
at(k);
166 c.at(i) = x.at(k) - x.at(j);
167 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
175 shapeFunct.
at(1) = lCoords.
at(1);
176 shapeFunct.
at(2) = lCoords.
at(2);
177 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
182 for (
int i = 1; i <= 3; i++ ) {
183 int j = i + 1 - i / 3 * 3;
184 int k = j + 1 - j / 3 * 3;
185 ny.
at(i) = ( d.
at(j) / 2. * ( c.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * c.at(i) ) * sin( angles.
at(j) ) -
186 d.
at(k) / 2. * ( c.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * c.at(j) ) * sin( angles.
at(k) ) );
203 for (
int i = 1; i <= 3; i++ ) {
204 int j = i + 1 - i / 3 * 3;
205 int k = j + 1 - j / 3 * 3;
206 b.at(i) = y.
at(j) - y.
at(k);
207 c.at(i) = x.at(k) - x.at(j);
208 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
216 shapeFunct.
at(1) = lCoords.
at(1);
217 shapeFunct.
at(2) = lCoords.
at(2);
218 shapeFunct.
at(3) = 1.0 - shapeFunct.
at(1) - shapeFunct.
at(2);
223 for (
int i = 1; i <= 3; i++ ) {
224 int j = i + 1 - i / 3 * 3;
225 int k = j + 1 - j / 3 * 3;
226 ny.
at(i) = ( d.
at(j) / 2. * ( c.at(k) * shapeFunct.
at(i) + shapeFunct.
at(k) * c.at(i) ) * cos( angles.
at(j) ) -
227 d.
at(k) / 2. * ( c.at(i) * shapeFunct.
at(j) + shapeFunct.
at(i) * c.at(j) ) * cos( angles.
at(k) ) ) * ( -1.0 );
234TR_SHELL11 :: GivePitch()
244 for (
int i = 0; i < 3; i++ ) {
245 int j = i + 1 - i / 2 * 3;
246 int k = j + 1 - j / 2 * 3;
247 if ( x(k) == x(j) ) {
249 angles.
at(i + 1) =
M_PI / 2.;
251 angles.
at(i + 1) =
M_PI * 3. / 2.;
256 if ( y(k) >= y(j) ) {
257 angles.
at(i + 1) = atan( ( y(k) - y(j) ) / ( x(k) - x(j) ) );
259 angles.
at(i + 1) = 2. *
M_PI - atan( ( y(j) - y(k) ) / ( x(k) - x(j) ) );
264 if ( y(k) >= y(j) ) {
265 angles.
at(i + 1) =
M_PI - atan( ( y(k) - y(j) ) / ( x(j) - x(k) ) );
267 angles.
at(i + 1) =
M_PI + atan( ( y(j) - y(k) ) / ( x(j) - x(k) ) );
289 for (
int i = 1; i <= 3; i++ ) {
290 int j = i + 1 - i / 3 * 3;
291 int k = j + 1 - j / 3 * 3;
292 b.at(i) = y.
at(j) - y.
at(k);
293 c.
at(i) = x.at(k) - x.at(j);
298 l.at(3) = 1.-l.at(1)-l.at(2);
312 double detJ = 1.0 / ( 2.0 *
area );
314 for (
int i = 1; i <= 3; i++ ) {
315 int j = i + 1 - i / 3 * 3;
316 int k = j + 1 - j / 3 * 3;
318 answer.
at(1, 6 * i - 5) = b.at(i) * detJ;
319 answer.
at(1, 6 * i - 0) = nx.
at(i) * detJ;
322 answer.
at(2, 6 * i - 4) = c.
at(i) * detJ;
323 answer.
at(2, 6 * i - 0) = ny.
at(i) * detJ;
328 answer.
at(3, 6 * i - 5) = c.
at(i) * detJ;
329 answer.
at(3, 6 * i - 4) = b.at(i) * detJ;
330 answer.
at(3, 6 * i - 0) = ( nxRed.
at(i) + nyRed.
at(i) ) * detJ;
333 answer.
at(4, 6*i - 1) = b.at(i)*detJ;
335 answer.
at(5, 6*i - 2) =-c.
at(i)*detJ;
337 answer.
at(6, 6*i - 2) =-b.at(i)*detJ;
338 answer.
at(6, 6*i - 1) = c.
at(i)*detJ;
340 answer.
at(7, 6*i - 3) = b.at(i)*detJ;
341 answer.
at(7, 6*i - 2) = (-b.at(i)*b.at(k)*lc.
at(j) + b.at(i)*b.at(j)*lc.
at(k))*0.5*detJ;
342 answer.
at(7, 6*i - 1) = (-b.at(i)*c.
at(k)*lc.
at(j)-b.at(j)*c.
at(k)*lc.
at(i)+b.at(k)*c.
at(j)*lc.
at(i)+b.at(i)*c.
at(j)*lc.
at(k))*0.5*detJ+lc.
at(i)*2.0*
area*detJ;
344 answer.
at(8, 6*i - 3) = c.
at(i)*detJ;
345 answer.
at(8, 6*i - 2) = (-b.at(k)*c.
at(i)*lc.
at(j)-b.at(k)*c.
at(j)*lc.
at(i)+b.at(j)*c.
at(k)*lc.
at(i)+b.at(j)*c.
at(i)*lc.
at(k))*0.5*detJ-lc.
at(i)*2.0*
area*detJ;
346 answer.
at(8, 6*i - 1) = (-c.
at(i)*c.
at(k)*lc.
at(j)+c.
at(i)*c.
at(j)*lc.
at(k))*0.5*detJ;
350 answer.
at(9, 6 * i - 5) = -1. * c.
at(i) * 1.0 / 4.0 /
area;
351 answer.
at(9, 6 * i - 4) = b.at(i) * 1.0 / 4.0 /
area;
352 answer.
at(9, 6 * i - 0) = ( -4. *
area * lc.
at(i) + nxRed.
at(i) - nyRed.
at(i) ) * 1.0 / 4.0 /
area;
373 for (
int i = 1; i <= 3; i++ ) {
374 int j = i + 1 - i / 3 * 3;
375 int k = j + 1 - j / 3 * 3;
376 b.at(i) = y.
at(j) - y.
at(k);
377 c.at(i) = x.at(k) - x.at(j);
378 d.
at(i) = sqrt( b.at(i) * b.at(i) + c.at(i) * c.at(i) );
385 double l1, l2, l3, f11, f12, f13, f21, f22, f23;
387 l1 = iLocCoord.
at(1);
388 l2 = iLocCoord.
at(2);
391 f11 = d.
at(2) / 2. *l1 *l3 *sin( angles.
at(2) ) - d.
at(3) / 2. *l2 *l1 *sin( angles.
at(3) );
392 f12 = d.
at(3) / 2. *l2 *l1 *sin( angles.
at(3) ) - d.
at(1) / 2. *l3 *l2 *sin( angles.
at(1) );
393 f13 = d.
at(1) / 2. *l3 *l2 *sin( angles.
at(1) ) - d.
at(2) / 2. *l1 *l3 *sin( angles.
at(2) );
395 f21 = d.
at(3) / 2. *l2 *l1 *cos( angles.
at(3) ) - d.
at(2) / 2. *l1 *l3 *cos( angles.
at(2) );
396 f22 = d.
at(1) / 2. *l3 *l2 *cos( angles.
at(1) ) - d.
at(3) / 2. *l2 *l1 *cos( angles.
at(3) );
397 f23 = d.
at(2) / 2. *l1 *l3 *cos( angles.
at(2) ) - d.
at(1) / 2. *l3 *l2 *cos( angles.
at(1) );
403 answer.
at(1, 1) = l1;
404 answer.
at(1, 6) = f11;
405 answer.
at(1, 7) = l2;
406 answer.
at(1, 12) = f12;
407 answer.
at(1, 13) = l3;
408 answer.
at(1, 18) = f13;
410 answer.
at(2, 2) = l1;
411 answer.
at(2, 6) = f21;
412 answer.
at(2, 8) = l2;
413 answer.
at(2, 12) = f22;
414 answer.
at(2, 14) = l3;
415 answer.
at(2, 18) = f23;
417 answer.
at(3, 3) = l1;
418 answer.
at(3, 4) = l1 * ( l2 * b.at(3) - l3 * b.at(2) ) * 0.5;
419 answer.
at(3, 5) = l1 * ( l2 * c.at(3) - l3 * c.at(2) ) * 0.5;
420 answer.
at(3, 9) = l2;
421 answer.
at(3, 10) = l2 * ( l3 * b.at(1) - l1 * b.at(3) ) * 0.5;
422 answer.
at(3, 11) = l2 * ( l3 * c.at(1) - l1 * c.at(3) ) * 0.5;
423 answer.
at(3, 15) = l3;
424 answer.
at(3, 16) = l3 * ( l1 * b.at(2) - l2 * b.at(1) ) * 0.5;
425 answer.
at(3, 17) = l3 * ( l1 * c.at(2) - l2 * c.at(1) ) * 0.5;
427 answer.
at(4, 4) = l1;
428 answer.
at(4, 10) = l2;
429 answer.
at(4, 16) = l3;
431 answer.
at(5, 5) = l1;
432 answer.
at(5, 11) = l2;
433 answer.
at(5, 17) = l3;
435 answer.
at(6, 6) = l1;
436 answer.
at(12, 12) = l2;
437 answer.
at(18, 18) = l3;
442TR_SHELL11 :: giveArea()
446 if ( fabs(
area) > 0 ) {
455 double x1, x2, x3, y1, y2, y3;
465 return (
area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 ) );
476 OOFEM_ERROR(
"cannot transform coordinates - size mismatch");
497 std :: vector< FloatArray > lc = {
Vec2(x[0], y[0]),
Vec2(x[1], y[1]),
Vec2(x[2], y[2])};
501 return detJ * weight;
533TR_SHELL11 :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
535 answer = {D_u, D_v, D_w, R_u, R_v, R_w};
554TR_SHELL11 :: computeGtoLRotationMatrix()
587 for (
int i = 1; i <= 3; i++ ) {
612 for (
int i = 1; i <= 6; i++ ) {
636 answer.
at(1, 1) = charVect.
at(1) * h;
637 answer.
at(2, 2) = charVect.
at(2) * h;
638 answer.
at(1, 2) = charVect.
at(3) * h;
639 answer.
at(2, 1) = charVect.
at(3) * h;
641 answer.
at(1, 3) = charVect.
at(7);
642 answer.
at(3, 1) = charVect.
at(7);
643 answer.
at(2, 3) = charVect.
at(8);
644 answer.
at(3, 2) = charVect.
at(8);
651 answer.
at(1, 1) = charVect.
at(4);
652 answer.
at(2, 2) = charVect.
at(5);
653 answer.
at(1, 2) = charVect.
at(6);
654 answer.
at(2, 1) = charVect.
at(6);
660 answer.
at(1, 1) = charVect.
at(1);
661 answer.
at(2, 2) = charVect.
at(2);
662 answer.
at(1, 2) = charVect.
at(3) / 2.;
663 answer.
at(2, 1) = charVect.
at(3) / 2.;
665 answer.
at(1, 3) = charVect.
at(7) / 2.;
666 answer.
at(3, 1) = charVect.
at(7) / 2.;
667 answer.
at(2, 3) = charVect.
at(8) / 2.;
668 answer.
at(3, 2) = charVect.
at(8) / 2.;
677 answer.
at(1, 1) = charVect.
at(4);
678 answer.
at(2, 2) = charVect.
at(5);
679 answer.
at(1, 2) = charVect.
at(6) / 2.;
680 answer.
at(2, 1) = charVect.
at(6) / 2.;
702 if ( type == IST_CurvatureTensor || type == IST_ShellStrainTensor ) {
703 if ( type == IST_CurvatureTensor ) {
711 answer.
at(1) = globTensor.
at(1, 1);
712 answer.
at(2) = globTensor.
at(2, 2);
713 answer.
at(3) = globTensor.
at(3, 3);
714 answer.
at(4) = 2 * globTensor.
at(2, 3);
715 answer.
at(5) = 2 * globTensor.
at(1, 3);
716 answer.
at(6) = 2 * globTensor.
at(1, 2);
719 }
else if ( type == IST_ShellMomentTensor || type == IST_ShellForceTensor ) {
720 if ( type == IST_ShellMomentTensor ) {
728 answer.
at(1) = globTensor.
at(1, 1);
729 answer.
at(2) = globTensor.
at(2, 2);
730 answer.
at(3) = globTensor.
at(3, 3);
731 answer.
at(4) = globTensor.
at(2, 3);
732 answer.
at(5) = globTensor.
at(1, 3);
733 answer.
at(6) = globTensor.
at(1, 2);
737 return StructuralElement :: giveIPValue(answer, gp, type, tStep);
754 for (
int i = 1; i <= 3; i++ ) {
772 double dens, dV, load;
797 load = force.
at(1) * dens * dV / 3.0;
800 answer.
at(13) = load;
802 load = force.
at(2) * dens * dV / 3.0;
805 answer.
at(14) = load;
807 load = force.
at(3) * dens * dV / 3.0;
810 answer.
at(15) = load;
828TR_SHELL11 :: giveSurfaceDofMapping(
IntArray &answer,
int iSurf)
const
833 for (
int i=1; i<=18; i++)
842TR_SHELL11 :: computeSurfaceVolumeAround(
GaussPoint *gp,
int iSurf)
856TR_SHELL11 :: printOutputAt(FILE *file,
TimeStep *tStep)
866 fprintf( file,
" GP %2d.%-2d :", i + 1, gp->giveNumber() );
868 this->
giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
869 fprintf(file,
" strains ");
870 for (
auto &val : v ) fprintf(file,
" %.4e", val);
872 this->
giveIPValue(v, gp, IST_CurvatureTensor, tStep);
873 fprintf(file,
"\n curvatures ");
874 for (
auto &val : v ) fprintf(file,
" %.4e", val);
877 this->
giveIPValue(v, gp, IST_ShellForceTensor, tStep);
878 fprintf(file,
"\n stresses ");
879 for (
auto &val : v ) fprintf(file,
" %.4e", val);
881 this->
giveIPValue(v, gp, IST_ShellMomentTensor, tStep);
882 fprintf(file,
"\n moments ");
883 for (
auto &val : v ) fprintf(file,
" %.4e", val);
886 if ( gp->hasSlaveGaussPoint()) {
887 fprintf(file,
"\n Layers report \n{\n");
889 for (
auto &sgp: gp->giveSlaveGaussPoints()) {
890 sgp->printOutputAt(file, tStep);
892 fprintf(file,
"} end layers report\n");
905 StructuralElement :: initializeFrom(ir, priority);
928TR_SHELL11 :: NodalAveragingRecoveryMI_computeNodalValue(
FloatArray &answer,
int node,
932 if ( ( type == IST_ShellForceTensor ) || ( type == IST_ShellMomentTensor ) ||
933 ( type == IST_ShellStrainTensor ) || ( type == IST_CurvatureTensor ) ) {
943TR_SHELL11 :: SPRNodalRecoveryMI_giveSPRAssemblyPoints(
IntArray &pap)
953TR_SHELL11 :: SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(
IntArray &answer,
int pap)
967TR_SHELL11 :: SPRNodalRecoveryMI_givePatchType()
983 double layerZeta, layerZCoord, top, bottom;
988 layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
992 answer.
at(1) = masterGpStrain.
at(1)+masterGpStrain.
at(4) * layerZCoord;
993 answer.
at(2) = masterGpStrain.
at(2)+masterGpStrain.
at(5) * layerZCoord;
994 answer.
at(5) = masterGpStrain.
at(3)+masterGpStrain.
at(6) * layerZCoord;
995 answer.
at(3) = masterGpStrain.
at(8);
996 answer.
at(4) = masterGpStrain.
at(7);
1000TR_SHELL11 :: giveCharacteristicLength(
const FloatArray &normalToCrackPlane)
#define REGISTER_Element(class)
Node * giveNode(int i) const
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
double giveCharacteristicLengthForPlaneElements(const FloatArray &normalToCrackPlane)
CrossSection * giveCrossSection()
Index giveSize() const
Returns the size of receiver.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
void zero()
Zeroes all coefficients of receiver.
void rotatedWith(FloatMatrix &r, char mode)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
void subtract(const FloatArray &src)
void rotatedWith(const FloatMatrix &r, char mode='n')
void resize(Index rows, Index cols)
void setSubMatrix(const FloatMatrix &src, int sr, int sc)
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
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
double giveWeight()
Returns integration weight of receiver.
virtual bcGeomType giveBCGeoType() const
virtual bcValType giveBCValType() const
void zero()
Sets all component to zero.
GaussPoint * getIntegrationPoint(int n)
LayeredCrossSectionInterface()
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
NodalAveragingRecoveryModelInterface()
Constructor.
SPRNodalRecoveryModelInterface()
Constructor.
SpatialLocalizerInterface(Element *element)
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
StructuralElement(int n, Domain *d)
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.
static FEI2dTrLin interp_lin
Element_Geometry_Type giveGeometryType() const override
FloatArray GiveDerivativeUY(const FloatArray &lCoords)
const FloatMatrix * computeGtoLRotationMatrix()
void giveNodeCoordinates(FloatArray &x, FloatArray &y)
FloatArray GiveDerivativeVY(const FloatArray &lCoords)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
void giveLocalCoordinates(FloatArray &answer, const FloatArray &global)
void giveCharacteristicTensor(FloatMatrix &answer, CharTensor type, GaussPoint *gp, TimeStep *tStep)
int numberOfRotGaussPoints
FloatArray GiveDerivativeUX(const FloatArray &lCoords)
FloatMatrix GtoLRotationMatrix
void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer) override
double computeVolumeAround(GaussPoint *gp) override
FloatArray GiveDerivativeVX(const FloatArray &lCoords)
int computeLoadGToLRotationMtrx(FloatMatrix &answer) override
ZZErrorEstimatorInterface(Element *element)
Constructor.
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
static FloatArray Vec2(const double &a, const double &b)
@ CS_BottomZCoord
Bottom z coordinate.
@ CS_TopZCoord
Top z coordinate.
@ BodyLoadBGT
Distributed body load.
@ SPRNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
@ LayeredCrossSectionInterfaceType
@ ZZErrorEstimatorInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
static FloatArray Vec3(const double &a, const double &b, const double &c)