-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMR for ElementSubdomainModifier #19519
Conversation
Depend on this libMesh/libmesh#3094 |
@@ -27,15 +27,16 @@ class ErrorFractionMarker : public IndicatorMarker | |||
|
|||
protected: | |||
virtual MarkerValue computeElementMarker() override; | |||
bool checkElementSubdomainConsistent(const Elem * const & _current_elem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool checkElementSubdomainConsistent(const Elem * const & _current_elem); | |
bool checkSubdomainConsistency(const Elem & elem) const; |
also add docstring
|
||
Real _coarsen; | ||
Real _refine; | ||
bool _clear_extremes; | ||
bool _is_subdomain_consistent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool _is_subdomain_consistent; | |
// Whether or not to check the consistency of subdomain ids when coarsening | |
const bool _check_subdomain_consistency; |
|
||
// Change the parent's subdomain, if any | ||
// We do not save the parent info since they are inactive | ||
setAncestorsSubdomainIDs(subdomain_id, elem_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setAncestorsSubdomainIDs(subdomain_id, elem_id); | |
setAncestorsSubdomainIDs(*elem); |
void | ||
ElementSubdomainModifier::setAncestorsSubdomainIDs(const SubdomainID & subdomain_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
void
ElementSubdomainModifier::setAncestorsSubdomainIDs(Elem & elem) const
{
Elem * current_elem = &elem;
unsigned int lv = current_elem->level();
for (unsigned int i = lv; i > 0; --i)
{
current_elem = curent_elem->parent();
current_elem->subdomain_id() = elem.subdomain_id();
// displaced parent element
Elem * displaced_elem = _displaced_problem ? _displaced_problem->mesh().elemPtr(id) : nullptr;
if (displaced_elem)
displaced_elem->subdomain_id() = elem.subdomain_id();
}
}
There's no need to ever call _mesh.elemPtr()
. current_elem->parent()
should return a non-const elem because current_elem
is non const
Need libmesh update libMesh/libmesh#3094 |
libmesh
Outdated
@@ -1 +1 @@ | |||
Subproject commit 544e2c87ea2f35aab900dde8b8f1e0926d720421 | |||
Subproject commit f2940e0fcffcb81301cd14c88088a09727b55ebe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution! This contains a submodule update
libmesh
Outdated
@@ -1 +1 @@ | |||
Subproject commit 544e2c87ea2f35aab900dde8b8f1e0926d720421 | |||
Subproject commit f2940e0fcffcb81301cd14c88088a09727b55ebe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution! This contains a submodule update
libmesh
Outdated
@@ -1 +1 @@ | |||
Subproject commit 544e2c87ea2f35aab900dde8b8f1e0926d720421 | |||
Subproject commit f2940e0fcffcb81301cd14c88088a09727b55ebe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution! This contains a submodule update
Job Documentation on 628b8cf wanted to post the following: View the site here This comment will be updated on new commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning: This PR changes repo size by 6.43 MiB.
way too much for only a few tests
I will try to make the mesh smaller .... |
I've got a partial review going for this from december, give me a ping @fdkong when you're ready |
I need to add more tests. |
Do not allow coarsening on the moving boundary and an element and its siblings have different subdomain ids
libmesh
Outdated
@@ -1 +1 @@ | |||
Subproject commit 544e2c87ea2f35aab900dde8b8f1e0926d720421 | |||
Subproject commit f2940e0fcffcb81301cd14c88088a09727b55ebe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution! This contains a submodule update
@@ -1 +1 @@ | |||
Subproject commit 544e2c87ea2f35aab900dde8b8f1e0926d720421 | |||
Subproject commit 0c01ac73068bbf19891001680c44ec6b6d0420b8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution! This contains a submodule update
We did this tmp update to check if the code still works
@@ -1 +1 @@ | |||
Subproject commit 544e2c87ea2f35aab900dde8b8f1e0926d720421 | |||
Subproject commit 0c01ac73068bbf19891001680c44ec6b6d0420b8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution! This contains a submodule update
This pull request has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in 3 days if no further activity occurs. Thank you for your contributions. |
Closes #20387