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
Remove hp::DoFHandler::get_fe() #9734
Remove hp::DoFHandler::get_fe() #9734
Conversation
/rebuild |
@@ -277,16 +277,21 @@ namespace VectorTools | |||
int spacedim, | |||
typename VectorType, | |||
template <int, int> class DoFHandlerType, | |||
typename T> | |||
typename T, | |||
typename F> |
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.
can you give this argument a more descriptive template type name? Maybe FEorFECollectionType
?
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.
On the other hand, why do you need this? Regular DoFHandler
has a function get_fe_collection()
so that's a function you can generically call...
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.
@bangerth Right! I was happy that after pages of compiler errors it compiled ;)
@@ -529,7 +529,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::internal_reinit( | |||
{ | |||
unsigned int n_components = 0; | |||
for (unsigned int no = 0; no < dof_handler.size(); ++no) | |||
n_components += dof_handler[no]->get_fe()[0].n_base_elements(); | |||
n_components += dof_handler[no]->get_fe_collection()[0].n_base_elements(); |
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.
I would rather use
n_components += dof_handler[no]->get_fe_collection()[0].n_base_elements(); | |
n_components += dof_handler[no]->get_fe(0).n_base_elements(); |
here and at the other places similarly.
be2a128
to
0fb6fcc
Compare
@bangerth @masterleinad Thanks for the review! I have made the changes. |
Did you actaully remove the member function? |
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.
Looks good! Found nothing major. I think you don't have to introduce the two interpolate
functions.
I agree with @masterleinad: Did you remove the get_fe()
function?
@@ -0,0 +1,4 @@ | |||
Removed: The depricated method hp::DoFHandler::get_fe() has been removed. Please use |
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.
Removed: The depricated method hp::DoFHandler::get_fe() has been removed. Please use | |
Removed: The deprecated method hp::DoFHandler::get_fe() has been removed. Please use |
@@ -553,21 +607,7 @@ namespace VectorTools | |||
VectorType & vec, | |||
const ComponentMask & component_mask) | |||
{ | |||
Assert(dof_handler.get_fe().n_components() == function.n_components, |
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.
Do you actually need to introduce your new two internal::interpolate(...)
functions? Both DoFHandler
and hp::DoFHandler
have the member function get_fe_collection()
.
I guess if you just replace dof_handler.get_fe()
with dof_handler.get_fe_collection()
in this assertion, you should be fine!
@@ -553,21 +607,7 @@ namespace VectorTools | |||
VectorType & vec, | |||
const ComponentMask & component_mask) | |||
{ | |||
Assert(dof_handler.get_fe().n_components() == function.n_components, | |||
ExcDimensionMismatch(dof_handler.get_fe().n_components(), |
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.
I don't quite understand why you need to duplicate this function into one for the hp and one for the non-hp case. Can't you just replace this call to get_fe()
by get_fe_collection()
? That works for both ::DoFHandler
and hp::DoFHandler
. If you did that, then you wouldn't have to duplicate the body of the function...
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.
Done!
0fb6fcc
to
2303887
Compare
Oops! Not it is removed. I removed the function on an other branch, where I am working of |
2303887
to
02c5c34
Compare
@bangerth still needs to approve. |
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, better! :-)
Seems like you missed one test:
|
02c5c34
to
9765fe6
Compare
This PR removes the deprecated method
hp::DoFHandler::get_fe()
. I guess we can do this since the function has been deprecated more than two years ago.Do you agree @bangerth and @marcfehling?