hippylibX.modeling package
Submodules
hippylibX.modeling.PDEProblem module
- class hippylibX.modeling.PDEProblem.PDEVariationalProblem(Vh: list, varf_handler, bc=[], bc0=[], is_fwd_linear=False)[source]
Bases:
object- apply_ij(i: int, j: int, dir: dolfinx.la.Vector, out: dolfinx.la.Vector) None[source]
Given \(u, m, p\); compute \(\delta_{ij} F(u, m, p; \hat{i}, \tilde{j})\) in the direction \(\tilde{j} =\)
disr, \(\forall \hat{i}\).
- evalGradientParameter(x: list, out: dolfinx.la.Vector) None[source]
Given \(u, m, p\); evaluate \(\delta_m F(u, m, p; \hat{m}),\, \forall \hat{m}.\)
- setLinearizationPoint(x: list, gauss_newton_approx) None[source]
Set the values of the state and parameter for the incremental forward and adjoint solvers.
- solveAdj(adj: dolfinx.la.Vector, x: dolfinx.la.Vector, adj_rhs: dolfinx.la.Vector) None[source]
Solve the linear adjoint problem: Given \(m, u\); find \(p\) such that .. math:: delta_u F(u, m, p;hat{u}) = 0, quad forall hat{u}.
- solveFwd(state: dolfinx.la.Vector, x: list) None[source]
Solve the possibly nonlinear forward problem: Given \(m\), find \(u\) such that
\[\delta_p F(u, m, p;\hat{p}) = 0,\quad \forall \hat{p}.\]
- solveIncremental(out: dolfinx.la.Vector, rhs: dolfinx.la.Vector, is_adj: bool) None[source]
If
is_adj == False:Solve the forward incremental system: Given \(u, m\), find \(\tilde{u}\) such that
\[\delta_{pu} F(u, m, p; \hat{p}, \tilde{u}) = \mbox{rhs},\quad \forall \hat{p}.\]If
is_adj == True:Solve the adjoint incremental system: Given \(u, m\), find \(\tilde{p}\) such that
\[\delta_{up} F(u, m, p; \hat{u}, \tilde{p}) = \mbox{rhs},\quad \forall \hat{u}.\]
hippylibX.modeling.laplaceApproximation module
hippylibX.modeling.misfit module
- class hippylibX.modeling.misfit.DiscreteStateObservationMisfit(B: petsc4py.PETSc.Mat, d: petsc4py.PETSc.Mat, sigma2: float)[source]
Bases:
objectThis class define a misfit function for a discrete linear observation operator B math: 1/(2sigma^2) || B u - d ||^2
Constructor:
Bis the observation operatordis the datasigma2is the variance of the noise
- class hippylibX.modeling.misfit.NonGaussianContinuousMisfit(Vh: list, form, bc0=[])[source]
Bases:
objectAbstract class to model the misfit component of the cost functional. In the following
xwill denote the variable[u, m, p], denoting respectively the stateu, the parameterm, and the adjoint variablep.The methods in the class misfit will usually access the state u and possibly the parameter
m. The adjoint variables will never be accessed.- apply_ij(i: int, j: int, dir: dolfinx.la.Vector, out: dolfinx.la.Vector) None[source]
Apply the second variation \(\delta_{ij}\) (
i,j = STATE,PARAMETER) of the cost in directiondir.
- cost(x: list) float[source]
Given x evaluate the cost functional. Only the state u and (possibly) the parameter m are accessed.
hippylibX.modeling.model module
hippylibX.modeling.modelVerify module
hippylibX.modeling.prior module
hippylibX.modeling.reducedHessian module
hippylibX.modeling.Regularization module
hippylibX.modeling.variables module
Enumerator for the variables of the inverse problem: - the STATE, PARAMETER, and ADJOINT variables.