Classes | |
struct | gas_state_t |
Current state of the gas mixing ratios in the system. More... | |
Functions | |
subroutine | gas_state_allocate (gas_state) |
Allocate storage for gas species. | |
subroutine | gas_state_allocate_size (gas_state, n_spec) |
Allocate storage for gas species of the given size. | |
subroutine | gas_state_deallocate (gas_state) |
Free all storage. | |
subroutine | gas_state_zero (gas_state) |
Zeros the state. | |
subroutine | gas_state_copy (from_state, to_state) |
Copy to an already allocated to_state. | |
subroutine | gas_state_scale (gas_state, alpha) |
Scale a gas state. | |
subroutine | gas_state_add (gas_state, gas_state_delta) |
Adds the given gas_state_delta. | |
subroutine | gas_state_sub (gas_state, gas_state_delta) |
Subtracts the given gas_state_delta. | |
subroutine | gas_state_axpy (alpha, gas_state_x, gas_state_y) |
Sets y = a * x + y. | |
subroutine | gas_state_interp_1d (gas_state_list, time_list, rate_list, time, gas_state, rate) |
Determine the current gas_state and rate by interpolating at the current time with the lists of gas_states and rates. | |
subroutine | spec_file_read_gas_state (file, gas_data, name, gas_state) |
Read gas state from the file named on the line read from file. | |
subroutine | spec_file_read_gas_states_times_rates (file, gas_data, name, times, rates, gas_states) |
Read an array of gas states with associated times and rates from the file named on the line read from the given file. | |
subroutine | gas_state_mix (val) |
Average val over all processes. | |
integer | pmc_mpi_pack_size_gas_state (val) |
Determines the number of bytes required to pack the given value. | |
subroutine | pmc_mpi_pack_gas_state (buffer, position, val) |
Packs the given value into the buffer, advancing position. | |
subroutine | pmc_mpi_unpack_gas_state (buffer, position, val) |
Unpacks the given value from the buffer, advancing position. | |
subroutine | pmc_mpi_reduce_avg_gas_state (val, val_avg) |
Computes the average of val across all processes, storing the result in val_avg on the root process. | |
subroutine | gas_state_output_netcdf (gas_state, ncid, gas_data) |
Write full state. | |
subroutine | gas_state_input_netcdf (gas_state, ncid, gas_data) |
Read full state. |
subroutine pmc_gas_state::gas_state_add | ( | type(gas_state_t),intent(inout) | gas_state, | |
type(gas_state_t),intent(in) | gas_state_delta | |||
) |
Adds the given gas_state_delta.
gas_state | Existing gas state. |
gas_state_delta | Incremental state. |
subroutine pmc_gas_state::gas_state_allocate | ( | type(gas_state_t),intent(out) | gas_state | ) |
Allocate storage for gas species.
gas_state | Gas state to be allocated. |
subroutine pmc_gas_state::gas_state_allocate_size | ( | type(gas_state_t),intent(out) | gas_state, | |
integer,intent(in) | n_spec | |||
) |
Allocate storage for gas species of the given size.
gas_state | Gas state to be allocated. |
n_spec | Number of species. |
subroutine pmc_gas_state::gas_state_axpy | ( | real*8,intent(in) | alpha, | |
type(gas_state_t),intent(in) | gas_state_x, | |||
type(gas_state_t),intent(inout) | gas_state_y | |||
) |
Sets y = a * x + y.
alpha | Coefficient. |
gas_state_x | Incremental state. |
gas_state_y | Existing gas state. |
subroutine pmc_gas_state::gas_state_copy | ( | type(gas_state_t),intent(in) | from_state, | |
type(gas_state_t),intent(out) | to_state | |||
) |
Copy to an already allocated to_state.
from_state | Existing gas state. |
to_state | Must be allocated already. |
subroutine pmc_gas_state::gas_state_deallocate | ( | type(gas_state_t),intent(inout) | gas_state | ) |
Free all storage.
gas_state | Gas state to be freed. |
subroutine pmc_gas_state::gas_state_input_netcdf | ( | type(gas_state_t),intent(inout) | gas_state, | |
integer,intent(in) | ncid, | |||
type(gas_data_t),intent(in) | gas_data | |||
) |
Read full state.
gas_state | Gas state to read. |
ncid | NetCDF file ID, in data mode. |
gas_data | Gas data. |
subroutine pmc_gas_state::gas_state_interp_1d | ( | type(gas_state_t),dimension(:),intent(in) | gas_state_list, | |
real*8,dimension(size(gas_state_list),intent(in) | time_list, | |||
real*8,dimension(size(gas_state_list),intent(in) | rate_list, | |||
real*8,intent(in) | time, | |||
type(gas_state_t),intent(inout) | gas_state, | |||
real*8,intent(out) | rate | |||
) |
Determine the current gas_state and rate by interpolating at the current time with the lists of gas_states and rates.
gas_state_list | Gas states. |
time_list | Times (s). |
rate_list | Rates (s^{-1}). |
time | Current time (s). |
gas_state | Current gas state. |
rate | Current rate (s^{-1}). |
subroutine pmc_gas_state::gas_state_mix | ( | type(gas_state_t),intent(inout) | val | ) |
Average val over all processes.
val | Value to average. |
subroutine pmc_gas_state::gas_state_output_netcdf | ( | type(gas_state_t),intent(in) | gas_state, | |
integer,intent(in) | ncid, | |||
type(gas_data_t),intent(in) | gas_data | |||
) |
Write full state.
gas_state | Gas state to write. |
ncid | NetCDF file ID, in data mode. |
gas_data | Gas data. |
subroutine pmc_gas_state::gas_state_scale | ( | type(gas_state_t),intent(inout) | gas_state, | |
real*8,intent(in) | alpha | |||
) |
Scale a gas state.
gas_state | Existing gas state. |
alpha | Scale factor. |
subroutine pmc_gas_state::gas_state_sub | ( | type(gas_state_t),intent(inout) | gas_state, | |
type(gas_state_t),intent(in) | gas_state_delta | |||
) |
Subtracts the given gas_state_delta.
gas_state | Existing gas state. |
gas_state_delta | Incremental state. |
subroutine pmc_gas_state::gas_state_zero | ( | type(gas_state_t),intent(inout) | gas_state | ) |
Zeros the state.
gas_state | Gas state. |
subroutine pmc_gas_state::pmc_mpi_pack_gas_state | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(gas_state_t),intent(in) | val | |||
) |
Packs the given value into the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
integer pmc_gas_state::pmc_mpi_pack_size_gas_state | ( | type(gas_state_t),intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
val | Value to pack. |
subroutine pmc_gas_state::pmc_mpi_reduce_avg_gas_state | ( | type(gas_state_t),intent(in) | val, | |
type(gas_state_t),intent(out) | val_avg | |||
) |
Computes the average of val across all processes, storing the result in val_avg on the root process.
val | Value to average. |
val_avg | Result. |
subroutine pmc_gas_state::pmc_mpi_unpack_gas_state | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(gas_state_t),intent(out) | val | |||
) |
Unpacks the given value from the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
subroutine pmc_gas_state::spec_file_read_gas_state | ( | type(spec_file_t),intent(inout) | file, | |
type(gas_data_t),intent(in) | gas_data, | |||
character(len=*),intent(in) | name, | |||
type(gas_state_t),intent(out) | gas_state | |||
) |
Read gas state from the file named on the line read from file.
file | Spec file. |
gas_data | Gas data. |
name | Name of data line for filename. |
gas_state | Gas data. |
subroutine pmc_gas_state::spec_file_read_gas_states_times_rates | ( | type(spec_file_t),intent(inout) | file, | |
type(gas_data_t),intent(in) | gas_data, | |||
character(len=*),intent(in) | name, | |||
real*8,dimension(:),pointer | times, | |||
real*8,dimension(:),pointer | rates, | |||
type(gas_state_t),dimension(:),pointer | gas_states | |||
) |
Read an array of gas states with associated times and rates from the file named on the line read from the given file.
file | Spec file. |
gas_data | Gas data. |
name | Name of data line for filename. |
times | Times (s). |
rates | Rates (s^{-1}). |
gas_states | Gas states. |