Can you mix spatialdb.uniformDB and spatialdb.SimpleDB?

Hello developers,

I am running a 3D poroelastic simulation based off of magma-2d using PyLith 4.2.0.

Turning gravity on with:

gravity_field = spatialdata.spatialdb.GravityField
gravity_field.gravity_dir = [0.0, 0.0, -1.0]

works and including reference stresses in the db_auxiliary_field works too:

However, the reference stresses above are specified using UniformDB. I want to include them using simpleDB so that I have stresses that increase with depth according to the overburden pressure for gravitational body forces. Like the example file in subduction-3d/mat_initial_stress_grav.spatialDB:

Can I mix spatialdb.uniformDB and spatialdb.SimpleDB ? uniformDB for the material properties and simpleDB for the references stresses? How would I update my pylithapp.cfg (attached)?
pylithapp.cfg (4.1 KB)

Thank you,
Eduardo

There are two options. The easiest option is to use a SimpleDB or SimpleGridDB and list uniform values for the cases in which there is no spatial variation. A more sophisticated approach is to use CompositeDB with two spatial databases, a UniformDB for the values that are uniform and a SimpleDB or SimpleGridDB for the values that vary spatially.

Here is the documentation for the CompositeDB with an example: