Skip to content
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

Derive remaining managers from ManagerBase #6097

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

gassmoeller
Copy link
Member

A suggestion for how to finish #1775. This is still work in progress and unfortunately not completely backwards compatible, but at least the incompatibility is only limited to two rarely used functions in the code, not the input file. The traction manager (and the velocity manager once I get to it) need additional information compared to ManagerBase, namely which boundary each plugin is responsible for, and which components (of the tensor components xyz). The main change is the type of internal storage container, and the access functions get_active_boundary_traction_conditions and get_active_boundary_traction_names. Opinions? If we we agree this is a good idea I can continue with the velocity manager.

Copy link
Contributor

@bangerth bangerth left a comment

Choose a reason for hiding this comment

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

Yes, nice idea. I supposed you also want to do this for the boundary velocity manager?


Assert(boundary_plugins != boundary_traction_objects.end(),
[[maybe_unused]] bool found_plugin = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

We're not there yet -- we still allow compiling ASPECT with C++14.

Comment on lines 67 to 82
unsigned int i=0;
for (const auto &plugin: this->plugin_objects)
{
if (this->boundary_indicators[i])
{
const Tensor<1,dim> plugin_traction = plugin->boundary_traction(boundary_indicator,
position,
normal_vector);
for (unsigned int d=0; d<dim; ++d)
if (this->component_masks[i][d])
traction[d] += plugin_traction[d];
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Something is not right with this code. I don't see you incrementing i anywhere. It's also not clear that this-boundary_indicators[i] is a bool. Are you forgetting to compare it against boundary_indicator?

@gassmoeller gassmoeller force-pushed the convert_managers branch 3 times, most recently from 8b74bd2 to 96b009e Compare October 23, 2024 07:14
@gassmoeller
Copy link
Member Author

/rebuild

@gassmoeller gassmoeller changed the title [WIP] Derive remaining managers from ManagerBase Derive remaining managers from ManagerBase Oct 25, 2024
@gassmoeller
Copy link
Member Author

Something is not right with this code. I don't see you incrementing i anywhere. It's also not clear that this-boundary_indicators[i] is a bool. Are you forgetting to compare it against boundary_indicator?

Yes, I rushed this PR a bit, I mostly needed feedback if the idea is sound in general. I have cleaned up the PR, addressed your comments and expanded it to the boundary velocity manager. I think this should work now, but I am open to suggestions for changes.

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