libgravix2  0.1.0
A fast simulation of attractive forces acting on point-like particles embedded onto the surface of a sphere.
pot.c File Reference
#include "libgravix2/pot.h"
#include <math.h>
#include <stddef.h>
#include "libgravix2/api.h"
#include "libgravix2/config.h"
#include "libgravix2/linalg.h"
#include "libgravix2/planet.h"
#include "libgravix2/constants.h"
#include "libgravix2/helpers.h"
Include dependency graph for pot.c:

Functions

void grvx_gradV (struct GrvxVec3D *x, const struct GrvxPlanets *planets)
 Gradient of the potential at position q. More...
 
double grvx_min_dist (const struct GrvxVec3D *x, const struct GrvxPlanets *planets)
 Minimal distance to any planet. More...
 
double grvx_v_esc (void)
 Escape velocity \(p_\pi\) for isolated planets. More...
 
double grvx_v_scrcl (double r)
 Velocity of a missile on a small circle for isolated planets. More...
 

Function Documentation

◆ grvx_gradV()

void grvx_gradV ( struct GrvxVec3D q,
const struct GrvxPlanets planets 
)

Gradient of the potential at position q.

The gradient is evaluated at position q and the resulting vectors is stored in q.

Parameters
qThe position where the gradient is evaluated. The result overwrites this variable.
planetsPlanets that generate the force field.
Here is the call graph for this function:

◆ grvx_min_dist()

double grvx_min_dist ( const struct GrvxVec3D q,
const struct GrvxPlanets planets 
)

Minimal distance to any planet.

Parameters
qThe position of the missile.
planetsPlanets that generate the force field.
Returns
Cosine of smallest angle between q and any planet.
Here is the call graph for this function:
Here is the caller graph for this function: