35 #include "../sm/Elements/PlaneStress/trplanestressrotallman.h" 36 #include "../sm/CrossSections/structuralcrosssection.h" 86 for (
int i = 0; i < 3; i++ ) {
92 for (
int i = 1; i <= 2; i++ ) {
93 lxy [ 3 ].at(i) = 0.5 * ( lxy [ 0 ].at(i) + lxy [ 1 ].at(i) );
94 lxy [ 4 ].at(i) = 0.5 * ( lxy [ 1 ].at(i) + lxy [ 2 ].at(i) );
95 lxy [ 5 ].at(i) = 0.5 * ( lxy [ 2 ].at(i) + lxy [ 0 ].at(i) );
107 std::vector< FloatArray > lxy;
116 answer.
at(1, 1) = answer.
at(2, 2) = n.
at(1) + n.
at(4) / 2. + n.
at(6) / 2.;
117 answer.
at(1, 4) = answer.
at(2, 5) = n.
at(2) + n.
at(4) / 2. + n.
at(5) / 2.;
118 answer.
at(1, 7) = answer.
at(2, 8) = n.
at(3) + n.
at(5) / 2. + n.
at(6) / 2.;
119 answer.
at(1, 3) = n.
at(6) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0 - n.
at(4) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0;
120 answer.
at(1, 6) = n.
at(4) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0 - n.
at(5) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0;
121 answer.
at(1, 9) = n.
at(5) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0 - n.
at(6) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0;
122 answer.
at(2, 3) = -n.
at(6) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0 + n.
at(4) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0;
123 answer.
at(2, 6) = -n.
at(4) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0 + n.
at(5) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0;
124 answer.
at(2, 9) = -n.
at(5) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0 + n.
at(6) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0;
126 answer.
at(3, 3) = L.
at(1);
127 answer.
at(3, 6) = L.
at(2);
128 answer.
at(3, 9) = L.
at(3);
137 std::vector< FloatArray > lxy;
146 answer.
at(1, 1) = dnx.
at(1, 1) + 0.5 * dnx.
at(4, 1) + 0.5 * dnx.
at(6, 1);
147 answer.
at(1, 4) = dnx.
at(2, 1) + 0.5 * dnx.
at(4, 1) + 0.5 * dnx.
at(5, 1);
148 answer.
at(1, 7) = dnx.
at(3, 1) + 0.5 * dnx.
at(5, 1) + 0.5 * dnx.
at(6, 1);
149 answer.
at(1, 3) =+dnx.
at(6, 1) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0 - dnx.
at(4, 1) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0;
150 answer.
at(1, 6) =+dnx.
at(4, 1) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0 - dnx.
at(5, 1) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0;
151 answer.
at(1, 9) =+dnx.
at(5, 1) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0 - dnx.
at(6, 1) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0;
154 answer.
at(2, 2) = dnx.
at(1, 2) + 0.5 * dnx.
at(4, 2) + 0.5 * dnx.
at(6, 2);
155 answer.
at(2, 5) = dnx.
at(2, 2) + 0.5 * dnx.
at(4, 2) + 0.5 * dnx.
at(5, 2);
156 answer.
at(2, 8) = dnx.
at(3, 2) + 0.5 * dnx.
at(5, 2) + 0.5 * dnx.
at(6, 2);
157 answer.
at(2, 3) =-dnx.
at(6, 2) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0 + dnx.
at(4, 2) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0;
158 answer.
at(2, 6) =-dnx.
at(4, 2) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0 + dnx.
at(5, 2) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0;
159 answer.
at(2, 9) =-dnx.
at(5, 2) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0 + dnx.
at(6, 2) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0;
162 answer.
at(3, 1) = dnx.
at(1, 2) + 0.5 * dnx.
at(4, 2) + 0.5 * dnx.
at(6, 2);
163 answer.
at(3, 2) = dnx.
at(1, 1) + 0.5 * dnx.
at(4, 1) + 0.5 * dnx.
at(6, 1);
164 answer.
at(3, 4) = dnx.
at(2, 2) + 0.5 * dnx.
at(4, 2) + 0.5 * dnx.
at(5, 2);
165 answer.
at(3, 5) = dnx.
at(2, 1) + 0.5 * dnx.
at(4, 1) + 0.5 * dnx.
at(5, 1);
166 answer.
at(3, 7) = dnx.
at(3, 2) + 0.5 * dnx.
at(5, 2) + 0.5 * dnx.
at(6, 2);
167 answer.
at(3, 8) = dnx.
at(3, 1) + 0.5 * dnx.
at(5, 1) + 0.5 * dnx.
at(6, 1);
169 answer.
at(3, 3) = dnx.
at(6, 2) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0 - dnx.
at(4, 2) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0;
170 answer.
at(3, 3) += -dnx.
at(6, 1) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0 + dnx.
at(4, 1) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0;
171 answer.
at(3, 6) = dnx.
at(4, 2) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0 - dnx.
at(5, 2) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0;
172 answer.
at(3, 6) += -dnx.
at(4, 1) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0 + dnx.
at(5, 1) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0;
173 answer.
at(3, 9) = dnx.
at(5, 2) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0 - dnx.
at(6, 2) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0;
174 answer.
at(3, 9) += -dnx.
at(5, 1) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0 + dnx.
at(6, 1) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0;
194 FloatArray lec = {0.333333333333, 0.333333333333, 0.333333333333};
195 std::vector< FloatArray > lxy;
201 b.
at(1, 1) = -1.0 * ( dnx.
at(1, 2) + 0.5 * dnx.
at(4, 2) + 0.5 * dnx.
at(6, 2) );
202 b.
at(1, 2) = dnx.
at(1, 1) + 0.5 * dnx.
at(4, 1) + 0.5 * dnx.
at(6, 1);
203 b.
at(1, 4) = -1.0 * ( dnx.
at(2, 2) + 0.5 * dnx.
at(4, 2) + 0.5 * dnx.
at(5, 2) );
204 b.
at(1, 5) = dnx.
at(2, 1) + 0.5 * dnx.
at(4, 1) + 0.5 * dnx.
at(5, 1);
205 b.
at(1, 7) = -1.0 * ( dnx.
at(3, 2) + 0.5 * dnx.
at(5, 2) + 0.5 * dnx.
at(6, 2) );
206 b.
at(1, 8) = dnx.
at(3, 1) + 0.5 * dnx.
at(5, 1) + 0.5 * dnx.
at(6, 1);
208 b.
at(1, 3) = -dnx.
at(6, 2) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0 + dnx.
at(4, 2) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0;
209 b.
at(1, 3) += -dnx.
at(6, 1) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0 + dnx.
at(4, 1) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0;
210 b.
at(1, 6) = -dnx.
at(4, 2) * ( lxy [ 1 ].at(2) - lxy [ 0 ].at(2) ) / 8.0 + dnx.
at(5, 2) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0;
211 b.
at(1, 6) += -dnx.
at(4, 1) * ( lxy [ 1 ].at(1) - lxy [ 0 ].at(1) ) / 8.0 + dnx.
at(5, 1) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0;
212 b.
at(1, 9) = -dnx.
at(5, 2) * ( lxy [ 2 ].at(2) - lxy [ 1 ].at(2) ) / 8.0 + dnx.
at(6, 2) * ( lxy [ 0 ].at(2) - lxy [ 2 ].at(2) ) / 8.0;
213 b.
at(1, 9) += -dnx.
at(5, 1) * ( lxy [ 2 ].at(1) - lxy [ 1 ].at(1) ) / 8.0 + dnx.
at(6, 1) * ( lxy [ 0 ].at(1) - lxy [ 2 ].at(1) ) / 8.0;
216 b.
at(1, 3) -= 1.0 / 3.0;
217 b.
at(1, 6) -= 1.0 / 3.0;
218 b.
at(1, 9) -= 1.0 / 3.0;
231 answer = {D_u, D_v, R_w};
260 std::vector< FloatArray > lxy;
271 answer.
at(1, 1) = answer.
at(2, 2) = n.
at(1) + n.
at(3) / 2.0;
272 answer.
at(1, 4) = answer.
at(2, 5) = n.
at(2) + n.
at(3) / 2.0;
273 answer.
at(1, 3) = n.
at(3) * ( lxy [ en.
at(2) - 1 ].at(2) - lxy [ en.
at(1) - 1 ].at(2) ) / 8.0;
274 answer.
at(1, 6) = -answer.
at(1, 3);
275 answer.
at(2, 3) = n.
at(3) * ( lxy [ en.
at(2) - 1 ].at(1) - lxy [ en.
at(1) - 1 ].at(1) ) / 8.0;
276 answer.
at(2, 6) = -answer.
at(2, 3);
277 answer.
at(3, 3) = l.
at(1);
278 answer.
at(3, 6) = l.
at(2);
297 }
else if ( iEdge == 2 ) {
304 }
else if ( iEdge == 3 ) {
324 double layerZeta, layerZCoord, top, bottom;
329 layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
332 answer.
at(1) = masterGpStrain.
at(1) * layerZCoord;
333 answer.
at(2) = masterGpStrain.
at(2) * layerZCoord;
334 answer.
at(3) = masterGpStrain.
at(3);
340 if ( type != ExternalForcesVector ) {
363 edgeLoad->
computeValueAt(force, tStep, gp->giveNaturalCoordinates(), mode);
CrossSection * giveCrossSection()
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of edge interpolation functions (shape functions) at given point.
The element interface required by ZZNodalRecoveryModel.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
Wrapper around cell with vertex coordinates stored in FloatArray**.
virtual FEInterpolation * giveInterpolation() const
The element interface required by ZZNodalRecoveryModel.
virtual int computeLoadLEToLRotationMatrix(FloatMatrix &answer, int iEdge, GaussPoint *gp)
Returns transformation matrix from local edge c.s to element local coordinate system of load vector c...
Load is specified in global c.s.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
void clear()
Clears receiver (zero size).
int giveInterpolationOrder()
Returns the interpolation order.
virtual CoordSystType giveCoordSystMode()
Returns receiver's coordinate system.
Interface * giveInterface(InterfaceType interface)
Interface requesting service.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
void computeStiffnessMatrixZeroEnergyStabilization(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix stabilization of zero energy mode (equal rotations) ...
void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Assembles edge dof mapping mask, which provides mapping between edge local DOFs and "global" element ...
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
virtual double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Computes volume related to integration point on local edge.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix of receiver.
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
virtual double giveArea(const FEICellGeometry &cellgeo) const
Computes the exact area.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual void computeLocalNodalCoordinates(std::vector< FloatArray > &lxy)
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
void computeEgdeNMatrixAt(FloatMatrix &answer, int iedge, GaussPoint *gp)
void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global)
Computes the contribution of the given load at the given boundary edge.
virtual int computeLoadGToLRotationMtrx(FloatMatrix &answer)
Returns transformation matrix from global coordinate system to local element coordinate system for el...
static FEI2dTrQuad qinterpolation
virtual double giveArea()
virtual FormulationType giveFormulationType()
Specifies is load should take local or global coordinates.
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
void times(double f)
Multiplies receiver by factor f.
virtual void computeStrainVectorInLayer(FloatArray &answer, const FloatArray &masterGpStrain, GaussPoint *masterGp, GaussPoint *slaveGp, TimeStep *tStep)
Computes full 3D strain vector in element layer.
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
Abstract base class representing an edge load (force, momentum, ...) that acts directly on a edge bou...
Wrapper around element definition to provide FEICellGeometry interface.
int SPRNodalRecoveryMI_giveNumberOfIP()
virtual int giveApproxOrder()=0
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
int numberOfGaussPoints
Number of integration points as specified by nip.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix of receiver.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
This class implements an triangular three-node plane-stress elasticity finite element.
TrPlanestressRotAllman(int, Domain *)
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
The spatial localizer element interface associated to spatial localizer.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
virtual FloatArray * giveCoordinates()
void zero()
Zeroes all coefficient of receiver.
InterfaceType
Enumerative type, used to identify interface type.
The element interface required by LayeredCrossSection.
Second order triangular interpolation in 2D (6 nodes).
virtual void boundaryEdgeLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Maps the local boundary coordinates to global.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)
Computes components values of load at given point - global coordinates (coordinates given)...
virtual int SetUpPointsOnLine(int nPoints, MaterialMode mode)
Sets up receiver's integration points on unit line integration domain.
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of edge interpolation functions (shape functions) at given point.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
void add(const FloatArray &src)
Adds array src to receiver.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.