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

Iterated problem solver

+2 votes

I have a question in terms of efficiency.

I'm interested in the heat flow through a flowing medium. I don't assume that a temperature change will influence any properties of the flow problem. This means I want to solve

${\displaystyle {\frac {\partial c}{\partial t}}=\nabla \cdot (D\nabla c)-\nabla \cdot ({\vec {v}}c)}$

where $\vec {v}$ is the solution of a Navier-Stokes equation in this area.
This is part of an optimization problem, so I'll have to solve this quite a couple of times. Since I don't assume that the flow problem changes in any way, I don't have to solve it again after the first time (I just care about the heat transport here).

Is it possible to save the solution of $\vec {v}$ in a file and load it later again when solving the problem for the next time?

asked Nov 13, 2016 by freistil FEniCS Novice (260 points)

1 Answer

+3 votes

Yes you can save solution Vectors to file in xml format, and reload them.
In parallel, you can also use HDF5File to save a solution Vector.

answered Nov 13, 2016 by chris_richardson FEniCS Expert (31,740 points)

Thanks, I'll try that!

...