# Outpur writer preferred

**URL:** <https://community.geodynamics.org/t/outpur-writer-preferred/2118>\
**Category:** PyLith\
**Created:** [December 1, 2021, 2:49pm UTC](https://community.geodynamics.org/t/outpur-writer-preferred/2118 "2021-12-01T14:49:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRCCGEO](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/drccgeo/32/578_2.png) [@DRCCGEO](https://community.geodynamics.org/u/DRCCGEO)\
**Post date:** [December 1, 2021, 2:49pm UTC](https://community.geodynamics.org/t/outpur-writer-preferred/2118/1 "2021-12-01T14:49:45Z")

</div>

Hi,

Is there any option to obtain only outputs from preferred materials in 2D analysis? For example, I have a geometry mesh with 5 different materials’ polygon, but I only want the \*.HDF5 output files for 2 materials, I don’t want that pyilth write HDF5 neither VTK files for the other 3 materials.

Thanks for your time.

Regards.

---

<div class="post-metadata">

**Author:** ![willic3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/willic3/32/598_2.png) [@willic3](https://community.geodynamics.org/u/willic3)\
**Post date:** [December 1, 2021, 8:25pm UTC](https://community.geodynamics.org/t/outpur-writer-preferred/2118/2 "2021-12-01T20:25:02Z")

</div>

Yes, you can do this by setting the data fields to an empty list for those materials where you don’t want output. For example:

```auto
[pylithapp.problem.materials.toe.output]
writer = pylith.meshio.DataWriterHDF5
cell_info_fields = [density,mu,lambda]
cell_data_fields = []

```

This section from a .cfg file will set the output type to HDF5, and will output the listed `cell_info_fields` for this material. The data fields are set to an empty list, however. For those materials for which you want output, you can do something like:

```auto
[pylithapp.problem.materials.C0002G.output]
writer = pylith.meshio.DataWriterHDF5
cell_info_fields = [density,mu,lambda]
cell_data_fields = [stress, total_strain]

```

Cheers,  
Charles
