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

#include <MCGIDI_functions.hpp>

Inheritance diagram for MCGIDI::Functions::Branching1d:

Public Member Functions

LUPI_HOST_DEVICE Branching1d ()
LUPI_HOST Branching1d (SetupInfo &a_setupInfo, GIDI::Functions::Branching1d const &a_branching1d)
LUPI_HOST_DEVICE ~Branching1d ()
LUPI_HOST_DEVICE int initialStateIndex () const
LUPI_HOST_DEVICE double evaluate (double a_x1) const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Public Member Functions inherited from MCGIDI::Functions::Function1d_d2
LUPI_HOST_DEVICE Function1d_d2 ()
LUPI_HOST_DEVICE Function1d_d2 (double a_domainMin, double a_domainMax, Interpolation a_interpolation, double a_outerDomainValue=0)
LUPI_HOST_DEVICE double evaluate (double a_x1) const
Public Member Functions inherited from MCGIDI::Functions::Function1d_d1
LUPI_HOST_DEVICE Function1d_d1 ()
LUPI_HOST_DEVICE Function1d_d1 (double a_domainMin, double a_domainMax, Interpolation a_interpolation, double a_outerDomainValue=0)
LUPI_HOST_DEVICE double evaluate (double a_x1) const
Public Member Functions inherited from MCGIDI::Functions::Function1d
LUPI_HOST_DEVICE Function1d ()
LUPI_HOST_DEVICE Function1d (double a_domainMin, double a_domainMax, Interpolation a_interpolation, double a_outerDomainValue=0)
LUPI_HOST_DEVICE ~Function1d ()
LUPI_HOST_DEVICE Function1dType type () const
LUPI_HOST_DEVICE String typeString () const
template<typename RNG>
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION int sampleBoundingInteger (double a_x1, RNG &&a_rng) const
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION double evaluate (double a_x1) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
template<typename RNG>
LUPI_HOST_DEVICE int sampleBoundingInteger (double a_x1, RNG &&a_rng) const
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::Functions::Function1d
Function1dType m_type

Detailed Description

Definition at line 222 of file MCGIDI_functions.hpp.

Constructor & Destructor Documentation

◆ Branching1d() [1/2]

LUPI_HOST_DEVICE MCGIDI::Functions::Branching1d::Branching1d ( )

Definition at line 752 of file MCGIDI_functions.cc.

752 {
753
754}

◆ Branching1d() [2/2]

LUPI_HOST MCGIDI::Functions::Branching1d::Branching1d ( SetupInfo & a_setupInfo,
GIDI::Functions::Branching1d const & a_form1d )

Function that parses a node one-d function node. Called from a Suite::parse instance.

Parameters
a_setupInfo[in] Information create my the Protare constructor to help in parsing.
a_form1d[in] The GIDI::Functions::Branching1d instance whose data is to be used to construct this.
Returns
The parsed and constructed resonanceBackground region instance.

Definition at line 768 of file MCGIDI_functions.cc.

768 :
769 Function1d_d2( a_form1d.domainMin( ), a_form1d.domainMax( ), Interpolation::FLAT, 0.0 ),
770 m_initialStateIndex( -1 ) {
771
773
774 std::map<std::string,int>::iterator iter = a_setupInfo.m_stateNamesToIndices.find( a_form1d.initialState( ) );
775 if( iter == a_setupInfo.m_stateNamesToIndices.end( ) ) {
776 std::string message( "Branching1d: initial state not found: pid = '" + a_form1d.initialState( ) + "'." );
777 throw std::runtime_error( message.c_str( ) );
778 }
779 m_initialStateIndex = iter->second;
780
781 a_setupInfo.m_initialStateIndex = m_initialStateIndex;
782}

◆ ~Branching1d()

LUPI_HOST_DEVICE MCGIDI::Functions::Branching1d::~Branching1d ( )

Definition at line 787 of file MCGIDI_functions.cc.

787 {
788
789}

Member Function Documentation

◆ evaluate()

LUPI_HOST_DEVICE double MCGIDI::Functions::Branching1d::evaluate ( double a_x1) const

◆ initialStateIndex()

LUPI_HOST_DEVICE int MCGIDI::Functions::Branching1d::initialStateIndex ( ) const
inline

Definition at line 232 of file MCGIDI_functions.hpp.

232{ return( m_initialStateIndex ); }

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::Functions::Branching1d::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 806 of file MCGIDI_functions.cc.

806 {
807
808 Function1d::serialize( a_buffer, a_mode );
809 DATA_MEMBER_INT( m_initialStateIndex, a_buffer, a_mode );
810}
#define DATA_MEMBER_INT( member, buf, mode)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

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