GaussKronrodRule¶
- class GaussKronrodRule(*args)¶
Gauss-Kronrod rule used in the integration algorithm.
- Parameters:
- myGaussKronrodPairint
It encodes the selected rule.
Available rules:
GaussKronrodRule.G1K3,
GaussKronrodRule.G3K7,
GaussKronrodRule.G7K15,
GaussKronrodRule.G11K23,
GaussKronrodRule.G15K31,
GaussKronrodRule.G25K51.
Notes
The Gauss-Kronrod rules with enable to build two approximations of the definite integral defined by:
and:
We have , , , and .
The rule combines a -point Gauss rule and a -point Kronrod rule (re-using the nodes of the Gauss method). The nodes are defined on and always contain the node 0 when is odd.
Examples
Create an Gauss-Kronrod rule:
>>> import openturns as ot >>> myRule = ot.GaussKronrodRule(ot.GaussKronrodRule.G15K31)
Methods
Accessor to the object's name.
getName
()Accessor to the object's name.
getOrder
()Accessor to parameter.
Accessor to the weights used in the Gauss approximation.
Accessor to the positive nodes used in the Gauss-Kronrod approximation.
Accessor to the positive nodes used in the Gauss-Kronrod approximation.
getPair
()Accessor to pair definig the rule.
Accessor to the first Gauss weight.
Accessor to the first Kronrod weight.
hasName
()Test if the object is named.
setName
(name)Accessor to the object's name.
- __init__(*args)¶
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getOrder()¶
Accessor to parameter.
- Returns:
- mint
The number of points used for the Gauss approximation.
- getOtherGaussWeights()¶
Accessor to the weights used in the Gauss approximation.
- Returns:
- otherGaussWeights
Point
The weights
- otherGaussWeights
- getOtherKronrodNodes()¶
Accessor to the positive nodes used in the Gauss-Kronrod approximation.
- Returns:
- otherKronrodNodes
Point
The positive nodes It contains the positive Gauss nodes as we have .
- otherKronrodNodes
- getOtherKronrodWeights()¶
Accessor to the positive nodes used in the Gauss-Kronrod approximation.
- Returns:
- otherKronrodWeights
Point
The weights .
- otherKronrodWeights
- getPair()¶
Accessor to pair definig the rule.
- Returns:
- gkPairint
Id of the Gauss-Kronrod rule.
- getZeroGaussWeight()¶
Accessor to the first Gauss weight.
- Returns:
- zeroKronrodWeightfloat
The first weight .
- getZeroKronrodWeight()¶
Accessor to the first Kronrod weight.
- Returns:
- zeroKronrodWeightfloat
The first weight .
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.