Class to manage element-to-node connectivity information for a mesh.
More...
#include <mesh_connectivity.hpp>
|
| MeshConnectivity ()=default |
|
void | AddBeamElementConnectivity (size_t elem_id, std::span< const size_t > node_ids) |
| Adds a beam element's node connectivity.
|
|
void | AddMassElementConnectivity (size_t elem_id, size_t node_id) |
| Adds a mass element's node connectivity.
|
|
void | AddSpringElementConnectivity (size_t elem_id, const std::array< size_t, 2 > &node_ids) |
| Adds a spring element's node connectivity.
|
|
void | AddConstraintConnectivity (size_t constraint_id, std::span< const size_t > node_ids) |
| Adds a constraint's node connectivity.
|
|
const std::vector< size_t > & | GetBeamElementConnectivity (size_t elem_id) const |
| Get nodes connected to a specific beam element.
|
|
const std::vector< size_t > & | GetMassElementConnectivity (size_t elem_id) const |
| Get nodes connected to a specific mass element.
|
|
const std::vector< size_t > & | GetSpringElementConnectivity (size_t elem_id) const |
| Get nodes connected to a specific spring element.
|
|
const std::vector< size_t > & | GetConstraintConnectivity (size_t constraint_id) const |
| Get nodes connected to a specific constraint.
|
|
void | ExportToYAML (std::ostream &file) const |
| Export mesh connectivity inforation to a YAML file.
|
|
void | ExportToYAML (const std::string &filename) const |
| Export mesh connectivity information to a YAML file.
|
|
void | ImportFromYAML (const YAML::Node &root) |
| Import mesh connectivity information from a YAML file.
|
|
void | ImportFromYAML (const std::string &filename) |
| Import mesh connectivity information from a YAML file.
|
|
Class to manage element-to-node connectivity information for a mesh.
This class stores and manages the relationships between elements/constraints and the nodes they connect to, providing YAML import/export functionality.
◆ MeshConnectivity()
kynema::model::MeshConnectivity::MeshConnectivity |
( |
| ) |
|
|
default |
◆ AddBeamElementConnectivity()
void kynema::model::MeshConnectivity::AddBeamElementConnectivity |
( |
size_t |
elem_id, |
|
|
std::span< const size_t > |
node_ids |
|
) |
| |
|
inline |
Adds a beam element's node connectivity.
- Parameters
-
elem_id | The beam element ID |
node_ids | The vector of node IDs connected to this beam |
◆ AddConstraintConnectivity()
void kynema::model::MeshConnectivity::AddConstraintConnectivity |
( |
size_t |
constraint_id, |
|
|
std::span< const size_t > |
node_ids |
|
) |
| |
|
inline |
Adds a constraint's node connectivity.
- Parameters
-
constraint_id | The constraint ID |
node_ids | The vector of node IDs connected to this constraint |
◆ AddMassElementConnectivity()
void kynema::model::MeshConnectivity::AddMassElementConnectivity |
( |
size_t |
elem_id, |
|
|
size_t |
node_id |
|
) |
| |
|
inline |
Adds a mass element's node connectivity.
- Parameters
-
elem_id | The mass element ID |
node_id | The node ID connected to this mass |
◆ AddSpringElementConnectivity()
void kynema::model::MeshConnectivity::AddSpringElementConnectivity |
( |
size_t |
elem_id, |
|
|
const std::array< size_t, 2 > & |
node_ids |
|
) |
| |
|
inline |
Adds a spring element's node connectivity.
- Parameters
-
elem_id | The spring element ID |
node_ids | The array of node IDs connected to this spring |
◆ ExportToYAML() [1/2]
void kynema::model::MeshConnectivity::ExportToYAML |
( |
const std::string & |
filename | ) |
const |
|
inline |
Export mesh connectivity information to a YAML file.
- Parameters
-
filename | Path to the output YAML file |
◆ ExportToYAML() [2/2]
void kynema::model::MeshConnectivity::ExportToYAML |
( |
std::ostream & |
file | ) |
const |
|
inline |
Export mesh connectivity inforation to a YAML file.
- Parameters
-
file | Stream to output YAML file |
◆ GetBeamElementConnectivity()
const std::vector< size_t > & kynema::model::MeshConnectivity::GetBeamElementConnectivity |
( |
size_t |
elem_id | ) |
const |
|
inline |
Get nodes connected to a specific beam element.
- Parameters
-
elem_id | The beam element ID |
- Returns
- Vector of node IDs
◆ GetConstraintConnectivity()
const std::vector< size_t > & kynema::model::MeshConnectivity::GetConstraintConnectivity |
( |
size_t |
constraint_id | ) |
const |
|
inline |
Get nodes connected to a specific constraint.
- Parameters
-
constraint_id | The constraint ID |
- Returns
- Vector of node IDs
◆ GetMassElementConnectivity()
const std::vector< size_t > & kynema::model::MeshConnectivity::GetMassElementConnectivity |
( |
size_t |
elem_id | ) |
const |
|
inline |
Get nodes connected to a specific mass element.
- Parameters
-
elem_id | The mass element ID |
- Returns
- Vector of node IDs
◆ GetSpringElementConnectivity()
const std::vector< size_t > & kynema::model::MeshConnectivity::GetSpringElementConnectivity |
( |
size_t |
elem_id | ) |
const |
|
inline |
Get nodes connected to a specific spring element.
- Parameters
-
elem_id | The spring element ID |
- Returns
- Vector of node IDs
◆ ImportFromYAML() [1/2]
void kynema::model::MeshConnectivity::ImportFromYAML |
( |
const std::string & |
filename | ) |
|
|
inline |
Import mesh connectivity information from a YAML file.
- Parameters
-
filename | Path to the input YAML file |
◆ ImportFromYAML() [2/2]
void kynema::model::MeshConnectivity::ImportFromYAML |
( |
const YAML::Node & |
root | ) |
|
|
inline |
Import mesh connectivity information from a YAML file.
- Parameters
-
root | YAML node with the input YAML file loaded |
The documentation for this class was generated from the following file: