CAMP 1.0.0
Chemistry Across Multiple Phases
Functions
time_derivative.c File Reference

Functions of the time derivative structure. More...

Include dependency graph for time_derivative.c:

Go to the source code of this file.

Functions

int time_derivative_initialize (TimeDerivative *time_deriv, unsigned int num_spec)
 Initialize the derivative.
 
void time_derivative_reset (TimeDerivative time_deriv)
 Reset the derivative.
 
void time_derivative_output (TimeDerivative time_deriv, double *dest_array, double *deriv_est, unsigned int output_precision)
 Output the current derivative array.
 
void time_derivative_add_value (TimeDerivative time_deriv, unsigned int spec_id, long double rate_contribution)
 Add a contribution to the time derivative.
 
void time_derivative_free (TimeDerivative time_deriv)
 Free memory associated with a TimeDerivative.
 

Detailed Description

Functions of the time derivative structure.

Definition in file time_derivative.c.

Function Documentation

◆ time_derivative_add_value()

void time_derivative_add_value ( TimeDerivative  time_deriv,
unsigned int  spec_id,
long double  rate_contribution 
)

Add a contribution to the time derivative.

Parameters
time_derivTimeDerivative object
spec_idIndex of the species to update rates for
rate_contributionValue to add to the time derivative for speces spec_id

Definition at line 90 of file time_derivative.c.

Here is the caller graph for this function:

◆ time_derivative_free()

void time_derivative_free ( TimeDerivative  time_deriv)

Free memory associated with a TimeDerivative.

Parameters
time_derivTimeDerivative object

Definition at line 105 of file time_derivative.c.

Here is the caller graph for this function:

◆ time_derivative_initialize()

int time_derivative_initialize ( TimeDerivative time_deriv,
unsigned int  num_spec 
)

Initialize the derivative.

Parameters
time_derivPointer to the TimeDerivative object
num_specNumber of species to include in the derivative
Returns
Flag indicating whether the derivative was sucessfully initialized (0 = false; 1 = true)

Definition at line 15 of file time_derivative.c.

Here is the caller graph for this function:

◆ time_derivative_output()

void time_derivative_output ( TimeDerivative  time_deriv,
double *  dest_array,
double *  deriv_est,
unsigned int  output_precision 
)

Output the current derivative array.

Parameters
time_derivTimeDerivative object
dest_arrayPointer to the destination array
deriv_estPointer to an estimate of the derivative array (optional)
output_precisionOutput the estimated loss of precision for each species if output_precision == 1

Definition at line 46 of file time_derivative.c.

Here is the caller graph for this function:

◆ time_derivative_reset()

void time_derivative_reset ( TimeDerivative  time_deriv)

Reset the derivative.

Parameters
time_derivTimeDerivative object

Definition at line 39 of file time_derivative.c.

Here is the caller graph for this function: