FEniCS / ufl

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

ConstantValue and Parameter #267

Open mscroggs opened 4 months ago

mscroggs commented 4 months ago

As discussed at SysGenX meeting, we should:

jorgensd commented 4 months ago

Is Firedrake (or FEniCSx for that matter) using ConstantValue? As discussed earlier, Constant with an associated domain is motivated by differentiation (i.e. the derivative of a Constant-value maps to the real-element).

dham commented 4 months ago

Yes, we are using ConstantValue. As soon as you start doing multiple domain calculations, having to associate a domain with a constant is a pain. We concede the differentiation point. For the moment, differentiation WRT to a Parameter won't be possible. In theory in the future it could be made so but that is a much bigger change.

jorgensd commented 4 months ago

I think AbstractParameter should have a dtype as input, as it could be: Float32,float64,complex64, complex128 etc, which should change the representation of it.