17 std::size_t
const n_global_nodes,
18 std::vector<std::size_t>
const& n_regular_base_nodes_at_rank,
19 std::vector<std::size_t>
const& n_regular_high_order_nodes_at_rank)
21 std::vector<int> data;
23 std::transform(n_regular_base_nodes_at_rank.begin() + 1,
24 n_regular_base_nodes_at_rank.end(),
25 n_regular_high_order_nodes_at_rank.begin() + 1,
26 std::back_inserter(data), std::plus<int>());
28 data.push_back(n_global_nodes);
34 const std::string& name,
35 const std::vector<Node*>& nodes,
36 const std::vector<std::size_t>& glb_node_ids,
37 const std::vector<Element*>& elements,
39 const std::size_t n_global_base_nodes,
40 const std::size_t n_global_nodes,
41 const std::size_t n_regular_nodes,
42 std::vector<std::size_t>&& n_regular_base_nodes_at_rank,
43 std::vector<std::size_t>&& n_regular_high_order_nodes_at_rank)
44 :
Mesh(name, nodes, elements, true ,
52 std::move(n_regular_high_order_nodes_at_rank)),
67 auto const& nodes_connections =
69 auto const max_connections = std::max_element(
70 nodes_connections.cbegin(), nodes_connections.cend(),
71 [](
auto const& connections_node_a,
auto const& connections_node_b)
72 { return (connections_node_a.size() < connections_node_b.size()); });
74 return static_cast<std::size_t
>(max_connections->size() + 1);
78 const std::size_t global_node_id)
const
Definition of mesh class for partitioned mesh (by node) for parallel computing within the framework o...
Mesh(std::string name, std::vector< Node * > nodes, std::vector< Element * > elements, bool const compute_element_neighbors=false, Properties const &properties=Properties())
const bool _is_single_thread
std::size_t _n_global_base_nodes
Number of the nodes of the global mesh linear interpolations.
std::size_t getPartitionID(const std::size_t global_node_id) const
bool isGhostNode(const std::size_t node_id) const
Check whether a node with ID of node_id is a ghost node.
std::vector< std::size_t > _global_node_ids
Global IDs of nodes of a partition.
std::vector< std::size_t > _n_regular_base_nodes_at_rank
std::size_t _n_regular_nodes
Number of the all regular nodes.
std::vector< std::size_t > _n_regular_high_order_nodes_at_rank
Gathered numbers of the all regular high order nodes of all partitions.
std::vector< int > _end_node_id_at_rank
Gathered the end node id of each rank.
NodePartitionedMesh(const Mesh &mesh)
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)
std::vector< int > getEndNodeIDRanks(std::size_t const n_global_nodes, std::vector< std::size_t > const &n_regular_base_nodes_at_rank, std::vector< std::size_t > const &n_regular_high_order_nodes_at_rank)