Skip to content

Macnider/interior faces subdomain#1566

Open
bmacnider wants to merge 5 commits intodevelopfrom
macnider/interior_faces_subdomain
Open

Macnider/interior faces subdomain#1566
bmacnider wants to merge 5 commits intodevelopfrom
macnider/interior_faces_subdomain

Conversation

@bmacnider
Copy link
Contributor

Adding methods and test to create a domain out of a subset of interior faces.

domains_.emplace(domain_name, Domain::ofBoundaryElements(*mfem_mesh_, func));
return domain(domain_name);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

We can implement 2D and 3D addDomainOfInternalBoundaryElements for the mesh class here

Comment on lines +689 to +690
int bdr_id = face_id_to_bdr_id[f];
int attr = (bdr_id >= 0) ? mesh.GetBdrAttribute(bdr_id) : -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

If face f is an interior face, then face_id_to_bdr_id[f] will return -1, which will lead to attr = -1. I am not sure if this implementation will always return the correct attribute. In 3D, you can easily point to a face and get its attribute like this

Suggested change
int bdr_id = face_id_to_bdr_id[f];
int attr = (bdr_id >= 0) ? mesh.GetBdrAttribute(bdr_id) : -1;
int attr = mesh.GetFace(f)->GetAttribute();

I've trying to find a way to point to an edge element for 2D scenarios but I could not find any. Maybe @btalamini and @tupek2 knows a way.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess your original implementation will work. side sets in cubit are considered boundaries, even if the side set is defined on a set of interior faces. When loaded in MFEM, the mesh still consider them to be boundaries and assign them a boundary attribute. But the faces on the side set has IsInterior() == true.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants