GALAHAD FIT package#
purpose#
The fit
package fits polynomials to function and derivative data.
Currently only the options and inform dictionaries are exposed; these are provided and used by other GALAHAD packages with Python interfaces. Please contact us if you would like full functionality!
See Section 4 of $GALAHAD/doc/fit.pdf for a brief description of the method employed and other details.
parametric real type T and integer type INT#
Below, the symbol T refers to a parametric real type that may be Float32 (single precision), Float64 (double precision) or, if supported, Float128 (quadruple precision). The symbol INT refers to a parametric integer type that may be Int32 (32-bit integer) or Int64 (64-bit integer).
callable functions#
function fit_initialize(T, INT, data, control, status)
Set default control values and initialize private data
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see fit_control_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function fit_information(T, INT, data, inform, status)
Provides output information
Parameters:
data |
holds private internal data |
inform |
is a structure containing output information (see fit_inform_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function fit_terminate(T, INT, data, control, inform)
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see fit_control_type) |
inform |
is a structure containing output information (see fit_inform_type) |
available structures#
fit_control_type structure#
struct fit_control_type{INT} f_indexing::Bool error::INT out::INT print_level::INT space_critical::Bool deallocate_error_fatal::Bool prefix::NTuple{31,Cchar}
detailed documentation#
control derived type as a Julia structure
components#
Bool f_indexing
use C or Fortran sparse matrix indexing
INT error
error and warning diagnostics occur on stream error
INT out
general output occurs on stream out
INT print_level
the level of output required is specified by print_level
Bool space_critical
if space_critical is true, every effort will be made to use as little space as possible. This may result in longer computation times
Bool deallocate_error_fatal
if deallocate_error_fatal is true, any array/pointer deallocation error will terminate execution. Otherwise, computation will continue
NTuple{31,Cchar} prefix
all output lines will be prefixed by .prefix(2:LEN(TRIM(.prefix))-1) where .prefix contains the required string enclosed in quotes, e.g. “string” or ‘string’
fit_inform_type structure#
struct fit_inform_type{INT} status::INT alloc_status::INT bad_alloc::NTuple{81,Cchar}
detailed documentation#
inform derived type as a Julia structure
components#
INT status
return status. Possible values are:
0
Normal termination with the required fit.
-1
An allocation error occurred. A message indicating the offending array is written on unit control.error, and the returned allocation status and a string containing the name of the offending array are held in inform.alloc_status and inform.bad_alloc respectively.
-2
A deallocation error occurred. A message indicating the offending array is written on unit control.error and the returned allocation status and a string containing the name of the offending array are held in inform.alloc_status and inform.bad_alloc respectively.
-3
the restriction n >= 1 has been violated.
INT alloc_status
the status of the last attempted allocation/deallocation.
NTuple{81,Cchar} bad_alloc
the name of the array for which an allocation/deallocation error
occurred.