geodynamics / pylith

PyLith is a finite element code for the solution of dynamic and quasi-static tectonic deformation problems.
Other
154 stars 98 forks source link

Allow more complex spatial and temporal formulations for Neumann and Dirichlet boundary conditions #494

Open baagaard-usgs opened 2 years ago

baagaard-usgs commented 2 years ago

Description

We currently associate point-wise functions and auxiliary fields with an integration key (label, label value, field, and part). These must be unique. This prevents us from applying multiple Neumann BCs for the same field on a given boundary to achieve a more complex spatial and temporal boundary condition.

Desired Solution

Allow more complicated spatial and temporal formulations for Neumann (and Dirichlet) boundary conditions.

Alternatives

An alternative formulation is to allow multiple Neumann BC on the same boundary.

baagaard-usgs commented 1 year ago

Adding support for complex spatial and temporal formulations for boundary conditions involves two main changes.

  1. Add time as an argument to the spatial database query interface. Spatial databases could ignore it, and we should add a flag that allows an application to detect whether time is used.
  2. Implement a spatial database for complex spatial and temporal variations using HDF5 as the storage. We could set this up to be consistent with PyLith output. That is, include topology information and time slices and use the DMPlex projection functions to interpolate spatially. The spatial database would be implemented as its own library or part of PyLith, because the spatial database library does not depend on PETSc.
  3. Update the boundary condition and fault implementations (and potentially bulk rheologies) to potentially make use of the time dependence in the spatial database query. We already have some of the functionality implemented with our use of the time history database.

Complexities

  1. Having a spatial and temporal database is incompatible with our current implementation of Dirichlet and Neumann boundary conditions. How do we preserve the current functionality? We probably want separate objects as we have done for spatial databases versus analytical functions.
  2. Does using DMPlex project functions break our current interface?