Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MCGIDI::Probabilities::SimpleMaxwellianFission2d Class Reference

#include <MCGIDI_functions.hpp>

Inheritance diagram for MCGIDI::Probabilities::SimpleMaxwellianFission2d:

Public Member Functions

LUPI_HOST_DEVICE SimpleMaxwellianFission2d ()
LUPI_HOST SimpleMaxwellianFission2d (GIDI::Functions::SimpleMaxwellianFission2d const &a_simpleMaxwellianFission2d)
LUPI_HOST_DEVICE ~SimpleMaxwellianFission2d ()
LUPI_HOST_DEVICE double evaluate (double a_x2, double a_x1) const
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, LUPI_maybeUnused RNG &&a_rng) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase2d_d2
LUPI_HOST_DEVICE ProbabilityBase2d_d2 ()
LUPI_HOST ProbabilityBase2d_d2 (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase2d_d2 (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE double evaluate (double a_x2, double a_x1) const
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double sample2dOf3d (double a_x2, double a_rngValue, RNG &&a_rng, double *a_x1_1, double *a_x1_2) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase2d_d1
LUPI_HOST_DEVICE ProbabilityBase2d_d1 ()
LUPI_HOST ProbabilityBase2d_d1 (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase2d_d1 (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE double evaluate (double a_x2, double a_x1) const
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double sample2dOf3d (double a_x2, double a_rngValue, RNG &&a_rng, double *a_x1_1, double *a_x1_2) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase2d
LUPI_HOST_DEVICE ProbabilityBase2d ()
LUPI_HOST ProbabilityBase2d (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase2d (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE ~ProbabilityBase2d ()
LUPI_HOST_DEVICE ProbabilityBase2dType type () const
LUPI_HOST_DEVICE String typeString () const
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION double evaluate (double a_x2, double a_x1) const MCGIDI_TRUE_VIRTUAL
template<typename RNG>
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION double sample (double a_x2, double a_rngValue, RNG &&a_rng) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase
LUPI_HOST_DEVICE ProbabilityBase ()
LUPI_HOST ProbabilityBase (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE ~ProbabilityBase ()
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Public Member Functions inherited from MCGIDI::Functions::FunctionBase
LUPI_HOST_DEVICE FunctionBase ()
LUPI_HOST FunctionBase (GIDI::Functions::FunctionForm const &a_function)
LUPI_HOST_DEVICE FunctionBase (int a_dimension, double a_domainMin, double a_domainMax, Interpolation a_interpolation, double a_outerDomainValue=0)
virtual LUPI_HOST_DEVICE ~FunctionBase ()=0
LUPI_HOST_DEVICE Interpolation interpolation () const
LUPI_HOST_DEVICE double domainMin () const
LUPI_HOST_DEVICE double domainMax () const
LUPI_HOST_DEVICE double outerDomainValue () const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

Additional Inherited Members

Protected Attributes inherited from MCGIDI::Probabilities::ProbabilityBase2d
ProbabilityBase2dType m_type
Protected Attributes inherited from MCGIDI::Probabilities::ProbabilityBase
Vector< double > m_Xs

Detailed Description

Definition at line 668 of file MCGIDI_functions.hpp.

Constructor & Destructor Documentation

◆ SimpleMaxwellianFission2d() [1/2]

LUPI_HOST_DEVICE MCGIDI::Probabilities::SimpleMaxwellianFission2d::SimpleMaxwellianFission2d ( )

Definition at line 2145 of file MCGIDI_functions.cc.

2145 :
2146 m_U( 0.0 ),
2147 m_theta( nullptr ) {
2148
2150}

◆ SimpleMaxwellianFission2d() [2/2]

LUPI_HOST MCGIDI::Probabilities::SimpleMaxwellianFission2d::SimpleMaxwellianFission2d ( GIDI::Functions::SimpleMaxwellianFission2d const & a_simpleMaxwellianFission2d)

Definition at line 2154 of file MCGIDI_functions.cc.

2154 :
2155 ProbabilityBase2d_d2( a_simpleMaxwellianFission2d ),
2156 m_U( a_simpleMaxwellianFission2d.U( ) ),
2157 m_theta( Functions::parseFunction1d_d1( a_simpleMaxwellianFission2d.theta( ) ) ) {
2158
2160}
LUPI_HOST Function1d_d1 * parseFunction1d_d1(Transporting::MC const &a_settings, GIDI::Suite const &a_suite)

◆ ~SimpleMaxwellianFission2d()

LUPI_HOST_DEVICE MCGIDI::Probabilities::SimpleMaxwellianFission2d::~SimpleMaxwellianFission2d ( )

Definition at line 2165 of file MCGIDI_functions.cc.

2165 {
2166
2167 delete m_theta;
2168}

Member Function Documentation

◆ evaluate()

LUPI_HOST_DEVICE double MCGIDI::Probabilities::SimpleMaxwellianFission2d::evaluate ( double a_x2,
double a_x1 ) const

Definition at line 2172 of file MCGIDI_functions.cc.

2172 {
2173
2174 double theta = m_theta->evaluate( a_x2 );
2175 double E_U_theta = ( a_x2 - m_U ) / theta;
2176
2177 if( E_U_theta < 0 ) return( 0.0 );
2178
2179 double Ep_theta = a_x1 / theta;
2180 double sqrt_E_U_theta = sqrt( E_U_theta );
2181
2182 return( sqrt( Ep_theta ) * exp( -Ep_theta ) / ( theta * ( erf( sqrt_E_U_theta ) / M_2_SQRTPI - sqrt_E_U_theta * exp( -E_U_theta ) ) ) );
2183}

◆ sample() [1/2]

template<typename RNG>
LUPI_HOST_DEVICE double MCGIDI::Probabilities::SimpleMaxwellianFission2d::sample ( double a_x2,
double a_rngValue,
LUPI_maybeUnused RNG && a_rng ) const

Definition at line 2066 of file MCGIDI_headerSource.hpp.

2066 {
2067
2068 double theta = m_theta->evaluate( a_x2 );
2069
2070 return( theta * MCGIDI_sampleSimpleMaxwellianFission( ( a_x2 - m_U ) / theta, a_rngValue ) );
2071}

◆ sample() [2/2]

template<typename RNG>
LUPI_HOST_DEVICE double MCGIDI::Probabilities::SimpleMaxwellianFission2d::sample ( double a_x2,
double a_rngValue,
RNG && a_rng ) const

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::Probabilities::SimpleMaxwellianFission2d::serialize ( LUPI::DataBuffer & a_buffer,
LUPI::DataBuffer::Mode a_mode )

This method serializes this for broadcasting as needed for MPI and GPUs. The method can count the number of required bytes, pack this or unpack this depending on a_mode.

Parameters
a_buffer[in] The buffer to read or write data to depending on a_mode.
a_mode[in] Specifies the action of this method.

Definition at line 2193 of file MCGIDI_functions.cc.

2193 {
2194
2195 ProbabilityBase2d::serialize( a_buffer, a_mode );
2196 DATA_MEMBER_DOUBLE( m_U, a_buffer, a_mode );
2197 m_theta = serializeFunction1d_d1( a_buffer, a_mode, m_theta );
2198}
#define DATA_MEMBER_DOUBLE(member, buf, mode)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE Functions::Function1d_d1 * serializeFunction1d_d1(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Functions::Function1d_d1 *a_function1d)

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