libRoadRunner C API  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
Boundary species group

Get information about boundary species. More...

Functions

RRVectorPtr getBoundarySpeciesConcentrations (RRHandle handle)
 Retrieve the concentrations for all the boundary species in a vector. More...
 
bool setBoundarySpeciesByIndex (RRHandle handle, const int index, const double value)
 Set the concentration for a particular boundary species. More...
 
bool getBoundarySpeciesByIndex (RRHandle handle, const int index, double *value)
 Retrieve the concentration for a particular floating species. More...
 
bool setBoundarySpeciesConcentrations (RRHandle handle, const RRVectorPtr vec)
 Set the boundary species concentration to the vector vec. More...
 
int getNumberOfBoundarySpecies (RRHandle handle)
 Returns the number of boundary species in the model. More...
 
RRStringArrayPtr getBoundarySpeciesIds (RRHandle handle)
 Obtain the list of boundary species Ids. More...
 

Detailed Description

Get information about boundary species.

Function Documentation

bool getBoundarySpeciesByIndex ( RRHandle  handle,
const int  index,
double *  value 
)

Retrieve the concentration for a particular floating species.

Parameters
[in]handleHandle to a RoadRunner instance
indexThe index to the boundary species (corresponds to position in getBoundarySpeciesIds(RRHandle handle))
valueThe value returned by the method
Returns
Returns true if successful
RRVectorPtr getBoundarySpeciesConcentrations ( RRHandle  handle)

Retrieve the concentrations for all the boundary species in a vector.

Example:

1 RRVectorPtr values = getBoundarySpeciesConcentrations (void);
Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns the vector of boundary species concentrations or null if an error occurred
RRStringArrayPtr getBoundarySpeciesIds ( RRHandle  handle)

Obtain the list of boundary species Ids.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns null if it fails, if successful it returns a pointer to a RRStringArrayPtr struct
int getNumberOfBoundarySpecies ( RRHandle  handle)

Returns the number of boundary species in the model.

Parameters
[in]handleHandle to a RoadRunner instance
bool setBoundarySpeciesByIndex ( RRHandle  handle,
const int  index,
const double  value 
)

Set the concentration for a particular boundary species.

Parameters
[in]handleHandle to a RoadRunner instance
indexThe index to the boundary species (corresponds to position in getBoundarySpeciesIds(void))
valueThe concentration of the species to set
Returns
Returns true if successful
bool setBoundarySpeciesConcentrations ( RRHandle  handle,
const RRVectorPtr  vec 
)

Set the boundary species concentration to the vector vec.

Example:

1 myVector = createVector (getNumberOfBoundarySpecies(RRHandle handle));
2 setVectorElement (myVector, 0, 1.2);
3 setVectorElement (myVector, 1, 5.7);
4 setVectorElement (myVector, 2, 3.4);
5 setBoundarySpeciesConcentrations(myVector);
Parameters
[in]handleHandle to a RoadRunner instance
vecA vector of boundary species concentrations
Returns
Returns true if successful