(git:0de0cc2)
grid_sphere_cache.c File Reference
#include "grid_sphere_cache.h"
#include "grid_common.h"
#include "grid_library.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

static int single_sphere_bounds (const double disr_radius, const double dh[3][3], const double dh_inv[3][3], int *bounds)
 Compute the sphere bounds for a given single radius. More...
 
static void rebuild_cache_entry (const int max_imr, const double drmin, const double dh[3][3], const double dh_inv[3][3], grid_sphere_cache_entry *entry)
 Rebuild a cache entry for a given cell and max radius. More...
 
void grid_sphere_cache_lookup (const double radius, const double dh[3][3], const double dh_inv[3][3], int **sphere_bounds, double *discr_radius)
 Lookup the sphere bound from cache and compute them as needed. See grid_sphere_cache.h for details. More...
 
void grid_sphere_cache_free (grid_sphere_cache *cache)
 Free the memory of the sphere cache. More...
 

Function Documentation

◆ single_sphere_bounds()

static int single_sphere_bounds ( const double  disr_radius,
const double  dh[3][3],
const double  dh_inv[3][3],
int *  bounds 
)
static

Compute the sphere bounds for a given single radius.

Author
Ole Schuett

Definition at line 21 of file grid_sphere_cache.c.

Here is the caller graph for this function:

◆ rebuild_cache_entry()

static void rebuild_cache_entry ( const int  max_imr,
const double  drmin,
const double  dh[3][3],
const double  dh_inv[3][3],
grid_sphere_cache_entry entry 
)
static

Rebuild a cache entry for a given cell and max radius.

Author
Ole Schuett

Definition at line 62 of file grid_sphere_cache.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grid_sphere_cache_lookup()

void grid_sphere_cache_lookup ( const double  radius,
const double  dh[3][3],
const double  dh_inv[3][3],
int **  sphere_bounds,
double *  discr_radius 
)

Lookup the sphere bound from cache and compute them as needed. See grid_sphere_cache.h for details.

Lookup the sphere bounds from the cache and compute them when missing.

Author
Ole Schuett

Definition at line 96 of file grid_sphere_cache.c.

Here is the call graph for this function:

◆ grid_sphere_cache_free()

void grid_sphere_cache_free ( grid_sphere_cache cache)

Free the memory of the sphere cache.

Author
Ole Schuett

Definition at line 163 of file grid_sphere_cache.c.

Here is the caller graph for this function: