README file - Spatially-extended hybrid methods: a review. -------------------------------------------------------------------------------------------- Contact information: Name: Cameron Smith Email: c.smith3@bath.ac.uk -------------------------------------------------------------------------------------------- This is the README file for the various parts of code that can be found in the ESM. -------------------------------------------------------------------------------------------- ***_CODE.m (script) >>> Replace *** with either PCM for the pseudo-compartment method, GCM for the ghost cell method or ARM for the auxiliary region method <<< These are the main code which generates the solution trajectories for the hybrid method selsected. The first four sections contain the variables that can be changed. The first section contains the initial conditions, switch to a 1 to select (ensure all others are set to 0). These are: INITIAL_LEFT (All particles in the PDE part of the domain, corresponds to the simulations in the paper), INITIAL_RIGHT (All particles in the Brownian part of the domain), INITIAL_UNIFORM (All particles distributed uniformly across entire domain), and INITIAL_MORPH (The morphogen gradient). The following three sections contain information about the spatial domain, temporal domain and the model constants. Most of this is changeable. The code will save a workspaces which will be used for plotting. -------------------------------------------------------------------------------------------- PLOT_***.m (script) >>> Replace *** with either PCM for the pseudo-compartment method, GCM for the ghost cell method or ARM for the auxiliary region method <<< This plots the results from the ***_CODE.m code. Ensure that this code is run first. As with the ***_CODE.m script, an initial condition is selected through the use of Boolean variables. -------------------------------------------------------------------------------------------- Theta_C.m (function) Generates a matrix which evolves the diffusion PDE solution forward by a timestep using the theta method. The function takes in a value of theta, the number of points in the mesh and the value of the constant D*dt/h^2, where D is the diffusion coefficient, dt is the time-step and h is the PDE mesh spacing. This matrix is for the diffusion equation with zero-flux boundaries. -------------------------------------------------------------------------------------------- Theta_C_Morph.m (function) Generates a matrix which evolves the morphogen gradient PDE solution forward by a timestep using the theta method. The function takes in a value of theta, the number of points in the mesh and the value of the constant D*dt/h^2, where D is the diffusion coefficient, dt is the time-step and h is the PDE mesh spacing. It outputs the matrix C and a vector c which contains the non-zero-flux boundary. -------------------------------------------------------------------------------------------- Int_Irreg.m (function) This function interpolates a set of values on one mesh onto another. It uses a linear interpolation method. It takes in the vector on which the solution is currently residing, the solution vector and the new vector of mesh-points, and outputs the interpolated solution on tha new mesh. -------------------------------------------------------------------------------------------- Trap_Rule.m (function) Calculates an integral using the numerical trapezoidal quadrature rule. Takes in the vector containing function values and the (regular) spacing between them, and outputs, the approximate integral.