Swarm-NG  1.1
swarm::gpu::bppt::rkck< AdaptationStyle, Monitor, Gravitation > Class Template Reference

Runge Kutta Cash Karp integrator Fixed/Adaptive. More...

#include <rkck_integrator.hpp>

Inheritance diagram for swarm::gpu::bppt::rkck< AdaptationStyle, Monitor, Gravitation >:
swarm::gpu::bppt::integrator swarm::gpu::integrator swarm::integrator

Public Member Functions

 rkck (const config &cfg)
 Construct for class rkck.
 
virtual void launch_integrator ()
 Integrater implementation provided by derived instance.
 
GPUAPI void convert_internal_to_std_coord ()
 method for convert internal coord to std coord
 
GPUAPI void convert_std_to_internal_coord ()
 method for convert std coord to internal coord
 
template<class T >
__device__ void kernel (T compile_time_param)
 RKCK integrator. More...
 
- Public Member Functions inherited from swarm::gpu::bppt::integrator
 integrator (const config &cfg)
 Constructor.
 
const int & override_system_per_block () const
 User specified value of system_per_block. More...
 
- Public Member Functions inherited from swarm::gpu::integrator
 integrator (const config &cfg)
 Pass on constructor.
 
virtual void integrate ()
 Interfaces function to integrate, for use by general user. More...
 
virtual void core_integrate ()
 To integrate without any bookkeeping. More...
 
virtual void set_log_manager (log::Pmanager &l)
 Read the GPU log object from log manager and set it.
 
void set_log (gpulog::device_log *log)
 Set the GPU log object used for loggin output.
 
gpulog::device_log * get_device_log ()
 Get the GPU log object used for logging output.
 
void set_ensemble (defaultEnsemble &ens)
 Set the ensemble, only provide an ensemble on host. This cals automatically creates a copy of ensemble on GPU and keeps it in sync. Refer to set_ensemble(host_ens,device_ens) if you wish to manage the GPU memory allocation.
 
void set_ensemble (defaultEnsemble &host_ens, deviceEnsemble &device_ens)
 Set two host and device ensembles, two ensembles should match. More...
 
void upload_ensemble ()
 Synchronize device ensemble with host ensemble.
 
void download_ensemble ()
 Synchronize host ensemble with device ensemble.
 
- Public Member Functions inherited from swarm::integrator
 integrator (const config &cfg)
 Inetgrator class should be configurable. Derived instances should also have a constructor with similar signature and pass on the config parameter.
 
virtual void flush_log ()
 Flush the host log.
 
virtual defaultEnsembleget_ensemble ()
 Access the ensemble subject to integration.
 
virtual void set_destination_time (const double &destination_time)
 Set the time marker to end the integration.
 

Additional Inherited Members

- Static Public Member Functions inherited from swarm::gpu::bppt::integrator
template<class T >
static GENERIC int thread_per_system (T compile_time_param)
 Calculate number of worker threads needed for each system. More...
 
template<class T >
static GENERIC int shmem_per_system (T compile_time_param)
 Helper Function: Logical amount of shared memory needed for force calculations per thread This value is calculated from number of bodies, if this is used in a kernel, the actual amount of shared memory allocated might be different. More...
 
- Static Public Attributes inherited from swarm::integrator
static const int _default_max_iterations = 10000000
 Default value for maximum number of iterations. c.f. _max_iterations.
 
static const int _default_max_attempts = 1000000
 Default value for maximum number of attempts. c.f. _max_attempts.
 
- Protected Attributes inherited from swarm::gpu::bppt::integrator
int _override_system_per_block
 Number of systems allocated in a block. Should be a multiple of SHMEM_CHUNK_SIZE for better coalescing.
 

Detailed Description

template<class AdaptationStyle, class Monitor, template< class T > class Gravitation>
class swarm::gpu::bppt::rkck< AdaptationStyle, Monitor, Gravitation >

Runge Kutta Cash Karp integrator Fixed/Adaptive.

This integrator comes in two flavors: Fixed time step, Adaptive time step

Definition at line 51 of file rkck_integrator.hpp.

Member Function Documentation

template<class AdaptationStyle , class Monitor , template< class T > class Gravitation>
template<class T >
__device__ void swarm::gpu::bppt::rkck< AdaptationStyle, Monitor, Gravitation >::kernel ( compile_time_param)
inline

RKCK integrator.

Define Cash-Karp constants From GSL

local information per component per body

RKCK integrate system ////////////////////////////////////////////////////////////////

Value used as power in formula to produce larger time step

Value used as power in formula to produce smaller time step

Safety factor to prevent extreme changes in time step

Maximum growth of step size allowed at a time

Maximum shrinkage of step size allowed at a time

factor of 0.5 below due to use of squares in calculate_normalized_error, should we change to match gsl? gsl uses 1.1, but that seems dangerous, any reason we shouldn't use 1?

Definition at line 91 of file rkck_integrator.hpp.

References swarm::gpu::integrator::_dens, swarm::integrator::_destination_time, swarm::gpu::integrator::_log, peyton::constants::c, swarm::EnsembleBase< _CHUNK_SIZE, _NUM_BODY_ATTRIBUTES, _NUM_SYS_ATTRIBUTES >::nsys(), swarm::gpu::bppt::sysid(), swarm::gpu::bppt::system_shared_data_pointer(), swarm::gpu::bppt::thread_body_idx(), swarm::gpu::bppt::thread_component_idx(), and swarm::gpu::bppt::thread_in_system().


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