Top |
NcmHOAA * | ncm_hoaa_ref () |
void | ncm_hoaa_free () |
void | ncm_hoaa_clear () |
void | ncm_hoaa_set_reltol () |
void | ncm_hoaa_set_abstol () |
void | ncm_hoaa_set_k () |
void | ncm_hoaa_set_ti () |
void | ncm_hoaa_set_tf () |
void | ncm_hoaa_save_evol () |
void | ncm_hoaa_prepare () |
void | ncm_hoaa_get_t0_t1 () |
void | ncm_hoaa_eval_adiabatic_approx () |
void | ncm_hoaa_eval_adiabatic_LnI_approx () |
void | ncm_hoaa_eval_AA () |
void | ncm_hoaa_eval_AA2QV () |
void | ncm_hoaa_eval_QV2AA () |
void | ncm_hoaa_eval_QV () |
void | ncm_hoaa_eval_Delta () |
void | ncm_hoaa_eval_solution () |
gdouble | ncm_hoaa_eval_nu () |
gdouble | ncm_hoaa_eval_mnu () |
gdouble | ncm_hoaa_eval_dlnmnu () |
gdouble | ncm_hoaa_eval_V () |
void | ncm_hoaa_eval_system () |
guint | ncm_hoaa_nsing () |
void | ncm_hoaa_get_sing_info () |
gdouble | ncm_hoaa_eval_sing_mnu () |
gdouble | ncm_hoaa_eval_sing_dlnmnu () |
gdouble | ncm_hoaa_eval_sing_V () |
void | ncm_hoaa_eval_sing_system () |
gdouble | ncm_hoaa_eval_powspec_factor () |
#define | NCM_TYPE_HOAA |
enum | NcmHOAAOpt |
enum | NcmHOAASingType |
struct | NcmHOAAClass |
enum | NcmHOAAVar |
#define | NCM_HOAA_TIME_FRAC |
#define | NCM_HOAA_DEBUG_EVOL |
#define | NCM_HOAA_DEBUG_SING |
#define | NCM_HOAA_DEBUG_EVOL_SING |
#define | NCM_HOAA_PARABOLIC_MIN_POINTS |
#define | NCM_HOAA_PARABOLIC_TRIG_ONE |
NcmHOAA |
This object represents a generic time dependent harmonic oscillator for the variables $q$ and its momentum $p$. The Hamiltonian of the system is given by \begin{equation}\label{eq:H} H = \frac{P_q^2}{2m} + \frac{m(\nu^2 - V)q^2}{2}, \end{equation} where the mass $m$, frequency $\nu$ and the potential $V$ are functions of the time $t$ and mode $k$. The mass $m$ and frequency $\nu$ are assumed to be positive definite functions. For details about this system see Appendix A of Celani et al (2016).
Each child should implement the functions ncm_hoaa_eval_mnu()
, ncm_hoaa_eval_nu()
and
ncm_hoaa_eval_system()
. The potential term is optional, if not implemented then $V$ is assumed
to be zero.
The Action Angle variables are defined through \begin{align} q &= \sqrt{\frac{2I}{m\nu}}\sin\theta, \\ P_q &= \sqrt{2Im\nu}\cos\theta. \end{align} Therefore, the new Hamiltonian is \begin{equation}\label{eq:HAA} H = I\nu + \frac{\mathrm{d}\ln(\sqrt{m\nu})}{\mathrm{d}t}I\sin2\theta - \frac{V}{\nu}I\sin^2\theta. \end{equation} The Hamilton equations for these variables are: \begin{align} \frac{\mathrm{d}\theta}{\mathrm{d}t} &= \nu - \frac{V}{\nu}\sin^2\theta + \frac{\mathrm{d}\ln(\sqrt{m\nu})}{\mathrm{d}t}\sin2\theta, \\ \frac{\mathrm{d}\ln(I)}{\mathrm{d}t} &= - 2\frac{\mathrm{d}\ln(\sqrt{m\nu})}{\mathrm{d}t}\cos2\theta + \frac{V}{\nu}I\sin2\theta. \end{align}
void
ncm_hoaa_clear (NcmHOAA **hoaa
);
Decreases the reference count of *hoaa
and sets the pointer *hoaa
to NULL.
void ncm_hoaa_set_reltol (NcmHOAA *hoaa
,const gdouble reltol
);
Sets the relative tolerance to reltol
.
void ncm_hoaa_set_abstol (NcmHOAA *hoaa
,const gdouble abstol
);
Sets the absolute tolerance to abstol
.
void ncm_hoaa_set_ti (NcmHOAA *hoaa
,const gdouble ti
);
Sets the initial time $t_i$ to ti
.
void ncm_hoaa_set_tf (NcmHOAA *hoaa
,const gdouble tf
);
Sets the initial time $t_f$ to tf
.
void ncm_hoaa_save_evol (NcmHOAA *hoaa
,gboolean save_evol
);
If true saves all evolution to be evaluted later through.
void ncm_hoaa_prepare (NcmHOAA *hoaa
,NcmModel *model
);
Prepares the object using model
.
[virtual prepare]
void ncm_hoaa_get_t0_t1 (NcmHOAA *hoaa
,NcmModel *model
,gdouble *t0
,gdouble *t1
);
Gets the time interval where the numerical evolution was calculated;
void ncm_hoaa_eval_adiabatic_approx (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,gdouble *thetab
,gdouble *upsilon
,gdouble *gamma
);
Calculates the adiabatic approximation at $t$ and $k$.
void ncm_hoaa_eval_adiabatic_LnI_approx (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble theta
,const gdouble psi
,gdouble *LnI
,gdouble *LnJ
);
Calculates the adiabatic approximation at $t$ and $k$.
void ncm_hoaa_eval_AA (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,gdouble *upsilon
,gdouble *gamma
,gdouble *qbar
,gdouble *pbar
);
Calculates the AA variables at $t$ and $k$.
void ncm_hoaa_eval_AA2QV (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble upsilon
,const gdouble gamma
,const gdouble qbar
,const gdouble pbar
,gdouble *q
,gdouble *v
,gdouble *Pq
,gdouble *Pv
);
Change the variables from AA to QV.
void ncm_hoaa_eval_QV2AA (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble q
,const gdouble v
,const gdouble Pq
,const gdouble Pv
,gdouble *upsilon
,gdouble *gamma
,gdouble *qbar
,gdouble *pbar
);
Change the variables from complex to AA.
void ncm_hoaa_eval_QV (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,gdouble *q
,gdouble *v
,gdouble *Pq
,gdouble *Pv
);
Calculates the complex variables at $t$ and $k$.
void ncm_hoaa_eval_Delta (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,gdouble *Delta_phi
,gdouble *Delta_Pphi
);
Calculates the power spectra.
void ncm_hoaa_eval_solution (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble S
,const gdouble PS
,gdouble *Aq
,gdouble *Av
);
Calculates the coefficients $A_q$ and $A_v$ of the solution with initial conditions $S,\;P_S$ at $t$.
gdouble ncm_hoaa_eval_nu (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble k
);
Evaluates the frequency term at $t$ and $k$.
[virtual eval_nu]
gdouble ncm_hoaa_eval_mnu (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble k
);
Evaluates the mass term at $t$ and $k$.
[virtual eval_mnu]
gdouble ncm_hoaa_eval_dlnmnu (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble k
);
Evaluates the derivative $\mathrm{d}(m\nu)/\mathrm{d}t$ term at $t$ and $k$.
[virtual eval_dlnmnu]
gdouble ncm_hoaa_eval_V (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble k
);
Evaluates the potential term at $t$ and $k$.
[virtual eval_V]
void ncm_hoaa_eval_system (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t
,const gdouble k
,gdouble *nu
,gdouble *dlnmnu
,gdouble *Vnu
);
Evaluates the system functions at $t$ and $k$.
[virtual eval_system]
guint ncm_hoaa_nsing (NcmHOAA *hoaa
,NcmModel *model
,const gdouble k
);
Gets the number of singular points $m(t_s) = 0$ for the problem in hand.
[virtual nsing]
void ncm_hoaa_get_sing_info (NcmHOAA *hoaa
,NcmModel *model
,const gdouble k
,const guint sing
,gdouble *ts
,gdouble *dts_i
,gdouble *dts_f
,NcmHOAASingType *st
);
Gets the time $t_s$ where the sing
-th singularity occour.
[virtual get_sing_info]
gdouble ncm_hoaa_eval_sing_mnu (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t_m_ts
,const gdouble k
,const guint sing
);
Evaluates the mass term at $t$ and $k$.
[virtual eval_sing_mnu]
gdouble ncm_hoaa_eval_sing_dlnmnu (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t_m_ts
,const gdouble k
,const guint sing
);
Evaluates the derivative $\mathrm{d}(m\nu)/\mathrm{d}t$ term at $t$ and $k$.
[virtual eval_sing_dlnmnu]
gdouble ncm_hoaa_eval_sing_V (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t_m_ts
,const gdouble k
,const guint sing
);
Evaluates the potential term at $t$ and $k$.
[virtual eval_sing_V]
void ncm_hoaa_eval_sing_system (NcmHOAA *hoaa
,NcmModel *model
,const gdouble t_m_ts
,const gdouble k
,const guint sing
,gdouble *nu
,gdouble *dlnmnu
,gdouble *Vnu
);
Evaluates the system functions at $t$ and $k$.
[virtual eval_sing_system]
When solving the system of equations, the user can choose to solve the system with all variables non-zero, only V non-zero or only dlnmnu non-zero.
“abstol”
property “abstol” double
Absolute tolerance tolerance.
Owner: NcmHOAA
Flags: Read / Write / Construct
Allowed values: >= 0
Default value: 0
“k”
property “k” double
The mode k.
Owner: NcmHOAA
Flags: Read / Write / Construct
Allowed values: >= 0
Default value: 1
“opt”
property“opt” NcmHOAAOpt
Evolution options.
Owner: NcmHOAA
Flags: Read / Write / Construct Only
Default value: NCM_HOAA_OPT_INVALID
“reltol”
property “reltol” double
Relative tolerance.
Owner: NcmHOAA
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 1e-07
“save-evol”
property “save-evol” gboolean
Save the system evolution.
Owner: NcmHOAA
Flags: Read / Write / Construct
Default value: TRUE
“tf”
property “tf” double
The final time t_f.
Owner: NcmHOAA
Flags: Read / Write / Construct
Default value: 1