UFL calculate with Trail Function

Asked by Niklas

Hello Community,

I have a little problem with the UFL definition of my boundary value problem. In my bilinear term I have a factor

    a= ...dx - ...*inner(T-T0,v)...dx ,

where T is the trail function, v is the test function and T0 some constant. If the constant subtraction is removed, the simulation goes through. If present, it throws an exception "All terms in form must have same rank." while assembling.

I figured the problem is the operation of a constant on a function. My first attempt was an interpolated constant function for T0, without success:

   T0 = interpolate(Constant(37), V)

Any ideas on the correct formulation?

Thanks a lot in advance...

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Niklas
Solved:
Last query:
Last reply:
Revision history for this message
Niklas (ntschech) said :
#1

Update:
I made a mistake in the formulation. The T0 has to be separated and belongs to the mono-linear part L.