CAMP 1.0.0
Chemistry Across Multiple Phases
Classes | Macros | Functions
time_derivative.h File Reference

Header for the time derivative structure and related functions. More...

Include dependency graph for time_derivative.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TimeDerivative
 

Macros

#define MAX_PRECISION_LOSS   1.0e-14
 

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

Header for the time derivative structure and related functions.

Definition in file time_derivative.h.

Macro Definition Documentation

◆ MAX_PRECISION_LOSS

#define MAX_PRECISION_LOSS   1.0e-14

Definition at line 18 of file time_derivative.h.

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: