tyssue.solvers package¶
Submodules¶
tyssue.solvers.base module¶
tyssue.solvers.isotropic_solver module¶
tyssue.solvers.quasistatic module¶
Quasistatic solver for vertex models
-
class
tyssue.solvers.quasistatic.
QSSolver
(with_collisions=False, with_t1=False, with_t3=False)[source]¶ Bases:
object
Quasistatic solver performing a gradient descent on a
tyssue.Epithelium
object.-
find_energy_min : energy minimization calling `scipy.optimize.minimize`
-
approx_grad : uses `optimize.approx_fprime` to compute an approximated
gradient.
-
check_grad : compares the approximated gradient with the one provided
by the model
Creates a quasistatic gradient descent solver with optional type1, type3 and collision detection and solving routines.
- Parameters
with_collisions (bool, default False) – wheter or not to solve collisions
with_t1 (bool, default False) – whether or not to solve type 1 transitions at each iteration.
with_t3 (bool, default False) – whether or not to solve type 3 transitions (i.e. elimnation of small triangular faces) at each iteration.
corrections are applied in this order (Those) –
3 (type) –
the collisions (then) –
-
find_energy_min
(eptm, geom, model, periodic=False, **minimize_kw)[source]¶ Energy minimization function.
The epithelium’s total energy is minimized by displacing its vertices. This is a wrapper around scipy.optimize.minimize
- Parameters
eptm (a
tyssue.Epithlium
object) –geom (a geometry class) –
must provide an update_all method that takes eptm (geom) – as sole argument and updates the relevant geometrical quantities
model (a model class) – model must provide compute_energy and compute_gradient methods that take eptm as first and unique positional argument.
-
tyssue.solvers.sheet_vertex_solver module¶
Energy minimization solvers for the sheet vertex model
tyssue.solvers.viscous module¶
Viscosity based ODE solver
-
class
tyssue.solvers.viscous.
EulerSolver
(eptm, geom, model, history=None, auto_reconnect=False, manager=None, bounds=None, with_t1=False, with_t3=False)[source]¶ Bases:
object
Explicit Euler solver
creates an instance of EulerSolver
- Parameters
eptm (a
tyssue.Epithelium
instance) –geom (a Geometry class) –
model (a Model class) –
history (a
tyssue.History
ortyssue.Hdf5History
instance) –auto_reconnect (bool) – if True, will automatically perform reconnections, default False
manager (a
tyssue.EventManager
instance) –bounds (tuple of (min, max),) – bonds the displacement of the vertices at each time step
-
property
current_pos
¶
-
ode_func
(t, pos)[source]¶ Computes the models’ gradient.
dot_r : 1D np.ndarray of shape (self.eptm.Nv * self.eptm.dim, )
\[\]rac{dr_i}{dt} = rac{ abla U_i}{eta_i}
-
solve
(tf, dt, on_topo_change=None, topo_change_args=())[source]¶ Solves the system of differential equations from the current time to tf with steps of dt with a forward Euler method.
- Parameters
tf (float, final time when we stop solving) –
dt (float, time step) –
on_topo_change (function, optional, default None) – function of self.eptm
topo_change_args (tuple, arguments passed to on_topo_change) –
Module contents¶
solvers