9.2
general documentation
cs_lagr_particle_set_t Struct Reference

#include <cs_lagr_particle.h>

+ Collaboration diagram for cs_lagr_particle_set_t:

Public Member Functions

 cs_lagr_particle_set_t ()
 Default constructor. More...
 
 cs_lagr_particle_set_t (cs_lnum_t n_part_max, const cs_lagr_attribute_map_t *map)
 Constructor. More...
 
 cs_lagr_particle_set_t (const cs_lagr_particle_set_t &other)
 Copy constructor (shallow copy) More...
 
CS_F_HOST_DEVICE cs_lagr_particle_set_t (cs_lagr_particle_set_t &&other)
 Move constructor. More...
 
 ~cs_lagr_particle_set_t ()
 Default destructor. More...
 
CS_F_HOST_DEVICE cs_lagr_particle_set_toperator= (cs_lagr_particle_set_t other)
 Assignment operator. More...
 
CS_F_HOST int resize (const cs_lnum_t n_particles_max_min)
 Resize particles set. More...
 
template<typename T >
CS_F_HOST_DEVICE T & attr (cs_lnum_t particle_id, cs_lagr_attribute_t attr)
 Access attribute based on particle id and a given type. More...
 
template<typename T >
CS_F_HOST_DEVICE T & attr (cs_lnum_t particle_id, cs_lagr_attribute_t attr) const
 Access attribute based on particle id and a given type from a const particle set. More...
 
template<typename T >
CS_F_HOST_DEVICE T & attr_n (cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr)
 Access attribute based on particle id, time id and a given type. More...
 
template<typename T >
CS_F_HOST_DEVICE T & attr_n (cs_lnum_t p_id, int time_id, cs_lagr_attribute_t attr) const
 Access attribute based on particle id, time id and a given type for a const particle set. More...
 
template<typename T >
CS_F_HOST_DEVICE T * attr_get_ptr (cs_lnum_t p_id, cs_lagr_attribute_t attr)
 Get a pointer to attribute values. More...
 
template<typename T >
CS_F_HOST_DEVICE const T * attr_get_const_ptr (cs_lnum_t p_id, cs_lagr_attribute_t attr)
 Get a const pointer to attribute values. More...
 
template<typename T >
CS_F_HOST_DEVICE T * attr_n_get_ptr (cs_lnum_t p_id, int time_id, cs_lagr_attribute_t attr)
 Get a pointer to attribute values. More...
 
template<typename T >
CS_F_HOST_DEVICE const T * attr_n_get_const_ptr (cs_lnum_t p_id, int time_id, cs_lagr_attribute_t attr)
 Get a const pointer to attribute values. More...
 
CS_F_HOST_DEVICE int flag (cs_lnum_t p_id, int mask)
 Check if a flag is set for a given particle based on a mask. More...
 
CS_F_HOST_DEVICE void set_flag (cs_lnum_t p_id, int mask)
 Set flag for a given particle. More...
 
CS_F_HOST_DEVICE void unset_flag (cs_lnum_t p_id, int mask)
 Unset a flag for a given particle. More...
 
CS_F_HOST_DEVICE cs_real_tsource_terms (cs_lnum_t p_id, cs_lagr_attribute_t attr)
 Get pointer to 2nd order scheme source terms for an attribute of a given particle in a set. More...
 
CS_F_HOST_DEVICE const cs_real_tsource_terms_const (cs_lnum_t p_id, cs_lagr_attribute_t attr)
 Get pointer to 2nd order scheme source terms for an attribute of a given particle in a set. More...
 
template<typename... Args>
auto attr_real (Args &&... args) -> decltype(attr< cs_real_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_lnum (Args &&... args) -> decltype(attr< cs_lnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_gnum (Args &&... args) -> decltype(attr< cs_gnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_real (Args &&... args) -> decltype(attr_n< cs_real_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_lnum (Args &&... args) -> decltype(attr_n< cs_lnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_gnum (Args &&... args) -> decltype(attr_n< cs_gnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_real_ptr (Args &&... args) -> decltype(attr_get_ptr< cs_real_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_lnum_ptr (Args &&... args) -> decltype(attr_get_ptr< cs_lnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_gnum_ptr (Args &&... args) -> decltype(attr_get_ptr< cs_gnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_real_const_ptr (Args &&... args) -> decltype(attr_get_const_ptr< cs_real_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_lnum_const_ptr (Args &&... args) -> decltype(attr_get_const_ptr< cs_lnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_gnum_const_ptr (Args &&... args) -> decltype(attr_get_const_ptr< cs_gnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_real_ptr (Args &&... args) -> decltype(attr_n_get_ptr< cs_real_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_lnum_ptr (Args &&... args) -> decltype(attr_n_get_ptr< cs_lnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_gnum_ptr (Args &&... args) -> decltype(attr_n_get_ptr< cs_gnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_real_const_ptr (Args &&... args) -> decltype(attr_n_get_const_ptr< cs_real_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_lnum_const_ptr (Args &&... args) -> decltype(attr_n_get_const_ptr< cs_lnum_t >(std::forward< Args >(args)...))
 
template<typename... Args>
auto attr_n_gnum_const_ptr (Args &&... args) -> decltype(attr_n_get_const_ptr< cs_gnum_t >(std::forward< Args >(args)...))
 

Public Attributes

cs_lnum_t n_particles
 
cs_lnum_t n_part_new
 
cs_lnum_t n_part_out
 
cs_lnum_t n_part_merged
 
cs_lnum_t n_part_dep
 
cs_lnum_t n_part_fou
 
cs_lnum_t n_part_resusp
 
cs_lnum_t n_failed_part
 
cs_real_t weight
 
cs_real_t weight_new
 
cs_real_t weight_out
 
cs_real_t weight_merged
 
cs_real_t weight_dep
 
cs_real_t weight_fou
 
cs_real_t weight_resusp
 
cs_real_t weight_failed
 
cs_lnum_t n_particles_max
 
const cs_lagr_attribute_map_tp_am
 
unsigned char * p_buffer
 

Constructor & Destructor Documentation

◆ cs_lagr_particle_set_t() [1/4]

Default constructor.

◆ cs_lagr_particle_set_t() [2/4]

cs_lagr_particle_set_t ( cs_lnum_t  n_part_max,
const cs_lagr_attribute_map_t map 
)

Constructor.

Parameters
[in]n_part_maxMaximal number of particles
[in]mapAttribute map

◆ cs_lagr_particle_set_t() [3/4]

Copy constructor (shallow copy)

Parameters
[in]otherreference to other set

◆ cs_lagr_particle_set_t() [4/4]

Move constructor.

Parameters
[in]other&& reference for move

◆ ~cs_lagr_particle_set_t()

Default destructor.

Member Function Documentation

◆ attr() [1/2]

CS_F_HOST_DEVICE T & attr ( cs_lnum_t  particle_id,
cs_lagr_attribute_t  attr 
)
inline

Access attribute based on particle id and a given type.

Template Parameters
T: type used to cast attribute.
Returns
reference to attribute of type "T"
Parameters
[in]particle_idParticle id
[in]attrattribute id (enum)

◆ attr() [2/2]

CS_F_HOST_DEVICE T & attr ( cs_lnum_t  particle_id,
cs_lagr_attribute_t  attr 
) const
inline

Access attribute based on particle id and a given type from a const particle set.

Template Parameters
T: type used to cast attribute.
Returns
reference to attribute of type "T"
Parameters
[in]particle_idParticle id
[in]attrattribute id (enum)

◆ attr_get_const_ptr()

CS_F_HOST_DEVICE const T * attr_get_const_ptr ( cs_lnum_t  p_id,
cs_lagr_attribute_t  attr 
)
inline

Get a const pointer to attribute values.

Template Parameters
T: type used to cast attribute.
Returns
const pointer of type T*
Parameters
[in]p_idparticle id
[in]attrattribute id (enum)

◆ attr_get_ptr()

CS_F_HOST_DEVICE T * attr_get_ptr ( cs_lnum_t  p_id,
cs_lagr_attribute_t  attr 
)
inline

Get a pointer to attribute values.

Template Parameters
T: type used to cast attribute.
Returns
pointer of type T*
Parameters
[in]p_idparticle id
[in]attrattribute id (enum)

◆ attr_gnum()

auto attr_gnum ( Args &&...  args) -> decltype(attr<cs_gnum_t>(std::forward<Args>(args)...))
inline

◆ attr_gnum_const_ptr()

auto attr_gnum_const_ptr ( Args &&...  args) -> decltype(attr_get_const_ptr<cs_gnum_t>(std::forward<Args>(args)...))
inline

◆ attr_gnum_ptr()

auto attr_gnum_ptr ( Args &&...  args) -> decltype(attr_get_ptr<cs_gnum_t>(std::forward<Args>(args)...))
inline

◆ attr_lnum()

auto attr_lnum ( Args &&...  args) -> decltype(attr<cs_lnum_t>(std::forward<Args>(args)...))
inline

◆ attr_lnum_const_ptr()

auto attr_lnum_const_ptr ( Args &&...  args) -> decltype(attr_get_const_ptr<cs_lnum_t>(std::forward<Args>(args)...))
inline

◆ attr_lnum_ptr()

auto attr_lnum_ptr ( Args &&...  args) -> decltype(attr_get_ptr<cs_lnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n() [1/2]

CS_F_HOST_DEVICE T & attr_n ( cs_lnum_t  p_id,
int  time_id,
cs_lagr_attribute_t  attr 
) const
inline

Access attribute based on particle id, time id and a given type for a const particle set.

Template Parameters
T: type used to cast attribute.
Returns
reference to attribute of type "T"
Parameters
[in]p_idParticle id
[in]time_idtime id
[in]attrattribute id (enum)

◆ attr_n() [2/2]

CS_F_HOST_DEVICE T & attr_n ( cs_lnum_t  particle_id,
int  time_id,
cs_lagr_attribute_t  attr 
)
inline

Access attribute based on particle id, time id and a given type.

Template Parameters
T: type used to cast attribute.
Returns
reference to attribute of type "T"
Parameters
[in]particle_idParticle id
[in]time_idtime id
[in]attrattribute id (enum)

◆ attr_n_get_const_ptr()

CS_F_HOST_DEVICE const T * attr_n_get_const_ptr ( cs_lnum_t  p_id,
int  time_id,
cs_lagr_attribute_t  attr 
)
inline

Get a const pointer to attribute values.

Template Parameters
T: type used to cast attribute.
Returns
const pointer of type T*
Parameters
[in]p_idparticle id
[in]time_idtime id
[in]attrattribute id (enum)

◆ attr_n_get_ptr()

CS_F_HOST_DEVICE T * attr_n_get_ptr ( cs_lnum_t  p_id,
int  time_id,
cs_lagr_attribute_t  attr 
)
inline

Get a pointer to attribute values.

Template Parameters
T: type used to cast attribute.
Returns
pointer of type T*
Parameters
[in]p_idparticle id
[in]time_idtime id
[in]attrattribute id (enum)

◆ attr_n_gnum()

auto attr_n_gnum ( Args &&...  args) -> decltype(attr_n<cs_gnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n_gnum_const_ptr()

auto attr_n_gnum_const_ptr ( Args &&...  args) -> decltype(attr_n_get_const_ptr<cs_gnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n_gnum_ptr()

auto attr_n_gnum_ptr ( Args &&...  args) -> decltype(attr_n_get_ptr<cs_gnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n_lnum()

auto attr_n_lnum ( Args &&...  args) -> decltype(attr_n<cs_lnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n_lnum_const_ptr()

auto attr_n_lnum_const_ptr ( Args &&...  args) -> decltype(attr_n_get_const_ptr<cs_lnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n_lnum_ptr()

auto attr_n_lnum_ptr ( Args &&...  args) -> decltype(attr_n_get_ptr<cs_lnum_t>(std::forward<Args>(args)...))
inline

◆ attr_n_real()

auto attr_n_real ( Args &&...  args) -> decltype(attr_n<cs_real_t>(std::forward<Args>(args)...))
inline

◆ attr_n_real_const_ptr()

auto attr_n_real_const_ptr ( Args &&...  args) -> decltype(attr_n_get_const_ptr<cs_real_t>(std::forward<Args>(args)...))
inline

◆ attr_n_real_ptr()

auto attr_n_real_ptr ( Args &&...  args) -> decltype(attr_n_get_ptr<cs_real_t>(std::forward<Args>(args)...))
inline

◆ attr_real()

auto attr_real ( Args &&...  args) -> decltype(attr<cs_real_t>(std::forward<Args>(args)...))
inline

◆ attr_real_const_ptr()

auto attr_real_const_ptr ( Args &&...  args) -> decltype(attr_get_const_ptr<cs_real_t>(std::forward<Args>(args)...))
inline

◆ attr_real_ptr()

auto attr_real_ptr ( Args &&...  args) -> decltype(attr_get_ptr<cs_real_t>(std::forward<Args>(args)...))
inline

◆ flag()

CS_F_HOST_DEVICE int flag ( cs_lnum_t  p_id,
int  mask 
)
inline

Check if a flag is set for a given particle based on a mask.

Returns
1 if mask is set, 0 otherwise
Parameters
[in]p_idparticle id
[in]maskmask

◆ operator=()

Assignment operator.

◆ resize()

CS_F_HOST int resize ( const cs_lnum_t  n_particles_max_min)

Resize particles set.

Resize the particle set.

Parameters
[in]n_particles_max_minminimum local max number of particles

◆ set_flag()

CS_F_HOST_DEVICE void set_flag ( cs_lnum_t  p_id,
int  mask 
)
inline

Set flag for a given particle.

Parameters
[in]p_idparticle id
[in]maskmask

◆ source_terms()

CS_F_HOST_DEVICE cs_real_t * source_terms ( cs_lnum_t  p_id,
cs_lagr_attribute_t  attr 
)
inline

Get pointer to 2nd order scheme source terms for an attribute of a given particle in a set.

Parameters
[in]p_idparticle id
[in]attrrequested attribute id
Returns
pointer to current attribute data

◆ source_terms_const()

CS_F_HOST_DEVICE const cs_real_t * source_terms_const ( cs_lnum_t  p_id,
cs_lagr_attribute_t  attr 
)
inline

Get pointer to 2nd order scheme source terms for an attribute of a given particle in a set.

Parameters
[in]p_idparticle id
[in]attrrequested attribute id
Returns
pointer to current attribute data

◆ unset_flag()

CS_F_HOST_DEVICE void unset_flag ( cs_lnum_t  p_id,
int  mask 
)
inline

Unset a flag for a given particle.

Parameters
[in]p_idparticle id
[in]maskmask

Member Data Documentation

◆ n_failed_part

cs_lnum_t n_failed_part

◆ n_part_dep

cs_lnum_t n_part_dep

◆ n_part_fou

cs_lnum_t n_part_fou

◆ n_part_merged

cs_lnum_t n_part_merged

◆ n_part_new

cs_lnum_t n_part_new

◆ n_part_out

cs_lnum_t n_part_out

◆ n_part_resusp

cs_lnum_t n_part_resusp

◆ n_particles

cs_lnum_t n_particles

◆ n_particles_max

cs_lnum_t n_particles_max

◆ p_am

particle attributes maps (p_am + i for time n-i)

◆ p_buffer

unsigned char* p_buffer

Particles data buffer

◆ weight

cs_real_t weight

◆ weight_dep

cs_real_t weight_dep

◆ weight_failed

cs_real_t weight_failed

◆ weight_fou

cs_real_t weight_fou

◆ weight_merged

cs_real_t weight_merged

◆ weight_new

cs_real_t weight_new

◆ weight_out

cs_real_t weight_out

◆ weight_resusp

cs_real_t weight_resusp

The documentation for this struct was generated from the following files: