Exemplo n.º 1
0
  /**
   * \brief Add the total concentration of an agent on received grid
   *
   * <p>Add the total concentration of an agent on received grid
   *
   * @param aSpG Spatial grid used to sum total mass
   */
  public void fitMassOnGrid(SpatialGrid aSpG) {
    if (isDead) return;

    double value = _totalMass / aSpG.getVoxelVolume();
    if (Double.isNaN(value) | Double.isInfinite(value)) value = 0;
    aSpG.addValueAt(value, _location);
  }
Exemplo n.º 2
0
  /**
   * \brief Add the reacting concentration of an agent to the received grid
   *
   * <p>Add the reacting concentration of an agent to the received grid
   *
   * @param aSpG Spatial grid used to sum catalysing mass
   * @param catalystIndex Index of the compartment of the cell supporting the reaction
   */
  public void fitMassOnGrid(SpatialGrid aSpG, int catalystIndex) {
    if (isDead) return;

    double value = particleMass[catalystIndex] / aSpG.getVoxelVolume();
    if (Double.isNaN(value) | Double.isInfinite(value)) value = 0;
    aSpG.addValueAt(value, _location);
  }
Exemplo n.º 3
0
  /**
   * \brief Add the reaction/growth rate of an agent on received grid, for a specified reaction
   *
   * <p>Add the total reaction/growth rate of an agent on received grid, for a specified reaction
   *
   * @param aRateGrid Spatial grid used to store total reaction rate
   * @param reactionIndex Index of this declared reaction in the simulation dictionary
   */
  public void fitReacRateOnGrid(SpatialGrid aRateGrid, int reactionIndex) {
    if (isDead) return;

    // growthRate is in [fgX.hr-1] so convert to concentration:
    // [fgX.um-3.hr-1 = gX.L-1.hr-1]
    double value = growthRate[reactionIndex] / aRateGrid.getVoxelVolume();

    if (Double.isNaN(value) | Double.isInfinite(value)) value = 0;

    aRateGrid.addValueAt(value, _location);
  }
Exemplo n.º 4
0
 /**
  * \brief Add the total volume rate of an agent on received grid
  *
  * <p>Add the total volume rate of an agent on received grid
  *
  * @param aSpG Spatial grid used to sum volume
  */
 public void fitVolRateOnGrid(SpatialGrid aSpG) {
   double value;
   value = _netVolumeRate / aSpG.getVoxelVolume();
   if (Double.isNaN(value) | Double.isInfinite(value)) value = 0;
   aSpG.addValueAt(value, _location);
 }