FEniCS / ufl

UFL - Unified Form Language
https://fenicsproject.org
GNU Lesser General Public License v3.0
97 stars 64 forks source link

Relax assumption on BaseFormOperator's dual argument slot #283

Closed nbouziani closed 1 month ago

nbouziani commented 4 months ago

This PR relaxes the assumption on the type of the object that goes into the dual argument slot of BaseFormOperators. Base form operators (e.g. ExternalOperator or Interpolate) of the form B: V -> V, or B: V x V* -> R, have an argument slot to represent their dual argument (the one in V). Strictly speaking, whatever is in V should be allowed to go in there. At the moment, the code assumes that only a Cofunction or a Form can be held in this slot. This PR extends that assumption to other cases such as Action or even BaseFormOperator.