Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

dyn Class Reference

dyn: The simplest class of dynamical particles. More...

#include <dyn.h>

Inheritance diagram for dyn:

node _dyn_ _pdyn_ hdyn sdyn sdyn3 pdyn tdyn List of all members.

Public Member Functions

void clear_ifp ()
void clear_ofp ()
void dyn_init ()
 Reset dynamical quantities.
 dyn (hbpfp the_hbpfp=new_hydrobase, sbpfp the_sbpfp=new_starbase, bool use_stories=true)
void rmkepler ()
 Delete kepler structure and pointer.
virtual ~dyn ()
xreal get_system_time () const
real get_real_system_time () const
void set_system_time (xreal t)
void set_ignore_internal (bool i=true)
bool get_ignore_internal () const
unsigned int get_external_field () const
void set_external_field (unsigned int e)
void set_tidal_field (int t)
 Tidal field (external field #1, bit 0).
int get_tidal_field () const
void unset_tidal_field (int t)
void set_omega (real o)
real get_omega () const
real get_omega_sq () const
void set_alpha (real a1, real a3)
real get_alpha1 () const
real get_alpha3 () const
void set_tidal_center (vec c)
vec get_tidal_center () const
void set_tidal_field (real alpha1, real alpha3, int type=0, real omega=0, vec c=0.0)
 Set tidal field flag and alpha parameters.
void set_plummer ()
 Plummer field (external field #2, bit 1).
bool get_plummer () const
void unset_plummer ()
real get_p_mass () const
void set_p_mass (real m)
real get_p_scale_sq () const
void set_p_scale_sq (real r2)
void set_p_center (vec c)
vec get_p_center () const
bool get_p_friction () const
void set_p_friction (bool f)
void set_plummer (real m, real r2, vec c=0.0, bool f=false)
 Set Plummer field flag and parameters.
void set_pl ()
 Power-law field (external field #3, bit 2).
bool get_pl () const
void unset_pl ()
real get_pl_coeff () const
void set_pl_coeff (real c)
real get_pl_scale () const
void set_pl_scale (real r)
real get_pl_exponent () const
void set_pl_exponent (real e)
void set_pl_center (vec c)
vec get_pl_center () const
void set_pl (real A, real a, real e, vec c=0.0)
 Set power-law field flag and parameters.
real get_external_scale_sq ()
 Generic accessor for (single) external field (see dyn_external.C):.
vec get_external_center ()
 Generic accessor for (single) external field (see dyn_external.C):.
void set_pos (const vec &new_pos)
void set_vel (const vec &new_vel)
void set_acc (const vec &new_acc)
void clear_pos ()
 Set pos = 0.
void clear_vel ()
 Set vel = 0.
void clear_acc ()
 Set acc = 0.
void inc_pos (const vec &d_pos)
 pos += del
void inc_vel (const vec &d_vel)
 vel += del
void inc_acc (const vec &d_acc)
 acc += del
void scale_pos (const real scale_factor)
 Scale pos by the specified factor.
void scale_vel (const real scale_factor)
 Scale vel by the specified factor.
void scale_acc (const real scale_factor)
 Scale acc by the specified factor.
vec get_pos () const
vec get_vel () const
vec get_acc () const
dynget_parent () const
dynget_oldest_daughter () const
dynget_younger_sister () const
dynget_elder_sister () const
dynget_root () const
 Set or find the root node pointer.
dynget_top_level_node () const
 Return the top-level node of this node.
dynget_binary_sister ()
 Find the binary sister of this node.
void calculate_acceleration (dyn *, real)
 Compute the gravitational acceleration on this due to the system.
keplerget_kepler () const
void set_kepler (kepler *new_kep)
virtual void null_pointers ()
 Clear story and base pointers (dangerous!).
virtual void print_static (ostream &s=cerr)
 Print the static members of this class.
virtual istream & scan_dyn_story (istream &)
 Read the dyn story from a stream.
virtual bool check_and_correct_node (bool verbose=true)
 Repair tree structure.
virtual ostream & print_dyn_story (ostream &s, bool print_xreal=true, int short_output=0)
 Write the dyn story to a stream.
void to_com ()
 Transform to center-of-mass coordinates.
void set_com (vec r=0.0, vec v=0.0)
void offset_com ()
void reset_com ()
int flatten_node ()
 Remove all binary substructure.
virtual real get_radius ()
virtual void set_radius (real)
bool get_use_sstar ()
void set_use_sstar (bool u)
virtual bool nn_stats (real energy_cutoff, real kT, vec center, bool verbose, bool long_binary_output=true, int which=0)
virtual real print_pert (bool long_binary_output=true, int indent=BIN_INDENT)

Static Public Member Functions

static FILE * set_ifp (FILE *p)
static FILE * get_ifp ()
static FILE * set_ofp (FILE *p)
static FILE * get_ofp ()
static bool set_col_output (bool b=true)
 Col output is a simpler data format suitable for flat trees.
static bool get_col_output ()

Protected Attributes

vec pos
 Position (3-D Cartesian vector).
vec vel
 Velocity: (d/dt) pos.
vec acc
 Acceleration: (d/dt) vel.
keplerkep
 Pointer to a kepler orbit object.

Static Protected Attributes

static xreal system_time
 Extended-precision time.
static real real_system_time
 Real copy of system_time.
static bool use_sstar
 Activate single star evolution.
static bool ignore_internal
 Flag to neglect all internal interactions.
static unsigned int external_field
 External field specification.
static int tidal_type
 Tidal field specification.
static real omega
 System (circular) angular speed.
static real omega_sq
static real alpha1
 Tidal x-acceleration is -alpha1*x.
static real alpha3
 Tidal x-acceleration is alpha3*z.
static vec tidal_center
 (Fixed) center of tidal force.
static real p_mass
 Total Plummer-sphere mass.
static real p_scale_sq
 Plummer scale radius squared.
static vec p_center
 (Fixed) center of Plummer forces.
static bool p_friction
 Flag to include dynamical friction.
static real pl_coeff
 Overall power-law coefficient.
static real pl_scale
 Power-law scale/cutoff radius.
static real pl_exponent
 Power-law exponent.
static vec pl_center
 (Fixed) center of power-law forces.
static FILE * ifp
 If set, use file instead of C++ stream input.
static FILE * ofp
 If set, use file instead of C++ stream ouput.
static bool col_output
 If true, output is in col format.

Detailed Description

dyn: The simplest class of dynamical particles.

Definition at line 37 of file dyn.h.


Member Function Documentation

void dyn::offset_com  ) 
 

Place the root node at the origin, keeping the absolute pos and vel of all top-level nodes unchanged.

void dyn::reset_com  ) 
 

Place the root node at the center of mass, keeping the absolute pos and vel of all top-level nodes unchanged.


Member Data Documentation

int dyn::tidal_type [static, protected]
 

Tidal field specification.

0 => no tidal field
1 => point-mass field
2 => isothermal halo field
3 => disk field (Oort constants)

Definition at line 76 of file dyn.h.

Referenced by get_tidal_field(), and set_tidal_field().


The documentation for this class was generated from the following file:
Generated on Wed Jul 20 12:43:38 2005 for Starlab by  doxygen 1.4.3