My Project
programmer's documentation
|
#include "cs_defs.h"
#include <limits.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <float.h>
#include <assert.h>
#include "bft_printf.h"
#include "bft_error.h"
#include "bft_mem.h"
#include "fvm_periodicity.h"
#include "cs_base.h"
#include "cs_math.h"
#include "cs_mesh_quantities.h"
#include "cs_order.h"
#include "cs_parall.h"
#include "cs_timer_stats.h"
#include "cs_lagr.h"
#include "cs_lagr_particle.h"
#include "cs_lagr_event.h"
Functions | |
void | cs_lagr_event_initialize (void) |
Define particle map based on defined options. More... | |
void | cs_lagr_event_finalize (void) |
Destroy main particle set and map if they exist. More... | |
const cs_lagr_event_attribute_map_t * | cs_lagr_event_get_attr_map (void) |
Return const pointer to the main particle event attribute map structure. More... | |
const char * | cs_lagr_event_get_attr_name (cs_lagr_event_attribute_t attr) |
Return name associated with a given attribute. More... | |
cs_lagr_event_set_t * | cs_lagr_event_set_create (void) |
void | cs_lagr_event_set_destroy (cs_lagr_event_set_t **events) |
void | cs_lagr_event_get_attr_info (const cs_lagr_event_set_t *events, cs_lagr_event_attribute_t attr, size_t *extents, size_t *size, ptrdiff_t *displ, cs_datatype_t *datatype, int *count) |
Get data extents for a given particle event attribute. More... | |
void | cs_lagr_event_attr_in_range (int attr) |
Check if an event attribute is in a valid range. More... | |
void | cs_lagr_event_set_resize (cs_lagr_event_set_t *event_set, cs_lnum_t min_size) |
void | cs_lagr_event_set_dump (const cs_lagr_event_set_t *events) |
Dump a cs_lagr_event_set_t structure. More... | |
void | cs_lagr_event_init_from_particle (cs_lagr_event_set_t *events, cs_lagr_particle_set_t *particles, cs_lnum_t event_id, cs_lnum_t particle_id) |
cs_lagr_event_set_t * | cs_lagr_event_set_boundary_interaction (void) |
Particle event management.
Particle events allow keeping track of particle events suh as boundary interactions using a structure and API similar to that used for particles.
Particles events could actually be stored as particle data, given the necessary additional attributes defined here (i.e. using a different attribute map), and could be refactored in the future based on feedback.
As of now, it was chosen to use an independent structure, so as to avoid confusion regarding the more restricted uses and (temporary) lifetime of particle events, which should need to be maintained only as a buffer mechanism for event-based statistics.
void cs_lagr_event_attr_in_range | ( | int | attr | ) |
Check if an event attribute is in a valid range.
If this is not the case, a fatal error is provoked.
[in] | attr | event attribute |
void cs_lagr_event_finalize | ( | void | ) |
Destroy main particle set and map if they exist.
Destroy event set map if it exists.
void cs_lagr_event_get_attr_info | ( | const cs_lagr_event_set_t * | events, |
cs_lagr_event_attribute_t | attr, | ||
size_t * | extents, | ||
size_t * | size, | ||
ptrdiff_t * | displ, | ||
cs_datatype_t * | datatype, | ||
int * | count | ||
) |
Get data extents for a given particle event attribute.
Get data extents for a given event attribute.
For attributes not currently present, the displacement and data size should be -1 and 0 respectively.
[in] | events | associated event set |
[in] | attr | event attribute |
[out] | extents | size (in bytes) of event structure, or NULL |
[out] | size | size (in bytes) of attribute in event structure, or NULL |
[out] | displ | displacement (in bytes) in event structure, or NULL |
[out] | datatype | datatype of associated attribute, or NULL |
[out] | count | number of type values associated with attribute, or NULL |
const cs_lagr_event_attribute_map_t* cs_lagr_event_get_attr_map | ( | void | ) |
Return const pointer to the main particle event attribute map structure.
Return const pointer to the main event attribute map structure.
const char* cs_lagr_event_get_attr_name | ( | cs_lagr_event_attribute_t | attr | ) |
Return name associated with a given attribute.
[in] | attr | event attribute |
void cs_lagr_event_init_from_particle | ( | cs_lagr_event_set_t * | events, |
cs_lagr_particle_set_t * | particles, | ||
cs_lnum_t | event_id, | ||
cs_lnum_t | particle_id | ||
) |
void cs_lagr_event_initialize | ( | void | ) |
Define particle map based on defined options.
Define event map based on defined options.
cs_lagr_event_set_t* cs_lagr_event_set_boundary_interaction | ( | void | ) |
Return a cs_lagr_event_set_t structure for particle/boundary interactions.
The event set is created if not present yet.
This event set is automatically freed and destroyed at the end of the computation.
cs_lagr_event_set_t* cs_lagr_event_set_create | ( | void | ) |
Create a cs_lagr_event_set_t structure.
void cs_lagr_event_set_destroy | ( | cs_lagr_event_set_t ** | events | ) |
Destroy a cs_lagr_event_set_t structure.
[in,out] | pointer | to pointer to event set to destroy |
void cs_lagr_event_set_dump | ( | const cs_lagr_event_set_t * | events | ) |
Dump a cs_lagr_event_set_t structure.
[in] | events | cs_lagr_event_set_t structure to dump |
void cs_lagr_event_set_resize | ( | cs_lagr_event_set_t * | event_set, |
cs_lnum_t | min_size | ||
) |