Open ratnania opened 8 months ago
Do we want a Function
to be only scalar valued, or also vector and matrix valued?
Given that we already have the classes ScalarFunction
and VectorFunction
, which must belong to a ScalarFunctionSpace
or VectorFunctionSpace
, I suggest that we use the name UserFunction
for this class.
I agree that we need to think about the API. We have different ways of doing it;
ScalarFunction
and VectorFunction
and allow them to have an expression or implemented code,ScalarFunction
and VectorFunction
to UndefinedScalarFunction
and UndefinedVectorFunction
, and use ScalarFunction
and VectorFunction
with expression/code, in addition to a new object MatrixFunction
.
The latter seems to be more appropriate, since the user (does not and) will not call UndefinedScalarFunction
and UndefinedVectorFunction
constructors, but use element_of
.
Up to now, we were allowing expression (using the coordinates) to be passed directly in the weak formulation. We encountered two major problems with this approach
This issue aims at allowing the definition of a Function, as a container, for two major uses;
in which case,
F
will not appear as a free-variable, and its expression will be provided inTerminalExpr
like in the valuedConstant
case.