GraviDy  1.0
Gravitational Dynamics N-body integrator
Public Member Functions | Public Attributes | List of all members
NbodyUtils Class Reference

Class in charge of the different properties of the system. More...

#include <NbodyUtils.hpp>

Collaboration diagram for NbodyUtils:
Collaboration graph
[legend]

Public Member Functions

 NbodyUtils (NbodySystem *ns)
 Constructor. More...
 
 ~NbodyUtils ()
 Destructor. More...
 
void nbody_attributes ()
 General method to get many N-body attributes. More...
 
void get_radii ()
 Radii respect the center of density calculation, to be able to calculate the layers of the Lagrange radii. More...
 
void get_layers ()
 Layers of the Lagrange radii calculation. More...
 
void lagrange_radii ()
 Lagrange radii calculation. More...
 
double get_virial_radius (double energy)
 Virial radius calculation. More...
 
double get_close_encounter_radius (double r_virial)
 Close encounter radius calculation. More...
 
double get_close_encounter_timestep (double r_cl)
 Close encounter timestep calculation. More...
 
double get_core_radius ()
 Core radius calculation using CORE_MASS as limit point, and respect the center of mass of the system. More...
 
double get_half_mass_relaxation_time ()
 Half mass relaxation time calculation. More...
 
double get_crossing_time (double r_virial)
 Crossing time calculation. More...
 
double get_halfmass_radius ()
 Half mass radius calculation. More...
 
double get_magnitude (double x, double y, double z)
 Vector magnitude calculation. More...
 
double get_timestep_normal (unsigned int i, float ETA)
 Time step calculation. More...
 
double normalize_dt (double new_dt, double old_dt, double t, unsigned int i)
 Normalization of the timestep. More...
 
double get_potential ()
 Potential energy calculation. More...
 
double get_kinetic ()
 Kinetic energy calculation. More...
 
double get_energy (double ext=0)
 Kinetic and Potential energy calculation. More...
 
double3 get_center_of_density ()
 Center of density calculation. More...
 

Public Attributes

NbodySystemns
 
float ratio
 
double3 cod
 Center of density. More...
 
std::vector< Distanceradii
 Radii array related to the center of density, and related to the percentage distribution that we want to obtain. More...
 
std::vector< double > layers_radii
 values of the radii of the different layers More...
 

Detailed Description

Class in charge of the different properties of the system.

All the calculation of radii, times, energy, density, etc plus some utilities for the code, like the normalization of the timesteps.

Constructor & Destructor Documentation

§ NbodyUtils()

NbodyUtils::NbodyUtils ( NbodySystem ns)

Constructor.

§ ~NbodyUtils()

NbodyUtils::~NbodyUtils ( )

Destructor.

Member Function Documentation

§ get_center_of_density()

double3 NbodyUtils::get_center_of_density ( )

Center of density calculation.

§ get_close_encounter_radius()

double NbodyUtils::get_close_encounter_radius ( double  r_virial)

Close encounter radius calculation.

§ get_close_encounter_timestep()

double NbodyUtils::get_close_encounter_timestep ( double  r_cl)

Close encounter timestep calculation.

§ get_core_radius()

double NbodyUtils::get_core_radius ( )

Core radius calculation using CORE_MASS as limit point, and respect the center of mass of the system.

§ get_crossing_time()

double NbodyUtils::get_crossing_time ( double  r_virial)

Crossing time calculation.

§ get_energy()

double NbodyUtils::get_energy ( double  ext = 0)

Kinetic and Potential energy calculation.

§ get_half_mass_relaxation_time()

double NbodyUtils::get_half_mass_relaxation_time ( )

Half mass relaxation time calculation.

Please note that this method uses a lot of empirical values and approximations.

§ get_halfmass_radius()

double NbodyUtils::get_halfmass_radius ( )

Half mass radius calculation.

§ get_kinetic()

double NbodyUtils::get_kinetic ( )

Kinetic energy calculation.

This method is auxiliary and use only for verification procedures

§ get_layers()

void NbodyUtils::get_layers ( )

Layers of the Lagrange radii calculation.

This method consider the distribution in LAGRANGE_RADII to select the % of mass for each layer

§ get_magnitude()

double NbodyUtils::get_magnitude ( double  x,
double  y,
double  z 
)

Vector magnitude calculation.

§ get_potential()

double NbodyUtils::get_potential ( )

Potential energy calculation.

This method is auxiliary and use only for verification procedures

§ get_radii()

void NbodyUtils::get_radii ( )

Radii respect the center of density calculation, to be able to calculate the layers of the Lagrange radii.

§ get_timestep_normal()

double NbodyUtils::get_timestep_normal ( unsigned int  i,
float  ETA 
)

Time step calculation.

§ get_virial_radius()

double NbodyUtils::get_virial_radius ( double  energy)

Virial radius calculation.

§ lagrange_radii()

void NbodyUtils::lagrange_radii ( )

Lagrange radii calculation.

§ nbody_attributes()

void NbodyUtils::nbody_attributes ( )

General method to get many N-body attributes.

Virial radius, Crossing time, Close encounter radus, close encounter timestep, core radius and half mass relaxation time.

§ normalize_dt()

double NbodyUtils::normalize_dt ( double  new_dt,
double  old_dt,
double  t,
unsigned int  i 
)

Normalization of the timestep.

This method take care of the limits conditions to avoid large jumps between the timestep distribution

Member Data Documentation

§ cod

double3 NbodyUtils::cod

Center of density.

§ layers_radii

std::vector<double> NbodyUtils::layers_radii

values of the radii of the different layers

§ ns

NbodySystem* NbodyUtils::ns

§ radii

std::vector<Distance> NbodyUtils::radii

Radii array related to the center of density, and related to the percentage distribution that we want to obtain.

§ ratio

float NbodyUtils::ratio

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