Skip to content

Commit c5e3fdb

Browse files
Merge pull request festim-dev#1028 from jhdark/cov_fix
[BUG] Fix for exports with Change of Variable method
2 parents 58c2c0d + 1aec376 commit c5e3fdb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/festim/exports/vtx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def get_functions(self) -> list[fem.Function]:
162162
legacy_output = True
163163
break
164164
if legacy_output:
165-
return [field.sub_function for field in self._field]
165+
return [field.post_processing_solution for field in self._field]
166166
else:
167167
if self._subdomain is None:
168168
raise ValueError("Subdomain must be specified")

test/test_vtx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_vtx_export_one_function(tmpdir):
1414
"""Test can add one function to a vtx export"""
1515
u = dolfinx.fem.Function(V)
1616
sp = F.Species("H")
17-
sp.sub_function = u
17+
sp.post_processing_solution = u
1818
filename = str(tmpdir.join("my_export.bp"))
1919
my_export = F.VTXSpeciesExport(filename, field=sp)
2020

@@ -30,8 +30,8 @@ def test_vtx_export_two_functions(tmpdir):
3030

3131
sp1 = F.Species("1")
3232
sp2 = F.Species("2")
33-
sp1.sub_function = u
34-
sp2.sub_function = v
33+
sp1.post_processing_solution = u
34+
sp2.post_processing_solution = v
3535
filename = str(tmpdir.join("my_export.bp"))
3636
my_export = F.VTXSpeciesExport(filename, field=[sp1, sp2])
3737

0 commit comments

Comments
 (0)