-
Notifications
You must be signed in to change notification settings - Fork 237
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
base: main
Are you sure you want to change the base?
Conversation
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.
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; |
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.
We're not there yet -- we still allow compiling ASPECT with C++14.
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]; | ||
} | ||
} |
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.
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
?
8b74bd2
to
96b009e
Compare
96b009e
to
cd5d2ae
Compare
/rebuild |
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. |
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 functionsget_active_boundary_traction_conditions
andget_active_boundary_traction_names
. Opinions? If we we agree this is a good idea I can continue with the velocity manager.