In Pylith 4, how can I output only a portion of the simulation results, such as subdomain groundsurf results, just like in Pylith 2?
The mechanism for controlling output in PyLith v3 and later is nearly the same as in PyLith v2.
In examples/reverse-2d
we set the observers to both the domain and boundary using
[pylithapp.problem]
solution_observers = [domain, boundary]
solution_observers.boundary = pylith.meshio.OutputSolnBoundary
[pylithapp.problem.solution_observers.boundary]
# The `label` and `label_value` correspond to the name and tag of the
# physical group in the Gmsh Python script.
label = boundary_ypos
label_value = 13
If you want just the boundary, then we just change the solution_observers
to be only the boundary.
[pylithapp.problem]
solution_observers = [boundary]
solution_observers.boundary = pylith.meshio.OutputSolnBoundary
[pylithapp.problem.solution_observers.boundary]
# The `label` and `label_value` correspond to the name and tag of the
# physical group in the Gmsh Python script.
label = boundary_ypos
label_value = 13
To turn off output for materials and boundary conditions, then just set the corresponding observers to an empty array.
[pylithapp.problem.materials.wedge]
observers = []
Thank you very much for your help!