35 #include "../sm/Elements/Beams/libeam3d2.h" 36 #include "../sm/Materials/structuralms.h" 75 double l, ksi, n1, n2, n1x, n2x;
88 n1 = 0.5 * ( 1 - ksi );
89 n2 = 0.5 * ( 1. + ksi );
93 answer.
at(1, 1) = -1. / l;
94 answer.
at(1, 7) = 1. / l;
96 answer.
at(2, 3) = n1x;
98 answer.
at(2, 9) = n2x;
99 answer.
at(2, 11) = n2;
101 answer.
at(3, 2) = n1x;
102 answer.
at(3, 6) = -n1;
103 answer.
at(3, 8) = n2x;
104 answer.
at(3, 12) = -n2;
106 answer.
at(4, 4) = -1. / l;
107 answer.
at(4, 10) = 1. / l;
109 answer.
at(5, 5) = n1x;
110 answer.
at(5, 11) = n2x;
112 answer.
at(6, 6) = n1x;
113 answer.
at(6, 12) = n2x;
139 answer.
at(1, 1) = answer.
at(2, 2) = answer.
at(3, 3) = halfMass;
140 answer.
at(7, 7) = answer.
at(8, 8) = answer.
at(9, 9) = halfMass;
151 ksi = iLocCoord.
at(1);
152 n1 = ( 1. - ksi ) * 0.5;
153 n2 = ( 1. + ksi ) * 0.5;
158 answer.
at(1, 1) = n1;
159 answer.
at(1, 7) = n2;
160 answer.
at(2, 2) = n1;
161 answer.
at(2, 8) = n2;
162 answer.
at(3, 3) = n1;
163 answer.
at(3, 9) = n2;
165 answer.
at(4, 4) = n1;
166 answer.
at(4, 10) = n2;
167 answer.
at(5, 5) = n1;
168 answer.
at(5, 11) = n2;
169 answer.
at(6, 6) = n1;
170 answer.
at(6, 12) = n2;
193 for (
int i = 1; i <= 3; i++ ) {
194 for (
int j = 1; j <= 3; j++ ) {
195 answer.
at(i, j) = lcs.
at(i, j);
196 answer.
at(i + 3, j + 3) = lcs.
at(i, j);
197 answer.
at(i + 6, j + 6) = lcs.
at(i, j);
198 answer.
at(i + 9, j + 9) = lcs.
at(i, j);
204 for (
int i = 1; i <= 3; i++ ) {
205 for (
int j = 1; j <= 3; j++ ) {
231 answer = {D_u, D_v, D_w, R_u, R_v, R_w};
241 n1 = ( 1. - ksi ) * 0.5;
242 n2 = ( 1. + ksi ) * 0.5;
287 length = sqrt(dx * dx + dy * dy + dz * dz);
339 for (
int i = 1; i <= 12; i++ ) {
374 for (
int i = 1; i <= 3; i++ ) {
375 for (
int j = 1; j <= 3; j++ ) {
376 answer.
at(i, j) = lcs.
at(i, j);
377 answer.
at(3 + i, 3 + j) = lcs.
at(i, j);
418 Node *nodeA, *nodeB, *refNode;
426 for (
int i = 1; i <= 3; i++ ) {
431 lz.beVectorProductOf(lx, help);
433 ly.beVectorProductOf(lz, lx);
436 for (
int i = 1; i <= 3; i++ ) {
437 answer.
at(1, i) = lx.at(i);
438 answer.
at(2, i) = ly.at(i);
439 answer.
at(3, i) = lz.at(i);
461 centreSpin.
at(1) = 0.5 * ( u.
at(4) + u.
at(10) );
462 centreSpin.
at(2) = 0.5 * ( u.
at(5) + u.
at(11) );
463 centreSpin.
at(3) = 0.5 * ( u.
at(6) + u.
at(12) );
489 answer.
at(1, 1) = answer.
at(2, 2) = answer.
at(3, 3) = 1.;
491 if ( psiSize <= 1.e-40 ) {
497 S.times(sin(psiSize) / psiSize);
498 SS.
times( ( 1. - cos(psiSize) ) / ( psiSize * psiSize ) );
514 answer.
at(1, 1) = answer.
at(2, 2) = answer.
at(3, 3) = 0.;
515 answer.
at(1, 2) = -vec.
at(3);
516 answer.
at(1, 3) = vec.
at(2);
517 answer.
at(2, 1) = vec.
at(3);
518 answer.
at(2, 3) = -vec.
at(1);
519 answer.
at(3, 1) = -vec.
at(2);
520 answer.
at(3, 2) = vec.
at(1);
540 answer.
add(PrevEpsilon);
562 return sqrt(dx * dx + dy * dy + dz * dz);
635 double layerYCoord, layerZCoord;
642 answer.
at(1) = masterGpStrain.
at(1) + masterGpStrain.
at(5) * layerZCoord - masterGpStrain.
at(6) * layerYCoord;
643 answer.
at(2) = masterGpStrain.
at(2);
644 answer.
at(3) = masterGpStrain.
at(3);
680 go = CreateLine3D(p);
681 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
682 EGAttachObject(go, ( EObjectP )
this);
683 EMAddGraphicsToModel(ESIModel(), go);
699 char const *colors[] = {
700 "red",
"green",
"blue" 713 go = CreateLine3D(p);
714 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
715 EMAddGraphicsToModel(ESIModel(), go);
727 for ( i = 1; i <= 3; i++ ) {
728 p [ 1 ].x = p [ 0 ].x + coeff *
tc.
at(1, i);
729 p [ 1 ].y = p [ 0 ].y + coeff *
tc.
at(2, i);
730 p [ 1 ].z = p [ 0 ].z + coeff *
tc.
at(3, i);
732 EASValsSetColor( ColorGetPixelFromString(const_cast< char * >(colors [ i - 1 ]), & succ) );
734 go = CreateLine3D(p);
735 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
736 EMAddGraphicsToModel(ESIModel(), go);
782 go = CreateLine3D(p);
786 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
787 EMAddGraphicsToModel(ESIModel(), go);
789 EASValsSetMType(FILLED_CIRCLE_MARKER);
790 go = CreateMarkerWD3D( p, v.
at(1) );
791 EGWithMaskChangeAttributes(LAYER_MASK | FILL_MASK | MTYPE_MASK, go);
792 EMAddGraphicsToModel(ESIModel(), go);
CrossSection * giveCrossSection()
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
virtual void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Assembles edge dof mapping mask, which provides mapping between edge local DOFs and "global" element ...
void computeSMtrx(FloatMatrix &answer, FloatArray &vec)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
int nlGeometry
Flag indicating if geometrical nonlinearities apply.
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
#define _IFT_LIBeam3d2_refnode
void initForNewStep()
Initializes receivers state to new time step.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Abstract base class for "structural" finite elements with geometrical nonlinearities.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
#define OOFEG_RAW_GEOMETRY_LAYER
This class implements a structural material status information.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual void initForNewStep()
Initializes receivers state to new time step.
virtual void giveGeneralizedStress_Beam3d(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)=0
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
virtual double giveCoordinate(int i)
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes lumped mass matrix of receiver.
virtual double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Computes volume related to integration point on local edge.
#define OOFEG_DEFORMED_GEOMETRY_LAYER
contextIOResultType storeYourself(DataStream &stream) const
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
StateCounterType tempTcCounter
Time stamp of temporary centre triad.
int getInternalVarsDefGeoFlag()
EPixel getDeformedElementColor()
InternalStateType giveIntVarType()
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
virtual void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
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...
StateCounterType giveSolutionStateCounter()
Returns current solution state counter.
virtual double computeLength()
Computes the length (zero for all but 1D geometries)
ElementExtension
Type representing element extension.
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
UnknownType
Type representing particular unknown (its physical meaning).
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
void times(double f)
Multiplies receiver by factor f.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual bool computeGtoLRotationMatrix(FloatMatrix &answer)
Returns transformation matrix from global c.s.
virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale=1.)
Returns updated ic-th coordinate of receiver.
double at(int i, int j) const
Coefficient access function.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes numerically stiffness matrix of receiver.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void give3dBeamStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Computes the stiffness matrix for 2d beams.
virtual int computeLoadGToLRotationMtrx(FloatMatrix &answer)
Returns transformation matrix from global coordinate system to local element coordinate system for el...
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
FloatMatrix tc
Last equilibrium triad at the centre.
double giveCurrentLength(TimeStep *tStep)
contextIOResultType restoreYourself(DataStream &stream)
Class representing vector of real numbers.
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
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 updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
void computeRotMtrx(FloatMatrix &answer, FloatArray &psi)
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
double computeNorm() const
Computes the norm (or length) of the vector.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the stress vector of receiver at given integration point, at time step tStep.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
virtual void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Compute strain vector of receiver evaluated at given integration point at given time step from elemen...
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
void times(double s)
Multiplies receiver with scalar.
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
FloatMatrix tempTc
Temporary triad at the centre.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
The element interface required by FiberedCrossSection.
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
InterfaceType
Enumerative type, used to identify interface type.
void updateFringeTableMinMax(double *s, int size)
Load is base abstract class for all loads.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj)
Stores receiver state to output stream.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix of receiver.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
int giveSize() const
Returns the size of receiver.
Node * giveNode(int n)
Service for accessing particular domain node.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
Class implementing node in finite element mesh.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
#define OOFEG_VARPLOT_PATTERN_LAYER
LIBeam3d2(int n, Domain *d)
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj)
Restores the receiver state previously written in stream.
Class representing integration point in finite element program.
void updateTempTriad(TimeStep *tStep)
void FiberedCrossSectionInterface_computeStrainVectorInFiber(FloatArray &answer, const FloatArray &masterGpStrain, GaussPoint *slaveGp, TimeStep *tStep)
Computes full 3d strain vector in element fiber.
Class representing solution step.
virtual int testElementExtension(ElementExtension ext)
Tests if the element implements required extension.
int numberOfDofMans
Number of dofmanagers.
void add(const FloatArray &src)
Adds array src to receiver.
Element extension for edge loads.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.