11 #include "libmesh/parallel_algebra.h" 14 #include "libmesh/quadrature.h" 22 params.
addClassDescription(
"Manages the list of currently active nucleation sites and adds new " 23 "sites according to a given probability function.");
25 "probability",
"Probability density for inserting a discrete nucleus");
27 params.
addParam<MaterialPropertyName>(
"radius",
29 "variable radius material property name, supply a value if " 30 "radius is constant in the simulation");
31 params.
addParam<
bool>(
"time_dependent_statistics",
33 "flag if time-dependent or time-independent statistics are used");
40 _probability(getMaterialProperty<
Real>(
"probability")),
41 _hold_time(getParam<
Real>(
"hold_time")),
42 _local_nucleus_list(declareRestartableData<
NucleusList>(
"local_nucleus_list", 0)),
43 _local_radius(getMaterialProperty<
Real>(
"radius")),
44 _time_dep_stats(getParam<bool>(
"time_dependent_statistics"))
84 for (
unsigned int qp = 0; qp <
_qrule->n_points(); ++qp)
156 unsigned int n = comm_buffer.size() / 5;
157 mooseAssert(comm_buffer.size() % 5 == 0,
158 "Communication buffer has an unexpected size (not divisible by 5)");
161 for (
unsigned i = 0; i < n; ++i)
NucleusChanges _changes_made
count the number of nucleus insertions and deletions
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
registerMooseObject("PhaseFieldApp", DiscreteNucleationInserter)
virtual Real & time() const
const MooseArray< Point > & _q_point
static InputParameters validParams()
const MooseArray< Real > & _coord
virtual void addNucleus(unsigned int &qp)
Adds a nucleus to the list containing nucleus information.
virtual void initialize()
const MaterialProperty< Real > & _local_radius
store the local nucleus radius
const MaterialProperty< Real > & _probability
Nucleation rate density (should be a material property implementing nucleation theory) ...
std::vector< NucleusLocation > NucleusList
Every MPI task should keep a full list of nuclei (in case they cross domains with their finite radii)...
A nucleus has an expiration time, a location, and a size.
const std::vector< double > y
const Parallel::Communicator & _communicator
static InputParameters validParams()
This UserObject manages the insertion and expiration of nuclei in the simulation domain it manages a ...
This UserObject manages the insertion and expiration of nuclei in the simulation domain it manages a ...
DiscreteNucleationInserter(const InputParameters ¶meters)
Real _nucleation_rate
Total nucleation rate.
virtual void threadJoin(const UserObject &y)
virtual bool converged(const unsigned int sys_num)
NucleusList & _local_nucleus_list
the local nucleus list of nuclei centered in the domain of the current processor
unsigned int number() const
bool _update_required
is a map update required
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _hold_time
Duration of time each nucleus is kept active after insertion.
const QBase *const & _qrule
FEProblemBase & _fe_problem
const MooseArray< Real > & _JxW
NucleusList & _global_nucleus_list
the global list of all nuclei over all processors
virtual Real & dt() const
Real getRandomReal() const
const bool _time_dep_stats
indicates whether time-dependent statistics are used or not