This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Is there a reverse split command?

+1 vote

I have a time dependent simulation I would like to compare with a steady state solution (unknown). To do so I want to use the last solution found in the time dependent case as an initial condition for the steady state solution.

The time dependent simulation has 3 coupled solutions. I can use the "split" command to separate each of these solutions from a mixed solution. For the steady state case the simplification of not relying on time dependence means I only need to solve for 2 of those solutions.

Is there a way to load in the 3 mixed solutions (a xml file), separate them using split, and then recombine the two functions I am interested in as an initial condition to solve the steady state?

asked Apr 22, 2016 by aldenpack FEniCS User (1,450 points)

1 Answer

+1 vote
 
Best answer

Look into FunctionAssigner. It is a more general way to do split(), and it also works in the opposite direction. Receiving and assigning function spaces can be one space or a list of spaces. This code shows the way to use it (and also a small bug that I have not yet gotten around to fix even though I meant to some months ago ...)

answered Apr 22, 2016 by Tormod Landet FEniCS User (5,130 points)
selected Jun 27, 2016 by aldenpack
...