regpy.functionals.ngsolve¶
Special NGSolve functionals defined on the regpy.vecsps.ngsolve.NgsSpace.
Classes¶
Functions¶
|
Computes the divergence of a vector field 'p' on a FES 'fes'. gradp is a list of ngsolve CoefficientFunctions |
Module Contents¶
- class regpy.functionals.ngsolve.NgsL1(domain)[source]¶
Bases:
regpy.functionals.FunctionalImplementation of the \(L^1\)-norm on a given NgsSpace. It is registered under the Abstract functional L1 and should not be called directly but rather used by defining the abstract L1 functional as the penalty or data_fid when initializing the regularization setting by calling regpy.solvers.RegularizationSetting.
- Parameters:
domain (NgsSpace) – The underlying ngsolve space.
- class regpy.functionals.ngsolve.NgsTV(domain, h_domain=L2)[source]¶
Bases:
regpy.functionals.FunctionalImplementation of the total variation functional \(TV\) on a given NgsSpace. It is registered under the Abstract functional TV and should not be called directly but rather used by defining the abstract TV functional as the penalty or data_fid when initializing the regularization setting by calling regpy.solvers.RegularizationSetting.
- Parameters:
domain (NgsSpace) – The underlying ngsolve space.
h_domain (HilbertSpace) – The Hilbert space wrt which the proximal gets computed.
- regpy.functionals.ngsolve.ngsdivergence(p, fes)[source]¶
Computes the divergence of a vector field ‘p’ on a FES ‘fes’. gradp is a list of ngsolve CoefficientFunctions p=(p_x, p_y, p_z, …). The return value is the coefficient array of the GridFunction holding the divergence.
- Parameters:
p (vector field) – Vector field on a FES ‘fes’ for which to compute the divergence.
fes (ngsolve fes) – Underlying FES.
- Returns:
Values of the divergence of the given vector p
- Return type:
array