OGS
|
A subdomain mesh.
Definition at line 28 of file NodePartitionedMesh.h.
#include <NodePartitionedMesh.h>
Public Member Functions | |
NodePartitionedMesh (const Mesh &mesh) | |
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 const &properties, const std::size_t n_global_base_nodes, const std::size_t n_global_nodes, const std::size_t n_regular_nodes, std::vector< std::size_t > &&n_regular_base_nodes_at_rank, std::vector< std::size_t > &&n_regular_high_order_nodes_at_rank) | |
Constructor. | |
std::size_t | getNumberOfGlobalBaseNodes () const |
Get the number of nodes of the global mesh for linear elements. | |
std::size_t | getNumberOfGlobalNodes () const |
Get the number of all nodes of the global mesh. | |
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 | getNumberOfRegularNodes () const |
Get the number of all regular nodes of the partition. | |
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 | getNumberOfRegularBaseNodesAtRank (int const partition_id) const |
std::size_t | getNumberOfRegularHighOrderNodesAtRank (int const partition_id) const |
std::size_t | getMaximumNConnectedNodesToNode () const |
Get the maximum number of connected nodes to node. | |
std::size_t | getPartitionID (const std::size_t global_node_id) const |
int | getNumberOfPartitions () const |
bool | isForSingleThread () const |
Public Member Functions inherited from MeshLib::Mesh | |
Mesh (std::string name, std::vector< Node * > nodes, std::vector< Element * > elements, bool const compute_element_neighbors=false, Properties const &properties=Properties()) | |
Mesh (const Mesh &mesh) | |
Copy constructor. | |
Mesh (Mesh &&mesh) | |
Mesh & | operator= (const Mesh &mesh)=delete |
Mesh & | operator= (Mesh &&mesh)=delete |
virtual | ~Mesh () |
Destructor. | |
void | shallowClean () |
void | addElement (Element *elem) |
Add an element to the mesh. | |
unsigned | getDimension () const |
Returns the dimension of the mesh (determined by the maximum dimension over all elements). | |
const Node * | getNode (std::size_t idx) const |
Get the node with the given index. | |
const Element * | getElement (std::size_t idx) const |
Get the element with the given index. | |
std::size_t | getNumberOfElements () const |
Get the number of elements. | |
std::size_t | getNumberOfNodes () const |
Get the number of nodes. | |
const std::string | getName () const |
Get name of the mesh. | |
std::vector< Node * > const & | getNodes () const |
Get the nodes-vector for the mesh. | |
std::vector< Element * > const & | getElements () const |
Get the element-vector for the mesh. | |
void | resetElementIDs () |
Resets the IDs of all mesh-elements to their position in the element vector. | |
void | resetNodeIDs () |
Resets the IDs of all mesh-nodes to their position in the node vector. | |
void | setName (const std::string &name) |
Changes the name of the mesh. | |
std::size_t | getID () const |
Get id of the mesh. | |
std::size_t | computeNumberOfBaseNodes () const |
Get the number of base nodes. | |
bool | hasNonlinearElement () const |
Check if the mesh contains any nonlinear element. | |
std::vector< Element const * > const & | getElementsConnectedToNode (std::size_t node_id) const |
std::vector< Element const * > const & | getElementsConnectedToNode (Node const &node) const |
Properties & | getProperties () |
Properties const & | getProperties () const |
bool | isAxiallySymmetric () const |
void | setAxiallySymmetric (bool is_axial_symmetric) |
Private Attributes | |
std::vector< std::size_t > | _global_node_ids |
Global IDs of nodes of a partition. | |
std::size_t | _n_global_base_nodes |
Number of the nodes of the global mesh linear interpolations. | |
std::size_t | _n_global_nodes |
Number of all nodes of the global mesh. | |
std::size_t | _n_regular_nodes |
Number of the all regular nodes. | |
std::vector< std::size_t > | _n_regular_base_nodes_at_rank |
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. | |
const bool | _is_single_thread |
Additional Inherited Members | |
Protected Member Functions inherited from MeshLib::Mesh | |
void | calcEdgeLengthRange () |
Set the minimum and maximum length over the edges of the mesh. | |
void | setDimension () |
Sets the dimension of the mesh. | |
void | setElementNeighbors () |
Protected Attributes inherited from MeshLib::Mesh | |
std::size_t const | _id |
unsigned | _mesh_dimension |
std::pair< double, double > | _node_distance |
The minimal and maximal distance of nodes within an element over all elements in the mesh. | |
std::string | _name |
std::vector< Node * > | _nodes |
std::vector< Element * > | _elements |
Properties | _properties |
std::vector< std::vector< Element const * > > | _elements_connected_to_nodes |
bool | _is_axially_symmetric = false |
bool const | _compute_element_neighbors |
|
inlineexplicit |
Definition at line 34 of file NodePartitionedMesh.h.
References _global_node_ids, and MeshLib::Mesh::_nodes.
MeshLib::NodePartitionedMesh::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 const & | properties, | ||
const std::size_t | n_global_base_nodes, | ||
const std::size_t | n_global_nodes, | ||
const std::size_t | n_regular_nodes, | ||
std::vector< std::size_t > && | n_regular_base_nodes_at_rank, | ||
std::vector< std::size_t > && | n_regular_high_order_nodes_at_rank ) |
Constructor.
name | Name assigned to the mesh. |
nodes | Vector for nodes, which storage looks like: |regular base nodes|ghost base nodes| ... ... regular higher order nodes| ... ... ghost higher order nodes| |
glb_node_ids | Global IDs of nodes of a partition. |
elements | Vector for elements. Ghost elements are stored after regular (non-ghost) elements. |
properties | Mesh property. |
n_global_base_nodes | Number of the base nodes of the global mesh. |
n_global_nodes | Number of all nodes of the global mesh. |
n_regular_nodes | Number of all regular nodes. |
n_regular_base_nodes_at_rank | Numbers of the regular base nodes of all previous ranks. |
n_regular_high_order_nodes_at_rank | Numbers of the regular high order nodes of all previous ranks. |
Definition at line 33 of file NodePartitionedMesh.cpp.
|
inline |
Get the global node ID of a node with its local ID.
Definition at line 89 of file NodePartitionedMesh.h.
References _global_node_ids.
Referenced by MeshLib::computeGhostBaseNodeGlobalNodeIDsOfSubDomainPartition(), and NumLib::MeshComponentMap::createParallelMeshComponentMap().
std::size_t MeshLib::NodePartitionedMesh::getMaximumNConnectedNodesToNode | ( | ) | const |
Get the maximum number of connected nodes to node.
Definition at line 65 of file NodePartitionedMesh.cpp.
References MeshLib::calculateNodesConnectedByElements().
|
inline |
Get the number of nodes of the global mesh for linear elements.
Definition at line 81 of file NodePartitionedMesh.h.
References _n_global_base_nodes.
Referenced by NumLib::MeshComponentMap::createParallelMeshComponentMap().
|
inline |
Get the number of all nodes of the global mesh.
Definition at line 87 of file NodePartitionedMesh.h.
References _n_global_nodes.
Referenced by NumLib::MeshComponentMap::createParallelMeshComponentMap().
|
inline |
Definition at line 116 of file NodePartitionedMesh.h.
References _n_regular_base_nodes_at_rank.
|
inline |
Definition at line 99 of file NodePartitionedMesh.h.
References _n_regular_base_nodes_at_rank.
Referenced by NumLib::getGlobalIndexWithTaylorHoodElement().
|
inline |
Definition at line 104 of file NodePartitionedMesh.h.
References _n_regular_high_order_nodes_at_rank.
Referenced by NumLib::getGlobalIndexWithTaylorHoodElement().
|
inline |
Get the number of all regular nodes of the partition.
Definition at line 95 of file NodePartitionedMesh.h.
References _n_regular_nodes.
std::size_t MeshLib::NodePartitionedMesh::getPartitionID | ( | const std::size_t | global_node_id | ) | const |
Definition at line 77 of file NodePartitionedMesh.cpp.
References _end_node_id_at_rank.
Referenced by NumLib::getGlobalIndexWithTaylorHoodElement().
|
inline |
Definition at line 121 of file NodePartitionedMesh.h.
References _is_single_thread.
Referenced by NumLib::MeshComponentMap::MeshComponentMap().
bool MeshLib::NodePartitionedMesh::isGhostNode | ( | const std::size_t | node_id | ) | const |
Check whether a node with ID of node_id is a ghost node.
Definition at line 60 of file NodePartitionedMesh.cpp.
References _n_regular_nodes.
Referenced by MeshLib::computeGhostBaseNodeGlobalNodeIDsOfSubDomainPartition(), NumLib::MeshComponentMap::createParallelMeshComponentMap(), and anonymous_namespace{transformMeshToNodePartitionedMesh.cpp}::isRegularNode().
|
private |
Gathered the end node id of each rank.
Definition at line 144 of file NodePartitionedMesh.h.
Referenced by getPartitionID().
|
private |
Global IDs of nodes of a partition.
Definition at line 125 of file NodePartitionedMesh.h.
Referenced by NodePartitionedMesh(), and getGlobalNodeID().
|
private |
Definition at line 146 of file NodePartitionedMesh.h.
Referenced by isForSingleThread().
|
private |
Number of the nodes of the global mesh linear interpolations.
Definition at line 128 of file NodePartitionedMesh.h.
Referenced by getNumberOfGlobalBaseNodes().
|
private |
Number of all nodes of the global mesh.
Definition at line 131 of file NodePartitionedMesh.h.
Referenced by getNumberOfGlobalNodes().
|
private |
Gathered numbers of the regular nodes for linear interpolations of all partitions.
Definition at line 138 of file NodePartitionedMesh.h.
Referenced by getNumberOfPartitions(), and getNumberOfRegularBaseNodesAtRank().
|
private |
Gathered numbers of the all regular high order nodes of all partitions.
Definition at line 141 of file NodePartitionedMesh.h.
Referenced by getNumberOfRegularHighOrderNodesAtRank().
|
private |
Number of the all regular nodes.
Definition at line 134 of file NodePartitionedMesh.h.
Referenced by getNumberOfRegularNodes(), and isGhostNode().