#include <MCGIDI_functions.hpp>
|
| LUPI_HOST_DEVICE | Regions2d () |
| LUPI_HOST | Regions2d (GIDI::Functions::Regions2d const &a_regions2d) |
| LUPI_HOST_DEVICE | ~Regions2d () |
| 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) |
| 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 |
| 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 |
| 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) |
| 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) |
Definition at line 487 of file MCGIDI_functions.hpp.
◆ Regions2d() [1/2]
Definition at line 1682 of file MCGIDI_functions.cc.
1682 :
1683 m_probabilities( ) {
1684
1686}
ProbabilityBase2dType m_type
◆ Regions2d() [2/2]
Definition at line 1690 of file MCGIDI_functions.cc.
1690 :
1692
1694
1695 Vector<GIDI::Functions::Function2dForm *> const &function2ds = a_regions2d.function2ds( );
1696 m_probabilities.resize( function2ds.size( ) );
1697 for( std::size_t i1 = 0; i1 < function2ds.size( ); ++i1 ) m_probabilities[i1] =
parseProbability2d_d2( function2ds[i1],
nullptr );
1698}
LUPI_HOST_DEVICE ProbabilityBase2d_d1()
LUPI_HOST ProbabilityBase2d_d2 * parseProbability2d_d2(GIDI::Functions::Function2dForm const *form2d, SetupInfo *a_setupInfo)
◆ ~Regions2d()
Definition at line 1703 of file MCGIDI_functions.cc.
1703 {
1704
1705 for( std::size_t i1 = 0; i1 < m_probabilities.size( ); ++i1 ) delete m_probabilities[i1];
1706}
◆ evaluate()
| LUPI_HOST_DEVICE double MCGIDI::Probabilities::Regions2d::evaluate |
( |
double | a_x2, |
|
|
double | a_x1 ) const |
Definition at line 1710 of file MCGIDI_functions.cc.
1710 {
1711
1713
1714 if( intLower < 0 ) {
1715 if( intLower == -1 ) {
1716 return( m_probabilities.back( )->evaluate( a_x2, a_x1 ) );
1717 }
1718 intLower = 0;
1719 }
1720
1721 std::size_t lower = static_cast<std::size_t>( intLower );
1722
1723 return( m_probabilities[lower]->
evaluate( a_x2, a_x1 ) );
1724}
LUPI_HOST_DEVICE double evaluate(double a_x2, double a_x1) const
LUPI_HOST_DEVICE int binarySearchVector(double a_x, Vector< double > const &a_Xs, bool a_boundIndex=false)
Referenced by evaluate().
◆ sample()
template<typename RNG>
| LUPI_HOST_DEVICE double MCGIDI::Probabilities::Regions2d::sample |
( |
double | a_x2, |
|
|
double | a_rngValue, |
|
|
RNG && | a_rng ) const |
Definition at line 1968 of file MCGIDI_headerSource.hpp.
1968 {
1969
1971
1972 if( intLower < 0 ) {
1973 if( intLower == -1 ) {
1974 return( m_probabilities.back( )->sample( a_x2, a_rngValue, a_rng ) );
1975 }
1976 intLower = 0;
1977 }
1978
1979 std::size_t lower = static_cast<std::size_t>( intLower );
1980
1981 return( m_probabilities[lower]->
sample( a_x2, a_rngValue, a_rng ) );
1982}
LUPI_HOST_DEVICE double sample(double a_x2, double a_rngValue, RNG &&a_rng) const
Referenced by sample().
◆ serialize()
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 1734 of file MCGIDI_functions.cc.
1734 {
1735
1737
1738 std::size_t vectorSize = m_probabilities.size( );
1739 int vectorSizeInt = (int) vectorSize;
1741 vectorSize = (std::size_t) vectorSizeInt;
1742
1745 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
1747 }
1748}
#define DATA_MEMBER_INT( member, buf, mode)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE Probabilities::ProbabilityBase2d_d2 * serializeProbability2d_d2(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Probabilities::ProbabilityBase2d_d2 *a_probability2d)
The documentation for this class was generated from the following files: