# Problem with assembling

**URL:** <https://fenicsproject.discourse.group/t/problem-with-assembling/5670>\
**Category:** variational formulation\
**Created:** [April 25, 2021, 4:13pm UTC](https://fenicsproject.discourse.group/t/problem-with-assembling/5670 "2021-04-25T16:13:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbyJulia](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@newbyJulia](https://fenicsproject.discourse.group/u/newbyJulia)\
**Post date:** [April 25, 2021, 4:13pm UTC](https://fenicsproject.discourse.group/t/problem-with-assembling/5670/1 "2021-04-25T16:13:58Z")

</div>

Hello everybody,

I would be very grateful if someone here could help me.

I have the following problem. I want to “change” the linear form and then assemble it. The problem is that in my

```auto
L = M*u0_vec + dt*M*v0_vec + dt**2*(1-2*beta)*M*a0_vec 

```

M is a dolfin.cpp.la.Matrix and u0,v0 and a0 were originally dolfin.function.function.Function`s. Now they are dolfin.cpp.la.PETScVector`s. After my calculation i want to do

```auto
assemble(L).

```

That is why L has to be again of the type of dolfin.function.function.Function. Now it is of course of the type dolfin.cpp.la.PETScVector. Is there any chance to convert it back?

Thank you!
