123 double load = force.
at(1) * dens * dV / 3.0;
145 double x1, x2, x3, y1, y2, y3, z1, z2, z3;
152 double N1dk = 4.0 * ksi - 1.0;
154 double N3dk = -3.0 + 4.0 * ksi + 4.0 * eta;
155 double N4dk = 4.0 * eta;
156 double N5dk = -4.0 * eta;
157 double N6dk = 4.0 * ( 1.0 - 2.0 * ksi - eta );
160 double N2de = 4.0 * eta - 1.0;
161 double N3de = -3.0 + 4.0 * eta + 4.0 * ksi;
162 double N4de = 4.0 * ksi;
163 double N5de = 4.0 * ( 1.0 - 2.0 * eta - ksi );
164 double N6de = -4.0 * ksi;
166 double A = N1dk * x1 + N2dk * x2 + N3dk * x3 + N4dk * ( x1 + x2 ) / 2 + N5dk * ( x2 + x3 ) / 2 + N6dk * ( x1 + x3 ) / 2;
167 double B = N1dk * y1 + N2dk * y2 + N3dk * y3 + N4dk * ( y1 + y2 ) / 2 + N5dk * ( y2 + y3 ) / 2 + N6dk * ( y1 + y3 ) / 2;
168 double C = N1de * x1 + N2de * x2 + N3de * x3 + N4de * ( x1 + x2 ) / 2 + N5de * ( x2 + x3 ) / 2 + N6de * ( x1 + x3 ) / 2;
169 double D = N1de * y1 + N2de * y2 + N3de * y3 + N4de * ( y1 + y2 ) / 2 + N5de * ( y2 + y3 ) / 2 + N6de * ( y1 + y3 ) / 2;
171 double dxdk = D / ( A * D - B * C );
172 double dydk = -C / ( A * D - B * C );
173 double dxde = -B / ( A * D - B * C );
174 double dyde = A / ( A * D - B * C );
176 double dN102 = N1dk * dxdk + N1de * dxde;
177 double dN104 = N2dk * dxdk + N2de * dxde;
178 double dN106 = N3dk * dxdk + N3de * dxde;
179 double dN108 = N4dk * dxdk + N4de * dxde;
180 double dN110 = N5dk * dxdk + N5de * dxde;
181 double dN112 = N6dk * dxdk + N6de * dxde;
183 double dN201 = -N1dk * dydk - N1de * dyde;
184 double dN203 = -N2dk * dydk - N2de * dyde;
185 double dN205 = -N3dk * dydk - N3de * dyde;
186 double dN207 = -N4dk * dydk - N4de * dyde;
187 double dN209 = -N5dk * dydk - N5de * dyde;
188 double dN211 = -N6dk * dydk - N6de * dyde;
191 double dx4 = x2 - x1;
192 double dy4 = y2 - y1;
193 double l4 = sqrt(dx4 * dx4 + dy4 * dy4);
195 double dx5 = x3 - x2;
196 double dy5 = y3 - y2;
197 double l5 = sqrt(dx5 * dx5 + dy5 * dy5);
199 double dx6 = x1 - x3;
200 double dy6 = y1 - y3;
201 double l6 = sqrt(dx6 * dx6 + dy6 * dy6);
203 double c4 = dy4 / l4;
204 double s4 = -dx4 / l4;
206 double c5 = dy5 / l5;
207 double s5 = -dx5 / l5;
209 double c6 = dy6 / l6;
210 double s6 = -dx6 / l6;
213 double T11 = -1.5 / l4 * c4;
214 double T12 = -0.25 * c4 * c4 + 0.5 * s4 * s4;
215 double T13 = -0.25 * c4 * s4 - 0.5 * c4 * s4;
216 double T14 = 1.5 / l4 * c4;
217 double T15 = -0.25 * c4 * c4 + 0.5 * s4 * s4;
218 double T16 = -0.25 * c4 * s4 - 0.5 * c4 * s4;
220 double T21 = -1.5 / l4 * s4;
221 double T22 = -0.25 * c4 * s4 - 0.5 * c4 * s4;
222 double T23 = -0.25 * s4 * s4 + 0.5 * c4 * c4;
223 double T24 = 1.5 / l4 * s4;
224 double T25 = -0.25 * c4 * s4 - 0.5 * c4 * s4;
225 double T26 = -0.25 * s4 * s4 + 0.5 * c4 * c4;
227 double T34 = -1.5 / l5 * c5;
228 double T35 = -0.25 * c5 * c5 + 0.5 * s5 * s5;
229 double T36 = -0.25 * c5 * s5 - 0.5 * c5 * s5;
230 double T37 = 1.5 / l5 * c5;
231 double T38 = -0.25 * c5 * c5 + 0.5 * s5 * s5;
232 double T39 = -0.25 * c5 * s5 - 0.5 * c5 * s5;
234 double T44 = -1.5 / l5 * s5;
235 double T45 = -0.25 * c5 * s5 - 0.5 * c5 * s5;
236 double T46 = -0.25 * s5 * s5 + 0.5 * c5 * c5;
237 double T47 = 1.5 / l5 * s5;
238 double T48 = -0.25 * c5 * s5 - 0.5 * c5 * s5;
239 double T49 = -0.25 * s5 * s5 + 0.5 * c5 * c5;
241 double T51 = 1.5 / l6 * c6;
242 double T52 = -0.25 * c6 * c6 + 0.5 * s6 * s6;
243 double T53 = -0.25 * c6 * s6 - 0.5 * c6 * s6;
244 double T57 = -1.5 / l6 * c6;
245 double T58 = -0.25 * c6 * c6 + 0.5 * s6 * s6;
246 double T59 = -0.25 * c6 * s6 - 0.5 * c6 * s6;
248 double T61 = 1.5 / l6 * s6;
249 double T62 = -0.25 * c6 * s6 - 0.5 * c6 * s6;
250 double T63 = -0.25 * s6 * s6 + 0.5 * c6 * c6;
251 double T67 = -1.5 / l6 * s6;
252 double T68 = -0.25 * c6 * s6 - 0.5 * c6 * s6;
253 double T69 = -0.25 * s6 * s6 + 0.5 * c6 * c6;
258 answer.
at(1, 1) = T21 * dN108 + T61 * dN112;
259 answer.
at(1, 2) = T22 * dN108 + T62 * dN112;
260 answer.
at(1, 3) = dN102 + T23 * dN108 + T63 * dN112;
261 answer.
at(1, 4) = T24 * dN108 + T44 * dN110;
262 answer.
at(1, 5) = T25 * dN108 + T45 * dN110;
263 answer.
at(1, 6) = dN104 + T26 * dN108 + T46 * dN110;
264 answer.
at(1, 7) = T47 * dN110 + T67 * dN112;
265 answer.
at(1, 8) = T48 * dN110 + T68 * dN112;
266 answer.
at(1, 9) = dN106 + T49 * dN110 + T69 * dN112;
268 answer.
at(2, 1) = T11 * dN207 + T51 * dN211;
269 answer.
at(2, 2) = dN201 + T12 * dN207 + T52 * dN211;
270 answer.
at(2, 3) = T13 * dN207 + T53 * dN211;
271 answer.
at(2, 4) = T14 * dN207 + T34 * dN209;
272 answer.
at(2, 5) = dN203 + T15 * dN207 + T35 * dN209;
273 answer.
at(2, 6) = T16 * dN207 + T36 * dN209;
274 answer.
at(2, 7) = T37 * dN209 + T57 * dN211;
275 answer.
at(2, 8) = dN205 + T38 * dN209 + T58 * dN211;
276 answer.
at(2, 9) = T39 * dN209 + T59 * dN211;
278 answer.
at(3, 1) = -T11 * dN108 - T51 * dN112 - T21 * dN207 - T61 * dN211;
279 answer.
at(3, 2) = -dN102 - T12 * dN108 - T52 * dN112 - T22 * dN207 - T62 * dN211;
280 answer.
at(3, 3) = -dN201 - T13 * dN108 - T53 * dN112 - T23 * dN207 - T63 * dN211;
281 answer.
at(3, 4) = -T14 * dN108 - T34 * dN110 - T24 * dN207 - T44 * dN209;
282 answer.
at(3, 5) = -dN104 - T15 * dN108 - T35 * dN110 - T25 * dN207 - T45 * dN209;
283 answer.
at(3, 6) = -dN203 - T16 * dN108 - T36 * dN110 - T26 * dN207 - T46 * dN209;
284 answer.
at(3, 7) = -T37 * dN110 - T57 * dN112 - T47 * dN209 - T67 * dN211;
285 answer.
at(3, 8) = -dN106 - T38 * dN110 - T58 * dN112 - T48 * dN209 - T68 * dN211;
286 answer.
at(3, 9) = -dN205 - T39 * dN110 - T59 * dN112 - T49 * dN209 - T69 * dN211;
327 double &y1,
double &y2,
double &y3,
328 double &z1,
double &z2,
double &z3)
358 answer = { D_w, R_u, R_v };
393 lc [ 0 ].at(2), lc [ 1 ].at(2), lc [ 2 ].at(2),
394 lc [ 0 ].at(3), lc [ 1 ].at(3), lc [ 2 ].at(3) );
398 return detJ * weight;
415 answer.
at(1, 1) = mss1;
416 answer.
at(4, 4) = mss1;
417 answer.
at(7, 7) = mss1;
441#define POINT_TOL 1.e-3
450 double x1, x2, x3, y1, y2, y3, z1, z2, z3;
457 for (
int i = 1; i <= 3; i++ ) {
469 midplZ = z1 * answer.
at(1) + z2 * answer.
at(2) + z3 * answer.
at(3);
475 if ( elthick / 2.0 + midplZ - fabs(coords.
at(3) ) < -
POINT_TOL ) {
490 if ( type == IST_ShellForceTensor || type == IST_ShellStrainTensor ) {
491 if ( type == IST_ShellForceTensor ) {
499 answer.
at(4) = help.
at(5);
500 answer.
at(5) = help.
at(4);
503 }
else if ( type == IST_ShellMomentTensor || type == IST_CurvatureTensor ) {
504 if ( type == IST_ShellMomentTensor ) {
509 answer.
at(1) = help.
at(1);
510 answer.
at(2) = help.
at(2);
514 answer.
at(6) = help.
at(3);
530 if ( ( type == IST_ShellForceTensor ) || ( type == IST_ShellMomentTensor ) ||
531 ( type == IST_ShellStrainTensor ) || ( type == IST_CurvatureTensor ) ) {
582 answer.
at(1, 1) = n.
at(1);
583 answer.
at(1, 4) = n.
at(2);
584 answer.
at(2, 2) = answer.
at(3, 3) = n.
at(1);
585 answer.
at(2, 5) = answer.
at(3, 6) = n.
at(2);
599 double layerZeta, layerZCoord, top, bottom;
604 layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
608 answer.
at(1) = masterGpStrain.
at(1) * layerZCoord;
609 answer.
at(2) = masterGpStrain.
at(2) * layerZCoord;
610 answer.
at(5) = masterGpStrain.
at(3) * layerZCoord;
611 answer.
at(3) = masterGpStrain.
at(5);
612 answer.
at(4) = masterGpStrain.
at(4);
631 }
else if ( iEdge == 2 ) {
638 }
else if ( iEdge == 3 ) {
668 const auto &edgeNodes = this->
interp_lin.computeLocalEdgeMapping(iEdge);
670 auto nodeA = this->
giveNode(edgeNodes.at(1) );
671 auto nodeB = this->
giveNode(edgeNodes.at(2) );
673 double dx = nodeB->giveCoordinate(1) - nodeA->giveCoordinate(1);
674 double dy = nodeB->giveCoordinate(2) - nodeA->giveCoordinate(2);
675 double length = sqrt(dx * dx + dy * dy);
679 answer.
at(1, 1) = 1.0;
702 for (
int i = 1; i <= 9; i++ ) {
727#ifdef DKT_EnableVertexMomentsCache
761#ifdef DKT_EnableVertexMomentsCache
777 answer.
at(4) += m.
at(1, i) * dndx.
at(i, 1) + m.
at(3, i) * dndx.
at(i, 2);
778 answer.
at(5) += m.
at(2, i) * dndx.
at(i, 2) + m.
at(3, i) * dndx.
at(i, 1);
793 if ( !
gc.testElementGraphicActivity(
this) ) {
799 EASValsSetColor(
gc.getElementColor() );
800 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
801 EASValsSetEdgeFlag(
true);
802 EASValsSetFillStyle(FILL_SOLID);
814 go = CreateTriangle3D(p);
815 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
816 EGAttachObject(go, ( EObjectP )
this);
817 EMAddGraphicsToModel(ESIModel(), go);
827 double defScale =
gc.getDefScale();
829 if ( !
gc.testElementGraphicActivity(
this) ) {
835 EASValsSetColor(
gc.getDeformedElementColor() );
836 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
837 EASValsSetEdgeFlag(
true);
838 EASValsSetFillStyle(FILL_SOLID);
850 go = CreateTriangle3D(p);
851 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
852 EMAddGraphicsToModel(ESIModel(), go);
860 int i, indx, result = 0;
864 double s[ 3 ], defScale;
866 if ( !
gc.testElementGraphicActivity(
this) ) {
890 indx =
gc.giveIntVarIndx();
892 s [ 0 ] = v1.
at(indx);
893 s [ 1 ] = v2.
at(indx);
894 s [ 2 ] = v3.
at(indx);
899 for ( i = 0; i < 3; i++ ) {
900 if (
gc.getInternalVarsDefGeoFlag() ) {
902 defScale =
gc.getDefScale();
914 gc.updateFringeTableMinMax(s, 3);
915 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
916 EGWithMaskChangeAttributes(LAYER_MASK, tr);
917 EMAddGraphicsToModel(ESIModel(), tr);
double length(const Vector &a)
#define REGISTER_Element(class)
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
SPRPatchType SPRNodalRecoveryMI_givePatchType() override
bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords) override
double computeVolumeAround(GaussPoint *gp) override
FEInterpolation * giveInterpolation() const override
void drawScalar(oofegGraphicContext &gc, TimeStep *tStep) override
StateCounterType stateCounter
DKTPlate(int n, Domain *d)
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
void giveSurfaceDofMapping(IntArray &answer, int iSurf) const override
void computeShearForces(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type) override
void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode) override
Interface * giveInterface(InterfaceType it) override
void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer) override
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge) override
void computeEdgeNMatrix(FloatMatrix &answer, int boundaryID, const FloatArray &lcoords) override
computes edge interpolation matrix
void giveDofManDofIDMask(int inode, IntArray &) const override
void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep) override
void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap) override
FloatMatrix vertexMoments
int computeLoadLSToLRotationMatrix(FloatMatrix &answer, int iSurf, GaussPoint *gp) override
double giveCharacteristicLength(const FloatArray &normalToCrackPlane) override
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS) override
void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep) override
void giveEdgeDofMapping(IntArray &answer, int iEdge) const override
void initializeFrom(InputRecord &ir, int priority) override
double computeSurfaceVolumeAround(GaussPoint *gp, int iSurf) override
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
virtual void giveNodeCoordinates(double &x1, double &x2, double &x3, double &y1, double &y2, double &y3, double &z1, double &z2, double &z3)
void computeStrainVectorInLayer(FloatArray &answer, const FloatArray &masterGpStrain, GaussPoint *masterGp, GaussPoint *slaveGp, TimeStep *tStep) override
static FEI2dTrLin interp_lin
Element geometry approximation.
Element_Geometry_Type giveGeometryType() const override
void computeMidPlaneNormal(FloatArray &answer, const GaussPoint *gp) override
void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap) override
int computeLoadLEToLRotationMatrix(FloatMatrix &answer, int iEdge, GaussPoint *gp) override
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override
void computeGaussPoints() override
void computeVertexBendingMoments(FloatMatrix &answer, TimeStep *tStep)
void computeSurfaceNMatrixAt(FloatMatrix &answer, int iSurf, GaussPoint *gp)
double giveCoordinate(int i) const
const FloatArray & giveCoordinates() const
Node * giveNode(int i) const
virtual bool computeGtoLRotationMatrix(FloatMatrix &answer)
virtual bool isActivated(TimeStep *tStep)
void initializeFrom(InputRecord &ir, int priority) override
virtual Material * giveMaterial()
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
double giveCharacteristicLengthForPlaneElements(const FloatArray &normalToCrackPlane)
CrossSection * giveCrossSection()
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
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 beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
void resize(Index rows, Index cols)
void beNMatrixOf(const FloatArray &n, int nsd)
void setColumn(const FloatArray &src, int c)
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.
void setNaturalCoordinates(const FloatArray &c)
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.
virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale=1.)
SPRNodalRecoveryModelInterface()
Constructor.
virtual FloatMatrixF< 5, 5 > give2dPlateStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 5 > giveGeneralizedStress_Plate(const FloatArrayF< 5 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const =0
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
StructuralElement(int n, Domain *d)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
virtual void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
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.
StateCounterType giveSolutionStateCounter()
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
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_VARPLOT_PATTERN_LAYER
#define OOFEG_DEFORMED_GEOMETRY_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER