Top | ![]() |
![]() |
![]() |
![]() |
Functions
gsl_integration_workspace ** | ncm_integral_get_workspace () |
gdouble | (*_NcmIntegrand2dimFunc) () |
gint | ncm_integral_locked_a_b () |
gint | ncm_integral_locked_a_inf () |
gint | ncm_integral_cached_0_x () |
gint | ncm_integral_cached_x_inf () |
gboolean | ncm_integrate_2dim () |
NcmIntegralFixed * | ncm_integral_fixed_new () |
void | ncm_integral_fixed_free () |
void | ncm_integral_fixed_calc_nodes () |
gdouble | ncm_integral_fixed_nodes_eval () |
gdouble | ncm_integral_fixed_integ_mult () |
gdouble | ncm_integral_fixed_integ_posdef_mult () |
Types and Values
struct | NcmIntegrand2dim |
struct | NcmIntegralFixed |
#define | NCM_INTEGRAL_PARTITION |
#define | NCM_INTEGRAL_ALG |
#define | NCM_INTEGRAL_ERROR |
#define | NCM_INTEGRAL_ABS_ERROR |
Functions
ncm_integral_get_workspace ()
gsl_integration_workspace **
ncm_integral_get_workspace ();
This function provides a workspace to be used by numerical integration functions of GSL. It keeps a internal pool of workspaces and allocate a new one if the function is called and the pool is empty. It is designed to be used in a multithread enviroment. The workspace must be unlocked in order to return to the pool. This must be done using the ncm_memory_pool_return.
_NcmIntegrand2dimFunc ()
gdouble (*_NcmIntegrand2dimFunc) (gdouble x
,gdouble y
,gpointer userdata
);
ncm_integral_locked_a_b ()
gint ncm_integral_locked_a_b (gsl_function *F
,gdouble a
,gdouble b
,gdouble abstol
,gdouble reltol
,gdouble *result
,gdouble *error
);
This function uses a workspace from the pool and gsl_integration_qag function to perform the numerical integration in the [a, b] interval.
Parameters
F |
a gsl_function wich is the integrand. |
|
a |
lower integration limit. |
|
b |
upper integration limit. |
|
abstol |
absolute tolerance. |
|
reltol |
relative tolerance. |
|
result |
a pointer to a gdouble in which the function stores the result. |
|
error |
a pointer to a gdouble in which the function stores the estimated error. |
ncm_integral_locked_a_inf ()
gint ncm_integral_locked_a_inf (gsl_function *F
,gdouble a
,gdouble abstol
,gdouble reltol
,gdouble *result
,gdouble *error
);
This function uses a workspace from the pool and gsl_integration_qagiu function to perform the numerical integration in the \f$ [a, \infty] \f$ interval.
ncm_integral_cached_0_x ()
gint ncm_integral_cached_0_x (NcmFunctionCache *cache
,gsl_function *F
,gdouble x
,gdouble *result
,gdouble *error
);
This function searchs for the nearest x_near value previously chosed as the upper integration limit and perform the integration at [x_near, x] interval. This result is summed to that obtained at [0, x_near] and then it is saved in the cache.
Parameters
cache |
a pointer to NcmFunctionCache. |
|
F |
a gsl_function wich is the integrand. |
|
x |
upper integration limit. |
|
result |
a pointer to a gdouble in which the function stores the result. |
|
error |
a pointer to a gdouble in which the function stores the estimated error. |
ncm_integral_cached_x_inf ()
gint ncm_integral_cached_x_inf (NcmFunctionCache *cache
,gsl_function *F
,gdouble x
,gdouble *result
,gdouble *error
);
This function searchs for the nearest x_near value previously chosed as the lower integration limit and perform the integration at \f$ [x, x_{near}] \f$ interval. This result is summed to that obtained at \f$ [x_{near}, \infty] \f$ and then it is saved in the cache.
Parameters
cache |
a pointer to NcmFunctionCache. |
|
F |
a gsl_function wich is the integrand. |
|
x |
lower integration limit. |
|
result |
a pointer to a gdouble in which the function stores the result. |
|
error |
a pointer to a gdouble in which the function stores the estimated error. |
ncm_integrate_2dim ()
gboolean ncm_integrate_2dim (NcmIntegrand2dim *integ
,gdouble xi
,gdouble yi
,gdouble xf
,gdouble yf
,gdouble epsrel
,gdouble epsabs
,gdouble *result
,gdouble *error
);
This function FIXME
Parameters
integ |
a pointer to NcmIntegrand2dim. |
|
xi |
gbouble which is the lower integration limit of variable x. |
|
yi |
gbouble which is the lower integration limit of variable y. |
|
xf |
gbouble which is the upper integration limit of variable x. |
|
yf |
gbouble which is the upper integration limit of variable y. |
|
epsrel |
relative error |
|
epsabs |
absolute error |
|
result |
a pointer to a gdouble in which the function stores the result. |
|
error |
a pointer to a gdouble in which the function stores the estimated error. |
ncm_integral_fixed_new ()
NcmIntegralFixed * ncm_integral_fixed_new (gulong n_nodes
,gulong rule_n
,gdouble xl
,gdouble xu
);
This function prepares the NcmIntegralFixed with a grid with n_nodes - 1 intervals beteween xl and xu. In each interval it uses a fixed order (rule_n) Gauss-Legendre integration rule to determine the interval inner points. This results in a grid with (n_nodes - 1) * rule_n points.
ncm_integral_fixed_free ()
void
ncm_integral_fixed_free (NcmIntegralFixed *intf
);
This function frees the memory associated to NcmIntegralFixed.
ncm_integral_fixed_calc_nodes ()
void ncm_integral_fixed_calc_nodes (NcmIntegralFixed *intf
,gsl_function *F
);
This function FIXME
ncm_integral_fixed_nodes_eval ()
gdouble
ncm_integral_fixed_nodes_eval (NcmIntegralFixed *intf
);
This function
ncm_integral_fixed_integ_mult ()
gdouble ncm_integral_fixed_integ_mult (NcmIntegralFixed *intf
,gsl_function *F
);
This function
ncm_integral_fixed_integ_posdef_mult ()
gdouble ncm_integral_fixed_integ_posdef_mult (NcmIntegralFixed *intf
,gsl_function *F
,gdouble max
,gdouble reltol
);
This function