32 #include "domain/mesh/MeshComponentContainer.h" 33 #include "utility/matrix/Vector.h" 34 #include "NodeLockers.h" 35 #include "solution/graph/graph/Graph.h" 36 #include "node/KDTreeNodes.h" 37 #include "element/utils/KDTreeElements.h" 47 class SingleDomEleIter;
48 class SingleDomNodIter;
53 class FEM_ObjectBroker;
54 class TaggedObjectStorage;
55 class RayleighDampingFactors;
67 bool eleGraphBuiltFlag;
68 bool nodeGraphBuiltFlag;
71 Graph theElementGraph;
73 TaggedObjectStorage *theNodes;
76 std::vector<std::string> nombresCoordenadas;
77 std::string nombreUnidades;
79 TaggedObjectStorage *theElements;
84 int tagNodeCheckReactionException;
88 void alloc_containers(
void);
89 void alloc_iters(
void);
90 bool check_containers(
void)
const;
91 void init_bounds(
void);
92 void update_bounds(
const Vector &);
93 void add_node_to_domain(
Node *);
94 void add_element_to_domain(
Element *);
95 void add_nodes_to_domain(
void);
96 void add_elements_to_domain(
void);
106 Mesh(CommandEntity *owr);
107 Mesh(CommandEntity *owr,TaggedObjectStorage &theNodesStorage, TaggedObjectStorage &theElementsStorage);
108 Mesh(CommandEntity *owr,TaggedObjectStorage &theStorageType);
131 inline const TaggedObjectStorage *nodes(
void)
const 133 inline TaggedObjectStorage *nodes(
void)
135 inline const TaggedObjectStorage *elements(
void)
const 136 {
return theElements; }
137 inline TaggedObjectStorage *elements(
void)
138 {
return theElements; }
141 inline const NodeLockers &getNodeLockers(
void)
const 168 inline const std::vector<std::string> &getNombresCoordenadas(
void)
const 169 {
return nombresCoordenadas; }
170 inline std::string getNombreUnidades(
void)
const 171 {
return nombreUnidades; }
193 virtual void Print(std::ostream &s,
int flag =0);
194 friend std::ostream &operator<<(std::ostream &,
Mesh &);
200 virtual double getNodeDisp(
int nodeTag,
int dof,
int &errorFlag);
208 std::ostream &operator<<(std::ostream &,
Mesh &);
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: Mesh.cc:1063
void zeroLoads(void)
Loop over nodes and elements getting them to first zero their loads.
Definition: Mesh.cc:731
void setNodeReactionException(const int &)
Assign the exception for reaction checking (see Mesh::checkNodalReactions).
Definition: Mesh.cc:1147
Float vector abstraction.
Definition: Vector.h:93
virtual int revertToStart(void)
Return the mesh into its initial state.
Definition: Mesh.cc:808
static void setDeadSRF(const double &)
Assigns Stress Reduction Factor for element deactivation.
Definition: Mesh.cc:189
virtual int revertToLastCommit(void)
Returns the mesh to its last commited state.
Definition: Mesh.cc:788
Vector getEffectiveModalMasses(const int &numModes) const
Returns the masas modales efectivas.
Definition: Mesh.cc:722
void clearDOF_GroupPtr(void)
Clears the pointers to node DOF groups.
Definition: Mesh.cc:400
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: Mesh.cc:1102
virtual double getNodeDisp(int nodeTag, int dof, int &errorFlag)
Returns the component of the displacement of the node wich the tag is being passed as parameter...
Definition: Mesh.cc:1119
NodeLocker container.
Definition: NodeLockers.h:41
bool existNode(int tag)
Returns true if the mesh has a node with the tag being passed as parameter.
Definition: Mesh.cc:466
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags de los miembros of the clase.
Definition: Mesh.cc:1056
Definition: SingleDomNodIter.h:70
size_t getNumDeadNodes(void) const
Returns the number of inactive nodes on the mesh.
Definition: Mesh.cc:600
int initialize(void)
Inicializa.
Definition: Mesh.cc:745
size_t getNumLiveNodes(void) const
Returns the number of active nodes on the mesh.
Definition: Mesh.cc:585
Node * getNearestNode(const Pos3d &p)
Returns the node closest to the point being passed as parameter.
Definition: Mesh.cc:492
virtual void clearAll(void)
Deletes from domain all its components (nodes, elements, loads and constraints).
Definition: Mesh.cc:167
Iterator over an element container.
Definition: ElementIter.h:73
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: Mesh.cc:1088
virtual int commit(void)
Commits mesh state.
Definition: Mesh.cc:771
virtual const Vector & getPhysicalBounds(void)
Definition: Mesh.cc:651
size_t getNumFrozenNodes(void) const
Returns the number of frozen nodes on the mesh.
Definition: Mesh.cc:615
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
virtual int getNumNodes(void) const
Returns the number of nodes.
Definition: Mesh.cc:551
virtual ElementIter & getElements()
Returns an iterator to the mesh elements.
Definition: Mesh.cc:409
size_t getNumDeadElements(void) const
Returns the number of inactive elements on the mesh.
Definition: Mesh.cc:570
virtual Element * getElement(int tag)
Returns a pointer to the element identified by the tag being passed as parameter. ...
Definition: Mesh.cc:428
virtual NodeIter & getNodes()
Returns an iterator a the nodes del domain.
Definition: Mesh.cc:416
const double getEffectiveModalMass(int mode) const
Return the masa modal efectiva corresponding to the mode i.
Definition: Mesh.cc:710
virtual int buildEleGraph(Graph &theEleGraph)
Builds the element's graph.
Definition: Mesh.cc:882
Base class for the finite elements.
Definition: Element.h:109
virtual ~Mesh(void)
Destructor.
Definition: Mesh.cc:184
virtual Node * getNode(int tag)
Returns a pointer to the node which tag being passed as parameter.
Definition: Mesh.cc:470
virtual bool addElement(Element *)
Appends to the mesh the element being passed as parameter.
Definition: Mesh.cc:230
void melt_alive_nodes(const std::string &nmbLocker)
Clears the constraints over activated nodes previously created by the freeze method.
Definition: Mesh.cc:528
bool existElement(int tag)
Returns true if the mesh has an element with the tag being passed as parameter.
Definition: Mesh.cc:423
void free_mem(void)
Frees memory occupied by mesh components.
Definition: Mesh.cc:62
bool checkNodalReactions(const double &)
Checks that all free nodes have zero reactions.
Definition: Mesh.cc:1151
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: Mesh.cc:1074
The Graph class provides the abstraction of a graph.
Definition: Graph.h:93
Element * getNearestElement(const Pos3d &p)
Returns a pointer to the nearest element to the point being passed as parameter.
Definition: Mesh.cc:452
virtual bool removeElement(int tag)
Deletes the element identified by the tag being passed as parameter.
Definition: Mesh.cc:355
virtual Graph & getElementGraph(void)
Builds the elements graph of the mesh (if not builded yet) and returns a reference to it...
Definition: Mesh.cc:663
void setGraphBuiltFlags(const bool &f)
Returns true if the modelo ha cambiado.
Definition: Mesh.cc:851
int update(void)
Update the element's state.
Definition: Mesh.cc:832
Base class for the element and constraint containers.
Definition: MeshComponentContainer.h:40
virtual int buildNodeGraph(Graph &theNodeGraph)
Builds the node graph.
Definition: Mesh.cc:993
size_t getNumFreeNodes(void) const
Returns the number of free nodes on the mesh.
Definition: Mesh.cc:630
Rayleigh damping factors.
Definition: RayleighDampingFactors.h:58
size_t getNumLiveElements(void) const
Returns the number of active elements on the mesh.
Definition: Mesh.cc:555
Definition: KDTreeElements.h:59
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual Graph & getNodeGraph(void)
Builds (if needed) the graph of the domain nodes and returns a reference to it.
Definition: Mesh.cc:691
Iterator over the nodes.
Definition: NodeIter.h:73
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
Definition: SingleDomEleIter.h:71
virtual void Print(std::ostream &s, int flag=0)
Imprime el domain.
Definition: Mesh.cc:858
void freeze_dead_nodes(const std::string &nmbLocker)
Freezes inactive nodes (prescribes zero displacement for all DOFs on inactive nodes).
Definition: Mesh.cc:507
virtual int getNumElements(void) const
Returns the number of elements.
Definition: Mesh.cc:547
virtual int setRayleighDampingFactors(const RayleighDampingFactors &rF)
Set Rayleigh damping factors.
Definition: Mesh.cc:755
Mesh node.
Definition: Node.h:110
Definition: KDTreeNodes.h:58
virtual int calculateNodalReactions(bool inclInertia, const double &)
Calculate nodal reaction forces and moments.
Definition: Mesh.cc:1176
Finite element mesh.
Definition: Mesh.h:64
virtual bool removeNode(int tag)
Remove from mesh the node identified by the argument.
Definition: Mesh.cc:380
virtual int setMass(const Matrix &mass, int nodeTag)
Set the mass matrix for the node identified by the argument.
Definition: Mesh.cc:1138
virtual bool addNode(Node *)
Adds to the domain the node being passed as parameter.
Definition: Mesh.cc:322