Skip to content

Conversation

@MaelRL
Copy link
Member

@MaelRL MaelRL commented Nov 5, 2025

Summary of Changes

The conversion from a CDT3 triangulation to a tetrahedral remeshing triangulation labels cells with a subdomain index that is either 0 if the cell is in the (constrained) connected component of the infinite vertex, and 1 otherwise.

But face constraints can also reflect multiple subdomains, and possibly nested subdomains, which we might want to remesh differently.

The following PR modifies the labeling during conversion such that a flood algorithm is used to mark constrained connected components.

  • The connected component containing the infinite vertex is marked with index 0.
  • Nested components are marked with increasing indices.
  • Disconnected components that have the same nesting level get the same index parity: for example two cubes within a larger bounding box will be index 2 and 4.

TODO:

Release Management

  • Affected package(s): Constrained_triangulation_3
  • Issue(s) solved (if any): -
  • Feature/Small Feature (if any): WIP
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: no change

Use a flood algorithm to mark constrained connected components.
The connected component containing the infinite vertex is marked with index 0.
Nested components are marked with increasing indices.
Disconnected components that have the same nesting level get the same index parity:
for example two cubes within a larger bounding box will be index 2 and 4.
Copy link
Member

@lrineau lrineau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, except for the use of std::list.

// Nested components are marked with increasing indices.
// Disconnected components that have the same nesting level get the same index parity:
// for example two cubes within a larger bounding box will be index 2 and 4.
std::list<typename Tr::Facet> border;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why std::list? That code does not need to splice or insert/remove in the middle of the container.
Use std::stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants