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

DataOutResample for multiple components #14258

Merged

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Sep 12, 2022

@peterrum peterrum force-pushed the DataOutResample_multiple_components branch 4 times, most recently from 8bf608e to 29d31b1 Compare September 13, 2022 07:38
Comment on lines +163 to +167
for (unsigned int comp = 0; comp < dh.get_fe_collection().n_components();
++comp)
{
const auto values = VectorTools::point_values<1>(
rpe, dh, data_ptr->vector, VectorTools::EvaluationFlags::avg, comp);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only relevant change. Loop over all components and call VectorTools::point_values for each component.

@peterrum
Copy link
Member Author

/rebuild


Assert(n_components == 1,
Assert(n_components == 1 && first_selected_component == 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the only place where you use first_selected_component, right? Did I overlook something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used here:

std::make_unique<FEPointEvaluation<n_components,
dim,
spacedim,
typename VectorType::value_type>>(
cache.get_mapping(),
cell->get_fe(),
update_flags,
first_selected_component);

@marcfehling
Copy link
Member

Would you document the new parameter in the header file? I would also like to have a test if that's alright :)

@peterrum peterrum force-pushed the DataOutResample_multiple_components branch from 29d31b1 to d9230d5 Compare September 14, 2022 07:44
@peterrum
Copy link
Member Author

Would you document the new parameter in the header file? I would also like to have a test if that's alright :)

@marcfehling Done!

@peterrum peterrum merged commit d13fb96 into dealii:master Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants