group_particles
Loading...
Searching...
No Matches
Public Member Functions | List of all members
y_prof::YProfile Class Reference

stores a single electron pressure profile More...

Public Member Functions

 YProfile (const GrpProperties &grp)
 constructs from group properties (we need to read the radius)
 
void prt_insert (size_t, const GrpProperties &, const PrtProperties &prt, coord_t Rsq)
 adds a particle to the profile
 
void save (std::FILE *fpressure, std::FILE *fnum_part)
 append this electron pressure profile to file.
 

Detailed Description

stores a single electron pressure profile

Constructor & Destructor Documentation

◆ YProfile()

y_prof::YProfile::YProfile ( const GrpProperties &  grp)
inline

constructs from group properties (we need to read the radius)

As explained in the documentation for CallbackUtils::prt_action::StorePrtHomogeneous, if the data type stored for each group has a constructor from a const GrpProperties &, this constructor will be called during the calls to Callback::grp_action. We use this fact to read the group radius.

Member Function Documentation

◆ prt_insert()

void y_prof::YProfile::prt_insert ( size_t  ,
const GrpProperties &  ,
const PrtProperties &  prt,
coord_t  Rsq 
)
inline

adds a particle to the profile

This function computes the electron pressure associated with a particle and adds it (weighted with its volume) to the appropriate profile bin.

Note that this exact signature and function name is required, as explained in the documentation for CallbackUtils::prt_action::StorePrtHomogeneous.

◆ save()

void y_prof::YProfile::save ( std::FILE *  fpressure,
std::FILE *  fnum_part 
)
inline

append this electron pressure profile to file.

Attention
it is assumed that this instance is "dead" after this function is called!

The documentation for this class was generated from the following file: