TensorProductQR

About the TensorProductQR 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 TensorProductQR

Class documentation

class WaveBlocksND.TensorProductQR(rules, options={})[source]

This class implements the construction of high dimensional quadrature rules from one-dimensional ones by taking tensor products.

__init__(rules, options={})[source]

Initialize a TensorProductQR instance.

Parameters:rules – A list of QuadratureRule subclass instances. Their nodes and weights will be used to compute the tensor product.
construct_rule()[source]

Compute the tensor product of the given quadrature rules.

Note

This is an internal method and there should be no reason to explicitely call it manually.

Returns:The nodes \{\gamma_i\}_i and weights \{\omega_i\}_i of the tensor product quadrature rule. The array of all nodes has a shape of (D, |\Gamma|) and the array of weights is of shape (|\Gamma|).
get_description()[source]

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

get_dimension()
Returns:The space dimension D of the quadrature rule.
get_nodes(flat=True, split=False)[source]

Return the quadrature nodes \{\gamma_i\}_i.

Parameters:
  • flat (Boolean, default is True.) – Dummy parameter for API compatibility with Grids.
  • split (Boolean, default is False.) – Dummy parameter for API compatibility with Grids.
Returns:

An ndarray containing the quadrature nodes \{\gamma_i\}_i.

get_number_nodes()
Returns:The number of quadrature nodes denoted by |\Gamma| that are part of this quadrature rule \Gamma = (\gamma, \omega).
get_weights()[source]

Returns the quadrature weights \{\omega_i\}_i.

Returns:An ndarray containing the quadrature weights \{\omega_i\}_i.