tyssue.solvers package#

Submodules#

tyssue.solvers.base module#

tyssue.solvers.base.set_pos(eptm, geom, pos)[source]#

Updates the vertex position of the Epithelium object.

Assumes that pos is passed as a 1D array to be reshaped as (eptm.Nv, eptm.dim)

tyssue.solvers.isotropic_solver module#

tyssue.solvers.isotropic_solver.bruteforce_isotropic_relax(eptm, geom, model)[source]#

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

approx_grad(eptm, geom, model)[source]#
check_grad(eptm, geom, model)[source]#
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 (geom must provide an update_all method that takes) –

  • geom (a geometry class) –

  • eptm – 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

class tyssue.solvers.sheet_vertex_solver.Solver[source]#

Bases: object

classmethod approx_grad(sheet, geom, model)[source]#
classmethod check_grad(sheet, geom, model)[source]#
classmethod find_energy_min(sheet, geom, model, pos_idx=None, **settings_kw)[source]#
classmethod opt_energy(pos, pos_idx, sheet, geom, model)[source]#
static opt_grad(pos, pos_idx, sheet, geom, model)[source]#
static set_pos(pos, pos_idx, sheet)[source]#

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

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}

record(t)[source]#
set_pos(pos)[source]#

Updates the eptm vertices position

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) –

class tyssue.solvers.viscous.IVPSolver(*args, **kwargs)[source]#

Bases: object

tyssue.solvers.viscous.set_pos(eptm, geom, pos)[source]#

Updates the vertex position of the Epithelium object.

Assumes that pos is passed as a 1D array to be reshaped as (eptm.Nv, eptm.dim)

Module contents#

solvers