sailfish.solvers.cbdiso_2d.Patch
- class sailfish.solvers.cbdiso_2d.Patch(time, primitive, mesh, index_range, physics, options, buffer_outer_radius, buffer_surface_density, lib, xp, execution_context)[source]
Bases:
object
Holds the array buffer state for the solution on a subset of the solution domain.
- __init__(time, primitive, mesh, index_range, physics, options, buffer_outer_radius, buffer_surface_density, lib, xp, execution_context)[source]
Methods
__init__
(time, primitive, mesh, index_range, ...)advance_rk
(rk_param, dt)Pass required parameters for time evolution of the setup.
Return the maximum wavespeed over a given patch.
new_iteration
()point_mass_source_term
(which_mass[, ...])Return an array of the rates of conserved quantities, resulting from the application of gravitational and/or accretion source terms due to point masses.
Convert the most recent primitive array to conserved.
Attributes
Return two 2d arrays, one with the cell-center X coordinates, and the other with the cell-center Y coordinates.
primitive
- advance_rk(rk_param, dt)[source]
Pass required parameters for time evolution of the setup.
This function calls the C-module function responsible for performing time evolution using a RK algorithm to update the parameters of the setup.
- property cell_center_coordinate_arrays
Return two 2d arrays, one with the cell-center X coordinates, and the other with the cell-center Y coordinates. The arrays are either numpy or cupy arrays, allocated for the device this patch is assigned to.