nifty.cl.operators.contraction_operator module#
- class ContractionOperator(domain, spaces, power=0)[source]#
Bases:
LinearOperatorA
LinearOperatorwhich sums up fields into the direction of subspaces.This Operator sums up a field which is defined on a
DomainTupleto aDomainTuplewhich is a subset of the former.- Parameters:
domain (Domain, tuple of Domain or DomainTuple)
spaces (None, int or tuple of int) – The elements of “domain” which are contracted. If None, everything is contracted
power (int, default=0) – If nonzero, the fields defined on self.domain are weighted with the specified power along the submdomains which are contracted.
- apply(x, mode)[source]#
Applies the Operator to a given x, in a specified mode.
- Parameters:
x (
nifty.cl.field.Field) – The input Field, defined on the Operator’s domain or target, depending on mode.mode (int) –
TIMES: normal applicationADJOINT_TIMES: adjoint applicationINVERSE_TIMES: inverse applicationADJOINT_INVERSE_TIMESorINVERSE_ADJOINT_TIMES: adjoint inverse application
- Returns:
The processed Field defined on the Operator’s target or domain, depending on mode.
- Return type:
- IntegrationOperator(domain, spaces)[source]#
A
LinearOperatorwhich integrates fields into the direction of subspaces.This Operator integrates a field which is defined on a
DomainTupleto aDomainTuplewhich is a subset of the former.- Parameters:
domain (Domain, tuple of Domain or DomainTuple)
spaces (None, int or tuple of int) – The elements of “domain” which are contracted. If None, everything is contracted