CosmoGRaPH v0.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
cosmo::RK4Register< IT, RT > Class Template Reference

RK4 Class for integration. More...

#include <RK4Register.h>

Collaboration diagram for cosmo::RK4Register< IT, RT >:
Collaboration graph
[legend]

Public Member Functions

 RK4Register ()
 Constructor calls CosmoArray constructors; call RK4Register::init to initialize class.
 
 RK4Register (IT nx_in, IT ny_in, IT nz_in, RT sim_dt_in)
 
void init (IT nx_in, IT ny_in, IT nz_in, RT sim_dt_in)
 Initialize class variables; call CosmoArray::init for array members. More...
 
void setDt (RT sim_dt_in)
 Set "dt" for RK4Register instance.
 
void setName (std::string name_in)
 Set "name" property of instance, CosmoArray member instances. More...
 
void swap_a_c ()
 Swap data in and names of _a and _c registers.
 
void swap_p_f ()
 Swap data in and names of _p and _f registers.
 
void stepInit ()
 
void K1Finalize ()
 
void K2Finalize ()
 
void K3Finalize ()
 
void K4Finalize ()
 
RT & _p (const IT &i, const IT &j, const IT &k)
 
RT & _a (const IT &i, const IT &j, const IT &k)
 
RT & _c (const IT &i, const IT &j, const IT &k)
 
RT & _f (const IT &i, const IT &j, const IT &k)
 
RT & operator() (const IT &i, const IT &j, const IT &k)
 
RT & operator[] (IT idx)
 

Public Attributes

CosmoArray< IT, RT > _array_p
 "_p" register: contains data from _p_revious step
 
CosmoArray< IT, RT > _array_a
 "_a" register: containes _a_ctive data needed for _c_omputations
 
CosmoArray< IT, RT > _array_c
 "_c" register: contains _c_omputed values
 
CosmoArray< IT, RT > _array_f
 "_f" register: containes final value of RK4 step
 

Private Attributes

std::string name
 
IT points
 
RT sim_dt
 

Detailed Description

template<typename IT, typename RT>
class cosmo::RK4Register< IT, RT >

RK4 Class for integration.

See the docs/RK4_integration.pptx file.

Template Parameters
ITIndex type
RTReal type

Member Function Documentation

template<typename IT, typename RT>
void cosmo::RK4Register< IT, RT >::init ( IT  nx_in,
IT  ny_in,
IT  nz_in,
RT  sim_dt_in 
)
inline

Initialize class variables; call CosmoArray::init for array members.

Set "dt" for class instance; grid dimensions

Parameters
nx_innum. grid points in x-direction
ny_innum. grid points in y-direction
nz_innum. grid points in z-direction
sim_dt_ininitial timestep
template<typename IT, typename RT>
void cosmo::RK4Register< IT, RT >::setName ( std::string  name_in)
inline

Set "name" property of instance, CosmoArray member instances.

Parameters
name_inname

The documentation for this class was generated from the following file: