Class containing methods to create and query the simulation world (bulk and computational domains) More...
Public Member Functions | |
void | init (Simulator aSim, XMLParser worldRoot) |
Creates and registers the bulks and computationDomains defined in the world mark-up of the protocol file. More... | |
Domain | getDomain (String cDName) |
Returns a domain from the domain list that matches a specified name. More... | |
Bulk | getBulk (String bulkName) |
Return a bulk object of the given string name. More... | |
boolean | containsBulk (String bulkName) |
Determines if a bulk object of a given string name exists. More... | |
double | getBulkTimeConstraint () |
Calculates and returns the simulation time required to change 100% of a bulk concentration. More... | |
double[] | getAllBulkValue (int soluteIndex) |
Returns the Sbulk value for a given solute index from that specified in the protocol file, for all bulks specified. More... | |
double | getMaxBulkValue (int soluteIndex) |
Return the max value of a particular solute in the bulk. More... | |
Public Attributes | |
ArrayList< Domain > | domainList = new ArrayList<Domain>() |
LinkedList< Bulk > | bulkList = new LinkedList<Bulk>() |
double[] | bulkTime = new double[2] |
Class containing methods to create and query the simulation world (bulk and computational domains)
The simulation world is a description of all bulks and computation domains defined in the simulation. This class is used to create the world specified in the protocol files. The world mark-up in the protocol file collects the description of all bulks and computational domains defined in the simulation. The bulk mark-up defines a bulk solute compartment that is a source or sink for solutes involved in biofilm growth. The computationDomain mark-up defines the spatial region the biofilm will grow in. Only one world may be defined, but this world may contain several bulk compartments and computationDomain domains, each with a different name. Though when simulating a chemostat scenario, the name of the bulk MUST be chemostat, regardless of the corresponding computationalDomain name.
This class is a component class of iDynoMiCS, released under the CECIL license. Please see www.idynomics.bham.ac.uk for more information
boolean simulator.World.containsBulk | ( | String | bulkName | ) |
Determines if a bulk object of a given string name exists.
Determines if a bulk object of a given string name exists
bulkName | The name of the bulk that is required |
double [] simulator.World.getAllBulkValue | ( | int | soluteIndex | ) |
Returns the Sbulk value for a given solute index from that specified in the protocol file, for all bulks specified.
Returns the Sbulk value for a given solute index from that specified in the protocol file, for all bulks specified.
soluteIndex | The integer reference of the solute in the solute dictionary |
Bulk simulator.World.getBulk | ( | String | bulkName | ) |
Return a bulk object of the given string name.
Return a bulk object of the given string name
bulkName | The name of the bulk that is required |
double simulator.World.getBulkTimeConstraint | ( | ) |
Calculates and returns the simulation time required to change 100% of a bulk concentration.
Calculates and returns the simulation time required to change 100% of a bulk concentration
Domain simulator.World.getDomain | ( | String | cDName | ) |
Returns a domain from the domain list that matches a specified name.
Returns a domain from the domain list that matches a specified name. One example - used to link solute grids to a particular domain
cDName | The name of the domain to return from domainList |
double simulator.World.getMaxBulkValue | ( | int | soluteIndex | ) |
Return the max value of a particular solute in the bulk.
Return the max value of a particular solute in the bulk
soluteIndex | The simulation dictionary integer reference for the solute being queried |
Creates and registers the bulks and computationDomains defined in the world mark-up of the protocol file.
This method, called by the createWorld method of the Simulator class, creates and registers the bulk and computation domains that are defined in the protocol file. The computation domains are stored in an arraylist, with the bulk information stored in a linked list
aSim | The simulation object used to simulate the conditions specified in the protocol file |
worldRoot | The World mark-up within the specified protocol file |
LinkedList<Bulk> simulator.World.bulkList = new LinkedList<Bulk>() |
LinkedList of bulk domains specified in a simulation scenario
double [] simulator.World.bulkTime = new double[2] |
Holds time constraints that are applicable to this bulk
ArrayList of computation domains specified in a simulation scenario