SDC Integrator (sdc_integrator)

class pypint.integrators.sdc_integrator.SdcIntegrator[source]

Bases: pypint.integrators.integrator_base.IntegratorBase

Integral part of the SDC algorithm.

_construct_q_matrix()[source]

Constructs integration \(Q\)-matrix

The \(Q\)-matrix is the commulation of the rows of the \(S\)-matrix. I.e. row \(i\) of \(Q\) is the sum of the rows \(0\) to \(i - 1\) of \(S\).

However, \(Q\) has one row more than \(S\), namely the first, which is constant zero.

_construct_s_matrix()[source]

Constructs integration \(S\)-matrix

Rows of the matrix are the integration from one node to the next. I.e. row \(i\) integrates from node \(i-1\) to node \(i\).

evaluate(data, **kwargs)[source]

Computes the integral until the given node from the previous one.

For integration nodes \(\tau_i\), \(i=1,\dots,n\) specifying \(\tau_3\) as target_node results in the integral \(\int_{\tau_2}^{\tau_3}\).

Examples

Given five integration nodes: \(\tau_1, \dots, \tau_5\).

To compute the integral from \(\tau_2\) to \(\tau_3\) one need to specify target_node as 3 and from_node as 2. Internally, the \(S\)-matrix is used.

To compute the full integral over all nodes one need to specify target_node as 5 only. Internally, the \(Q\)-matrix is used.

Parameters:
  • target_node (int) – (optional) (1-based) index of the last node to integrate. In case it is not given, an integral over the full interval is assumed.
  • from_node (int) – (optional) (1-based) index of the first node to integrate from. (defaults to ``0``)
Raises:

ValueError

  • if target_node is not given
  • if from_node is not smaller than target_node

See also

IntegratorBase.evaluate() : overridden method

init(nodes_type=<class 'pypint.integrators.node_providers.gauss_lobatto_nodes.GaussLobattoNodes'>, num_nodes=3, weights_function=<class 'pypint.integrators.weight_function_providers.polynomial_weight_function.PolynomialWeightFunction'>, interval=None)[source]

Initialize SDC Integrator

Parameters:
transform_interval(interval)[source]

Transforms nodes onto new interval

See also

IntegratorBase.transform_interval() : overridden method