42 for (std::size_t i = 0; i <
_nodes.size(); i++)
64 const std::vector<Node*>& nodes,
65 const std::vector<std::size_t>& glb_node_ids,
66 const std::vector<Element*>& elements,
68 const std::size_t n_global_nodes,
69 const std::size_t n_active_base_nodes,
70 const std::size_t n_active_nodes)
71 :
Mesh(
name, nodes, elements, properties),
123 auto const& nodes_connections =
125 auto const max_connections = std::max_element(
126 nodes_connections.cbegin(), nodes_connections.cend(),
127 [](
auto const& connections_node_a,
auto const& connections_node_b) {
128 return (connections_node_a.size() < connections_node_b.size());
131 return max_connections->size() + 1;
Definition of the Mesh class.
Definition of the Node class.
std::size_t getNumberOfBaseNodes() const
Get the number of base nodes.
std::size_t getNumberOfNodes() const
Get the number of nodes.
std::vector< Element const * > const & getElementsConnectedToNode(std::size_t node_id) const
std::vector< Node * > _nodes
const bool _is_single_thread
bool isGhostNode(const std::size_t node_id) const
Check whether a node with ID of node_id is a ghost node.
std::size_t _n_active_base_nodes
Number of the active nodes for linear interpolations.
std::vector< std::size_t > _global_node_ids
Global IDs of nodes of a partition.
NodePartitionedMesh(const std::string &name, const std::vector< Node * > &nodes, const std::vector< std::size_t > &glb_node_ids, const std::vector< Element * > &elements, Properties properties, const std::size_t n_global_nodes, const std::size_t n_active_base_nodes, const std::size_t n_active_nodes)
Constructor.
std::size_t getGlobalNodeID(const std::size_t node_id) const
Get the global node ID of a node with its local ID.
std::size_t getNumberOfGlobalNodes() const
Get the number of all nodes of the global mesh.
bool isForSingleThread() const
std::size_t getLargestActiveNodeID() const
std::size_t getNumberOfActiveBaseNodes() const
Get the number of the active nodes of the partition for linear elements.
std::size_t getNumberOfActiveNodes() const
Get the number of all active nodes of the partition.
NodePartitionedMesh(const Mesh &mesh)
std::size_t _n_active_nodes
Number of the all active nodes.
std::size_t getMaximumNConnectedNodesToNode() const
Get the maximum number of connected nodes to node.
std::size_t _n_global_nodes
Number of all nodes of the global mesh.
Property manager on mesh items. Class Properties manages scalar, vector or matrix properties....
std::vector< std::vector< Node * > > calculateNodesConnectedByElements(Mesh const &mesh)
bool isBaseNode(Node const &node, std::vector< Element const * > const &elements_connected_to_node)