PAPRECA hybrid off-lattice kMC/MD simulator  2.0.0 (17 September 2024)
event_select.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------------------
2 PAPRECA hybrid off-lattice kinetic Monte Carlo/Molecular dynamics simulator.
3 Copyright (C) 2024 Stavros Ntioudis, James P. Ewen, Daniele Dini, and C. Heath Turner
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 ----------------------------------------------------------------------------------------*/
19 
23 
24 #ifndef EVENT_SELECT_H
25 #define EVENT_SELECT_H
26 
27 //System Headers
28 #include <vector>
29 #include <mpi.h>
30 
31 
32 //LAMMPS headers
33 #include "lammps.h"
35 #include "pointers.h"
37 
38 //KMC headers
39 #include "event.h"
40 #include "event_list.h"
41 #include "papreca_config.h"
42 #include "utilities.h"
43 
44 namespace PAPRECA{
45 
46  double getLocalRate( std::vector< Event* > &events_local , PaprecaConfig &papreca_config );
47  void fillAndSortIndexedRatesVec( double *arr , const int &arr_size , DOUBLE2INTPAIR_VEC &rates_indexed );
48  int selectProcessStochastically( double *arr , const int &arr_size , double &rnum , double &rates_sum );
49 
50 }//end of PAPRECA namespace
51 
52 
53 #endif
Declarations for PAPRECA:Event class and its children classes.
Declarations of PredefinedEvent classes.
Definition: bond.cpp:26
int selectProcessStochastically(double *arr, const int &arr_size, double &rnum, double &rates_sum)
Definition: event_select.cpp:72
std::vector< DOUBLE2INTPAIR > DOUBLE2INTPAIR_VEC
Definition: utilities.h:192
void fillAndSortIndexedRatesVec(double *arr, const int &arr_size, DOUBLE2INTPAIR_VEC &rates_indexed)
Definition: event_select.cpp:54
double getLocalRate(std::vector< Event * > &events_local, PaprecaConfig &papreca_config)
Definition: event_select.cpp:27
Declarations for PAPRECA::PaprecaConfig class storing settings and global variables.
Utility functions (e.g., for arrays, strings etc.) and typedefs used in papreca.cpp main and in the o...