SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Particles::MonteCarlo::Packet Struct Reference

Struct representing a single Monte Carlo packet of neutrinos. More...

#include <Packet.hpp>

Public Member Functions

 Packet (const size_t &species_, const double &number_of_neutrinos_, const size_t &index_of_closest_grid_point_, const double &time_, const double &coord_x_, const double &coord_y_, const double &coord_z_, const double &p_upper_t_, const double &p_x_, const double &p_y_, const double &p_z_)
 Constructor.
 
 Packet ()
 Default constructor needed to make Packet puppable For the same reason, we have default initialization for a number of member variables to unphysical values.
 
void renormalize_momentum (const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const Scalar< DataVector > &lapse)
 
void pup (PUP::er &p)
 
bool operator== (const Packet &rhs) const
 Overloaded comparison operator. Useful for test; in an actual simulation two distinct packets are not truly "identical" as they represent different particles.
 

Public Attributes

size_t species = std::numeric_limits<size_t>::max()
 Species of neutrinos (in the code, just an index used to access the right interaction rates; typically 0=νe,1=νa,2=νx)
 
double number_of_neutrinos = std::numeric_limits<double>::signaling_NaN()
 Number of neutrinos represented by current packet Note that this number is rescaled so that Energy_of_packet = N * Energy_of_neutrinos with the packet energy in G=Msun=c=1 units but the neutrino energy in MeV!
 
size_t index_of_closest_grid_point = std::numeric_limits<size_t>::max()
 Index of the closest point on the FD grid.
 
double time = std::numeric_limits<double>::signaling_NaN()
 Current time.
 
double momentum_upper_t = std::numeric_limits<double>::signaling_NaN()
 Stores pt.
 
tnsr::I< double, 3, Frame::ElementLogicalcoordinates
 Coordinates of the packet, in element logical coordinates.
 
tnsr::i< double, 3, Frame::Inertialmomentum
 Spatial components of the 4-momentum pi, in Inertial coordinates.
 

Detailed Description

Struct representing a single Monte Carlo packet of neutrinos.

Member Function Documentation

◆ renormalize_momentum()

void Particles::MonteCarlo::Packet::renormalize_momentum ( const tnsr::II< DataVector, 3, Frame::Inertial > &  inv_spatial_metric,
const Scalar< DataVector > &  lapse 
)

Recalculte pt using the fact that the 4-momentum is a null vector

(1)pt=γijpipj/α


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