My Project
programmer's documentation
|
#include "fvm_nodal.h"
#include "fvm_writer.h"
#include "cs_base.h"
#include "cs_lagr_particle.h"
#include "cs_time_step.h"
Go to the source code of this file.
Functions | |
cs_lnum_t | cs_lagr_get_n_particles (void) |
Get the local number of particles. More... | |
void | cs_lagr_get_particle_list (cs_lnum_t n_cells, const cs_lnum_t cell_list[], double density, cs_lnum_t *n_particles, cs_lnum_t *particle_list) |
Extract a list of particles using an optional cell filter and statistical density filter. More... | |
int | cs_lagr_get_particle_values (const cs_lagr_particle_set_t *particles, cs_lagr_attribute_t attr, cs_datatype_t datatype, int stride, int component_id, cs_lnum_t n_particles, const cs_lnum_t particle_list[], void *values) |
Extract values for a set of particles. More... | |
int | cs_lagr_get_trajectory_values (const cs_lagr_particle_set_t *particles, cs_lagr_attribute_t attr, cs_datatype_t datatype, int stride, int component_id, cs_lnum_t n_particles, const cs_lnum_t particle_list[], void *segment_values) |
Extract trajectory values for a set of particles. More... | |
cs_lnum_t cs_lagr_get_n_particles | ( | void | ) |
Get the local number of particles.
void cs_lagr_get_particle_list | ( | cs_lnum_t | n_cells, |
const cs_lnum_t | cell_list[], | ||
double | density, | ||
cs_lnum_t * | n_particles, | ||
cs_lnum_t * | particle_list | ||
) |
Extract a list of particles using an optional cell filter and statistical density filter.
The output array must have been allocated by the caller and be of sufficient size.
[in] | n_cells | number of cells in filter |
[in] | cell_list | optional list of containing cells filter (1 to n numbering) |
[in] | density | if < 1, fraction of particles to select |
[out] | n_particles | number of selected particles, or NULL |
[out] | particle_list | particle_list (1 to n numbering), or NULL |
int cs_lagr_get_particle_values | ( | const cs_lagr_particle_set_t * | particles, |
cs_lagr_attribute_t | attr, | ||
cs_datatype_t | datatype, | ||
int | stride, | ||
int | component_id, | ||
cs_lnum_t | n_particles, | ||
const cs_lnum_t | particle_list[], | ||
void * | values | ||
) |
Extract values for a set of particles.
The output array must have been allocated by the caller and be of sufficient size.
[in] | particles | associated particle set |
[in] | attr | attribute whose values are required |
[in] | datatype | associated value type |
[in] | stride | number of values per particle |
[in] | component_id | if -1 : extract the whole attribute if >0 : id of the component to extract |
[in] | n_particles | number of particles in filter |
[in] | particle_list | particle_list (1 to n numbering), or NULL |
[out] | values | particle values for given attribute |
int cs_lagr_get_trajectory_values | ( | const cs_lagr_particle_set_t * | particles, |
cs_lagr_attribute_t | attr, | ||
cs_datatype_t | datatype, | ||
int | stride, | ||
int | component_id, | ||
cs_lnum_t | n_particles, | ||
const cs_lnum_t | particle_list[], | ||
void * | segment_values | ||
) |
Extract trajectory values for a set of particles.
Trajectories are defined as a mesh of segments, whose start and end points are copied in an interleaved manner in the segment_values array (p1_old, p1_new, p2_old, p2_new, ... pn_old, pn_new).
The output array must have been allocated by the caller and be of sufficient size.
[in] | particles | associated particle set |
[in] | attr | attribute whose values are required |
[in] | datatype | associated value type |
[in] | stride | number of values per particle |
[in] | component_id | if -1 : extract the whole attribute if >0 : id of the component to extract |
[in] | n_particles | number of particles in filter |
[in] | particle_list | particle_list (1 to n numbering), or NULL |
[out] | segment_values | particle segment values |