# Implement support for restrictions to subdomains

FFC should support forms defined over elements defined over different domains/regions. Today, FFC simplify ignores the differing domains.

Instead, for each integral in the form, FFC should generate tabulate-tensor functions

computing local element tensors of the minimal dimension necessary.

Take ~this as an example:

D = Domain(triangle, name='Universe')

left = Region(D, (0, 2), name='left')

right = Region(D, (1, 2), name='right')

V1 = FiniteElement("CG", left, 1)

V2 = FiniteElement("CG", right, 2)

W = V1*V2

(u1, u2) = TrialFunctions(W)

(v1, v2) = TestFunctions(W)

a = u1*v1*dx(0) + u2*v2*dx(1) + u1*v1*dx(2)

For the case above, the local element tensors corresponding to dx(0),

should be 3x3, while those corresponding to dx(1) should be 6x6,

and those corresponding to dx(2) would be 9x9.

This, potentially in combination with clever tabulate_dofs or dof map

construction, should enable assembly over multidomains without much overhead.

## Blueprint information

- Status:
- Not started

- Approver:
- None

- Priority:
- High

- Drafter:
- None

- Direction:
- Needs approval

- Assignee:
- None

- Definition:
- Discussion

- Series goal:
- None

- Implementation:
- Unknown

- Milestone target:
- None

- Started by

- Completed by

### Whiteboard

MER: I don't understand what this blueprint is about.

MSA: This is for function spaces living on subdomains. Core topic for the upcoming sprint. Note that the UFL syntax will be up for revision if we add better support for expressing subdomains.

MER: So, what is the existing UFL syntax for this?

MSA:

In [3]: V = FiniteElement("CG", triangle, 1)

In [4]: V[dx(0)]

Out[4]: RestrictedEleme

MER: Ack. I'll up the priority then :-)

### Work Items

## Dependency tree

* Blueprints in grey have been implemented.