ASCOT5
Loading...
Searching...
No Matches
Functions
libascot_mem.h File Reference

Header file for libascot_mem.c. More...

#include "particle.h"

Go to the source code of this file.

Functions

input_particlelibascot_allocate_input_particles (int nmrk)
 A routine to allocate an array of input particles.
 
particle_statelibascot_allocate_particle_states (int nmrk)
 A routine to allocate an array of particle states.
 
reallibascot_allocate_reals (size_t size)
 A routine to allocate an array of reals.
 
void libascot_deallocate (void *arr)
 A wrapper to C stdlib free()
 

Detailed Description

Header file for libascot_mem.c.

Definition in file libascot_mem.h.

Function Documentation

◆ libascot_allocate_input_particles()

input_particle * libascot_allocate_input_particles ( int nmrk)

A routine to allocate an array of input particles.

Parameters
nmrknumber of markers for which space is allocated
Returns
pointer to the allocated array

Definition at line 16 of file libascot_mem.c.

◆ libascot_allocate_particle_states()

particle_state * libascot_allocate_particle_states ( int nmrk)

A routine to allocate an array of particle states.

Parameters
nmrknumber of markers for which space is allocated
Returns
pointer to the allocated array

Definition at line 27 of file libascot_mem.c.

◆ libascot_allocate_reals()

real * libascot_allocate_reals ( size_t size)

A routine to allocate an array of reals.

Parameters
sizesize of the array
Returns
pointer to the allocated array

Definition at line 38 of file libascot_mem.c.

◆ libascot_deallocate()

void libascot_deallocate ( void * arr)

A wrapper to C stdlib free()

Parameters
arrarray to be freed

Definition at line 48 of file libascot_mem.c.