PRISMS-PF Manual
Loading...
Searching...
No Matches
NucleationManager< dim, degree, number > Class Template Reference

The class handles the stochastic nucleation in PRISMS-PF. More...

#include <nucleation_manager.h>

Static Public Member Functions

static bool attempt_nucleation (const SolveContext< dim, degree, number > &solve_context, std::vector< Nucleus< dim > > &nuclei)
 Main nucleation function. Iterates over the domain and stochastically adds nuclei to the list.
 
static unsigned int calculate_number_of_events (const double &rate, const double &delta_t, const double &volume, RNGEngine &rng)
 Samples the poisson distribution to calculate a number of events in a time-volume given a rate.
 
static bool gather_exclude_broadcast_nuclei (std::list< Nucleus< dim > > &new_nuclei_list, std::vector< Nucleus< dim > > &global_nuclei, const UserInputParameters< dim > &user_inputs, const SimulationTimer &time_info)
 Gathers the potential new nuclei from each processor onto the root process, eliminates any nuclei that need be excluded, then updates and redistributes the global list to each process.
 
static void mpi_gather_nuclei (std::vector< Nucleus< dim > > &local_nuclei)
 Gathers nuclei lists to root. Modifies.
 
static void mpi_broadcast_nuclei (std::vector< Nucleus< dim > > &local_nuclei)
 Broadcasts nuclei lists from root. Modifies.
 

Detailed Description

template<unsigned int dim, unsigned int degree, typename number>
class NucleationManager< dim, degree, number >

The class handles the stochastic nucleation in PRISMS-PF.

Member Function Documentation

◆ attempt_nucleation()

template<unsigned int dim, unsigned int degree, typename number >
bool NucleationManager< dim, degree, number >::attempt_nucleation ( const SolveContext< dim, degree, number > &  solve_context,
std::vector< Nucleus< dim > > &  nuclei 
)
inlinestatic

Main nucleation function. Iterates over the domain and stochastically adds nuclei to the list.

Parameters
nucleibased on nucleation rates.

◆ calculate_number_of_events()

template<unsigned int dim, unsigned int degree, typename number >
static unsigned int NucleationManager< dim, degree, number >::calculate_number_of_events ( const double rate,
const double delta_t,
const double volume,
RNGEngine rng 
)
inlinestatic

Samples the poisson distribution to calculate a number of events in a time-volume given a rate.

◆ gather_exclude_broadcast_nuclei()

template<unsigned int dim, unsigned int degree, typename number >
bool NucleationManager< dim, degree, number >::gather_exclude_broadcast_nuclei ( std::list< Nucleus< dim > > &  new_nuclei_list,
std::vector< Nucleus< dim > > &  global_nuclei,
const UserInputParameters< dim > &  user_inputs,
const SimulationTimer time_info 
)
inlinestatic

Gathers the potential new nuclei from each processor onto the root process, eliminates any nuclei that need be excluded, then updates and redistributes the global list to each process.

◆ mpi_broadcast_nuclei()

template<unsigned int dim, unsigned int degree, typename number >
void NucleationManager< dim, degree, number >::mpi_broadcast_nuclei ( std::vector< Nucleus< dim > > &  local_nuclei)
inlinestatic

Broadcasts nuclei lists from root. Modifies.

Parameters
local_nuclei

◆ mpi_gather_nuclei()

template<unsigned int dim, unsigned int degree, typename number >
void NucleationManager< dim, degree, number >::mpi_gather_nuclei ( std::vector< Nucleus< dim > > &  local_nuclei)
inlinestatic

Gathers nuclei lists to root. Modifies.

Parameters
local_nuclei

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