-
Notifications
You must be signed in to change notification settings - Fork 241
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
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
?
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. |
a481376
to
ffd4455
Compare
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.
minor nitpick for doxygen formatting...
/** | ||
* A list of boundary traction objects that have been requested in the | ||
* parameter file. | ||
* | ||
* @deprecated: This variable is no longer used, but needed to issue a proper |
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.
* @deprecated: This variable is no longer used, but needed to issue a proper | |
* @deprecated This variable is no longer used, but needed to issue a proper |
@@ -206,6 +252,11 @@ namespace aspect | |||
* mapped to one of the plugins of traction boundary conditions (e.g. | |||
* "function"). If the components string is empty, it is assumed the | |||
* plugins are used for all components. | |||
* | |||
* @deprecated: Remove this variable when the deprecated functions |
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.
* @deprecated: Remove this variable when the deprecated functions | |
* @deprecated Remove this variable when the deprecated functions |
ffd4455
to
70b0940
Compare
70b0940
to
fcdb42d
Compare
Thanks for the review. I have addressed all comments, all commits are squashed and I updated the date of the changelog entry. I will leave this open for a day or two and merge if there are no other comments. |
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.