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

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

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 (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

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

creates an instance of EulerSolver

Parameters
  • eptm (a tyssue.Epithelium instance) –

  • geom (a Geometry class) –

  • model (a Model class) –

  • history (a tyssue.History or tyssue.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}

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