NcScalefactor

NcScalefactor — Scale factor as a function of the conformal time.

Functions

Properties

double a0 Read / Write / Construct
gboolean a0-conformal-normal Read / Write / Construct
double abstol Read / Write / Construct
NcDistance * dist Read / Write / Construct Only
double reltol Read / Write / Construct
double zf Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── NcScalefactor

Description

Integrates the first order Friedmann equation, $$E^2 = \frac{\rho}{\rho_{\mathrm{crit}0}} + \Omega_{k0} x^2.$$ Where ${\mathrm{crit}0}$ is the critical density today [nc_hicosmo_crit_density()], $E = H / H_0$ is the dimensionless Hubble function [nc_hicosmo_E()] and $\Omega_{k0}$ is the curvature parameter today [nc_hicosmo_Omega_k0()].

Functions

nc_scalefactor_new ()

NcScalefactor *
nc_scalefactor_new (const gdouble zf,
                    NcDistance *dist);

Creates a new NcScalefactor valid for calculations in the $[0, z_f]$ interval.

Parameters

zf

maximum redshift $z_f$

 

dist

a NcDistance

 

Returns

a new NcScalefactor.

[transfer full]


nc_scalefactor_ref ()

NcScalefactor *
nc_scalefactor_ref (NcScalefactor *a);

Increases the reference count of a by one.

Parameters

a

a NcScalefactor

 

Returns

a .

[transfer full]


nc_scalefactor_free ()

void
nc_scalefactor_free (NcScalefactor *a);

Decreases the reference count of a by one.

Parameters

a

a NcScalefactor

 

nc_scalefactor_clear ()

void
nc_scalefactor_clear (NcScalefactor **a);

If *a is different from NULL, decreases the reference count of *a by one and sets *a to NULL.

Parameters

a

a NcScalefactor

 

nc_scalefactor_prepare ()

void
nc_scalefactor_prepare (NcScalefactor *a,
                        NcHICosmo *cosmo);

FIXME

Parameters

a

a NcScalefactor

 

cosmo

FIXME

 

nc_scalefactor_prepare_if_needed ()

void
nc_scalefactor_prepare_if_needed (NcScalefactor *a,
                                  NcHICosmo *cosmo);

FIXME

Parameters

a

a NcScalefactor

 

cosmo

FIXME

 

nc_scalefactor_set_zf ()

void
nc_scalefactor_set_zf (NcScalefactor *a,
                       const gdouble zf);

Sets the final redshift of the integration.

Parameters

a

a NcScalefactor

 

zf

final redshift $z_f$

 

nc_scalefactor_require_zf ()

void
nc_scalefactor_require_zf (NcScalefactor *a,
                           const gdouble zf);

Requires the final redshift of at least $z_f$ = zf .

Parameters

a

a NcScalefactor

 

zf

maximum redshift required

 

nc_scalefactor_set_a0 ()

void
nc_scalefactor_set_a0 (NcScalefactor *a,
                       const gdouble a0);

Sets the value of the scale factor today.

Parameters

a

a NcScalefactor

 

a0

scale factor today $a_0$

 

nc_scalefactor_set_reltol ()

void
nc_scalefactor_set_reltol (NcScalefactor *a,
                           const gdouble reltol);

Sets the relative tolerance of the integration.

Parameters

a

a NcScalefactor

 

reltol

relative tolerance

 

nc_scalefactor_set_abstol ()

void
nc_scalefactor_set_abstol (NcScalefactor *a,
                           const gdouble abstol);

Sets the absolute tolerance of the integration.

Parameters

a

a NcScalefactor

 

abstol

absolute tolerance

 

nc_scalefactor_set_a0_conformal_normal ()

void
nc_scalefactor_set_a0_conformal_normal
                               (NcScalefactor *a,
                                gboolean enable);

When enable is TRUE, it sets the value of the scale factor today $a_0$, assuming that the conformal hypersurface the spatial hypersurface where ($a=1$) hascurvature equals to 1Mpc, i.e., $1/\sqrt{K} = 1\,\mathrm{Mpc}$. If enable is FALSE it lets $a_0$ untouched. *

Parameters

a

a NcScalefactor

 

enable

a boolean

 

nc_scalefactor_get_zf ()

gdouble
nc_scalefactor_get_zf (NcScalefactor *a);

Gets the current final redshift $z_f$.

Parameters

a

a NcScalefactor

 

Returns

$z_f$.


nc_scalefactor_get_a0 ()

gdouble
nc_scalefactor_get_a0 (NcScalefactor *a);

Gets the current value of the scale factor today $a_0$.

Parameters

a

a NcScalefactor

 

Returns

$a_0$.


nc_scalefactor_get_reltol ()

gdouble
nc_scalefactor_get_reltol (NcScalefactor *a);

Gets the current relative tolerance.

Parameters

a

a NcScalefactor

 

Returns

reltol.


nc_scalefactor_get_abstol ()

gdouble
nc_scalefactor_get_abstol (NcScalefactor *a);

Gets the current absolute tolerance.

Parameters

a

a NcScalefactor

 

Returns

abstol.


nc_scalefactor_eval_z_eta ()

gdouble
nc_scalefactor_eval_z_eta (NcScalefactor *a,
                           const gdouble eta);

Calculates the value of the redshift in $\eta$, i.e., $z(\eta)$.

Parameters

a

a NcScalefactor

 

eta

conformal time $\eta$

 

Returns

$z(\eta)$.


nc_scalefactor_eval_a_eta ()

gdouble
nc_scalefactor_eval_a_eta (NcScalefactor *a,
                           const gdouble eta);

Calculates the value of the scale factor in $\eta$, i.e., $a(\eta)$.

Parameters

a

a NcScalefactor

 

eta

conformal time $\eta$

 

Returns

$a(\eta)$.


nc_scalefactor_eval_eta_z ()

gdouble
nc_scalefactor_eval_eta_z (NcScalefactor *a,
                           const gdouble z);

Calculates the value of the conformal time at $z$, i.e., $\eta(z)$.

Parameters

a

a NcScalefactor

 

z

redshift $z$

 

Returns

$\eta(z)$.


nc_scalefactor_eval_eta_x ()

gdouble
nc_scalefactor_eval_eta_x (NcScalefactor *a,
                           const gdouble x);

Calculates the value of the conformal time at $x$, i.e., $\eta(z(x))$.

Parameters

a

a NcScalefactor

 

x

redshift x variable $x = 1 + z$

 

Returns

$\eta(z(x))$.


nc_scalefactor_eval_t_eta ()

gdouble
nc_scalefactor_eval_t_eta (NcScalefactor *a,
                           const gdouble eta);

Calculates the value of the cosmic time at $\eta$, i.e., $t(\eta)$.

Parameters

a

a NcScalefactor

 

eta

conformal time $\eta$

 

Returns

$t(\eta)$.


nc_scalefactor_eval_eta_t ()

gdouble
nc_scalefactor_eval_eta_t (NcScalefactor *a,
                           const gdouble t);

Calculates the value of the conformal time at $t$, i.e., $\eta(t)$.

Parameters

a

a NcScalefactor

 

t

cosmic time $t$

 

Returns

$\eta(t)$.

Types and Values

NC_SCALEFACTOR_DEFAULT_ZF

#define NC_SCALEFACTOR_DEFAULT_ZF (1.0e14)

NC_SCALEFACTOR_DEFAULT_A0

#define NC_SCALEFACTOR_DEFAULT_A0 (1.0)

NC_SCALEFACTOR_DEFAULT_RELTOL

#define NC_SCALEFACTOR_DEFAULT_RELTOL (1.0e-13)

NC_SCALEFACTOR_DEFAULT_ABSTOL

#define NC_SCALEFACTOR_DEFAULT_ABSTOL (0.0)

NC_SCALEFACTOR_OMEGA_K_ZERO

#define NC_SCALEFACTOR_OMEGA_K_ZERO (1.0e-14)

NC_SCALEFACTOR_MIN_ETA_STEP

#define NC_SCALEFACTOR_MIN_ETA_STEP (1.0e-11)

Property Details

The “a0” property

  “a0”                       double

Scale factor today a_0.

Owner: NcScalefactor

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 1


The “a0-conformal-normal” property

  “a0-conformal-normal”      gboolean

Scale factor today a_0 from normalized curvature radius.

Owner: NcScalefactor

Flags: Read / Write / Construct

Default value: FALSE


The “abstol” property

  “abstol”                   double

Absolute tolerance.

Owner: NcScalefactor

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “dist” property

  “dist”                     NcDistance *

Distance object.

Owner: NcScalefactor

Flags: Read / Write / Construct Only


The “reltol” property

  “reltol”                   double

Relative tolerance.

Owner: NcScalefactor

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 1e-13


The “zf” property

  “zf”                       double

Initial redshift.

Owner: NcScalefactor

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 1e+14