Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc2e5ea6e |
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user