You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the grids in Domain (_domainGrid, _boundaryLayer, _diffusivityGrid, _biomassGrid) are cast as SoluteGrid rather than SpatialGrid, despite there being no obvious reason for this. SoluteGrid extends SpatialGrid with a soluteIndex, diffusivity, and _domain, plus a host of methods.
The crucial method in this case seems to be SoluteGrid.refreshBoundary(), called by Domain.refreshBiomassGrids() and which itself calls AllBC.refreshBoundary() on all of the boundary conditions attached to the domain. For some boundary conditions, there is no reason why refreshBoundary() needs to call a SoluteGrid rather than a SpatialGrid (e.g. in BoundaryZeroFlux).
In those that do need a SoluteGrid rather than a SpatialGrid, it is because they need to set the values of the grid along the boundary to the value given in some external object: for example, BoundaryBulk sets them to the value of the connected bulk for the solute with the same soluteIndex. But the grids in Domain don't have a corresponding solute... so for some reason their soluteIndex is simply set to 0 and so along these boundaries the grid values are set according to the external values of the solute which is defined first in the protocol file.
The text was updated successfully, but these errors were encountered:
All of the grids in Domain (_domainGrid, _boundaryLayer, _diffusivityGrid, _biomassGrid) are cast as SoluteGrid rather than SpatialGrid, despite there being no obvious reason for this. SoluteGrid extends SpatialGrid with a soluteIndex, diffusivity, and _domain, plus a host of methods.
The crucial method in this case seems to be SoluteGrid.refreshBoundary(), called by Domain.refreshBiomassGrids() and which itself calls AllBC.refreshBoundary() on all of the boundary conditions attached to the domain. For some boundary conditions, there is no reason why refreshBoundary() needs to call a SoluteGrid rather than a SpatialGrid (e.g. in BoundaryZeroFlux).
In those that do need a SoluteGrid rather than a SpatialGrid, it is because they need to set the values of the grid along the boundary to the value given in some external object: for example, BoundaryBulk sets them to the value of the connected bulk for the solute with the same soluteIndex. But the grids in Domain don't have a corresponding solute... so for some reason their soluteIndex is simply set to 0 and so along these boundaries the grid values are set according to the external values of the solute which is defined first in the protocol file.
The text was updated successfully, but these errors were encountered: