https://mooseframework.inl.gov
DiscreteNucleationMap.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"
14 
21 {
22 public:
24 
26 
27  virtual void initialize();
28  virtual void execute();
29  virtual void threadJoin(const UserObject & y);
30  virtual void finalize() {}
31 
32  virtual void meshChanged();
33 
34  const std::vector<Real> & nuclei(const Elem *) const;
35 
37 
38  Real getWidth() const { return _int_width; }
39  Real getPeriodic() const { return _periodic; }
40 
41 protected:
44 
47 
49  std::vector<Real> _elem_map;
50 
52  std::vector<Real> _zero_map;
53 
56 
58  int _periodic;
59 
62 
65 
67  using NucleusMap = std::unordered_map<dof_id_type, std::vector<Real>>;
70 };
const DiscreteNucleationInserterBase & _inserter
UserObject that manages nucleus insertin and deletion.
static InputParameters validParams()
const DiscreteNucleationInserterBase & getInserter() const
This UserObject maintains a per QP map that indicates if a nucleus is present or not.
bool _mesh_changed
Did the mesh change since the last execution of this PP?
virtual void threadJoin(const UserObject &y)
int _periodic
variable number to use for minPeriodicDistance calls (i.e. use the periodicity of this variable) ...
std::vector< NucleusLocation > NucleusList
Every MPI task should keep a full list of nuclei (in case they cross domains with their finite radii)...
const std::vector< double > y
const Real _int_width
Nucleus interface width.
DiscreteNucleationMap(const InputParameters &parameters)
This UserObject manages the insertion and expiration of nuclei in the simulation domain it manages a ...
std::vector< Real > _zero_map
Dummy map for elements without nuclei.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _elem_map
Buffer for building the per QP map.
const InputParameters & parameters() const
const std::vector< Real > & nuclei(const Elem *) const
bool _rebuild_map
Do we need to rebuild the map during this timestep?
const DiscreteNucleationInserterBase::NucleusList & _nucleus_list
list of nuclei maintained bu the inserter object
std::unordered_map< dof_id_type, std::vector< Real > > NucleusMap
Per element list with 0/1 flags indicating the presence of a nucleus.