How to pass _gravityField to getKernelRHSResidualPressure

Hi Brad,

We (@robertlwalker and @lurpi ) are stuck on an error on the Poroelasticity implementation.

We are trying to use the flag _gravityField inside the pylith::materials::IsotropicLinearPoroelasticity::getKernelRHSResidualPressure rheology implementation so that we can check what is the appropriate kernel to call for the g1p case (similar to what is done with the _useReferenceState option for the g1u).

However, we can’t figure out how to pass _gravityField flag to getKernelRHSResidualPressure from the pylith::materials::Poroelasticity::_setKernelsRHSResidual.

Could you help ?

The relevant files can be found here on Github.

Thanks!
Josimar

I think there are two general options:

  1. Put the if (_gravityIField) statement in the Poroelasticity object like you have on line 386 in Poroelasticity.cc. This is the appropriate solution if the inclusion of gravity in the pressure kernel does not depend on the rheology (the exact form can depend on the rheology but whether it is included or not does not depend on rheology).
  2. Put the if (_gravityField) statement in each rheology object. This is the appropriate solution if the inclusion of gravity in the pressure kernel depends on the rheology (that is selecting the appropriate kernel depends on other features/flags for the rheology). This approach would require adding a _gravityField data member to the RheologyPoroelasticity object along with setter/getter member functions; you would call the setter from the Poroelasticity object.
    What does the kernel for the pressure term look like?

Hi Brad,

Thanks for the comments. I think we will go with option 1. The kernel for the pressure term can be found on equation 1.201 on the developers manual.