Skip to content

AtPoints Operators - Add "foreign" field to support mapping between distinct element sets with consistent point sets #1931

@zatkins-dev

Description

@zatkins-dev

Motivation

The particular use case is that I need to project a quantity from different mesh elements to the same set of points. The points here are "shared" between the two sides - they have the same quadrature weights and areas, etc., but they are grouped differently and have different reference coordinates for each set of elements.

After interpolating from each set of FEM nodes to points, I need to be able to evaluate a QFunction which takes the pair of values at each point as an input to compute some physics.

Finally, the resulting values are interp-transposed back to one of the element sets and finally added into the FEM L-vector.

Current Approach

Currently, our at-point operators require that all element restrictions refer to the same elements, so that we can group points by their enclosing elements. As a result, this operation requires 2 "setup" operators (one for each set of mesh elements) that just interp to points, then 2 "output" operators (again, one for each set of mesh elements) to compute the physics and interp-transpose back to the mesh nodes.

This approach is particularly problematic for assembly (let's focus on diagonal), since our assembly routines only affect active outputs with the current active inputs. As such, all of the coupling between the two sets of mesh elements is lost. See https://gitlab.com/micromorph/ratel/-/merge_requests/1213 for an example of this approach.

Proposed Solution

Introduce CeedOperatorAtPointsSetForeignField() which, in addition to the arguments to CeedOperatorSetField(), takes the reference coordinates and restriction for the layout of the other elements.

In implementations, we would have to first interpolate from the foreign fields to an intermediate point vector, then use an internally created at-points element restriction to extract the values needed for the QFunction.

Additionally, for diagonal assembly, we would have to include the foreign field's elements in the loop over input elements.

Here's a hand drawn diagram of the process as I foresee it.

rough_foreign_field_diagram.pdf

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions