aspect icon indicating copy to clipboard operation
aspect copied to clipboard

Interpretation of "Exclude output properties"

Open bangerth opened this issue 3 years ago • 2 comments

Following #4080, the logic for omitting certain particle properties looks like this (and it was this way before #4080, the code was just differently organized):

                bool exclude_property = false;
                for (unsigned int i = 0; i < exclude_output_properties.size(); ++i)
                  if (field_name.find(exclude_output_properties[i]) != std::string::npos)
                    {
                      exclude_property = true;
                      break;
                    }

That means that the list exclude_output_properties contains entries so that if a particle property's name contains that entry, the property is skipped. So we're not matching particle names but are ok if a substring matches. In other words, if we have a particle property "temperature", then if exclude_output_properties contains "era", the temperature property is skipped.

Is this what we want or is that a mistake? @MFraters ?

bangerth avatar Jun 22 '21 22:06 bangerth

@MFraters will know best, but if I remember correctly he has hundreds of properties of the type grain_X_orientation_Y and he wants to filter output based on patterns, so yes matching a substring is intentional. I agree it could happen that someone unintentionally filters something but at the time we did not see a better solution.

gassmoeller avatar Jun 23 '21 19:06 gassmoeller

Sorry, I only saw this now. Yes, this has been intentional for the reason @gassmoeller stated. We could add a flag which matches on the full string if we have a usecase.

MFraters avatar Jul 07 '23 18:07 MFraters