https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
31template <>
32void
33dataStore(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
42template <>
43void
44dataLoad(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}
void storeHelper(std::ostream &stream, P &data, void *context)
void loadHelper(std::istream &stream, P &data, void *context)
void dataLoad(std::istream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)
void dataStore(std::ostream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_TIMESTEP_BEGIN
DiscreteNucleationInserterBase(const InputParameters &parameters)
std::vector< NucleusLocation > NucleusList
Every MPI task should keep a full list of nuclei (in case they cross domains with their finite radii)
static InputParameters validParams()
T & set(const std::string &name, bool quiet_mode=false)
void setRandomResetFrequency(ExecFlagType exec_flag)
A nucleus has an expiration time, a location, and a size.