OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::SpringElement Class Reference

This class implements a simple spring element. More...

#include <springelement.h>

+ Inheritance diagram for oofem::SpringElement:
+ Collaboration diagram for oofem::SpringElement:

Public Types

enum  SpringElementType {
  SE_1D_SPRING = 0, SE_2D_SPRING_XY = 1, SE_2D_SPRING_XZ = 2, SE_2D_TORSIONALSPRING_XZ = 3,
  SE_3D_SPRING = 4, SE_3D_TORSIONALSPRING = 5
}
 Defines type of spring element (longitudinal/rotational) spring. More...
 

Public Member Functions

 SpringElement (int n, Domain *d)
 
virtual ~SpringElement ()
 
virtual void computeLumpedMassMatrix (FloatMatrix &answer, TimeStep *tStep)
 Computes lumped mass matrix of receiver. More...
 
virtual void computeMassMatrix (FloatMatrix &answer, TimeStep *tStep)
 Computes mass matrix of receiver. More...
 
virtual void computeStiffnessMatrix (FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
 Computes numerically stiffness matrix of receiver. More...
 
virtual void computeInitialStressMatrix (FloatMatrix &answer, TimeStep *tStep)
 Computes initial stress matrix for linear stability problem. More...
 
virtual void giveInternalForcesVector (FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
 Returns equivalent nodal forces vectors. More...
 
virtual int computeNumberOfDofs ()
 Computes or simply returns total number of element's local DOFs. More...
 
virtual int computeNumberOfGlobalDofs ()
 Computes the total number of element's global dofs. More...
 
virtual void giveDofManDofIDMask (int inode, IntArray &answer) const
 Returns dofmanager dof mask for node. More...
 
virtual void updateInternalState (TimeStep *tStep)
 Updates element state after equilibrium in time step has been reached. More...
 
virtual void updateYourself (TimeStep *tStep)
 Updates element state after equilibrium in time step has been reached. More...
 
virtual int checkConsistency ()
 Performs consistency check. More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep)
 Prints output of receiver to stream, for given time step. More...
 
virtual bool isCast (TimeStep *tStep)
 
virtual const char * giveInputRecordName () const
 
virtual const char * giveClassName () const
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual Element_Geometry_Type giveGeometryType () const
 Returns the element geometry type. More...
 
- Public Member Functions inherited from oofem::StructuralElement
 StructuralElement (int n, Domain *d)
 Constructor. More...
 
virtual ~StructuralElement ()
 Destructor. More...
 
virtual void giveCharacteristicMatrix (FloatMatrix &answer, CharType, TimeStep *tStep)
 Computes characteristic matrix of receiver of requested type in given time step. More...
 
virtual void giveCharacteristicVector (FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
 Computes characteristic vector of receiver of requested type in given time step. More...
 
virtual void computeConsistentMassMatrix (FloatMatrix &answer, TimeStep *tStep, double &mass, const double *ipDensity=NULL)
 Computes consistent mass matrix of receiver using numerical integration over element volume. More...
 
virtual void giveMassMtrxIntegrationgMask (IntArray &answer)
 Returns mask indicating, which unknowns (their type and ordering is the same as element unknown vector) participate in mass matrix integration. More...
 
void computeStiffnessMatrix_withIRulesAsSubcells (FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
 
virtual void computeField (ValueModeType mode, TimeStep *tStep, const FloatArray &lcoords, FloatArray &answer)
 Computes the unknown vector interpolated at the specified local coordinates. More...
 
virtual void giveInternalForcesVector_withIRulesAsSubcells (FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
 
virtual void computeStrainVector (FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
 Compute strain vector of receiver evaluated at given integration point at given time step from element displacement vector. More...
 
virtual int giveIPValue (FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
 Returns the integration point corresponding value in full form. More...
 
virtual void computeResultingIPTemperatureAt (FloatArray &answer, TimeStep *tStep, GaussPoint *gp, ValueModeType mode)
 Computes at given time (tStep) the the resulting temperature component array. More...
 
virtual void computeResultingIPEigenstrainAt (FloatArray &answer, TimeStep *tStep, GaussPoint *gp, ValueModeType mode)
 Computes at given time the resulting eigenstrain component array. More...
 
virtual int adaptiveUpdate (TimeStep *tStep)
 Updates the internal state variables stored in all IPs according to already mapped state. More...
 
virtual void giveInputRecord (DynamicInputRecord &input)
 Setups the input record string of receiver. More...
 
virtual int giveInternalStateAtNode (FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
 Returns internal state variable (like stress,strain) at node of element in Reduced form, the way how is obtained is dependent on InternalValueType. More...
 
virtual void showSparseMtrxStructure (CharType mtrx, oofegGraphicContext &gc, TimeStep *tStep)
 Shows sparse structure. More...
 
virtual void showExtendedSparseMtrxStructure (CharType mtrx, oofegGraphicContext &gc, TimeStep *tStep)
 Shows extended sparse structure (for example, due to nonlocal interactions for tangent stiffness) More...
 
virtual void computeLoadVector (FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep)
 Computes the contribution of the given body load (volumetric). More...
 
virtual void computeBoundarySurfaceLoadVector (FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true)
 Computes the contribution of the given load at the given boundary surface in global coordinate system. More...
 
virtual void computeBoundaryEdgeLoadVector (FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true)
 Computes the contribution of the given load at the given boundary edge. More...
 
virtual void computeEdgeNMatrix (FloatMatrix &answer, int boundaryID, const FloatArray &lcoords)
 computes edge interpolation matrix More...
 
virtual void computeSurfaceNMatrix (FloatMatrix &answer, int boundaryID, const FloatArray &lcoords)
 Computes surface interpolation matrix. More...
 
StructuralCrossSectiongiveStructuralCrossSection ()
 Helper function which returns the structural cross-section for the element. More...
 
virtual void createMaterialStatus ()
 
virtual void updateBeforeNonlocalAverage (TimeStep *tStep)
 Updates internal element state (in all integration points of receiver) before nonlocal averaging takes place. More...
 
virtual void giveNonlocalLocationArray (IntArray &locationArray, const UnknownNumberingScheme &us)
 Returns the "nonlocal" location array of receiver. More...
 
virtual void addNonlocalStiffnessContributions (SparseMtrx &dest, const UnknownNumberingScheme &s, TimeStep *tStep)
 Adds the "nonlocal" contribution to stiffness matrix, to account for nonlocality of material model. More...
 
- Public Member Functions inherited from oofem::Element
 Element (int n, Domain *aDomain)
 Constructor. More...
 
 Element (const Element &src)=delete
 
Elementoperator= (const Element &src)=delete
 
virtual ~Element ()
 Virtual destructor. More...
 
virtual void drawYourself (oofegGraphicContext &gc, TimeStep *tStep)
 
virtual void drawAnnotation (oofegGraphicContext &gc, TimeStep *tStep)
 
virtual void drawRawGeometry (oofegGraphicContext &gc, TimeStep *tStep)
 
virtual void drawDeformedGeometry (oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
 
virtual void drawScalar (oofegGraphicContext &gc, TimeStep *tStep)
 
virtual void drawSpecial (oofegGraphicContext &gc, TimeStep *tStep)
 
virtual void giveLocalIntVarMaxMin (oofegGraphicContext &gc, TimeStep *tStep, double &emin, double &emax)
 
virtual int giveInternalStateAtSide (FloatArray &answer, InternalStateType type, InternalStateMode mode, int side, TimeStep *tStep)
 Returns internal state variable (like stress,strain) at side of element in Reduced form If side is possessing DOFs, otherwise recover techniques will not work due to absence of side-shape functions. More...
 
int giveLabel () const
 
int giveGlobalNumber () const
 
void setGlobalNumber (int num)
 Sets receiver globally unique number. More...
 
elementParallelMode giveParallelMode () const
 Return elementParallelMode of receiver. More...
 
void setParallelMode (elementParallelMode _mode)
 Sets parallel mode of element. More...
 
virtual elementParallelMode giveKnotSpanParallelMode (int) const
 Returns the parallel mode for particular knot span of the receiver. More...
 
int packUnknowns (DataStream &buff, TimeStep *tStep)
 Pack all necessary data of element (according to its parallel_mode) integration points into given communication buffer. More...
 
int unpackAndUpdateUnknowns (DataStream &buff, TimeStep *tStep)
 Unpack and updates all necessary data of element (according to its parallel_mode) integration points into given communication buffer. More...
 
int estimatePackSize (DataStream &buff)
 Estimates the necessary pack size to hold all packed data of receiver. More...
 
const IntArraygivePartitionList () const
 Returns partition list of receiver. More...
 
void setPartitionList (IntArray &pl)
 Sets partition list of receiver. More...
 
virtual double predictRelativeComputationalCost ()
 Returns the weight representing relative computational cost of receiver The reference element is triangular plane stress element with linear approximation, single integration point and linear isotropic material. More...
 
virtual double giveRelativeSelfComputationalCost ()
 Returns the weight representing relative computational cost of receiver The reference element is triangular plane stress element. More...
 
virtual double predictRelativeRedistributionCost ()
 Returns the relative redistribution cost of the receiver. More...
 
IntArraygiveBodyLoadArray ()
 Returns array containing load numbers of loads acting on element. More...
 
IntArraygiveBoundaryLoadArray ()
 Returns array containing load numbers of boundary loads acting on element. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream. More...
 
void giveLocationArray (IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
 Returns the location array (array of code numbers) of receiver for given numbering scheme. More...
 
void giveLocationArray (IntArray &locationArray, const IntArray &dofIDMask, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
 
virtual void giveBoundaryLocationArray (IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds=NULL)
 Returns the location array for the boundary of the element. More...
 
virtual void giveBoundaryLocationArray (IntArray &locationArray, const IntArray &bNodes, const IntArray &dofIDMask, const UnknownNumberingScheme &s, IntArray *dofIds=NULL)
 
virtual int giveNumberOfDofs ()
 
virtual int giveNumberOfInternalDofManagers () const
 
virtual DofManagergiveInternalDofManager (int i) const
 Returns i-th internal element dof manager of the receiver. More...
 
virtual double giveCharacteristicValue (CharType type, TimeStep *tStep)
 Computes characteristic value of receiver of requested type in given time step. More...
 
virtual void computeTangentFromSurfaceLoad (FloatMatrix &answer, SurfaceLoad *load, int boundary, MatResponseMode rmode, TimeStep *tStep)
 Computes the tangent contribution of the given load at the given boundary. More...
 
virtual void computeTangentFromEdgeLoad (FloatMatrix &answer, EdgeLoad *load, int boundary, MatResponseMode rmode, TimeStep *tStep)
 Computes the tangent contribution of the given load at the given boundary. More...
 
const IntArraygiveBodyLoadList () const
 Returns receiver list of bodyloads. More...
 
const IntArraygiveBoundaryLoadList () const
 Returns receiver list of boundary loads. More...
 
void computeVectorOf (ValueModeType u, TimeStep *tStep, FloatArray &answer)
 Returns local vector of unknowns. More...
 
void computeVectorOf (const IntArray &dofIDMask, ValueModeType u, TimeStep *tStep, FloatArray &answer, bool padding=false)
 
void computeBoundaryVectorOf (const IntArray &bNodes, const IntArray &dofIDMask, ValueModeType u, TimeStep *tStep, FloatArray &answer, bool padding=false)
 Boundary version of computeVectorOf. More...
 
void computeVectorOf (PrimaryField &field, const IntArray &dofIDMask, ValueModeType u, TimeStep *tStep, FloatArray &answer, bool padding=false)
 Returns local vector of unknowns. More...
 
void computeVectorOfPrescribed (ValueModeType u, TimeStep *tStep, FloatArray &answer)
 Returns local vector of prescribed unknowns. More...
 
void computeVectorOfPrescribed (const IntArray &dofIDMask, ValueModeType type, TimeStep *tStep, FloatArray &answer)
 Returns local vector of prescribed unknowns. More...
 
int computeNumberOfPrimaryMasterDofs ()
 Computes the total number of element's primary master DOFs. More...
 
virtual bool giveRotationMatrix (FloatMatrix &answer)
 Transformation matrices updates rotation matrix between element-local and primary DOFs, taking into account nodal c.s. More...
 
virtual bool computeDofTransformationMatrix (FloatMatrix &answer, const IntArray &nodes, bool includeInternal)
 Returns transformation matrix for DOFs from global coordinate system to local coordinate system in nodes. More...
 
virtual void giveInternalDofManDofIDMask (int inode, IntArray &answer) const
 Returns internal dofmanager dof mask for node. More...
 
virtual void giveElementDofIDMask (IntArray &answer) const
 Returns element dof mask for node. More...
 
virtual double computeVolumeAround (GaussPoint *gp)
 Returns volume related to given integration point. More...
 
virtual double computeVolumeAreaOrLength ()
 Computes the volume, area or length of the element depending on its spatial dimension. More...
 
double computeMeanSize ()
 Computes the size of the element defined as its length. More...
 
virtual double computeVolume ()
 Computes the volume. More...
 
virtual double computeArea ()
 Computes the area (zero for all but 2d geometries). More...
 
virtual double computeLength ()
 Computes the length (zero for all but 1D geometries) More...
 
virtual void giveBoundaryEdgeNodes (IntArray &bNodes, int boundary)
 Returns list of receiver boundary nodes for given edge. More...
 
virtual void giveBoundarySurfaceNodes (IntArray &bNodes, int boundary)
 Returns list of receiver boundary nodes for given surface. More...
 
virtual IntegrationRulegiveBoundaryEdgeIntegrationRule (int order, int boundary)
 Returns boundary edge integration rule. More...
 
virtual IntegrationRulegiveBoundarySurfaceIntegrationRule (int order, int boundary)
 Returns boundary surface integration rule. More...
 
int giveDofManagerNumber (int i) const
 Translates local to global indices for dof managers. More...
 
const IntArraygiveDofManArray () const
 
void addDofManager (DofManager *dMan)
 
DofManagergiveDofManager (int i) const
 
NodegiveNode (int i) const
 Returns reference to the i-th node of element. More...
 
virtual ElementSidegiveSide (int i) const
 Returns reference to the i-th side of element. More...
 
virtual FEInterpolationgiveInterpolation () const
 
virtual FEInterpolationgiveInterpolation (DofIDItem id) const
 Returns the interpolation for the specific dof id. More...
 
virtual MaterialgiveMaterial ()
 
int giveMaterialNumber () const
 
CrossSectiongiveCrossSection ()
 
void setMaterial (int matIndx)
 Sets the material of receiver. More...
 
virtual void setCrossSection (int csIndx)
 Sets the cross section model of receiver. More...
 
virtual int giveNumberOfDofManagers () const
 
virtual int giveNumberOfNodes () const
 Returns number of nodes of receiver. More...
 
void setDofManagers (const IntArray &dmans)
 Sets receiver dofManagers. More...
 
void setBodyLoads (const IntArray &bodyLoads)
 Sets receiver bodyLoadArray. More...
 
void setIntegrationRules (std::vector< std::unique_ptr< IntegrationRule > > irlist)
 Sets integration rules. More...
 
virtual integrationDomain giveIntegrationDomain () const
 Returns integration domain for receiver, used to initialize integration point over receiver volume. More...
 
virtual MaterialMode giveMaterialMode ()
 Returns material mode for receiver integration points. More...
 
virtual int giveIntegrationRuleLocalCodeNumbers (IntArray &answer, IntegrationRule &ie)
 Assembles the code numbers of given integration element (sub-patch) This is done by obtaining list of nonzero shape functions and by collecting the code numbers of nodes corresponding to these shape functions. More...
 
int giveRegionNumber ()
 
virtual void postInitialize ()
 Performs post initialization steps. More...
 
virtual void initializeYourself (TimeStep *timeStepWhenICApply)
 Initialization according to state given by initial conditions. More...
 
virtual bool isActivated (TimeStep *tStep)
 
virtual void initForNewStep ()
 Initializes receivers state to new time step. More...
 
virtual int giveSpatialDimension ()
 Returns the element spatial dimension (1, 2, or 3). More...
 
virtual int giveNumberOfBoundarySides ()
 
virtual int giveDefaultIntegrationRule () const
 Returns id of default integration rule. More...
 
virtual IntegrationRulegiveDefaultIntegrationRulePtr ()
 Access method for default integration rule. More...
 
int giveNumberOfIntegrationRules ()
 
virtual IntegrationRulegiveIntegrationRule (int i)
 
std::vector< std::unique_ptr< IntegrationRule > > & giveIntegrationRulesArray ()
 
virtual int testElementExtension (ElementExtension ext)
 Tests if the element implements required extension. More...
 
int giveGlobalIPValue (FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
 
virtual double giveLengthInDir (const FloatArray &normalToCrackPlane)
 Default implementation returns length of element projection into specified direction. More...
 
virtual double giveCharacteristicLength (const FloatArray &normalToCrackPlane)
 Returns the size of element in the given direction, in some cases adjusted (e.g. More...
 
double giveCharacteristicLengthForPlaneElements (const FloatArray &normalToCrackPlane)
 Returns the size of element in the given direction if the direction is in the XY plane, otherwise gives the mean size defined as the square root of the element area. More...
 
double giveCharacteristicLengthForAxisymmElements (const FloatArray &normalToCrackPlane)
 Returns the size of an axisymmetric element in the given direction if the direction is in the XY plane, otherwise gives the mean distance vrom the symmetry axis multiplied by pi. More...
 
virtual double giveCharacteristicSize (GaussPoint *gp, FloatArray &normalToCrackPlane, ElementCharSizeMethod method)
 Returns characteristic element size for a given integration point and given direction. More...
 
virtual double giveParentElSize () const
 Returns the size (length, area or volume depending on element type) of the parent element. More...
 
virtual int computeGlobalCoordinates (FloatArray &answer, const FloatArray &lcoords)
 Computes the global coordinates from given element's local coordinates. More...
 
virtual bool computeLocalCoordinates (FloatArray &answer, const FloatArray &gcoords)
 Computes the element local coordinates from given global coordinates. More...
 
virtual int giveLocalCoordinateSystem (FloatMatrix &answer)
 Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy. More...
 
virtual void computeMidPlaneNormal (FloatArray &answer, const GaussPoint *gp)
 Computes mid-plane normal of receiver at integration point. More...
 
virtual int adaptiveMap (Domain *oldd, TimeStep *tStep)
 Initializes the internal state variables stored in all IPs according to state in given domain. More...
 
virtual int mapStateVariables (Domain &iOldDom, const TimeStep &iTStep)
 Maps the internal state variables stored in all IPs from the old domain to the new domain. More...
 
virtual int adaptiveFinish (TimeStep *tStep)
 Finishes the mapping for given time step. More...
 
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support. More...
 
template<class T >
void ipEvaluator (T *src, void(T::*f)(GaussPoint *gp))
 Integration point evaluator, loops over receiver IP's and calls given function (passed as f parameter) on them. The IP is parameter to function f. More...
 
template<class T , class S >
void ipEvaluator (T *src, void(T::*f)(GaussPoint *, S &), S &_val)
 Integration point evaluator, loops over receiver IP's and calls given function (passed as f parameter) on them. The IP is parameter to function f as well as additional array. More...
 
- Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
 Regular constructor, creates component with given number and belonging to given domain. More...
 
virtual ~FEMComponent ()
 Virtual destructor. More...
 
DomaingiveDomain () const
 
virtual void setDomain (Domain *d)
 Sets associated Domain. More...
 
int giveNumber () const
 
void setNumber (int num)
 Sets number of receiver. More...
 
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging. More...
 
virtual InterfacegiveInterface (InterfaceType t)
 Interface requesting service. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Member Functions

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. More...
 
virtual void computeConstitutiveMatrixAt (FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
 Computes constitutive matrix of receiver. More...
 
virtual void computeBmatrixAt (GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS)
 Computes the geometrical matrix of receiver in given integration point. More...
 
virtual void computeNmatrixAt (const FloatArray &iLocCoord, FloatMatrix &answer)
 Computes interpolation matrix for element unknowns. More...
 
virtual bool computeGtoLRotationMatrix (FloatMatrix &answer)
 Returns transformation matrix from global c.s. More...
 
double computeSpringInternalForce (TimeStep *tStep)
 
- Protected Member Functions inherited from oofem::StructuralElement
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. More...
 
virtual int giveNumberOfIPForMassMtrxIntegration ()
 Return desired number of integration points for consistent mass matrix computation, if required. More...
 
void condense (FloatMatrix *stiff, FloatMatrix *mass, FloatArray *load, IntArray *what)
 General service for condensation of stiffness and optionally load vector and mass or initial stress matrices of receiver. More...
 
virtual void setupIRForMassMtrxIntegration (IntegrationRule &iRule)
 Setup Integration Rule Gauss Points for Mass Matrix integration. More...
 
virtual void computePointLoadVectorAt (FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode, bool global=true)
 Computes point load vector contribution of receiver for given load (should has BoundaryLoad Base). More...
 
virtual void giveEdgeDofMapping (IntArray &answer, int iEdge) const
 Assembles edge dof mapping mask, which provides mapping between edge local DOFs and "global" element DOFs. More...
 
virtual void giveSurfaceDofMapping (IntArray &answer, int iSurf) const
 Assembles surface dof mapping mask, which provides mapping between surface local DOFs and "global" element DOFs. More...
 
virtual IntegrationRuleGetSurfaceIntegrationRule (int order)
 
virtual double computeEdgeVolumeAround (GaussPoint *gp, int iEdge)
 Computes volume related to integration point on local edge. More...
 
virtual double computeSurfaceVolumeAround (GaussPoint *gp, int iSurf)
 Computes volume related to integration point on local surface. More...
 
virtual int computeLoadGToLRotationMtrx (FloatMatrix &answer)
 Returns transformation matrix from global coordinate system to local element coordinate system for element load vector components. More...
 
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 components. More...
 
virtual int computeLoadLSToLRotationMatrix (FloatMatrix &answer, int iSurf, GaussPoint *gp)
 Returns transformation matrix from local surface c.s to element local coordinate system of load vector components. More...
 
- Protected Member Functions inherited from oofem::Element
virtual void computeGaussPoints ()
 Initializes the array of integration rules member variable. More...
 

Protected Attributes

double springConstant
 The longitudinal spring constant [Force/Length], torsional spring constant [Force*Length/Radians]. More...
 
double mass
 total mass of the spring; to be distributed to nodes More...
 
FloatArray dir
 Orientation vector. More...
 
SpringElementType mode
 Mode. More...
 
- Protected Attributes inherited from oofem::StructuralElement
std::unique_ptr< FloatArrayinitialDisplacements
 Initial displacement vector, describes the initial nodal displacements when element has been casted. More...
 
- Protected Attributes inherited from oofem::Element
int numberOfDofMans
 Number of dofmanagers. More...
 
IntArray dofManArray
 Array containing dofmanager numbers. More...
 
int material
 Number of associated material. More...
 
int crossSection
 Number of associated cross section. More...
 
IntArray bodyLoadArray
 Array containing indexes of loads (body loads and boundary loads are kept separately), that apply on receiver. More...
 
IntArray boundaryLoadArray
 
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
 List of integration rules of receiver (each integration rule contains associated integration points also). More...
 
FloatMatrix elemLocalCS
 Transformation material matrix, used in orthotropic and anisotropic materials, global->local transformation. More...
 
int activityTimeFunction
 Element activity time function. If defined, nonzero value indicates active receiver, zero value inactive element. More...
 
int globalNumber
 In parallel mode, globalNumber contains globally unique DoFManager number. More...
 
int numberOfGaussPoints
 Number of integration points as specified by nip. More...
 
elementParallelMode parallel_mode
 Determines the parallel mode of the element. More...
 
IntArray partitions
 List of partition sharing the shared element or remote partition containing remote element counterpart. More...
 
- Protected Attributes inherited from oofem::FEMComponent
int number
 Component number. More...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

Detailed Description

This class implements a simple spring element.

Its purpose is to introduce a longitudinal or torsional spring between two nodes. The spring element is defined by its spring constant and orientation.

Definition at line 56 of file springelement.h.

Member Enumeration Documentation

Defines type of spring element (longitudinal/rotational) spring.

Enumerator
SE_1D_SPRING 

1D spring element along x-axis.

SE_2D_SPRING_XY 

2D spring element in xy plane, requires D_u and D_v DOFs in each node (orientation vector should be in this plane).

SE_2D_SPRING_XZ 
SE_2D_TORSIONALSPRING_XZ 

< 2D spring element in xz plane, requires D_u and D_w DOFs in each node (orientation vector should be in this plane).

2D torsional spring element in xz plane, requires R_v DOFs in each node.

SE_3D_SPRING 

3D spring element in space, requires D_u, D_v, and D_w DOFs in each node.

SE_3D_TORSIONALSPRING 

3D torsional spring in space, requires R_u, R_v, and R_w DOFs in each node.

Definition at line 60 of file springelement.h.

Constructor & Destructor Documentation

oofem::SpringElement::SpringElement ( int  n,
Domain d 
)

Definition at line 48 of file springelement.C.

References oofem::Element::numberOfDofMans, and springConstant.

virtual oofem::SpringElement::~SpringElement ( )
inlinevirtual

Definition at line 84 of file springelement.h.

References computeLumpedMassMatrix().

Member Function Documentation

virtual int oofem::SpringElement::checkConsistency ( )
inlinevirtual

Performs consistency check.

This method is called at startup for all elements in particular domain. This method is intended to check data compatibility. Particular element types should test if compatible material and crossSection both with required capabilities are specified. Derived classes should provide their own analysis specific tests. Some printed input if incompatibility is found should be provided (error or warning member functions). Method can be also used to initialize some variables, since this is invoked after all domain components are instanciated.

Returns
Zero value if check fail, otherwise nonzero.

Reimplemented from oofem::StructuralElement.

Definition at line 102 of file springelement.h.

References printOutputAt().

virtual void oofem::SpringElement::computeBmatrixAt ( GaussPoint gp,
FloatMatrix answer,
int  lowerIndx = 1,
int  upperIndx = ALL_STRAINS 
)
inlineprotectedvirtual

Computes the geometrical matrix of receiver in given integration point.

The product of this matrix (assembled at given integration point) and element displacement vector is element strain vector. If lowerIndx and upperIndx parameters are specified, answer is formed only for strains within this interval. This will affects the size of answer.

Parameters
gpIntegration point for which answer is computed.
answerGeometric matrix of receiver.
lowerIndxIf specified, answer is formed only for strain with index equal and greater than lowerIndx. This parameter has default value 1 (answer is formed from first strain).
upperIndxIf specified, answer is formed only for strain with index less and equal than upperIndx. This parameter has default value ALL_STRAINS (answer is formed for all strains).

Implements oofem::StructuralElement.

Definition at line 124 of file springelement.h.

References oofem::FloatMatrix::clear().

virtual void oofem::SpringElement::computeConstitutiveMatrixAt ( FloatMatrix answer,
MatResponseMode  rMode,
GaussPoint gp,
TimeStep tStep 
)
inlineprotectedvirtual

Computes constitutive matrix of receiver.

Default implementation uses element cross section giveCharMaterialStiffnessMatrix service.

Parameters
answerConstitutive matrix.
rModeMaterial response mode of answer.
gpIntegration point for which constitutive matrix is computed.
tStepTime step.

Implements oofem::StructuralElement.

Definition at line 121 of file springelement.h.

References oofem::FloatMatrix::clear().

bool oofem::SpringElement::computeGtoLRotationMatrix ( FloatMatrix answer)
protectedvirtual

Returns transformation matrix from global c.s.

to local element c.s., i.e. $ r_l =T r_g $. If no transformation is necessary then answer is empty matrix and zero value is returned.

Parameters
answerComputed rotation matrix.
Returns
Nonzero if transformation is necessary, zero otherwise.

Reimplemented from oofem::Element.

Definition at line 75 of file springelement.C.

References oofem::FloatArray::at(), oofem::FloatMatrix::at(), dir, mode, oofem::FloatMatrix::resize(), SE_1D_SPRING, SE_2D_SPRING_XY, SE_2D_SPRING_XZ, SE_2D_TORSIONALSPRING_XZ, SE_3D_SPRING, and SE_3D_TORSIONALSPRING.

Referenced by computeNmatrixAt().

virtual void oofem::SpringElement::computeInitialStressMatrix ( FloatMatrix answer,
TimeStep tStep 
)
inlinevirtual

Computes initial stress matrix for linear stability problem.

Default implementation is not provided. Please note, that initial stress matrix depends on normal forces of element, corresponding engineering model must take this into account.

Parameters
answerComputed initial stress matrix.
tStepTime step.

Reimplemented from oofem::StructuralElement.

Definition at line 90 of file springelement.h.

References oofem::FloatMatrix::clear(), and giveInternalForcesVector().

void oofem::SpringElement::computeLumpedMassMatrix ( FloatMatrix answer,
TimeStep tStep 
)
virtual

Computes lumped mass matrix of receiver.

Default implementation returns lumped consistent mass matrix. Then returns lumped mass transformed into nodal coordinate system. The lumping procedure zeroes all off-diagonal members and zeroes also all diagonal members corresponding to non-displacement DOFs. Such diagonal matrix is then rescaled, to preserve the element mass. Requires the computeNmatrixAt and giveMassMtrxIntegrationgMask services to be implemented.

Parameters
answerLumped mass matrix.
tStepTime step.

Reimplemented from oofem::StructuralElement.

Definition at line 136 of file springelement.C.

References oofem::FloatMatrix::at(), mass, and oofem::FloatMatrix::resize().

Referenced by computeMassMatrix(), and ~SpringElement().

virtual void oofem::SpringElement::computeMassMatrix ( FloatMatrix answer,
TimeStep tStep 
)
inlinevirtual

Computes mass matrix of receiver.

Default implementation returns consistent mass matrix and uses numerical integration. Returns result of this->computeConsistentMassMatrix service, transformed into nodal coordinate system. Requires the computeNmatrixAt and giveMassMtrxIntegrationgMask services to be implemented.

Parameters
answerMass matrix.
tStepTime step.

Reimplemented from oofem::StructuralElement.

Definition at line 87 of file springelement.h.

References computeLumpedMassMatrix(), and computeStiffnessMatrix().

virtual void oofem::SpringElement::computeNmatrixAt ( const FloatArray iLocCoord,
FloatMatrix answer 
)
inlineprotectedvirtual

Computes interpolation matrix for element unknowns.

The order and meaning of unknowns is element dependent.

Parameters
iLocCoordLocal coordinates.
answerInterpolation matrix evaluated at gp.

Reimplemented from oofem::StructuralElement.

Definition at line 127 of file springelement.h.

References oofem::FloatMatrix::clear(), computeGtoLRotationMatrix(), and computeSpringInternalForce().

virtual int oofem::SpringElement::computeNumberOfDofs ( )
inlinevirtual

Computes or simply returns total number of element's local DOFs.

Must be defined by particular element.

Returns
Number of local DOFs of element.

Reimplemented from oofem::Element.

Definition at line 95 of file springelement.h.

References computeNumberOfGlobalDofs(), and giveDofManDofIDMask().

int oofem::SpringElement::computeNumberOfGlobalDofs ( )
virtual

Computes the total number of element's global dofs.

The transitions from global c.s. to nodal c.s. should NOT be included.

Returns
Total number of global DOFs of element.

Reimplemented from oofem::Element.

Definition at line 144 of file springelement.C.

References mode, SE_1D_SPRING, SE_2D_SPRING_XY, SE_2D_SPRING_XZ, SE_2D_TORSIONALSPRING_XZ, SE_3D_SPRING, and SE_3D_TORSIONALSPRING.

Referenced by computeNumberOfDofs().

double oofem::SpringElement::computeSpringInternalForce ( TimeStep tStep)
protected
void oofem::SpringElement::computeStiffnessMatrix ( FloatMatrix answer,
MatResponseMode  rMode,
TimeStep tStep 
)
virtual

Computes numerically stiffness matrix of receiver.

Default implementation computes element stiffness using $ K=\int_v B^{\mathrm{T}} D B \mathrm{d}V $ formulae, where $ B $ is element geometric matrix and $ D $ is material stiffness matrix. No geometrical nonlinearity is taken into account. NUmerical integration procedure uses integrationRulesArray for numerical integration. Support for reduced or selected integration is implemented. The individual integration rules are assumed to correspond to different terms from which the overall matrix is assembled.

If there is one integration rule, the full integration of all coefficients is performed. Otherwise, integration is performed using following rules. Each integration rule can specify start and end strain index of strain vector components for which is valid. It is necessary to ensure that these start and end indexes, dividing geometrical matrix into blocks, are not overlapping and that each strain component is included.

Then stiffness matrix is obtained as summation of integrals $ I_{ij}=\int_v B^{\mathrm{T}}_i D_{ij} B_j \mathrm{d}V $ where $ B_i $ is i-th block of geometrical matrix and $ D_{ij} $ is corresponding constitutive sub-matrix. The geometrical matrix is obtained using computeBmatrixAt service and the constitutive matrix is obtained using computeConstitutiveMatrixAt service. The $ I_{ij} $ integral is evaluated using such integration rule, which is valid for i-th or j-th block and has smaller number of integration points.

For higher numerical performance, only one half of stiffness matrix is computed and answer is then symmetrized. Therefore, if element matrix will be generally nonsymmetric, one must specialize this method. Finally, the result is transformed into global coordinate system (or nodal coordinate system, if it is defined).

Parameters
answerComputed stiffness matrix (symmetric).
rModeResponse mode.
tStepTime step.

Reimplemented from oofem::StructuralElement.

Definition at line 55 of file springelement.C.

References oofem::FloatMatrix::at(), oofem::FloatMatrix::resize(), and springConstant.

Referenced by computeMassMatrix().

virtual void oofem::SpringElement::computeStressVector ( FloatArray answer,
const FloatArray strain,
GaussPoint gp,
TimeStep tStep 
)
inlineprotectedvirtual

Computes the stress vector of receiver at given integration point, at time step tStep.

The nature of these stresses depends on the element's type.

Parameters
answerStress vector.
strainStrain vector.
gpIntegration point.
tStepTime step.

Implements oofem::StructuralElement.

Definition at line 119 of file springelement.h.

References oofem::FloatArray::clear().

virtual const char* oofem::SpringElement::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Reimplemented from oofem::StructuralElement.

Definition at line 114 of file springelement.h.

References initializeFrom().

void oofem::SpringElement::giveDofManDofIDMask ( int  inode,
IntArray answer 
) const
virtual

Returns dofmanager dof mask for node.

This mask defines the dofs which are used by element in node. Mask influences the code number ordering for particular node. Code numbers are ordered according to node order and dofs belonging to particular node are ordered according to this mask. If element requests dofs using node mask which are not in node then error is generated. This masking allows node to be shared by different elements with different dofs in same node. Elements local code numbers are extracted from node using this mask. Must be defined by particular element.

Parameters
inodeMask is computed for local dofmanager with inode number.
answerMask for node.

Reimplemented from oofem::Element.

Definition at line 110 of file springelement.C.

References mode, SE_1D_SPRING, SE_2D_SPRING_XY, SE_2D_SPRING_XZ, SE_2D_TORSIONALSPRING_XZ, SE_3D_SPRING, and SE_3D_TORSIONALSPRING.

Referenced by computeNumberOfDofs().

virtual Element_Geometry_Type oofem::SpringElement::giveGeometryType ( ) const
inlinevirtual

Returns the element geometry type.

This information is assumed to be of general interest, but it is required only for some specialized tasks.

Returns
Geometry type of element.

Reimplemented from oofem::Element.

Definition at line 116 of file springelement.h.

virtual const char* oofem::SpringElement::giveInputRecordName ( ) const
inlinevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 113 of file springelement.h.

References _IFT_SpringElement_Name.

void oofem::SpringElement::giveInternalForcesVector ( FloatArray answer,
TimeStep tStep,
int  useUpdatedGpRecord = 0 
)
virtual

Returns equivalent nodal forces vectors.

Useful for nonlinear analysis. Default implementation computes result as $ F=\int_v B^{\mathrm{T}} \sigma \mathrm{d}V $, where $ \sigma $ is the real element stress vector obtained using computeStressVector service (if useUpdatedGpRecord=0) or (if useUpdatedGpRecord=1) from integration point status. The geometric matrix is obtained using computeBmatrixAt service. Integration is performed using default integration rule, which should produce always valid results, assuming that strains used for computation of stresses are valid.

Parameters
answerInternal nodal forces vector.
tStepTime step.
useUpdatedGpRecordIf equal to zero, the stresses in integration points are computed (slow but safe), else if nonzero the stresses are taken directly from integration point status (should be derived from StructuralMaterialStatus) (fast, but engineering model must ensure valid status data in each integration point).

Reimplemented from oofem::StructuralElement.

Definition at line 65 of file springelement.C.

References oofem::FloatArray::at(), computeSpringInternalForce(), and oofem::FloatArray::resize().

Referenced by computeInitialStressMatrix().

IRResultType oofem::SpringElement::initializeFrom ( InputRecord ir)
virtual

Initializes receiver according to object description stored in input record.

This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
Returns
IRResultType

Reimplemented from oofem::StructuralElement.

Definition at line 158 of file springelement.C.

References _IFT_SpringElement_mass, _IFT_SpringElement_mode, _IFT_SpringElement_orientation, _IFT_SpringElement_springConstant, dir, oofem::StructuralElement::initializeFrom(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mass, mode, oofem::FloatArray::normalize(), SE_1D_SPRING, and springConstant.

Referenced by giveClassName().

virtual bool oofem::SpringElement::isCast ( TimeStep tStep)
inlinevirtual
Returns
True, if the current time is higher than the casting time of the material, otherwise false. Used from e.g. vtkxml export module to display only active elements
Note
: The element can be activated (isActivated method) before its material is actually casted. This case has to be supported by the material and can be used to simulate the casting on deformed configuration, for example. In this case, the material has to define a small stifness for solution steps before is actually casted.

Reimplemented from oofem::Element.

Definition at line 104 of file springelement.h.

void oofem::SpringElement::printOutputAt ( FILE *  file,
TimeStep tStep 
)
virtual

Prints output of receiver to stream, for given time step.

This is used for output into the standard output file.

Parameters
fileFile pointer to print to.
tStepTime step to write for.

Reimplemented from oofem::Element.

Definition at line 176 of file springelement.C.

References computeSpringInternalForce(), oofem::Element::giveLabel(), and oofem::FEMComponent::giveNumber().

Referenced by checkConsistency().

virtual void oofem::SpringElement::updateInternalState ( TimeStep tStep)
inlinevirtual

Updates element state after equilibrium in time step has been reached.

Default implementation updates all integration rules defined by integrationRulesArray member variable. Doing this, all integration points and their material statuses are updated also. All temporary history variables, which now describe equilibrium state are copied into equilibrium ones. The existing internal state is used for update.

Parameters
tStepTime step for newly reached state.
See also
Material::updateYourself
IntegrationRule::updateYourself
GaussPoint::updateYourself
Element::updateInternalState

Reimplemented from oofem::StructuralElement.

Definition at line 100 of file springelement.h.

virtual void oofem::SpringElement::updateYourself ( TimeStep tStep)
inlinevirtual

Updates element state after equilibrium in time step has been reached.

Default implementation updates all integration rules defined by integrationRulesArray member variable. Doing this, all integration points and their material statuses are updated also. All temporary history variables, which now describe equilibrium state are copied into equilibrium ones. The existing internal state is used for update.

Parameters
tStepTime step for newly reached state.
See also
Material::updateYourself
IntegrationRule::updateYourself
GaussPoint::updateYourself
Element::updateInternalState

Reimplemented from oofem::StructuralElement.

Definition at line 101 of file springelement.h.

Member Data Documentation

FloatArray oofem::SpringElement::dir
protected

Orientation vector.

Defines orientation of spring element- for spring it defines the direction of spring, for torsional spring it defines the axis of rotation.

Definition at line 78 of file springelement.h.

Referenced by computeGtoLRotationMatrix(), and initializeFrom().

double oofem::SpringElement::mass
protected

total mass of the spring; to be distributed to nodes

Definition at line 73 of file springelement.h.

Referenced by computeLumpedMassMatrix(), and initializeFrom().

SpringElementType oofem::SpringElement::mode
protected
double oofem::SpringElement::springConstant
protected

The longitudinal spring constant [Force/Length], torsional spring constant [Force*Length/Radians].

Definition at line 71 of file springelement.h.

Referenced by computeSpringInternalForce(), computeStiffnessMatrix(), initializeFrom(), and SpringElement().


The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:41 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011