NcHIPertWKB

NcHIPertWKB — WKB perturbation object.

Functions

Types and Values

Object Hierarchy

    GEnum
    ├── NcHIPertWKBCmp
    ╰── NcHIPertWKBVars
    GObject
    ╰── NcHIPert
        ╰── NcHIPertWKB

Description

Generic implementation of WKB analysis.

Functions

NcHIPertWKBGetNuV ()

void
(*NcHIPertWKBGetNuV) (NcHIPertWKB *wkb,
                      NcmModel *model,
                      gdouble alpha,
                      gdouble k,
                      gdouble *nu,
                      gdouble *V);

NcHIPertWKBGetMnuDmnu ()

void
(*NcHIPertWKBGetMnuDmnu) (NcHIPertWKB *wkb,
                          NcmModel *model,
                          gdouble alpha,
                          gdouble k,
                          gdouble *mnu,
                          gdouble *dmnu);

NcHIPertWKBGetVal ()

gdouble
(*NcHIPertWKBGetVal) (NcHIPertWKB *wkb,
                      NcmModel *model,
                      gdouble alpha,
                      gdouble k);

nc_hipert_wkb_ref ()

NcHIPertWKB *
nc_hipert_wkb_ref (NcHIPertWKB *wkb);

Increases the reference count of wkb .

Parameters

wkb

a NcHIPertWKB.

 

Returns

wkb .

[transfer full]


nc_hipert_wkb_free ()

void
nc_hipert_wkb_free (NcHIPertWKB *wkb);

Decreases the reference count of wkb .

Parameters

wkb

a NcHIPertWKB.

 

nc_hipert_wkb_clear ()

void
nc_hipert_wkb_clear (NcHIPertWKB **wkb);

Decreases the reference count of *wkb and sets *wkb to NULL.

Parameters

wkb

a NcHIPertWKB.

 

nc_hipert_wkb_set_interval ()

void
nc_hipert_wkb_set_interval (NcHIPertWKB *wkb,
                            gdouble alpha_i,
                            gdouble alpha_f);

Sets the interval to calculate the WKB modes to $(\alpha_i,\,\alpha_f)$.

Parameters

wkb

a NcHIPertWKB

 

alpha_i

initial log-redshift time

 

alpha_f

final log-redshift time

 

nc_hipert_wkb_get_nu_V ()

void
nc_hipert_wkb_get_nu_V (NcHIPertWKB *wkb,
                        NcmModel *model,
                        gdouble alpha,
                        gdouble k,
                        gdouble *nu,
                        gdouble *V);

FIXME

[virtual get_nu_V]

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

log-redshift time

 

k

mode $k$

 

nu

frequency $\nu$.

[out]

V

WKB potential.

[out]

nc_hipert_wkb_get_mnu_dmnu ()

void
nc_hipert_wkb_get_mnu_dmnu (NcHIPertWKB *wkb,
                            NcmModel *model,
                            gdouble alpha,
                            gdouble k,
                            gdouble *mnu,
                            gdouble *dmnu);

FIXME

[virtual get_mnu_dmnu]

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

log-redshift time

 

k

mode $k$

 

mnu

mass-frequency $m\nu$.

[out]

dmnu

mass-frequency derivative $\mathrm{d}m\nu/\mathrm{d}\alpha$.

[out]

nc_hipert_wkb_get_m ()

gdouble
nc_hipert_wkb_get_m (NcHIPertWKB *wkb,
                     NcmModel *model,
                     gdouble alpha,
                     gdouble k);

FIXME

[virtual get_m]

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

log-redshift time

 

k

mode $k$

 

Returns

mass $m$.


nc_hipert_wkb_get_nu2 ()

gdouble
nc_hipert_wkb_get_nu2 (NcHIPertWKB *wkb,
                       NcmModel *model,
                       gdouble alpha,
                       gdouble k);

FIXME

[virtual get_nu2]

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

log-redshift time

 

k

mode $k$

 

Returns

frequency squared $m^2$.


nc_hipert_wkb_get_dVnu2 ()

gdouble
nc_hipert_wkb_get_dVnu2 (NcHIPertWKB *wkb,
                         NcmModel *model,
                         gdouble alpha,
                         gdouble k);

FIXME

[virtual get_dVnu2]

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

log-redshift time

 

k

mode $k$

 

Returns

derivative of the WKB potential $\mathrm{d}(V/\nu^2)/\mathrm{d}\alpha$.


nc_hipert_wkb_prepare ()

void
nc_hipert_wkb_prepare (NcHIPertWKB *wkb,
                       NcmModel *model);

Prepare the object for WKB calculations using the model model . It uses the wkb approximation until wkb->reltol is reached and then it solves the non-linear equation of motion for $\nu_A$ for the rest of the interval.

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

nc_hipert_wkb_q ()

void
nc_hipert_wkb_q (NcHIPertWKB *wkb,
                 NcmModel *model,
                 gdouble alpha,
                 gdouble *Re_q,
                 gdouble *Im_q);

Computes the WKB solution $q_\text{WKB}$ for the mode $k$ at the time $\alpha$.

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

the log-redshift time

 

Re_q

Real part of the wkb solution.

[out caller-allocates]

Im_q

Imaginary part of the wkb solution.

[out caller-allocates]

nc_hipert_wkb_q_p ()

void
nc_hipert_wkb_q_p (NcHIPertWKB *wkb,
                   NcmModel *model,
                   gdouble alpha,
                   gdouble *Re_q,
                   gdouble *Im_q,
                   gdouble *Re_p,
                   gdouble *Im_p);

Computes the WKB solution $q_\text{WKB}$ and its momentum for the mode $k$ at the time $\alpha$.

Parameters

wkb

a NcHIPertWKB.

 

model

a NcmModel

 

alpha

the log-redshift time.

 

Re_q

Real part of the wkb solution.

[out caller-allocates]

Im_q

Imaginary part of the wkb solution.

[out caller-allocates]

Re_p

Real part of the wkb solution momentum.

[out caller-allocates]

Im_p

Imaginary part of the wkb solution momentum.

[out caller-allocates]

nc_hipert_wkb_nuA ()

gdouble
nc_hipert_wkb_nuA (NcHIPertWKB *wkb,
                   NcmModel *model,
                   gdouble alpha);

FIXME

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

the log-redshift time

 

Returns

FIXME


nc_hipert_wkb_phase ()

gdouble
nc_hipert_wkb_phase (NcHIPertWKB *wkb,
                     NcmModel *model,
                     gdouble alpha);

FIXME

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha

the log-redshift time

 

Returns

FIXME


nc_hipert_wkb_maxtime ()

gdouble
nc_hipert_wkb_maxtime (NcHIPertWKB *wkb,
                       NcmModel *model,
                       gdouble alpha0,
                       gdouble alpha1);

Search for the root of $\nu_A^2$ between $\alpha_0$ and $\alpha_1$.

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

alpha0

the initial log-redshift time

 

alpha1

the final log-redshift time

 

Returns

the root of $\nu_A^2$ between $\alpha_0$ and $\alpha_1$ or NaN if not found.


nc_hipert_wkb_maxtime_prec ()

gdouble
nc_hipert_wkb_maxtime_prec (NcHIPertWKB *wkb,
                            NcmModel *model,
                            NcHIPertWKBCmp cmp,
                            gdouble alpha0,
                            gdouble alpha1);

Search for the instant at which the WKB approximation starts to fails within the asked precision.

Parameters

wkb

a NcHIPertWKB

 

model

a NcmModel

 

cmp

Comparison type

 

alpha0

FIXME

 

alpha1

FIXME

 

Returns

the instant $\alpha$ between $\alpha_0$ and $\alpha_1$ or NaN if not found.

Types and Values

enum NcHIPertWKBVars

Perturbation variables enumerator.

Members

NC_HIPERT_WKB_RE_Q

$\text{Re}(q)$

 

NC_HIPERT_WKB_IM_Q

$\text{Im}(q)$

 

NC_HIPERT_WKB_RE_P

$\text{Re}(p)$

 

NC_HIPERT_WKB_IM_P

$\text{Im}(p)$

 

enum NcHIPertWKBCmp

FIXME

Members

NC_HIPERT_WKB_CMP_POTENTIAL

Compare with the potential.

 

NC_HIPERT_WKB_CMP_ALPHA2

Compare with $\alpha^2$.