[A]
|
Set and . Initialize species numbers, , in and . Then, generate random numbers and uniformly distributed in (0, 1). Set so that , where is defined in Eq. (11). Set the next time when the diffusion occurs in as
|
[B]
|
If
|
Set
|
Use to determine which diffusive jump occurs. Each diffusive jump to the left (resp. to the right) has the probability (resp. ) to occur |
If the selected diffusive jump only includes internal compartments in , update species numbers in the corresponding compartments |
If the diffusion occurs across the interface from to , update the species number in by transferring one molecules from to the corresponding grid point in
|
If the diffusion occurs across the interface from to , update the species number in by adding one molecule and subtracting one from the corresponding grid point in
|
Generate random numbers and uniformly distributed in (0, 1). Set so that , where is defined in Eq. (11). Set the next time when the diffusion occurs in as
|
[C]
|
If
|
Set
|
Use Eq. (12) to update the SPDE part of the system from t to
|
Set the next time of the update of the SPDE part as
|
[D]
|
Repeat steps [B]–[C] until the simulation ends |