Open ksagiyam opened 2 months ago
@jpdean @jorgensd This is what we briefly discussed at PDESoft. Could you have a look?
It would be helpful to have a PR summary, e.g. what it sets out the achieve, what it supports, designs considered, design rationale, implementation summary, and what a MixedMesh is and how a MixedMesh is different from a Mesh.
Updated PR summary.
Added more checks.
Fixed MixedPullback.physical_value_shape()
.
Can I have another round of review on this?
First half of https://github.com/FEniCS/ufl/pull/264
Introduce
MixedMesh
class for multi-mesh problems.Note that
extract_domains()
now uses more robustsort_domains()
inside, so it might behave slightly differently.Edit 12-09-2024:
MixedMesh
class represents a collection of meshes (e.g., submeshes) that, along with aMixedElement
, can represent a mixed function space defined across multiple domains. The motivation is to allow for treatingArgument
s andCoefficient
s on a mixed function space defined across multiple domains just like those on a mixed function space defined on a single mesh.Specifically, the following becomes possible (see tests for more):
For now, one can only perform cell integrations when
MixedMesh
es are used. This is because, e.g., an interior facet integration on a submesh may either be interior or exterior facet integration on the parent mesh, and we need a logic to apply default restrictions on coefficients defined on the participating meshes. This is the second half of https://github.com/FEniCS/ufl/pull/264.Also, currently, all component meshes must have the same cell type (and thus the same topological dimension) -- we are to remove this limitation in the future.
Core changes:
GradRuleSet.{reference_value, reference_grad}
work component-wise (component of the mixed space) if theFunctionSpace
is defined on aMixedMesh
, so that each component is associated with a component of theMixedMesh
, saydomain_i
(JacobianInverse(domain_i)
is then well defined).extract_arguments_and_coefficients
is now calledextract_terminals_with_domain
, and it now also collectsGeometricQuanty
s, so that we can correctly handle, saySpatialCoordinate(mesh1)
andSpatialCoordinate(mesh2)
, in problem solving environments.