www.mooseframework.org
DiscreteNucleationInserterBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 {
27 }
28 
29 template <>
30 void
31 dataStore(std::ostream & stream,
33  void * context)
34 {
35  storeHelper(stream, nl.time, context);
36  storeHelper(stream, nl.center, context);
37  storeHelper(stream, nl.radius, context);
38 }
39 
40 template <>
41 void
42 dataLoad(std::istream & stream,
44  void * context)
45 {
46  loadHelper(stream, nl.time, context);
47  loadHelper(stream, nl.center, context);
48  loadHelper(stream, nl.radius, context);
49 }
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)
void dataStore(std::ostream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)
void loadHelper(std::istream &stream, P &data, void *context)