HomogeneousInnerProductLCWP

About the HomogeneousInnerProductLCWP class

The WaveBlocks Project

@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 R. Bourquin @license: Modified BSD License

Inheritance diagram

Inheritance diagram of HomogeneousInnerProductLCWP

Class documentation

class WaveBlocksND.HomogeneousInnerProductLCWP(delegate=None, oracle=None)[source]
__init__(delegate=None, oracle=None)[source]

Note that although this class computes the homogeneous inner product \langle\Upsilon|f|\Upsilon\rangle of a single linear combination \Upsilon with itself, the delegate inner product class used for computing \langle\Psi|f|\Psi^\prime\rangle has still to be of inhomogeneous type.

Parameters:
  • delegate (A InnerProduct subclass instance.) – The delegate inner product.
  • oracle – The sparsity oracle to use. If the variable is None no oracle is used and all integrals are computed.

Note

Make sure to use an inhomogeneous inner product here.

build_matrix(lcket, operator=None, component=None, eval_at_once=False)[source]

Delegates the computation of the matrix elements of \langle\Upsilon|f|\Upsilon\rangle for a general function f(x) with x \in \mathbb{R}^D. The matrix is computed without including the coefficients c_j.

Parameters:
  • lcket – The linear combination \Upsilon with J summands \Psi_j.
  • operator – A matrix-valued function f(x): \mathbb{R}^D \rightarrow \mathbb{R}^{N \times N}.
  • component (Integer or None, default is None.) – The index i of the component \Phi_j of \Psi_j. If set only those components will be taken into account for the computation.
  • eval_at_once (Boolean, default is False.) – Flag to tell whether the operator supports the entry=(r,c) call syntax.
Returns:

A matrix of size \sum_{j\in J} N_j \times \sum_{j\in J} N_{j}.

Type:

An ndarray.

get_delegate()

Return the Quadrature subclass instance used for evaluation of this inner product.

Returns:The current instance of the quadrature.
get_description()[source]

Return a description of this inner product object. A description is a dict containing all key-value pairs necessary to reconstruct the current instance. A description never contains any data.

get_oracle()[source]

Return the sparsity oracle in use or None.

quadrature(lcket, operator=None, component=None, eval_at_once=False)[source]

Delegates the evaluation of \langle\Upsilon|f|\Upsilon\rangle for a general function f(x) with x \in \mathbb{R}^D.

Parameters:
  • lcket – The linear combination \Upsilon with J summands \Psi_j.
  • operator – A matrix-valued function f(x): \mathbb{R}^D \rightarrow \mathbb{R}^{N \times N}.
  • component (Integer or None, default is None.) – The index i of the component \Phi_j of \Psi_j. If set only those components will be taken into account for the computation.
  • eval_at_once (Boolean, default is False.) – Flag to tell whether the operator supports the entry=(r,c) call syntax.
Returns:

The value of \langle\Upsilon|f|\Upsilon\rangle.

Type:

An ndarray.

set_delegate(delegate)

Set the Quadrature subclass instance used for quadrature.

Parameters:delegate – The new Quadrature instance.
set_oracle(new_oracle)[source]

Set the sparsity oracle.

Parameters:new_oracle – The new oracle to use. If the variable is None no oracle is used and all integrals are computed.