# UFL calculate with Trail Function

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(

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(

Any ideas on the correct formulation?

Thanks a lot in advance...

## Question information

- Language:
- English Edit question

- Status:
- Solved

- Assignee:
- No assignee Edit question

- Solved by:
- Niklas

- Solved:
- 2013-05-21

- Last query:
- 2013-05-21

- Last reply:

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.