Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI::Transporting::Flux_order Class Reference

#include <GIDI.hpp>

Public Member Functions

 Flux_order (std::size_t a_order, std::size_t a_length, double const *a_energies, double const *a_fluxes)
 Flux_order (std::size_t a_order, std::vector< double > const &a_energies, std::vector< double > const &a_fluxes)
 Flux_order (Flux_order const &a_fluxOrder)
 ~Flux_order ()
std::size_t order () const
std::size_t size () const
double const * energies () const
std::vector< double > const & v_energies () const
double const * fluxes () const
std::vector< double > const & v_fluxes () const
void print (unsigned int a_valuesPerLine=10) const

Detailed Description

Specifies the flux data for a specified Legendre order (see class Flux).

Definition at line 3540 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Flux_order() [1/3]

GIDI::Transporting::Flux_order::Flux_order ( std::size_t a_order,
std::size_t a_length,
double const * a_energies,
double const * a_fluxes )
Parameters
a_order[in] The Legendre order of the flux data.
a_length[in] The number of a_energies values.
a_energies[in] The list of energies that the flux a_fluxes are given at.
a_fluxes[in] The flux for this Legendre order.

Definition at line 34 of file GIDI_settings_flux.cc.

34 :
35 m_order( a_order ) {
36
37 for( std::size_t i1 = 0; i1 < a_length; ++i1 ) m_energies.push_back( a_energies[i1] );
38 for( std::size_t i1 = 0; i1 < a_length; ++i1 ) m_fluxes.push_back( a_fluxes[i1] );
39}

Referenced by Flux_order().

◆ Flux_order() [2/3]

GIDI::Transporting::Flux_order::Flux_order ( std::size_t a_order,
std::vector< double > const & a_energies,
std::vector< double > const & a_fluxes )
Parameters
a_order[in] The Legendre order of the flux data.
a_energies[in] The list of energies that the flux a_fluxes are given at.
a_fluxes[in] The flux for this Legendre order.

Definition at line 47 of file GIDI_settings_flux.cc.

47 :
48 m_order( a_order ),
49 m_energies( a_energies ),
50 m_fluxes( a_fluxes ) {
51
52 if( a_energies.size( ) != a_fluxes.size( ) ) throw Exception( "Flux_order::Flux_order: a_energies.size( ) != a_fluxes.size( )." );
53}

◆ Flux_order() [3/3]

GIDI::Transporting::Flux_order::Flux_order ( Flux_order const & a_fluxOrder)
Parameters
a_fluxOrder[in] The flux order to copy.

Definition at line 59 of file GIDI_settings_flux.cc.

59 :
60 m_order( a_fluxOrder.order( ) ),
61 m_energies( a_fluxOrder.v_energies( ) ),
62 m_fluxes( a_fluxOrder.v_fluxes( ) ) {
63
64}

◆ ~Flux_order()

GIDI::Transporting::Flux_order::~Flux_order ( )

Definition at line 69 of file GIDI_settings_flux.cc.

69 {
70
71}

Member Function Documentation

◆ energies()

double const * GIDI::Transporting::Flux_order::energies ( ) const
inline

Returns a pointer to the beginning of the energy data.

Definition at line 3555 of file GIDI.hpp.

Referenced by GIDI::multiGroupXYs1d(), and GIDI::Transporting::Flux::process().

◆ fluxes()

double const * GIDI::Transporting::Flux_order::fluxes ( ) const
inline

Returns a pointer to the beginning of the flux data.

Definition at line 3557 of file GIDI.hpp.

Referenced by GIDI::multiGroupXYs1d(), and GIDI::Transporting::Flux::process().

◆ order()

std::size_t GIDI::Transporting::Flux_order::order ( ) const
inline

Returns the value of the m_order member.

Definition at line 3553 of file GIDI.hpp.

Referenced by GIDI::Transporting::Flux::addFluxOrder(), and Flux_order().

◆ print()

void GIDI::Transporting::Flux_order::print ( unsigned int a_valuesPerLine = 10) const

Print the Flux_order to std::cout. Mainly for debugging.

Parameters
a_valuesPerLine[in] The number of points (i.e., energy, flux pairs) to print per line.

Definition at line 79 of file GIDI_settings_flux.cc.

79 {
80
81 auto nE = m_energies.size( );
82 bool printIndent = true;
83
84 std::cout << " ORDER: " << m_order << " (number of points = " << m_energies.size( ) << ")" << std::endl;
85 for( std::size_t iE = 0; iE < nE; ++iE ) {
86 if( printIndent ) std::cout << " ";
87 printIndent = false;
88 std::string buffer = LUPI::Misc::argumentsToString( " %15.8e %15.8e", m_energies[iE], m_fluxes[iE] );
89 std::cout << buffer;
90 if( ( ( iE + 1 ) % a_valuesPerLine ) == 0 ) {
91 std::cout << std::endl;
92 printIndent = true;
93 }
94 }
95 if( nE % a_valuesPerLine ) std::cout << std::endl;
96}
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305

◆ size()

std::size_t GIDI::Transporting::Flux_order::size ( ) const
inline

Returns the number of energy, flux pairs.

Definition at line 3554 of file GIDI.hpp.

Referenced by GIDI::multiGroupXYs1d(), and GIDI::Transporting::Flux::process().

◆ v_energies()

std::vector< double > const & GIDI::Transporting::Flux_order::v_energies ( ) const
inline

Returns the value of the m_energies member.

Definition at line 3556 of file GIDI.hpp.

Referenced by Flux_order().

◆ v_fluxes()

std::vector< double > const & GIDI::Transporting::Flux_order::v_fluxes ( ) const
inline

Returns the value of the m_fluxes member.

Definition at line 3558 of file GIDI.hpp.

Referenced by Flux_order().


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