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

Fix a bug in function DoFCellAccessor::distribute_local_to_global() #16472

Closed
wants to merge 11 commits into from

Conversation

YiminJin
Copy link

I found a bug in line 2960 of file include/deal.II/dofs/dof_accessor.templates.h. The bug is caused by passing boost::container::small_vector<>::iterator to function SparseMatrix<>::add(), which only takes a C pointer as the third argument. I simply replace dof_indices.begin() by dof_indices.data() (as in old versions of deal.II).

@drwells drwells added the Bug label Jan 15, 2024
@drwells
Copy link
Member

drwells commented Jan 15, 2024

Thanks for the fix! Would you be willing to do two more small things:

  1. rebase so you are down to one commit (we try to avoid adding extra merge commits into our history)
  2. add a short test which calls this function

@YiminJin
Copy link
Author

I have rebased the branch. It is the first time I use the "rebase" command so I don't know if I have done it right. Please let me know if there is something wrong.

A short test (test.txt) is appended to this comment.
test.txt

@marcfehling
Copy link
Member

A short test (test.txt) is appended to this comment.
test.txt

Would you include your test to the testsuite? You can find more information about it here:
https://www.dealii.org/developer/developers/testsuite.html#layoutaddtests

I suspect the right subfolder for the test would be tests/dofs among the dof_accessor tests. There you can also have a look at how other tests work. Please let us know if you need help with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants