Compare commits

...
Author SHA1 Message Date
termi-official 0fc2e5ea6e More nc mesh infos for parallel LTS. 2023-12-07 21:31:23 +01:00
5 changed files with 41 additions and 0 deletions
+13
View File
@@ -281,6 +281,7 @@ public:
/// inverse index.
long MemoryUsage() const;
~NCList() { Clear(); }
private:
// Check for existence or construct the inv_index list map if necessary.
// const because only modifies the mutable member inv_index.
@@ -293,6 +294,18 @@ public:
mutable std::unordered_map<int, std::pair<MeshIdType, int>> inv_index;
};
int GetRootElementIndex(int leaf_index)
{
auto element_index = leaf_elements[leaf_index];
auto element = elements[element_index];
while (element.parent >= 0)
{
element_index = element.parent;
element = elements[element_index];
}
return element_index;
}
/// Return the current list of conforming and nonconforming faces.
const NCList& GetFaceList()
{
+14
View File
@@ -3133,6 +3133,20 @@ int ParMesh::GetNSharedFaces() const
}
}
int ParMesh::GetNumFacesTotal() const
{
if (Conforming())
{
return GetNumFaces()+GetNSharedFaces();
}
else
{
return GetNumFaces()+GetNSharedFaces()+pncmesh->GetNumGhostFaces();
}
}
int ParMesh::GetSharedFace(int sface) const
{
if (Conforming())
+3
View File
@@ -580,6 +580,9 @@ public:
/// Return the number of shared faces (3D), edges (2D), vertices (1D)
int GetNSharedFaces() const;
/// Return the number of all local faces (3D), edges (2D), vertices (1D) including the ghosts
int GetNumFacesTotal() const;
/// Return the local face index for the given shared face.
int GetSharedFace(int sface) const;
+10
View File
@@ -1313,6 +1313,16 @@ void ParNCMesh::GetFaceNeighbors(ParMesh &pmesh)
// ParMesh::face_nbr_vertices_offset, these are not used outside of ParMesh
}
int ParNCMesh::GetNumGhostFaces() const
{
switch (Dim)
{
case 1: return GetNGhostVertices();
case 2: return GetNGhostEdges();
default: return GetNGhostFaces();
}
}
void ParNCMesh::ClearAuxPM()
{
for (int i = 0; i < aux_pm_store.Size(); i++)
+1
View File
@@ -115,6 +115,7 @@ public:
int GetNGhostEdges() const { return NGhostEdges; }
int GetNGhostFaces() const { return NGhostFaces; }
int GetNGhostElements() const override { return NGhostElements; }
int GetNumGhostFaces() const;
// Return a list of vertices/edges/faces shared by this processor and at
// least one other processor. These are subsets of NCMesh::<entity>_list. */