https://mooseframework.inl.gov
DiscreteNucleationInserterBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
14 {
16  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
17  return params;
18 }
19 
21  : ElementUserObject(parameters),
22  _global_nucleus_list(declareRestartableData<NucleusList>("global_nucleus_list", 0)),
23  _changes_made(0, 0),
24  _update_required(_app.isRecovering() || _app.isRestarting())
25 {
26  // Even though this object executes on timestep_end, registering on timestep_begin will allow
27  // generators to be restored if a timestep is repeated.
29 }
30 
31 template <>
32 void
33 dataStore(std::ostream & stream,
35  void * context)
36 {
37  storeHelper(stream, nl.time, context);
38  storeHelper(stream, nl.center, context);
39  storeHelper(stream, nl.radius, context);
40 }
41 
42 template <>
43 void
44 dataLoad(std::istream & stream,
46  void * context)
47 {
48  loadHelper(stream, nl.time, context);
49  loadHelper(stream, nl.center, context);
50  loadHelper(stream, nl.radius, context);
51 }
DiscreteNucleationInserterBase(const InputParameters &parameters)
void dataLoad(std::istream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)
static InputParameters validParams()
T & set(const std::string &name, bool quiet_mode=false)
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 ExecFlagType EXEC_TIMESTEP_END
void setRandomResetFrequency(ExecFlagType exec_flag)
void storeHelper(std::ostream &stream, P &data, void *context)
const ExecFlagType EXEC_TIMESTEP_BEGIN
void dataStore(std::ostream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)
void loadHelper(std::istream &stream, P &data, void *context)