67 #include "domain/mesh/MeshComponent.h" 68 #include "preprocessor/MeshingParams.h" 69 #include "domain/mesh/element/utils/RayleighDampingFactors.h" 70 #include "utility/matrix/Matrix.h" 71 #include "domain/mesh/node/NodeTopology.h" 72 #include "utility/matrices/3d_arrays/BoolArray3d.h" 95 class NodePtrsWithIDs;
117 inline static void setDeadSRF(
const double &d)
123 static std::deque<Matrix> theMatrices;
124 static std::deque<Vector> theVectors1;
125 static std::deque<Vector> theVectors2;
127 void compute_damping_matrix(
Matrix &)
const;
149 Element(
int tag,
int classTag);
170 virtual double getLength(
bool initialGeometry=
true)
const;
171 virtual double getArea(
bool initialGeometry=
true)
const;
172 virtual double getVolume(
bool initialGeometry=
true)
const;
174 virtual void setIdNodes(
const std::vector<int> &inodes);
176 virtual void setIdNode(
const int &i,
const int &inode);
205 virtual const Matrix &getInitialStiff(
void)
const= 0;
217 virtual int addInertiaLoadToUnbalance(
const Vector &accel)=0;
255 virtual int addInertiaLoadSensitivityToUnbalance(
const Vector &accel,
bool tag);
260 virtual const Vector &getResistingForceSensitivity(
int gradNumber);
261 virtual const Matrix &getInitialStiffSensitivity(
int gradNumber);
262 virtual const Matrix &getDampSensitivity(
int gradNumber);
263 virtual const Matrix &getMassSensitivity(
int gradNumber);
264 virtual int commitSensitivity(
int gradNumber,
int numGrads);
281 std::deque<Pos3d>
getPosNodes(
bool initialGeometry=
true)
const;
284 Pos3dArray3d getPoints(
const size_t &ni,
const size_t &nj,
const size_t &nk,
bool initialGeometry=
true);
285 bool In(
const GeomObj3d &,
const double &factor= 1.0,
const double &tol= 0.0)
const;
286 bool Out(
const GeomObj3d &,
const double &factor= 1.0,
const double &tol= 0.0)
const;
287 bool In(
const GeomObj2d &,
const double &factor= 1.0,
const double &tol= 0.0)
const;
288 bool Out(
const GeomObj2d &,
const double &factor= 1.0,
const double &tol= 0.0)
const;
289 bool Crosses(
const GeomObj3d &,
const double &factor= 1.0,
const double &tol= 0.0)
const;
290 bool Crosses(
const GeomObj2d &,
const double &factor= 1.0,
const double &tol= 0.0)
const;
291 virtual double getDist2(
const Pos2d &p,
bool initialGeometry=
true)
const;
292 virtual double getDist(
const Pos2d &p,
bool initialGeometry=
true)
const;
293 virtual double getDist2(
const Pos3d &p,
bool initialGeometry=
true)
const;
294 virtual double getDist(
const Pos3d &p,
bool initialGeometry=
true)
const;
337 virtual boost::python::list
getValuesAtNodes(
const std::string &,
bool silent=
false)
const;
339 std::set<SetBase *>
get_sets(
void)
const;
343 boost::python::dict
getPyDict(
void)
const;
344 void setPyDict(
const boost::python::dict &);
virtual const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: Element.cpp:487
const Material * get_material_ptr(const std::string &) const
Return a pointer to the material that corresponds to the name.
Definition: Element.cpp:1077
virtual int revertToStart(void)
Reverts the element to its initial state.
Definition: Element.cpp:148
virtual void computeTributaryAreas(bool initialGeometry=true) const
Compute tributary areas for each element node.
Definition: Element.cpp:1321
virtual void zeroLoad(void)
Zeroes the loads over the element.
Definition: Element.cpp:371
void resetTributaries(void) const
Resets tributary areas of connected nodes.
Definition: Element.cpp:1288
virtual double getDist2(const Pos2d &p, bool initialGeometry=true) const
Returns the squared distance from the element to the point being passed as parameter.
Definition: Element.cpp:1367
int find(const Node *) const
Returns the index of the node whose pointer is being passed as parameter.
Definition: Element.cpp:297
std::vector< const Node * > NodesEdge
Nodes on an element edge.
Definition: Element.h:116
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: Element.cpp:1655
Float vector abstraction.
Definition: Vector.h:94
Natural coordinates of an element's particle.
Definition: ParticlePos3d.h:41
int sendData(Communicator &comm)
Sends object members through the communicator argument.
Definition: Element.cpp:1628
const Vector & getNodeResistingForceIncInertia(const size_t &iNod) const
Returns the generalized force (including inertia forces) of the element over the node identified by t...
Definition: Element.cpp:592
Base class for grids of bool in 3D (used to express if something exists or not in a (layer...
Definition: BoolArray3d.h:34
virtual int getNumEdges(void) const
Returns number of edges (it must be overloaded for elements that have nodes inside edges...
Definition: Element.cpp:119
Communication parameters between processes.
Definition: Communicator.h:66
virtual int getVtkCellType(void) const
Interfaz con VTK.
Definition: Element.cpp:936
virtual ID getEdgesNode(const Node *) const
Returns the edges of the element that ends in the node being passed as parameter. ...
Definition: Element.cpp:985
virtual ParticlePos3d getNaturalCoordinates(const Pos3d &, bool initialGeometry=true) const
Return the natural coordinates that correspond to the given position.
Definition: Element.cpp:905
virtual Vector3d getBaseVector3d(size_t i, bool initialGeometry=true) const
Returns a base vector in the direction of the local i-th axis from the i-th row of the matrix returne...
Definition: Element.cpp:1204
Base class response objects.
Definition: Response.h:81
Matrix Kc
pointer to hold last committed matrix if needed for rayleigh damping
Definition: Element.h:140
virtual Element * getCopy(void) const =0
Virtual constructor.
virtual size_t getDimension(void) const
Returns the element dimension (0, 1, 3 or 3).
Definition: Element.cpp:183
std::deque< Pos3d > getPosNodes(bool initialGeometry=true) const
Returns the coordinates of the nodes.
Definition: Element.cpp:1142
bool Crosses(const GeomObj3d &, const double &factor=1.0, const double &tol=0.0) const
Return true if the element cross (i.e.
Definition: Element.cpp:1163
boost::python::list getMaterialNamesPy(void) const
Return the names of the material(s) of the element in a Python list.
Definition: Element.cpp:1584
Finite element model generation tools.
Definition: Preprocessor.h:59
virtual std::set< std::string > getMaterialNames(void) const
Return the names of the material(s) of the element.
Definition: Element.cpp:1574
virtual double getLength(bool initialGeometry=true) const
Return the element length.
Definition: Element.cpp:193
virtual const Vector & getResistingForce(void) const =0
Returns the resisting force vector for the element.
Posición en dos dimensiones.
Definition: Pos2d.h:41
const Matrix & getCooNodes(void) const
Returns the coordinates of the nodes.
Definition: Element.cpp:1137
int recvData(const Communicator &comm)
Receives object members through the communicator argument.
Definition: Element.cpp:1637
virtual Vector3d getIVector3d(bool initialGeometry=true) const
Returns a vector in the direction of the local x axis from the first row of the matrix returned by ge...
Definition: Element.cpp:1213
virtual void setIdNodes(const std::vector< int > &inodes)
Set the nodes.
Definition: Element.cpp:263
void add_to_sets(std::set< SetBase *> &)
Adds the element to the sets being passed as parameters.
Definition: Element.cpp:1052
Three-dimensional coordinate system defined in a three-dimensional space.
Definition: Rect3d3dCooSys.h:33
virtual double getTributaryAreaByTag(const int &) const
Returns the tributary area corresponding to the node.
Definition: Element.cpp:1333
virtual Vector getInterpolationFactors(const ParticlePos3d &) const
Returns interpolation factors for a material point.
Definition: Element.cpp:916
const Vector & getNodeResistingForceIncInertiaByTag(const int &) const
Returns the generalized force (including inertia forces) of the element over the node identified by t...
Definition: Element.cpp:627
Base class for materials.
Definition: Material.h:93
virtual int setParameter(const std::vector< std::string > &argv, Parameter ¶m)
Sets the value param to the parameter argv.
Definition: Element.cpp:735
Base class for nodes and elements (mesh components).
Definition: MeshComponent.h:44
virtual const Matrix & getTangentStiff(void) const =0
Return the tangent stiffness matrix.
int setMaterialParameter(Material *, const std::vector< std::string > &, const size_t &, Parameter &)
Set the value of a parameter of the material.
Definition: Element.cpp:1112
Matrix getTotalMass(void) const
Returns the sum of the mass matrices corresponding to the nodes.
Definition: Element.cpp:457
virtual void setIdNode(const int &i, const int &inode)
Set the i-th node.
Definition: Element.cpp:285
Vector of integers.
Definition: ID.h:95
Vector getCenterOfMassCoordinates(bool initialGeometry=true) const
Returns the coordinates of the center of mass of the element.
Definition: Element.cpp:1447
virtual double getTributaryVolume(const Node *) const
Returns the tributary volume corresponding to the node being passed as parameter. ...
Definition: Element.cpp:1351
std::set< int > getEdgesNodes(const NodePtrSet &) const
Returns the element edges that have both ends in the node set being passed as parameter.
Definition: Element.cpp:996
static double dead_srf
Stress reduction factor for foozen elements.
Definition: Element.h:115
virtual double getTributaryArea(const Node *) const
Returns the tributary area corresponding to the node.
Definition: Element.cpp:1329
virtual int addResistingForceToNodalReaction(bool inclInertia)
Adds nodal reactions.
Definition: Element.cpp:806
virtual void computeTributaryLengths(bool initialGeometry=true) const
Computes the tributary lengths that corresponds to each node of the element.
Definition: Element.cpp:1299
boost::python::list getConnectedElementTags(void) const
Return a python list containing the tags of the elements that are connected with this node...
Definition: Element.cpp:1553
Three-dimensional array of pointers to elements.
Definition: ElemPtrArray3d.h:47
virtual double getTributaryVolumeByTag(const int &) const
Returns the tributary volume corresponding to the node which tag se pasa as parameter.
Definition: Element.cpp:1356
Base de las clases Set y SetEstruct.
Definition: SetBase.h:51
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: Element.cpp:738
Base class for the finite elements.
Definition: Element.h:112
virtual Pos2d getProjection(const Pos2d &p, bool initialGeometry=true) const
Return the projection of the argument on the element.
Definition: Element.cpp:1413
void replaceNode(Node *, Node *)
Replace the old node by the new one.
Definition: Element.cpp:303
virtual ElementalLoad * createInertiaLoad(const Vector &)
Creates the inertia load that corresponds to the acceleration argument.
Definition: Element.cpp:359
const Vector & getNodeResistingForceByTag(const int &) const
Returns the generalized force of the element over the node identified by the given integer...
Definition: Element.cpp:618
virtual double getDist(const Pos2d &p, bool initialGeometry=true) const
Returns the the distance from the element to the point being passed as parameter. ...
Definition: Element.cpp:1380
boost::python::list getConnectedElementsPy(void)
Return a python list of pointers to the elements that are connected with this node.
Definition: Element.cpp:1531
Base class for the two-dimensional geometric objects.
Definition: GeomObj2d.h:37
virtual const GaussModel & getGaussModel(void) const
Returns the Gauss integration model of the element.
Definition: Element.cpp:945
RayleighDampingFactors rayFactors
Rayleigh damping factors.
Definition: Element.h:138
virtual const Matrix & getDamp(void) const
Returns the damping matrix.
Definition: Element.cpp:396
void dumpTributaries(const std::vector< double > &) const
Adds to the tributary magnitude of each node the vector being passed as parameter.
Definition: Element.cpp:1293
static void setDeadSRF(const double &d)
Assigns Stress Reduction Factor for element deactivation.
Definition: Element.h:118
virtual int commitState(void)
Commit the current element state.
Definition: Element.cpp:126
double MinCooNod(int i) const
Returns the minimum value of the i coordinate of the element nodes.
Definition: Element.cpp:1133
Default tag.
Definition: DefaultTag.h:37
std::set< const Element * > getConnectedElements(void) const
Return a set of pointers to the elements that are connected with this node.
Definition: Element.cpp:1488
virtual Pos3d getCenterOfMassPosition(bool initialGeometry=true) const
Returns the coordinates of the center of gravity of the element.
Definition: Element.cpp:1436
Matrix getNodeMatrixComponents(const Node *, const Matrix &) const
Returns the components of the matrix relative to the node.
Definition: Element.cpp:548
virtual Vector3d getJVector3d(bool initialGeometry=true) const
Returns a vector in the direction of the local y axis from the second row of the matrix returned by g...
Definition: Element.cpp:1219
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: Element.cpp:1646
virtual int update(void)
Updates the element state.
Definition: Element.cpp:140
virtual Vector3d getKVector3d(bool initialGeometry=true) const
Returns a vector in the direction of the local z axis from the third row of the matrix returned by ge...
Definition: Element.cpp:1225
virtual int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: Element.cpp:741
double getTotalMassComponent(const int &) const
Return the mass matrix component for the DOF argument.
Definition: Element.cpp:473
virtual Response * setResponse(const std::vector< std::string > &argv, Information &eleInformation)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: Element.cpp:707
virtual Rect3d3dCooSys getCooSys(bool) const
Returns the element coordinate system from the matrix returned by getLocalAxes.
Definition: Element.cpp:1231
Vector load
vector for applied nodal loads.
Definition: Element.h:137
virtual int revertToLastCommit(void)=0
Revert to the last committed state.
virtual double getTributaryLength(const Node *) const
Returns the tributary length corresponding to the node being passed as parameter. ...
Definition: Element.cpp:1308
static DefaultTag & getDefaultTag(void)
Returns next element's tag value by default.
Definition: Element.cpp:114
double MaxCooNod(int i) const
Returns the maximum value of the i coordinate of the element nodes.
Definition: Element.cpp:1129
bool Out(const GeomObj3d &, const double &factor=1.0, const double &tol=0.0) const
Return true if the element is outside the given object.
Definition: Element.cpp:1150
virtual int getNumDOF(void) const =0
return the number of DOF associated with the element.
virtual int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: Element.cpp:723
Base class for Gauss integration models.
Definition: GaussModel.h:41
const Vector & getNodeResistingComponents(const size_t &, const Vector &) const
Returns the generalized force of the element over the iNod-th node.
Definition: Element.cpp:572
Vector getEquivalentStaticLoad(int mode, const double &) const
Returns the equivalent static load for the mode being passed as parameter and the acceleration that c...
Definition: Element.cpp:636
const Vector & getNodeResistingForce(const size_t &iNod) const
Returns the generalized force of the element over the iNod-th node.
Definition: Element.cpp:584
Multiblock topology object (point, line, face, block,...).
Definition: EntMdlr.h:55
std::set< SetBase * > get_sets(void) const
Returns the sets to which the element belongs.
Definition: Element.cpp:1035
Rayleigh damping factors.
Definition: RayleighDampingFactors.h:59
Twp-dimensional rectangular coordinate system defined in a two-dimensional space. ...
Definition: Rect2d2dCooSys.h:33
virtual int getEdgeNodes(const Node *, const Node *) const
Returns the edge of the element that ends in the nodes being passed as parameters.
Definition: Element.cpp:965
virtual double getTributaryLengthByTag(const int &) const
Returns the tributary length corresponding to the node which tag se pasa as parameter.
Definition: Element.cpp:1313
structured set, i.
Definition: SetEstruct.h:48
ID getEdgesNodeByTag(const int &) const
Returns the edges of the element that have an en in the node with the tag being passed as parameter...
Definition: Element.cpp:1016
Position array in a three-dimensional space.
Definition: Pos3dArray3d.h:37
virtual BoolArray3d getNodePattern(void) const
Return a grid of booleans, one for each of the element nodes.
Definition: Element.cpp:1460
Node pointer container for elements.
Definition: NodePtrsWithIDs.h:46
Posición en tres dimensiones.
Definition: Pos3d.h:44
virtual ID getLocalIndexNodesEdge(const size_t &i) const
Returns the local indexes of the element nodes that lie over the i-th edge.
Definition: Element.cpp:1025
virtual const Matrix & getMass(void) const
Returns the mass matrix.
Definition: Element.cpp:417
Three-dimensional array of pointers to nodes.
Definition: NodePtrArray3d.h:53
virtual Matrix getLocalAxes(bool initialGeometry=true) const
Returns a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: Element.cpp:1174
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual boost::python::list getValuesAtNodes(const std::string &, bool silent=false) const
Return a python list with the values of the argument property at element nodes.
Definition: Element.cpp:1602
virtual void computeTributaryVolumes(bool initialGeometry=true) const
Computes the tributary volumes that corresponds to each node of the element.
Definition: Element.cpp:1342
Matrix of floats.
Definition: Matrix.h:111
virtual Rect2d2dCooSys getCooSys2d(bool) const
Returns the element coordinate system from the matrix returned by getLocalAxes.
Definition: Element.cpp:1252
virtual bool isSubdomain(void)
Returns true if the element is a subdomain.
Definition: Element.cpp:690
virtual Vector getBaseVector(size_t i, bool initialGeometry=true) const
Returns a base vector in the direction of the local i-th axis from the i-th row of the matrix returne...
Definition: Element.cpp:1187
Parameter.
Definition: Parameter.h:68
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: Element.cpp:343
virtual int getNumExternalNodes(void) const =0
return the number of external nodes associated with the element.
virtual double getCharacteristicLength(void) const
Return the characteristic length of this element.
Definition: Element.cpp:228
const Vector & getRayleighDampingForces(void) const
Returns element Rayleigh damping forces.
Definition: Element.cpp:654
Base class for loads over elements.
Definition: ElementalLoad.h:79
Pos3d getPosNode(const size_t &i, bool initialGeometry=true) const
Returns the position of the i-th node.
Definition: Element.cpp:1273
Element(int tag, int classTag)
Constructor that takes the element's unique tag and the number of external nodes for the element...
Definition: Element.cpp:104
virtual int setRayleighDampingFactors(const RayleighDampingFactors &rF) const
Set Rayleigh damping factors.
Definition: Element.cpp:155
void copySetsFrom(const Element &)
Add this element to all the sets containing the given one.
Definition: Element.cpp:1068
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
Mesh node.
Definition: Node.h:112
Pos3dArray3d getPoints(const size_t &ni, const size_t &nj, const size_t &nk, bool initialGeometry=true)
Returns a grid of points distributed along the element.
Definition: Element.cpp:1278
virtual int resetNodalCoordinates(void)
Reinitialize values that depend on the nodal coordinates (for example after a "manual" change in the ...
Definition: Element.cpp:334
virtual ElemPtrArray3d put_on_mesh(const NodePtrArray3d &, meshing_dir) const
Places the element on the mesh.
Definition: Element.cpp:1471
bool In(const GeomObj3d &, const double &factor=1.0, const double &tol=0.0) const
Return true if the element is inside the given object.
Definition: Element.cpp:1146
Vector en tres dimensiones.
Definition: Vector3d.h:39
virtual NodesEdge getNodesEdge(const size_t &) const
Returns the nodes of the element edge.
Definition: Element.cpp:954
Matrix getEquivalentStaticNodalLoads(int mode, const double &) const
Returns the equivalent static load on each node for the mode being passed as parameter and the corres...
Definition: Element.cpp:647
std::vector< int > getIdxNodes(void) const
Return the indexes of the nodes (used when creating VTK meshes).
Definition: Element.cpp:1125
virtual double getVolume(bool initialGeometry=true) const
Return the element volume.
Definition: Element.cpp:213
virtual double getArea(bool initialGeometry=true) const
Return the element area.
Definition: Element.cpp:203
Clase base para los objetos en tres dimensiones.
Definition: GeomObj3d.h:43