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
Add a field to Introspection to query the number of compositional fields. #1505
Add a field to Introspection to query the number of compositional fields. #1505
Conversation
/run-tests |
The tester is having the same problem as always, but I think the patch is ok. But since I worked on this with @pmbremner I'd prefer if someone else took a look. |
source/simulator/introspection.cc
Outdated
@@ -173,6 +173,7 @@ namespace aspect | |||
: | |||
FEVariableCollection<dim>(variable_definition), | |||
n_components (FEVariableCollection<dim>::n_components()), | |||
n_compositional_fields (n_components-dim-2), |
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.
please use parameters.names_of_compositional_fields.size()
instead. I think this can break with melt and/or other additional equations the way you did this.
9f8028d
to
dfd7975
Compare
Made suggested change. Please have a look |
source/simulator/introspection.cc
Outdated
@@ -173,6 +173,7 @@ namespace aspect | |||
: | |||
FEVariableCollection<dim>(variable_definition), | |||
n_components (FEVariableCollection<dim>::n_components()), | |||
n_compositional_fields (parameters.names_of_compositional_fields.size()), |
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.
why not use parameters.n_compositional_fields
as the initializer?
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.
well, that would work too. ;-)
@pmbremner -- would you mind addressing the one comment? |
dfd7975
to
88256ed
Compare
I see a test failed, but it's not clear how this patch affects it. What to do? |
No description provided.