Commit 6a0c7653 authored by Hamilton, Steven P's avatar Hamilton, Steven P
Browse files

Removing more unused stuff.

parent 9f3d8b89
......@@ -13,9 +13,7 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
Utils packages/Utils SS
CudaUtils packages/CudaUtils SS
Matprop packages/Matprop SS
SPn packages/SPn SS
MC packages/MC SS
Alea packages/Alea SS
)
##---------------------------------------------------------------------------##
......
##---------------------------------------------------------------------------##
## Alea/CMakeLists.txt
## Thomas M. Evans
## Monday June 20 15:40:52 2011
##---------------------------------------------------------------------------##
## Copyright (C) 2014 Oak Ridge National Laboratory, UT-Battelle, LLC.
##---------------------------------------------------------------------------##
## TriBITS package file for SPn package
##---------------------------------------------------------------------------##
INCLUDE(AppendSet)
INCLUDE(ProfugusAddCFlags)
# Add Utils cmake to path
APPEND_SET(CMAKE_MODULE_PATH ${Utils_SOURCE_DIR}/cmake)
##---------------------------------------------------------------------------##
## A) Define the package
##---------------------------------------------------------------------------##
TRIBITS_PACKAGE(Alea)
##---------------------------------------------------------------------------##
## B) Set up package-specific options
##---------------------------------------------------------------------------##
## MCLS options
IF (${PROJECT_NAME}_ENABLE_MCLS)
MESSAGE(STATUS "Building Profugus with MCLS support")
SET(USE_MCLS 1)
ENDIF()
# Setup M4 for FORTRAN processing
APPEND_SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Setup debug option
TRIBITS_ADD_DEBUG_OPTION()
# to allow includes like #include "comm/Comm.h"
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
# to allow includes like #include "Utils/config.h"
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/..)
IF(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
PROFUGUS_ADD_CXX_FLAGS(
-Wno-sign-compare
-Wno-unused-but-set-variable
-Wno-unused-variable)
ENDIF()
#
# Resolve min/max conflict on Windows
#
IF( CMAKE_SYSTEM_NAME MATCHES "Windows" )
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF( CMAKE_SYSTEM_NAME MATCHES "Windows" )
##---------------------------------------------------------------------------##
# C) Process the subpackages
##---------------------------------------------------------------------------##
TRIBITS_CONFIGURE_FILE(config.h)
##---------------------------------------------------------------------------##
## SOURCES AND HEADERS
SET(SOURCES "")
SET(HEADERS "")
# mc_solvers sources
FILE(GLOB MC_SOLVERS_HEADERS mc_solvers/*.hh)
SET(MC_SOLVERS_SOURCES
mc_solvers/AdditiveSchwarzWrapper.cc
mc_solvers/AleaSolver.cc
mc_solvers/BelosSolver.cc
mc_solvers/ChebyshevIteration.cc
mc_solvers/ChebyshevPolynomial.cc
mc_solvers/GmresPolynomial.cc
mc_solvers/LinearSolverFactory.cc
mc_solvers/LinearSystem.cc
mc_solvers/LinearSystemFactory.cc
mc_solvers/MC_Data.cc
mc_solvers/MonteCarloSolver.cc
mc_solvers/NeumannPolynomial.cc
mc_solvers/Polynomial.cc
mc_solvers/PolynomialBasis.cc
mc_solvers/PolynomialFactory.cc
mc_solvers/PolynomialPreconditioner.cc
mc_solvers/PolynomialUtils.cc
mc_solvers/RichardsonIteration.cc
mc_solvers/SyntheticAcceleration.cc
)
LIST(APPEND HEADERS ${MC_SOLVERS_HEADERS})
LIST(APPEND SOURCES ${MC_SOLVERS_SOURCES})
INSTALL(FILES ${MC_SOLVERS_HEADERS} DESTINATION include/Alea/mc_solvers)
LIST(APPEND HEADERS ${CMAKE_CURRENT_BINARY_DIR}/config.h)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/Alea)
##---------------------------------------------------------------------------##
## LIBRARY AND INSTALL TARGETS
TRIBITS_ADD_LIBRARY(
Alea
NOINSTALLHEADERS ${HEADERS}
SOURCES ${SOURCES})
TRIBITS_ADD_EXECUTABLE(
xalea
NOEXESUFFIX
NOEXEPREFIX
SOURCES mc_solvers/alea.cc
INSTALLABLE
)
TRIBITS_ADD_EXECUTABLE(
xaleae_multae
NOEXESUFFIX
NOEXEPREFIX
SOURCES mc_solvers/aleae_multae.cc
INSTALLABLE
)
# MCLS executable
IF (${PROJECT_NAME}_ENABLE_MCLS)
TRIBITS_ADD_EXECUTABLE(
xalea_mcls
NOEXESUFFIX
NOEXEPREFIX
SOURCES mc_solvers/alea_mcls.cc
INSTALLABLE
)
ENDIF()
##---------------------------------------------------------------------------##
# Add tests to this package
TRIBITS_ADD_TEST_DIRECTORIES(
mc_solvers/test)
##---------------------------------------------------------------------------##
## FINISH SETUP
# Exclude files for source package.
TRIBITS_EXCLUDE_AUTOTOOLS_FILES()
##---------------------------------------------------------------------------##
## D) Do standard postprocessing
##---------------------------------------------------------------------------##
TRIBITS_PACKAGE_POSTPROCESS()
##---------------------------------------------------------------------------##
## end of Alea/CMakeLists.txt
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
## Alea/cmake/Dependencies.cmake
## Thomas M. Evans
## Saturday July 14 16:54:41 2012
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
## Define sub-packages
##---------------------------------------------------------------------------##
SET(LIB_REQUIRED_DEP_PACKAGES
Utils SPn Teuchos Tpetra Ifpack2 KokkosCore KokkosAlgorithms)
SET(LIB_OPTIONAL_DEP_PACKAGES Belos Temere MCLS)
SET(TEST_REQUIRED_DEP_PACKAGES)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS)
##---------------------------------------------------------------------------##
## end of Alea/cmake/Dependencies.cmake
##---------------------------------------------------------------------------##
/*-----------------------------------*-C-*-----------------------------------*/
/*!
* \file Alea/config.h
* \author Thomas M. Evans
* \date Wed Jan 2 11:50:34 2008
* \brief Alea configure options
* \note Copyright (C) 2014 Oak Ridge National Laboratory, UT-Battelle, LLC
*/
/*---------------------------------------------------------------------------*/
/* $Id: config.h.in,v 1.3 2009/02/03 19:56:50 9te Exp $ */
/*---------------------------------------------------------------------------*/
#ifndef Alea_config_h
#define Alea_config_h
/* TRILINOS BUILD REQUIREMENTS */
#ifndef HAVE_CONFIG_H
#define HAVE_CONFIG_H
#endif
/* MCLS Linear Solvers */
#cmakedefine USE_MCLS
/* PARALLEL MPI ENVIRONMENT VARIABLES */
#include <Utils/config.h>
#endif /* Alea_config_h */
/*---------------------------------------------------------------------------*/
/* end of Alea/config.h */
/*---------------------------------------------------------------------------*/
<?xml version='1.0' encoding='ASCII'?>
<ParameterList name="Generic PWR Assembly">
<ParameterList name="CORE">
<Parameter name="axial list" type="Array(string)" value="{Core}"/>
<Parameter name="axial height" type="Array(double)" value="{1.0}"/>
<Parameter name="Core" type="TwoDArray(int)" value="1x1:{0}"/>
</ParameterList>
<ParameterList name="ASSEMBLIES">
<Parameter name="pin pitch" type="double" value="1.26"/>
<Parameter name="assembly list" type="Array(string)" value="{Fuel}"/>
<Parameter name="Fuel" type="TwoDArray(int)" value="17x17:{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}"/>
</ParameterList>
<ParameterList name="MATERIAL">
<Parameter name="xs library" type="string" value="xs_2G.xml"/>
<Parameter name="mat list" type="Array(string)" value="{Guide Tube,Fuel Pin}"/>
</ParameterList>
<ParameterList name="PROBLEM">
<Parameter name="radial mesh" type="int" value="1"/>
<Parameter name="axial mesh" type="Array(int)" value="{1}"/>
<Parameter name="symmetry" type="string" value="full"/>
<Parameter name="Pn_order" type="int" value="0"/>
<Parameter name="SPn_order" type="int" value="1"/>
<Parameter name="trilinos_implementation" type="string" value="tpetra"/>
<ParameterList name="eigenvalue_db">
<Parameter name="eigensolver" type="string" value="power"/>
<Parameter name="verbosity" type="string" value="high"/>
<ParameterList name="operator_db">
<Parameter name="solver_type" type="string" value="belos"/>
</ParameterList>
</ParameterList>
</ParameterList>
</ParameterList>
<ParameterList name="main">
<Parameter name="solver_type" type="string" value="mcsa"/>
<Parameter name="preconditioner" type="string" value="none"/>
<ParameterList name="Problem">
<Parameter name="matrix_type" type="string" value="laplacian"/>
<Parameter name="matrix_size" type="int" value="1000"/>
<Parameter name="laplacian_shift" type="double" value="0.1"/>
<Parameter name="scaling_type" type="string" value="diagonal"/>
</ParameterList>
<ParameterList name="Synthetic Acceleration">
<Parameter name="max_iterations" type="int" value="5000"/>
<Parameter name="tolerance" type="double" value="1.0e-6"/>
<Parameter name="damping_factor" type="double" value="1.0"/>
<Parameter name="divergence_tolerance" type="double" value="1.0e4"/>
<Parameter name="verbosity" type="string" value="high"/>
</ParameterList>
<ParameterList name="Monte Carlo">
<Parameter name="mc_type" type="string" value="adjoint"/>
<Parameter name="estimator" type="string" value="expected_value"/>
<Parameter name="num_histories" type="int" value="25000"/>
<Parameter name="verbosity" type="string" value="none"/>
</ParameterList>
<ParameterList name="Polynomial">
<Parameter name="polynomial_type" type="string" value="gmres"/>
<Parameter name="polynomial_order" type="int" value="5"/>
</ParameterList>
</ParameterList>
<ParameterList name="main">
<Parameter name="solver_type" type="string" value="mcsa"/>
<Parameter name="preconditioner" type="string" value="none"/>
<ParameterList name="Problem">
<Parameter name="matrix_type" type="string" value="profugus"/>
<Parameter name="profugus_input" type="string" value="assembly_2d.xml"/>
<Parameter name="scaling_type" type="string" value="diagonal"/>
<Parameter name="verbosity" type="string" value="none"/>
</ParameterList>
<ParameterList name="Synthetic Acceleration">
<Parameter name="max_iterations" type="int" value="5000"/>
<Parameter name="tolerance" type="double" value="1.0e-6"/>
<Parameter name="damping_factor" type="double" value="1.0"/>
<Parameter name="divergence_tolerance" type="double" value="1.0e4"/>
<Parameter name="verbosity" type="string" value="high"/>
</ParameterList>
<ParameterList name="Monte Carlo">
<Parameter name="mc_type" type="string" value="adjoint"/>
<Parameter name="estimator" type="string" value="expected_value"/>
<Parameter name="num_histories" type="int" value="1000"/>
<Parameter name="verbosity" type="string" value="none"/>
</ParameterList>
<ParameterList name="Polynomial">
<Parameter name="polynomial_type" type="string" value="neumann"/>
<Parameter name="polynomial_order" type="int" value="10"/>
</ParameterList>
</ParameterList>
<?xml version='1.0' encoding='ASCII'?>
<ParameterList name="cross sections">
<Parameter name="num groups" type="int" value="2"/>
<Parameter name="pn order" type="int" value="3"/>
<Parameter name="group v" type="Array(double)" value="{ 4.37394e+09, 2.18697e+06}"/>
<ParameterList name="Fuel Pin">
<Parameter name="sigma_t" type="Array(double)" value="{ 5.24840e-01, 1.20167e+00}"/>
<Parameter name="nu_sigma_f" type="Array(double)" value="{ 6.48829e-03, 1.23678e-01}"/>
<Parameter name="sigma_f" type="Array(double)" value="{ 2.52348e-03, 5.07562e-02}"/>
<Parameter name="chi" type="Array(double)" value="{ 1.00000e+00, 0.00000e+00}"/>
<Parameter name="sigma_s0" type="TwoDArray(double)" value="2x2:{ 4.96641e-01, 0.00000e+00, 1.84721e-02, 1.11717e+00}"/>
<Parameter name="sigma_s1" type="TwoDArray(double)" value="2x2:{ 2.20248e-01, 0.00000e+00, 7.61713e-03, 3.23168e-01}"/>
<Parameter name="sigma_s2" type="TwoDArray(double)" value="2x2:{ 9.21780e-02, 0.00000e+00,-2.67054e-03, 9.47696e-02}"/>
<Parameter name="sigma_s3" type="TwoDArray(double)" value="2x2:{ 1.03589e-02, 0.00000e+00,-4.93479e-03, 2.08931e-02}"/>
</ParameterList>
<ParameterList name="Guide Tube">
<Parameter name="sigma_t" type="Array(double)" value="{ 6.04359e-01, 1.66779e+00}"/>
<Parameter name="sigma_s0" type="TwoDArray(double)" value="2x2:{ 5.72336e-01, 0.00000e+00, 3.15044e-02, 1.64016e+00}"/>
<Parameter name="sigma_s1" type="TwoDArray(double)" value="2x2:{ 3.29287e-01, 0.00000e+00, 1.33551e-02, 4.99673e-01}"/>
<Parameter name="sigma_s2" type="TwoDArray(double)" value="2x2:{ 1.35295e-01, 0.00000e+00,-4.45774e-03, 1.37960e-01}"/>
<Parameter name="sigma_s3" type="TwoDArray(double)" value="2x2:{ 9.80266e-03, 0.00000e+00,-8.48500e-03, 2.99882e-02}"/>
</ParameterList>
<ParameterList name="Pyrex Insert">
<Parameter name="sigma_t" type="Array(double)" value="{ 4.58079e-01, 1.29630e+00}"/>
<Parameter name="sigma_s0" type="TwoDArray(double)" value="2x2:{ 4.35902e-01, 0.00000e+00, 1.73222e-02, 1.04049e+00}"/>
<Parameter name="sigma_s1" type="TwoDArray(double)" value="2x2:{ 2.03522e-01, 0.00000e+00, 7.05117e-03, 3.47824e-01}"/>
<Parameter name="sigma_s2" type="TwoDArray(double)" value="2x2:{ 8.50436e-02, 0.00000e+00,-2.57475e-03, 1.10745e-01}"/>
<Parameter name="sigma_s3" type="TwoDArray(double)" value="2x2:{ 6.79654e-03, 0.00000e+00,-4.63072e-03, 2.51285e-02}"/>
</ParameterList>
<ParameterList name="AIC Control Rod">
<Parameter name="sigma_t" type="Array(double)" value="{ 5.54822e-01, 1.76620e+00}"/>
<Parameter name="sigma_s0" type="TwoDArray(double)" value="2x2:{ 5.19343e-01, 0.00000e+00, 1.48903e-02, 1.24113e+00}"/>
<Parameter name="sigma_s1" type="TwoDArray(double)" value="2x2:{ 2.23701e-01, 0.00000e+00, 6.00697e-03, 4.14006e-01}"/>
<Parameter name="sigma_s2" type="TwoDArray(double)" value="2x2:{ 9.29707e-02, 0.00000e+00,-2.46949e-03, 1.35127e-01}"/>
<Parameter name="sigma_s3" type="TwoDArray(double)" value="2x2:{ 9.22645e-03, 0.00000e+00,-4.10869e-03, 3.06036e-02}"/>
</ParameterList>
<ParameterList name="B4C Control Rod">
<Parameter name="sigma_t" type="Array(double)" value="{ 5.48387e-01, 1.95417e+00}"/>
<Parameter name="sigma_s0" type="TwoDArray(double)" value="2x2:{ 4.96804e-01, 0.00000e+00, 1.13330e-02, 1.30875e+00}"/>
<Parameter name="sigma_s1" type="TwoDArray(double)" value="2x2:{ 2.05206e-01, 0.00000e+00, 4.40148e-03, 4.46201e-01}"/>
<Parameter name="sigma_s2" type="TwoDArray(double)" value="2x2:{ 8.41731e-02, 0.00000e+00,-1.95427e-03, 1.45827e-01}"/>
<Parameter name="sigma_s3" type="TwoDArray(double)" value="2x2:{ 6.22701e-03, 0.00000e+00,-3.03600e-03, 3.29063e-02}"/>
</ParameterList>
<ParameterList name="Moderator">
<Parameter name="sigma_t" type="Array(double)" value="{ 6.06040e-01, 2.14608e+00}"/>
<Parameter name="sigma_s0" type="TwoDArray(double)" value="2x2:{ 5.66356e-01, 0.00000e+00, 3.92572e-02, 2.10498e+00}"/>
<Parameter name="sigma_s1" type="TwoDArray(double)" value="2x2:{ 3.39223e-01, 0.00000e+00, 1.71577e-02, 5.16097e-01}"/>
<Parameter name="sigma_s2" type="TwoDArray(double)" value="2x2:{ 1.40873e-01, 0.00000e+00,-4.84452e-03, 1.15230e-01}"/>
<Parameter name="sigma_s3" type="TwoDArray(double)" value="2x2:{ 1.13982e-02, 0.00000e+00,-1.04053e-02, 2.21960e-02}"/>
</ParameterList>
</ParameterList>
//----------------------------------*-C++-*----------------------------------//
/*!
* \file AdditiveSchwarzWrapper.cc
* \author Steven Hamilton
* \brief Wrap local solver into an AdditiveSchwarz solver.
*/
//---------------------------------------------------------------------------//
#include <iterator>
#include <string>
#include "AdditiveSchwarzWrapper.hh"
namespace alea
{
//---------------------------------------------------------------------------//
/*!
* \brief Constructor
*
* \param A Problem matrix
* \param pl ParameterList
*
* Behavior is controlled by the nested "AdditiveSchwarz" sublist.
* Consult Ifpack2::AdditiveSchwarz documentation for options.
*/
//---------------------------------------------------------------------------//
AdditiveSchwarzWrapper::AdditiveSchwarzWrapper( Teuchos::RCP<const MATRIX> A,
Teuchos::RCP<Ifpack2::Preconditioner<SCALAR,LO,GO,NODE> > prec,
Teuchos::RCP<Teuchos::ParameterList> pl )
: AleaSolver(A,pl)
{
// Get belos pl
Teuchos::RCP<Teuchos::ParameterList> as_pl =
Teuchos::sublist(pl,"AdditiveSchwarz");
// Override default parameters if present on sublist
this->setParameters(as_pl);
// Build AdditiveSchwarz
d_schwarz = Teuchos::rcp( new Ifpack2::AdditiveSchwarz<MATRIX>(A) );
d_schwarz->setParameterList(as_pl);
d_schwarz->setInnerPreconditioner(prec);
d_schwarz->compute();
b_label = "AdditiveSchwarzWrapper";
}
//---------------------------------------------------------------------------//
// PRIVATE MEMBER FUNCTIONS
//---------------------------------------------------------------------------//
//---------------------------------------------------------------------------//
/*!
* \brief Solve linear system using Belos.
*/
//---------------------------------------------------------------------------//
void AdditiveSchwarzWrapper::applyImpl(const MV &x, MV &y) const
{
// Apply preconditioner
d_schwarz->apply(x,y,Teuchos::NO_TRANS,1.0,0.0);
b_num_iters = 1;
}
} // namespace alea
//----------------------------------*-C++-*----------------------------------//
/*!
* \file AdditiveSchwarzWrapper.hh
* \author Steven Hamilton
* \brief Wrap a Belos solver into an operator.
*/
//---------------------------------------------------------------------------//
#ifndef mc_solvers_AdditiveSchwarzWrapper_hh
#define mc_solvers_AdditiveSchwarzWrapper_hh
#include "AleaSolver.hh"
#include "Teuchos_RCP.hpp"
#include "Teuchos_ParameterList.hpp"
#include "AleaTypedefs.hh"
#include "Ifpack2_AdditiveSchwarz.hpp"
namespace alea
{
//---------------------------------------------------------------------------//
/*!
* \class AdditiveSchwarzWrapper
* \brief Wrap an Ifpack2 AdditiveSchwarz object into an AleaSolver
*/
//---------------------------------------------------------------------------//
class AdditiveSchwarzWrapper : public AleaSolver
{
public:
AdditiveSchwarzWrapper(Teuchos::RCP<const MATRIX> A,
Teuchos::RCP<Ifpack2::Preconditioner<SCALAR,LO,GO,NODE> > prec,
Teuchos::RCP<Teuchos::ParameterList> pl);
private:
// Implementation of apply
void applyImpl(const MV &x, MV &y) const;
// Belos solver
Teuchos::RCP<Ifpack2::AdditiveSchwarz<MATRIX> > d_schwarz;
};
}
#endif // mc_solvers_AdditiveSchwarzWrapper_hh
//----------------------------------*-C++-*----------------------------------//
/*!
* \file AdjointMcEventKernel.hh
* \author Steven Hamilton
* \brief Perform adjoint MC histories to solve linear system.
*/
//---------------------------------------------------------------------------//
#ifndef mc_solver_AdjointMcEventKernel_hh
#define mc_solver_AdjointMcEventKernel_hh
#include "MC_Data.hh"
#include "Kokkos_View.hpp"
#include "Kokkos_Core.hpp"
#include "Kokkos_Random.hpp"
#include "AleaTypedefs.hh"
namespace alea
{
//---------------------------------------------------------------------------//
/*!
* \class AdjointMcEventKernel
* \brief Perform Monte Carlo random walks on linear system.
*
* This class performs random walks using the adjoint Monte Carlo algorithm.
* The interface of this function conforms to the Kokkos "parallel_for"
* functor API to enable automated shared memory parallelism.
*/
//---------------------------------------------------------------------------//
class AdjointMcEventKernel
{
public:
// Required typedefs for Kokkos functor API
// Execution policy and team member types
typedef Kokkos::RangePolicy<DEVICE> range_policy;
typedef range_policy::member_type policy_member;
typedef Kokkos::TeamPolicy<DEVICE> team_policy;
typedef Kokkos::Random_XorShift64_Pool<DEVICE> generator_pool;
typedef typename generator_pool::generator_type generator_type;
AdjointMcEventKernel(const MC_Data_View &mc_data,
const const_scalar_view coeffs,
Teuchos::RCP<Teuchos::ParameterList> pl,
generator_pool pool);
//! Solve problem (this is a host function)
void solve(const MV &x, MV &y);
private:
enum TRANSITION {STANDARD, BINNED, SHARED_MEM};
// Build the initial CDF and weights (host function)
void build_initial_distribution(const MV &x);
void solve_impl( const scalar_view &y_device ) const;
template <class device>
void sort_by_state( const History_Data &data ) const;
// Vector length
int d_N;
// Data for Monte Carlo
const MC_Data_View d_mc_data;
const random_scalar_view d_coeffs;
const scalar_view d_start_cdf;
const scalar_view d_start_wt;
// Kokkos random generator pool
generator_pool d_rand_pool;
// Problem parameters
TRANSITION d_transition_type;
int d_max_history_length;
bool d_use_expected_value;
bool d_print;
int d_num_histories;
int d_num_batches;
int d_histories_batch;
SCALAR d_start_wt_factor;
Teuchos::RCP<Teuchos::ParameterList> d_pl;
};
} // namespace alea
#include "AdjointMcEventKernel.i.hh"
#endif // mc_solver_AdjointMcEventKernel_hh
//----------------------------------*-C++-*----------------------------------//