= -\mu^{reg} \int_{\Omega} \omega \cdot p \cdot q + \omega_i \cdot L_i^2 \cdot p_{,i} \cdot q_{,i} dx -\end{equation} -In practice it is assumed that the level set function is known to be zero in certain regions in the domain. Typically these regions -corresponds to region above the surface or regions explored by drilling. - -We need to provide the derivative of the cost function $J_{reg}$ with respect to a given direction $q$ which equals zero at locations -where $m$ is assumed to be zero. For a single-valued -level set function th is takes the form -\begin{equation}\label{EQU:REG:3} -\frac{ \partial J_{reg}}{\partial q}(m) = -\mu^{reg} \int_{\Omega} \omega \cdot m \cdot q + \omega_i \cdot L_i^2 \cdot m_{,i} \cdot q_{,i} dx -\end{equation} -So we can represent the gradient $\nabla J_{reg}$ of the cost function $J_{reg}$ by the pair of values $(Y,X)$ where we set -\begin{equation}\label{EQU:REG:3b} -Y=\mu^{reg} \cdot \omega \cdot m \mbox{ and } X_i = \mu^{reg} \cdot \omega_i \cdot L_i^2 \cdot m_{,i} -\end{equation} -and -\begin{equation}\label{EQU:REG:3c} -\frac{ \partial J_{reg}}{\partial q}(m) = [ \nabla J_{reg}(m), q ] = -\int_{\Omega} Y \cdot q + X_i \cdot q_{,i} dx -\end{equation} -where $[.,.]$ is called the dual product. - -For a multi-valued level set function an additional correlation term is introduced into the cost function $J_{total}$: -\begin{equation}\label{EQU:REG:1c} -J_{reg}(m) = \frac{1}{2} < m, m > + \frac{1}{2} \sum_{k,l} \mu_{kl}^{sec} \cdot \int_{\Omega} \sigma(m_k,m_l) dx -\end{equation} -where $sigma$ is a given symmetric, non-negative correlation function, and $\mu_{kl}^{sec}$ are symmetric, weighting factors -($\mu_{kl}^{sec} = \mu_{lk}^{sec}$, $\mu_{kk}^{sec}=0$) which may -be altered during the inversion. We use the correlation function -\begin{equation}\label{EQU:REG:4} - \sigma(a,b) = \frac{L^2}{2} \cdot ( ( a_{,i} \cdot a_{,i}) \cdot ( b_{,i} \cdot b_{,i}) - ( a_{,i} \cdot b_{,i})^2 ) -\end{equation} -with $L=L_i \cdot L_i$. Minimizing $J_{reg}(m)$ is minimizing the angle between the surface normals of the contours formed by -two level set function. the derivative of the cost function $J_{reg}$ with respect to a given direction $q$ which equals zero at locations -where $m$ is assumed to be zero: -\begin{equation}\label{EQU:REG:5} -\begin{array}{ll} -\displaystyle{\frac{ \partial J_{reg}}{\partial q}(m)} = -\displaystyle{\sum_{k} \mu^{reg}_k \int_{\Omega} \omega^{(k)} \cdot m_k \cdot q_k + \omega^{(k)}_i \cdot L_i^2 \cdot m_{k,i} \cdot q_{k,i} dx } \\ -+ \displaystyle{\sum_{k,l} \mu_{kl}^{sec} \cdot {L^2} \int_{\Omega} ( m_{k,i} \cdot q_{k,i}) \cdot ( m_{l,j} \cdot m_{l,j}) - ( m_{k,j} \cdot m_{l,j}) \cdot ( q_{l,i} \cdot m_{k,i}) } dx +For multi-valued level set function the characteristic function is set componentwise: +\begin{equation}\label{ref:EQU:REG:7b} +q_k(x) = \left\{ +\begin{array}{rl} + 1 & \mbox{ if component } m_k \mbox{ is set to zero at location } x \\ + 0 & \mbox{ otherwise } \end{array} +\right. \end{equation} -Similar to the single-case we can represent -the gradient $\nabla J_{reg}$ of the cost function $J_{reg}$ by the pair of values $(Y,X)$ where we set -\begin{equation}\label{EQU:REG:6} -Y_k= \mu^{reg}_k \cdot \omega^{(k)} \cdot m_k -\end{equation} -and -\begin{equation}\label{EQU:REG:6b} -X_{ki} = \mu^{reg}_k \cdot \omega^{(k)} \cdot L_i^2 \cdot m_{k,i} + -\sum_{l} \mu_{kl}^{sec} \cdot {L^2} \cdot ( ( m_{l,j} \cdot m_{l,j}) \cdot m_{k,i} - ( m_{l,j} \cdot m_{k,j}) \cdot m_{l,i} ) -\end{equation} -and -\begin{equation}\label{EQU:REG:7} -\frac{ \partial J_{reg}}{\partial q}(m) = [ \nabla J_{reg}(m), q ] = -\int_{\Omega} Y_j \cdot q_j + X_{ki} \cdot q_{k,i} dx + + +\section{Usage} + +\LG{Add example} + +\begin{classdesc}{Regularization}{domain + \optional{, w0=\None} + \optional{, w1=\None} + \optional{, wc=\None} + \optional{, location_of_set_m=Data()} + \optional{, numLevelSets=1} + \optional{, useDiagonalHessianApproximation=\False} + \optional{, tol=1e-8} + \optional{, scale=\None} + \optional{, scale_c=\None} + } + + +initializes a regularization component of the cost function for inversion. +\member{domain} defines the domain of the inversion. \member{numLevelSets} +sets the number of level set functions to be found during the inversion. +\member{w0}, \member{w1} and \member{wc} define the weighting factors +$\omega^{(0)}$, +$\omega^{(1)}$ and +$\omega^{(c)}$, respectively. A value for \member{w0} or \member{w1} or both must be given. +If more then one level set function is involved \member{wc} must be given. +\member{location_of_set_m} sets the characteristic function $q$ +to define locations where the level set function is set to zero, see equation~(\ref{ref:EQU:REG:7}). +\member{scale} and +\member{scale_c} set the scales $\alpha_k$ in equation~(\ref{ref:EQU:REG:5}) and +$\alpha^{(c)}_{lk}$ in equation~(\ref{ref:EQU:REG:6}), respectively. By default, their values are set to one. +Notice that weighting factors are rescaled to meet the scaling conditions. \member{tol} sets the +tolerance for the calculation of the Hessian approximation. \member{useDiagonalHessianApproximation} +indicates to ignore coupling in the Hessian approximation produced by the +cross-gradient term. This can speed-up an individual iteration step in the inversion but typically leads to more +inversion steps. +\end{classdesc} + +\section{Gradient Calculation} + + +The cost function kernel\index{cost function!kernel} is given as +\begin{equation}\label{ref:EQU:REG:100} +K^{reg}(m) = \frac{1}{2} +\sum_{k} \mu_k \cdot ( \omega^{(0)}_k \cdot m_k^2 + \omega^{(1)}_{ki}m_{k,i}^2 ) ++ \sum_{l