38 #include <Eigen/SparseCore> 72 void AddNode(
unsigned int tag, std::shared_ptr<Node> &node);
78 void AddConstraint(
unsigned int tag, std::shared_ptr<Constraint> &constraint);
84 void AddFiber(
unsigned int tag, std::unique_ptr<Material> &fiber);
90 void AddMaterial(
unsigned int tag, std::unique_ptr<Material> &material);
96 void AddSection(
unsigned int tag, std::unique_ptr<Section> §ion);
102 void AddDamping(
unsigned int tag, std::shared_ptr<Damping> &damping);
108 void AddElement(
unsigned int tag, std::shared_ptr<Element> &element);
114 void AddLoad(
unsigned int tag, std::shared_ptr<Load> &load);
120 void AddMass(
unsigned int tag, Eigen::VectorXd& mass);
125 void DelNode(
unsigned int tag);
130 void DelMass(
unsigned int tag);
165 void DelLoad(
unsigned int tag);
171 void SetDamping(
unsigned int tag, std::vector<unsigned int> &group);
185 void SetSupportMotion(
unsigned int tag,
unsigned int dof, std::vector<double>& Xo);
192 std::unique_ptr<Material>&
GetMaterial(
unsigned int tag);
199 std::unique_ptr<Section>&
GetSection(
unsigned int tag);
206 std::shared_ptr<Damping>&
GetDamping(
unsigned int tag);
212 std::map<unsigned int, std::shared_ptr<Node> >&
GetNodes();
224 std::map<unsigned int, std::shared_ptr<Element> >&
GetElements();
230 std::map<unsigned int, std::shared_ptr<Damping> >&
GetDampings();
236 std::map<unsigned int, std::shared_ptr<Load> >&
GetLoads();
241 template<
typename T> std::vector<T>
GetVectorIDs(std::string Name);
251 std::map<unsigned int, std::shared_ptr<Node> >
Nodes;
257 std::map<unsigned int, std::unique_ptr<Material> >
Materials;
260 std::map<unsigned int, std::unique_ptr<Section> >
Sections;
263 std::map<unsigned int, std::shared_ptr<Damping> >
Dampings;
266 std::map<unsigned int, std::shared_ptr<Element> >
Elements;
269 std::map<unsigned int, std::shared_ptr<Load> >
Loads;
std::map< unsigned int, std::shared_ptr< Node > > Nodes
Container/map of nodes for this partition.
Definition: Mesh.hpp:251
void DelSection(unsigned int tag)
Remove a Section from Mesh.
void AddSection(unsigned int tag, std::unique_ptr< Section > §ion)
Add a Section to the Mesh.
void DelDamping(unsigned int tag)
This file contains the "Constraint object" declarations, which impose linear kinematic relations betw...
void DelConstraint(int tag)
Remove a Constraint from Mesh.
std::map< unsigned int, std::shared_ptr< Damping > > Dampings
Container/map of damping for this partition.
Definition: Mesh.hpp:263
This file contains the "Load" class declarations, which defines a load that can act in a node or an e...
std::unique_ptr< Material > & GetMaterial(unsigned int tag)
Gets a material from the mesh.
void AddConstraint(unsigned int tag, std::shared_ptr< Constraint > &constraint)
Add a Constraint to the Mesh.
void DelNode(unsigned int tag)
Remove a Node from Mesh.
std::vector< T > GetVectorIDs(std::string Name)
Returns a vector with identifier of the property requested.
std::map< unsigned int, std::shared_ptr< Load > > Loads
Container/map of loads for this partition.
Definition: Mesh.hpp:269
void AddElement(unsigned int tag, std::shared_ptr< Element > &element)
Add a Element to the Mesh.
void DelLoad(unsigned int tag)
Remove a Load from Mesh.
void AddMaterial(unsigned int tag, std::unique_ptr< Material > &material)
Add a Material to the Mesh.
This file contains the abstract "Material object" declarations, which computes the strain...
Class for defining a mesh that stores the nodes, materials, elements, and loads.
Definition: Mesh.hpp:55
std::map< unsigned int, std::shared_ptr< Element > > Elements
Container/map of elements for this partition.
Definition: Mesh.hpp:266
void SetInitialCondition(unsigned int tag, int cond, Eigen::VectorXd &Xo)
Specifies the Node initial condition.
This file contains the abstract "Section object" declarations, which computes the strain...
void AddMass(unsigned int tag, Eigen::VectorXd &mass)
Add a point mass to a Node.
void SetSupportMotion(unsigned int tag, unsigned int dof, std::vector< double > &Xo)
Specifies the support motion for a certain Node object.
Eigen::SparseMatrix< double > GetTotalToFreeMatrix()
Gets operator that impose restrains/constraints on the model.
std::map< int, std::shared_ptr< Constraint > > Constraints
Container/map of constraints for this partition.
Definition: Mesh.hpp:254
std::map< unsigned int, std::shared_ptr< Damping > > & GetDampings()
Gets all damping from the mesh.
void AddNode(unsigned int tag, std::shared_ptr< Node > &node)
Add a Node object to the Mesh.
void DelSupportMotion(unsigned int tag)
Remove the support motions associated to Node in from Mesh.
std::unique_ptr< Section > & GetSection(unsigned int tag)
Gets a section from the mesh.
std::shared_ptr< Damping > & GetDamping(unsigned int tag)
Gets damping from the mesh.
void AddDamping(unsigned int tag, std::shared_ptr< Damping > &damping)
Add a Damping model to the Mesh.
void AddLoad(unsigned int tag, std::shared_ptr< Load > &load)
Add a Load to the Mesh.
std::map< unsigned int, std::unique_ptr< Material > > Materials
Container/map of materials for this partition.
Definition: Mesh.hpp:257
void Initialize()
Initialize the Mesh and compute memory storage.
void DelElement(unsigned int tag)
Remove an Element from Mesh.
This file contains the "Node object" declarations, which is stores the coordinates, state variables, degrees-of-freedom, and total-degree of freedom lists of a node in a finite element mesh.
This file contains the "Damping object" declarations to update damping matrix to account for Caughey-...
std::map< int, std::shared_ptr< Constraint > > & GetConstraints()
Gets constraint from the mesh.
std::map< unsigned int, std::shared_ptr< Node > > & GetNodes()
Gets nodes from the mesh.
void SetDamping(unsigned int tag, std::vector< unsigned int > &group)
Add a Damping model to the Mesh.
std::map< unsigned int, std::shared_ptr< Load > > & GetLoads()
Gets loads from the mesh.
std::map< unsigned int, std::shared_ptr< Element > > & GetElements()
Gets elements from the mesh.
Mesh()
Creates a Mesh object (container) to store Node, Material, Element, Load.
void AddFiber(unsigned int tag, std::unique_ptr< Material > &fiber)
Add a Material to the Mesh.
void DelMass(unsigned int tag)
Remove a Point Mass from Mesh.
void DelMaterial(unsigned int tag)
Remove a Material from Mesh.
~Mesh()
Destroys this Mesh object.
This file contains the "Element" object declarations, which defines an element in a finite element me...
std::map< unsigned int, std::unique_ptr< Section > > Sections
Container/map of materials for this partition.
Definition: Mesh.hpp:260