feature: propagate input field to output results#4077
Conversation
|
@npillardou Can you describe the benefit to this? You want to be able to visualize the "attribute" in the output? Is that "attribute" not already in the output? Things like initial stress/pore pressure? |
|
@rrsettgast The goal is to not lose information that was given in input such as:
Currently, you cannot easily compare an input .vtu with the output .vtu given by GEOS. All the indexes of the cells and points are reconstructed by GEOS. There is no easy mapping solution other than using 3D coordinates. EDIT1: Ok I thought this would also work with any property given in fieldNames like fieldNames="{ my_property1, my_property2... }" but apparently it is not the case. Only works if your mesh has a property called "attribute" and you just want this one in output. This would also be great to have for any property, not just "attribute". EDIT2: I cannot make it work when using "attribute". The "attribute" does not exist in the output. |
@alexbenedicto IIRC |
@rrsettgast The benefit of this PR is first to provide an attribute field that can help visualize specific results (such as applying a threshold on particular data or identifying a fault, for example). As this is an optional feature, it does not affect the memory footprint of the results unless the user explicitly requests the export of such a property. I have now extended this work to allow propagating any property from the input mesh to the output results. As requested by @alexbenedicto, this can now be tested from his side. I have edited the first message to change the way it works. |
This PR generalizes the approach to allow users to propagate a user-defined list of fields from the input mesh to the output results.
By default, no additional fields are exported, but users can optionally specify which fields to propagate.
Here is a short example of how it works, with a new keyword to make the declaration of propagated fields: