Describe the bug
When trying to compute a derived quantity (say TotalVolume) with field="retention" the code crashes with the following error:
This bug occurs on main and was introduced by #736
Traceback (most recent call last):
File "/home/remidm/FESTIM/MWE2.py", line 40, in <module>
my_model.run()
File "/home/remidm/FESTIM/festim/generic_simulation.py", line 360, in run
self.run_steady()
File "/home/remidm/FESTIM/festim/generic_simulation.py", line 390, in run_steady
self.run_post_processing()
File "/home/remidm/FESTIM/festim/generic_simulation.py", line 442, in run_post_processing
self.exports.write(self.label_to_function, self.mesh.dx)
File "/home/remidm/FESTIM/festim/exports/exports.py", line 97, in write
export.compute(self.t)
File "/home/remidm/FESTIM/festim/exports/derived_quantities/derived_quantities.py", line 155, in compute
self.data = [self.make_header()]
^^^^^^^^^^^^^^^^^^
File "/home/remidm/FESTIM/festim/exports/derived_quantities/derived_quantities.py", line 121, in make_header
header.append(quantity.title)
^^^^^^^^^^^^^^
File "/home/remidm/FESTIM/festim/exports/derived_quantities/total_volume.py", line 47, in title
return quantity_title + f" ({self.export_unit})"
^^^^^^^^^^^^^^^^
File "/home/remidm/FESTIM/festim/exports/derived_quantities/total_volume.py", line 36, in export_unit
dim = self.function.function_space().mesh().topology().dim()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Sum' object has no attribute 'function_space'
Describe the bug When trying to compute a derived quantity (say
TotalVolume
) withfield="retention"
the code crashes with the following error:This bug occurs on
main
and was introduced by #736To Reproduce
Run: