IrregularGridFiniteDifference
Defines a finite difference over an irregular grid
__init__(self, grid, order, stencil=None, accuracy=2, end_point_accuracy=2, **kw):
grid:np.ndarraythe grid to get the weights from
order:intthe order of the derivative to take
stencil:int | Nonethe number of stencil points to add
accuracy:int | Nonethe approximate accuracy to target with the method
end_point_accuracy:int | Nonethe extra number of stencil points to add to the end points
kw:Anyoptions passed through to the
FiniteDifferenceMatrix
@staticmethod
get_grid_slices(grid, stencil):
grid:Anystencil:Any:returns:_
@staticmethod
get_weights(m, z, x):
Extracts the grid weights for an unevenly spaced grid based off of the algorithm outlined by Fronberger in https://pdfs.semanticscholar.org/8bf5/912bde884f6bd4cfb4991ba3d077cace94c0.pdf
m:Anyhighest derivative order
z:Anycenter of the derivatives
X:Anygrid of points
@classmethod
finite_difference_data(cls, grid, order, stencil, end_point_precision):
Constructs a finite-difference function that computes the nth derivative with a given width
deriv:Anyaccuracy:Any:returns:_
Examples
IrregularGridFiniteDifference
Defines a finite difference over an irregular grid
Properties and Methods
finite_difference_data: method
__init__(self, grid, order, stencil=None, accuracy=2, end_point_accuracy=2, **kw):
grid:np.ndarraythe grid to get the weights from
order:intthe order of the derivative to take
stencil:int | Nonethe number of stencil points to add
accuracy:int | Nonethe approximate accuracy to target with the method
end_point_accuracy:int | Nonethe extra number of stencil points to add to the end points
kw:Anyoptions passed through to the
FiniteDifferenceMatrix
get_grid_slices(grid, stencil):
grid:AnyNo description…
stencil:AnyNo description…
:returns:_No description…
get_weights(m, z, x):
Extracts the grid weights for an unevenly spaced grid based off of the algorithm outlined by Fronberger in https://pdfs.semanticscholar.org/8bf5/912bde884f6bd4cfb4991ba3d077cace94c0.pdf
m:Anyhighest derivative order
z:Anycenter of the derivatives
X:Anygrid of points
Examples
Edit Examples or
Create New Examples
Edit Template or
Create New Template
Edit Docstrings