GaussKronrodRule¶
-
class
GaussKronrodRule
(*args)¶ Gauss-Kronrod rule used in the integration algorithm.
- Parameters
- myGaussKronrodPair
GaussKronrodPair
It encodes the selected rule.
Available rules:
GaussKronrodRule.G1K3,
GaussKronrodRule.G3K7,
GaussKronrodRule.G7K15,
GaussKronrodRule.G11K23,
GaussKronrodRule.G15K31,
GaussKronrodRule.G25K51.
- myGaussKronrodPair
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
getClassName
(self)Accessor to the object’s name.
getId
(self)Accessor to the object’s id.
getName
(self)Accessor to the object’s name.
getOrder
(self)Accessor to parameter.
getOtherGaussWeights
(self)Accessor to the weights used in the Gauss approximation.
getOtherKronrodNodes
(self)Accessor to the positive nodes used in the Gauss-Kronrod approximation.
getOtherKronrodWeights
(self)Accessor to the positive nodes used in the Gauss-Kronrod approximation.
getPair
(self)Accessor to pair definig the rule.
getShadowedId
(self)Accessor to the object’s shadowed id.
getVisibility
(self)Accessor to the object’s visibility state.
getZeroGaussWeight
(self)Accessor to the first Gauss weight.
getZeroKronrodWeight
(self)Accessor to the first Kronrod weight.
hasName
(self)Test if the object is named.
hasVisibleName
(self)Test if the object has a distinguishable name.
setName
(self, name)Accessor to the object’s name.
setShadowedId
(self, id)Accessor to the object’s shadowed id.
setVisibility
(self, visible)Accessor to the object’s visibility state.
-
__init__
(self, \*args)¶ Initialize self. See help(type(self)) for accurate signature.
-
getClassName
(self)¶ Accessor to the object’s name.
- Returns
- class_namestr
The object class name (object.__class__.__name__).
-
getId
(self)¶ Accessor to the object’s id.
- Returns
- idint
Internal unique identifier.
-
getName
(self)¶ Accessor to the object’s name.
- Returns
- namestr
The name of the object.
-
getOrder
(self)¶ Accessor to parameter.
- Returns
- mint
The number of points used for the Gauss approximation.
-
getOtherGaussWeights
(self)¶ Accessor to the weights used in the Gauss approximation.
- Returns
- otherGaussWeights
Point
The weights
- otherGaussWeights
-
getOtherKronrodNodes
(self)¶ 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
(self)¶ Accessor to the positive nodes used in the Gauss-Kronrod approximation.
- Returns
- otherKronrodWeights
Point
The weights .
- otherKronrodWeights
-
getPair
(self)¶ Accessor to pair definig the rule.
- Returns
- gkPair
GaussKronrodPair
Id of the Gauss-Kronrod rule.
- gkPair
-
getShadowedId
(self)¶ Accessor to the object’s shadowed id.
- Returns
- idint
Internal unique identifier.
-
getVisibility
(self)¶ Accessor to the object’s visibility state.
- Returns
- visiblebool
Visibility flag.
-
getZeroGaussWeight
(self)¶ Accessor to the first Gauss weight.
- Returns
- zeroKronrodWeightfloat
The first weight .
-
getZeroKronrodWeight
(self)¶ Accessor to the first Kronrod weight.
- Returns
- zeroKronrodWeightfloat
The first weight .
-
hasName
(self)¶ Test if the object is named.
- Returns
- hasNamebool
True if the name is not empty.
-
hasVisibleName
(self)¶ Test if the object has a distinguishable name.
- Returns
- hasVisibleNamebool
True if the name is not empty and not the default one.
-
setName
(self, name)¶ Accessor to the object’s name.
- Parameters
- namestr
The name of the object.
-
setShadowedId
(self, id)¶ Accessor to the object’s shadowed id.
- Parameters
- idint
Internal unique identifier.
-
setVisibility
(self, visible)¶ Accessor to the object’s visibility state.
- Parameters
- visiblebool
Visibility flag.