The optimization of functions subject to partial differential equations (PDE) plays an important role in many areas of science and industry. In this paper we introduce the basic concepts of PDE-constrained optimization and show how the all-at-once approach will lead to linear systems in saddle point form. We will discuss implementation details and different boundary conditions. We then show how these system can be solved efficiently and discuss methods and preconditioners also in the case when bound constraints for the control are introduced. Numerical results will illustrate the competitiveness of our techniques.
We develop a method for counting number of cells and extraction of approximate cell centers in 2D and 3D images of early stages of the zebra-fish embryogenesis. The approximate cell centers give us the starting points for the subjective surface based cell segmentation. We move in the inner normal direction all level sets of nuclei and membranes images by a constant speed with slight regularization of this flow by the (mean) curvature. Such multi-scale evolutionary process is represented by a geometrical advection-diffusion equation which gives us at a certain scale the desired information on the number of cells. For solving the problems computationally we use flux-based finite volume level set method developed by Frolkovič and Mikula in \cite{FM1} and semi-implicit co-volume subjective surface method given in \cite{CMSSg, MSSg_CVS, MSSg_chapter}. Computational experiments on testing and real 2D and 3D embryogenesis images are presented and the results are discussed.