https://mooseframework.inl.gov
DiscreteNucleationInserterBase.h
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 
10 #pragma once
11 
12 #include "ElementUserObject.h"
13 
22 {
23 public:
25 
27 
29  // using NucleusLocation = std::tuple<Real, Point, Real>;
31  {
33  Point center;
35  };
36 
38  using NucleusList = std::vector<NucleusLocation>;
39 
40  // counter pair to track insertions and deletion in the current timestep
41  using NucleusChanges = std::pair<unsigned int, unsigned int>;
42 
43  virtual bool isMapUpdateRequired() const { return _update_required; }
44  virtual const NucleusList & getNucleusList() const { return _global_nucleus_list; }
45  virtual const NucleusChanges & getInsertionsAndDeletions() const { return _changes_made; }
46 
47  virtual const Real & getRate() const = 0;
48 
49 protected:
52 
55 
58 };
59 
60 // Used for Restart
61 template <>
62 void dataStore(std::ostream & stream,
64  void * context);
65 template <>
66 void dataLoad(std::istream & stream,
68  void * context);
NucleusChanges _changes_made
count the number of nucleus insertions and deletions
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)...
A nucleus has an expiration time, a location, and a size.
virtual const NucleusList & getNucleusList() const
This UserObject manages the insertion and expiration of nuclei in the simulation domain it manages a ...
void dataStore(std::ostream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)
virtual const Real & getRate() const =0
bool _update_required
is a map update required
std::pair< unsigned int, unsigned int > NucleusChanges
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const NucleusChanges & getInsertionsAndDeletions() const
NucleusList & _global_nucleus_list
the global list of all nuclei over all processors
const InputParameters & parameters() const
void dataLoad(std::istream &stream, DiscreteNucleationInserterBase::NucleusLocation &nl, void *context)