My Project
programmer's documentation
|
Extract information from lagrangian particles. More...
#include "cs_defs.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_base.h"
#include "cs_field.h"
#include "cs_log.h"
#include "cs_mesh.h"
#include "cs_parall.h"
#include "cs_lagr_tracking.h"
#include "cs_selector.h"
#include "cs_timer.h"
#include "cs_time_step.h"
#include "cs_lagr_extract.h"
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... | |
Extract information from lagrangian particles.
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 |