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

gsDofMapper::findTagged does't work #681

Open
hhornik opened this issue Jan 18, 2024 · 2 comments
Open

gsDofMapper::findTagged does't work #681

hhornik opened this issue Jan 18, 2024 · 2 comments
Assignees
Labels

Comments

@hhornik
Copy link

hhornik commented Jan 18, 2024

The function returns an empty vector even if there are tagged dofs on the given patch.

I believe there are two issues:

  1. The input vectors in std::set_intersection should be sorted, while the vector defined by istart and iend is not.
  2. The line "si.assign(si.begin(),si.end());" is incorrect, it should be "rvo.assign(si.begin(),si.end());"
@filiatra
Copy link
Member

filiatra commented Feb 8, 2024

Does it work if you fix these problems?
for the istart, iend you can make a copy and sort it first, just to check if that works.

@hhornik
Copy link
Author

hhornik commented Feb 8, 2024

Yes, I added this:

std::vector<index_t> patchdofs;
patchdofs.assign(istart, iend);
std::sort(patchdofs.begin(), patchdofs.end());

and fixed the other problem and it works. The only remaining "issue" is, that the function returns global dof indices, while the documentation says they are local indices.

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

No branches or pull requests

2 participants