The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
Functions | Variables
Psys.c File Reference

Contains the functions that set up the planetary system configuration. More...

#include "fargo.h"
Include dependency graph for Psys.c:

Go to the source code of this file.

Functions

int FindNumberOfPlanets (char *filename)
 
PlanetarySystemAllocPlanetSystem (int nb)
 
void FreePlanetary (PlanetarySystem *sys)
 
PlanetarySystemInitPlanetarySystem (char *filename)
 
void ListPlanets (PlanetarySystem *sys)
 
real GetPsysInfo (PlanetarySystem *sys, boolean action)
 The original function was modified to handle 3D inclined orbits. More...
 
real GetPsysInfoFromRsim (struct reb_simulation *rsim, boolean action)
 An analogue of the GetPsysInfo() function; here a rebound simulation structure is used as a call argument. More...
 
void RotatePsys (struct reb_simulation *rsim, real angle)
 Synchronises the planetary system with the frame. More...
 

Variables

static real Xplanet
 
static real Yplanet
 
boolean GuidingCenter
 

Detailed Description

Contains the functions that set up the planetary system configuration.

In addition, the last two functions allow to track the first planet (number 0) of the planetary system, in order to perform a calculation in the frame corotating either with this planet or with its guiding-center.

Author
THORIN modifications by Ondřej Chrenko chren.nosp@m.ko@s.nosp@m.irrah.nosp@m..tro.nosp@m.ja.mf.nosp@m.f.cu.nosp@m.ni.cz, Copyright (C) 2017; original code by Frédéric Masset

Definition in file Psys.c.

Function Documentation

PlanetarySystem* AllocPlanetSystem ( int  nb)
int FindNumberOfPlanets ( char *  filename)

Definition at line 21 of file Psys.c.

References prs_exit().

Referenced by InitPlanetarySystem().

Here is the call graph for this function:

Here is the caller graph for this function:

void FreePlanetary ( PlanetarySystem sys)

Definition at line 98 of file Psys.c.

real GetPsysInfo ( PlanetarySystem sys,
boolean  action 
)

The original function was modified to handle 3D inclined orbits.

It is similar to the one used in fargo3D but employs tools from the REBOUND package.

Definition at line 189 of file Psys.c.

References FREQUENCY, G, GET, GuidingCenter, MARK, planetary_system::x, Xplanet, YES, and Yplanet.

real GetPsysInfoFromRsim ( struct reb_simulation *  rsim,
boolean  action 
)

An analogue of the GetPsysInfo() function; here a rebound simulation structure is used as a call argument.

Definition at line 262 of file Psys.c.

References FREQUENCY, G, GET, GuidingCenter, MARK, Xplanet, YES, and Yplanet.

PlanetarySystem* InitPlanetarySystem ( char *  filename)
void ListPlanets ( PlanetarySystem sys)

Definition at line 155 of file Psys.c.

References CPU_Master, planetary_system::nb, and YES.

void RotatePsys ( struct reb_simulation *  rsim,
real  angle 
)

Synchronises the planetary system with the frame.

Affects the rebound simulation structure only, 'sys' and 'rsim' are synchronised later on.

Definition at line 330 of file Psys.c.

Variable Documentation

boolean GuidingCenter

Definition at line 29 of file Interpret.c.

Referenced by GetPsysInfo(), GetPsysInfoFromRsim(), and ReadVariables().

real Xplanet
static

Definition at line 17 of file Psys.c.

Referenced by GetPsysInfo(), and GetPsysInfoFromRsim().

real Yplanet
static

Definition at line 17 of file Psys.c.

Referenced by GetPsysInfo(), and GetPsysInfoFromRsim().