regpy.functionals.ngsolve ========================= .. py:module:: regpy.functionals.ngsolve .. autoapi-nested-parse:: Special NGSolve functionals defined on the `regpy.vecsps.ngsolve.NgsSpace`. Classes ------- .. autoapisummary:: regpy.functionals.ngsolve.NgsL1 regpy.functionals.ngsolve.NgsTV Functions --------- .. autoapisummary:: regpy.functionals.ngsolve.ngsdivergence Module Contents --------------- .. py:class:: NgsL1(domain) Bases: :py:obj:`regpy.functionals.Functional` Implementation of the :math:`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`. :param domain: The underlying `ngsolve` space. :type domain: NgsSpace .. py:class:: NgsTV(domain, h_domain=L2) Bases: :py:obj:`regpy.functionals.Functional` Implementation of the total variation functional :math:`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`. :param domain: The underlying `ngsolve` space. :type domain: NgsSpace :param h_domain: The Hilbert space wrt which the proximal gets computed. :type h_domain: HilbertSpace .. py:function:: ngsdivergence(p, fes) 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. :param p: Vector field on a FES 'fes' for which to compute the divergence. :type p: vector field :param fes: Underlying FES. :type fes: ngsolve fes :returns: Values of the divergence of the given vector `p` :rtype: array