STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
starsh-particles.h File Reference
#include "starsh.h"
#include <stdio.h>
#include <stdint.h>
Include dependency graph for starsh-particles.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  starsh_particles
 Structure for general N-body problems. More...
 

Typedefs

typedef struct starsh_particles STARSH_particles
 Structure for general N-body problems.
 

Enumerations

enum  STARSH_PARTICLES_PLACEMENT {
  STARSH_PARTICLES_RAND = 1, STARSH_PARTICLES_UNIFORM = 3, STARSH_PARTICLES_RANDGRID = 4, STARSH_PARTICLES_QUASIUNIFORM1 = 6,
  STARSH_PARTICLES_QUASIUNIFORM2 = 7, STARSH_PARTICLES_OBSOLETE1 = -1, STARSH_PARTICLES_OBSOLETE2 = -2, STARSH_PARTICLES_OBSOLETE3 = -3,
  STARSH_PARTICLES_OBSOLETE4 = -4
}
 Distribution of particles for starsh_particles_generate(). More...
 

Functions

int starsh_particles_new (STARSH_particles **data, STARSH_int count, int ndim)
 Allocate memory for STARSH_particles object. More...
 
int starsh_particles_init (STARSH_particles **data, STARSH_int count, int ndim, double *point)
 Initialize STARSH_particles object by given data. More...
 
void starsh_particles_free (STARSH_particles *data)
 Free memory of STARSH_particles object. More...
 
int starsh_particles_generate (STARSH_particles **data, STARSH_int count, int ndim, enum STARSH_PARTICLES_PLACEMENT ptype)
 Generate STARSH_particles with required distribution. More...
 
int starsh_particles_generate_rand (STARSH_particles **data, STARSH_int count, int ndim)
 Generate particles with [0,1] uniform random distribution. More...
 
int starsh_particles_generate_randgrid (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a grid on randomly distributed grid coordinates. More...
 
int starsh_particles_generate_uniform (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles. More...
 
int starsh_particles_generate_quasiuniform1 (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles with random shift of each particle. More...
 
int starsh_particles_generate_quasiuniform2 (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles with random shift of grid coordinates. More...
 
int starsh_particles_generate_obsolete1 (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles with random shift of each particle. More...
 
int starsh_particles_generate_obsolete2 (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles with random shift of grid coordinates. More...
 
int starsh_particles_generate_obsolete3 (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles with random shift of each particle. More...
 
int starsh_particles_generate_obsolete4 (STARSH_particles **data, STARSH_int count, int ndim)
 Generate a uniform grid of particles with random shift of each particle. More...
 
int starsh_particles_read_from_file (STARSH_particles **data, const char *fname, const enum STARSH_FILE_TYPE ftype)
 Read STARSH_particles object from file. More...
 
int starsh_particles_read_from_file_pointer (STARSH_particles **data, FILE *fp, const enum STARSH_FILE_TYPE ftype)
 Read STARSH_particles object from file pointer. More...
 
int starsh_particles_read_from_file_pointer_ascii (STARSH_particles **data, FILE *fp)
 Read STARSH_particles object from file pointer in ASCII format. More...
 
int starsh_particles_read_from_file_pointer_binary (STARSH_particles **data, FILE *fp)
 Read STARSH_particles object from file pointer in binary format. More...
 
int starsh_particles_write_to_file (const STARSH_particles *data, const char *fname, const enum STARSH_FILE_TYPE ftype)
 Write STARSH_particles object to file. More...
 
int starsh_particles_write_to_file_pointer (const STARSH_particles *data, FILE *fp, const enum STARSH_FILE_TYPE ftype)
 Write STARSH_particles object to file pointer. More...
 
int starsh_particles_write_to_file_pointer_ascii (const STARSH_particles *data, FILE *fp)
 Write STARSH_particles object to file pointer in ASCII format. More...
 
int starsh_particles_write_to_file_pointer_binary (const STARSH_particles *data, FILE *fp)
 Write STARSH_particles object to file pointer in binary format. More...
 
int starsh_particles_zsort_inplace (STARSH_particles *data)
 Sort particles in Z-order (Morton order). More...
 

Detailed Description

STARS-H is a software package, provided by King Abdullah University of Science and Technology (KAUST)

Version
0.3.0
Author
Sameh Abdulah
Aleksandr Mikhalev
Date
2020-06-09