33 #include "domain/mesh/MeshComponentContainer.h" 34 #include "utility/matrix/Vector.h" 35 #include "NodeLockers.h" 36 #include "solution/graph/graph/Graph.h" 37 #include "node/KDTreeNodes.h" 38 #include "element/utils/KDTreeElements.h" 48 class SingleDomEleIter;
49 class SingleDomNodIter;
54 class FEM_ObjectBroker;
55 class TaggedObjectStorage;
56 class RayleighDampingFactors;
68 static const double reactionValueThreshold;
69 bool eleGraphBuiltFlag;
70 bool nodeGraphBuiltFlag;
73 Graph theElementGraph;
75 TaggedObjectStorage *theNodes;
78 std::vector<std::string> coordinateNames;
79 std::string unitsNames;
81 TaggedObjectStorage *theElements;
86 int tagNodeCheckReactionException;
90 void alloc_containers(
void);
91 void alloc_iters(
void);
92 bool check_containers(
void)
const;
93 void init_bounds(
void);
94 void update_bounds(
const Vector &);
95 void add_node_to_domain(
Node *);
96 void add_element_to_domain(
Element *);
97 void add_nodes_to_domain(
void);
98 void add_elements_to_domain(
void);
109 Mesh(
CommandEntity *owr,TaggedObjectStorage &theNodesStorage, TaggedObjectStorage &theElementsStorage);
135 inline const TaggedObjectStorage *nodes(
void)
const 137 inline TaggedObjectStorage *nodes(
void)
142 inline const TaggedObjectStorage *elements(
void)
const 143 {
return theElements; }
144 inline TaggedObjectStorage *elements(
void)
145 {
return theElements; }
149 inline const NodeLockers &getNodeLockers(
void)
const 176 inline const std::vector<std::string> &getCoordinateNames(
void)
const 177 {
return coordinateNames; }
178 inline std::string getUnitsNames(
void)
const 179 {
return unitsNames; }
205 virtual void Print(std::ostream &s,
int flag =0)
const;
206 friend std::ostream &operator<<(std::ostream &,
const Mesh &);
210 boost::python::dict
getPyDict(
void)
const;
211 void setPyDict(
const boost::python::dict &);
214 virtual double getNodeDisp(
int nodeTag,
int dof,
int &errorFlag);
226 std::ostream &operator<<(std::ostream &,
const Mesh &);
void clearEigenvectors(void)
Remove the stored eigenvectors.
Definition: Mesh.cc:1445
void zeroLoads(void)
Loop over nodes and elements getting them to first zero their loads.
Definition: Mesh.cc:849
void setNodeReactionException(const int &)
Assign the exception for reaction checking (see Mesh::checkNodalReactions).
Definition: Mesh.cc:1316
Float vector abstraction.
Definition: Vector.h:94
virtual int revertToStart(void)
Return the mesh into its initial state.
Definition: Mesh.cc:926
static void setDeadSRF(const double &)
Assigns Stress Reduction Factor for element deactivation.
Definition: Mesh.cc:199
virtual int revertToLastCommit(void)
Returns the mesh to its last committed state.
Definition: Mesh.cc:906
Vector getEffectiveModalMasses(const int &numModes) const
Returns the masas modales efectivas.
Definition: Mesh.cc:804
void clearDOF_GroupPtr(void)
Clears the pointers to node DOF groups.
Definition: Mesh.cc:436
virtual double getNodeDisp(int nodeTag, int dof, int &errorFlag)
Returns the component of the displacement of the node which the tag is being passed as parameter...
Definition: Mesh.cc:1288
boost::python::list normalizeEigenvectors(void)
Normalize the node eigenvectors for all the computed modes.
Definition: Mesh.cc:1428
Communication parameters between processes.
Definition: Communicator.h:66
NodeLocker container.
Definition: NodeLockers.h:42
bool existNode(int tag)
Returns true if the mesh has a node with the tag being passed as parameter.
Definition: Mesh.cc:540
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags de los miembros of the clase.
Definition: Mesh.cc:1179
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: Mesh.cc:1256
Definition: SingleDomNodIter.h:71
size_t getNumDeadNodes(void) const
Returns the number of inactive nodes on the mesh.
Definition: Mesh.cc:680
int initialize(void)
Compute elements initial stiff.
Definition: Mesh.cc:863
size_t getNumLiveNodes(void) const
Returns the number of active nodes on the mesh.
Definition: Mesh.cc:665
Matrix getTotalMass(void) const
Return the total mass matrix.
Definition: Mesh.cc:813
Node * getNearestNode(const Pos3d &p)
Returns the node closest to the point being passed as parameter.
Definition: Mesh.cc:566
virtual void clearAll(void)
Deletes from domain all its components (nodes, elements, loads and constraints).
Definition: Mesh.cc:172
Iterator over an element container.
Definition: ElementIter.h:74
virtual int commit(void)
Commits mesh state.
Definition: Mesh.cc:889
virtual const Vector & getPhysicalBounds(void)
Definition: Mesh.cc:731
size_t getNumFrozenNodes(void) const
Returns the number of frozen nodes on the mesh.
Definition: Mesh.cc:695
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
virtual int getNumNodes(void) const
Returns the number of nodes.
Definition: Mesh.cc:631
size_t getNumDeadElements(void) const
Returns the number of inactive elements on the mesh.
Definition: Mesh.cc:650
virtual Element * getElement(int tag)
Returns a pointer to the element identified by the tag being passed as parameter. ...
Definition: Mesh.cc:502
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: Mesh.cc:1186
int getDefaultElementTag(void) const
Get the default tag for the next element.
Definition: Mesh.cc:485
const double getEffectiveModalMass(int mode) const
Return the masa modal efectiva corresponding to the mode i.
Definition: Mesh.cc:792
virtual int buildEleGraph(Graph &theEleGraph)
Builds the element's graph.
Definition: Mesh.cc:1004
Base class for the finite elements.
Definition: Element.h:112
virtual ~Mesh(void)
Destructor.
Definition: Mesh.cc:194
virtual Node * getNode(int tag)
Returns a pointer to the node which tag being passed as parameter.
Definition: Mesh.cc:544
virtual bool addElement(Element *)
Appends to the mesh the element being passed as parameter.
Definition: Mesh.cc:241
void melt_alive_nodes(const std::string &nmbLocker)
Clears the constraints over activated nodes previously created by the freeze method.
Definition: Mesh.cc:607
bool existElement(int tag)
Returns true if the mesh has an element with the tag being passed as parameter.
Definition: Mesh.cc:497
void free_mem(void)
Frees memory occupied by mesh components.
Definition: Mesh.cc:65
bool checkNodalReactions(const double &)
Checks that all free nodes have zero reactions.
Definition: Mesh.cc:1321
Objet that can execute python scripts.
Definition: CommandEntity.h:40
The Graph class provides the abstraction of a graph.
Definition: Graph.h:94
virtual NodeIter & getNodes(void)
Returns an iterator a the nodes del domain.
Definition: Mesh.cc:459
Element * getNearestElement(const Pos3d &p)
Returns a pointer to the nearest element to the point being passed as parameter.
Definition: Mesh.cc:526
virtual bool removeElement(int tag)
Removes from the domain the element identified by the tag being passed as parameter.
Definition: Mesh.cc:369
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: Mesh.cc:1271
virtual Graph & getElementGraph(void)
Builds the elements graph of the mesh (if not built yet) and returns a reference to it...
Definition: Mesh.cc:743
void setGraphBuiltFlags(const bool &f)
Returns true if the modelo ha cambiado.
Definition: Mesh.cc:970
int update(void)
Update the element's state.
Definition: Mesh.cc:950
Base class for the element and constraint containers.
Definition: MeshComponentContainer.h:41
int getDefaultNodeTag(void) const
Get the default tag for the next node.
Definition: Mesh.cc:473
virtual int buildNodeGraph(Graph &theNodeGraph)
Builds the node graph.
Definition: Mesh.cc:1116
size_t getNumFreeNodes(void) const
Returns the number of free nodes on the mesh.
Definition: Mesh.cc:710
Rayleigh damping factors.
Definition: RayleighDampingFactors.h:59
virtual ElementIter & getElements(void)
Returns an iterator to the mesh elements.
Definition: Mesh.cc:445
size_t getNumLiveElements(void) const
Returns the number of active elements on the mesh.
Definition: Mesh.cc:635
Posición en tres dimensiones.
Definition: Pos3d.h:44
virtual void Print(std::ostream &s, int flag=0) const
Imprime el domain.
Definition: Mesh.cc:977
double getTotalMassComponent(const int &) const
Return the total mass matrix component for the DOF argument.
Definition: Mesh.cc:836
k-d tree for searching the nearest element to a given position.
Definition: KDTreeElements.h:63
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual Graph & getNodeGraph(void)
Builds (if needed) the graph of the domain nodes and returns a reference to it.
Definition: Mesh.cc:772
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: Mesh.cc:1225
Iterator over the nodes.
Definition: NodeIter.h:74
Matrix of floats.
Definition: Matrix.h:111
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: Mesh.cc:1211
Definition: SingleDomEleIter.h:72
void freeze_dead_nodes(const std::string &nmbLocker)
Freezes inactive nodes (prescribes zero displacement for all DOFs on inactive nodes).
Definition: Mesh.cc:583
virtual int getNumElements(void) const
Returns the number of elements.
Definition: Mesh.cc:627
double getEigenvectorsMaxNormInf(int mode) const
Return the maximum infinity norm of the nodes eigenvectors.
Definition: Mesh.cc:1372
virtual int setRayleighDampingFactors(const RayleighDampingFactors &rF)
Set Rayleigh damping factors.
Definition: Mesh.cc:873
Mesh node.
Definition: Node.h:111
k-d tree for searching the nearest node to a given position.
Definition: KDTreeNodes.h:62
virtual int calculateNodalReactions(bool inclInertia, const double &)
Calculate nodal reaction forces and moments.
Definition: Mesh.cc:1351
Finite element mesh.
Definition: Mesh.h:65
virtual bool removeNode(int tag)
Remove from mesh the node identified by the argument.
Definition: Mesh.cc:405
virtual int setMass(const Matrix &mass, int nodeTag)
Set the mass matrix for the node identified by the argument.
Definition: Mesh.cc:1307
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: Mesh.cc:1197
virtual bool addNode(Node *)
Adds to the domain the node being passed as parameter.
Definition: Mesh.cc:334