www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DiscreteNucleationMarker Class Reference

Mark new nucleation sites for refinement. More...

#include <DiscreteNucleationMarker.h>

Inheritance diagram for DiscreteNucleationMarker:
[legend]

Public Member Functions

 DiscreteNucleationMarker (const InputParameters &parameters)
 

Protected Member Functions

virtual MarkerValue computeElementMarker () override
 

Protected Attributes

const DiscreteNucleationMap_map
 UserObject providing a map of currently active nuclei. More...
 
int _periodic
 variable number to use for minPeriodicDistance calls (i.e. use the periodicity of this variable) More...
 
const DiscreteNucleationInserterBase_inserter
 UserObject that manages nucleus insertin and deletion. More...
 
const Real _radius
 Nucleus radius. More...
 
const Real _int_width
 Nucleus interface width. More...
 
const DiscreteNucleationInserterBase::NucleusList_nucleus_list
 list of nuclei maintained bu the inserter object More...
 

Detailed Description

Mark new nucleation sites for refinement.

Definition at line 25 of file DiscreteNucleationMarker.h.

Constructor & Destructor Documentation

◆ DiscreteNucleationMarker()

DiscreteNucleationMarker::DiscreteNucleationMarker ( const InputParameters &  parameters)

Definition at line 25 of file DiscreteNucleationMarker.C.

26  : Marker(parameters),
27  _map(getUserObject<DiscreteNucleationMap>("map")),
33 {
34 }
const DiscreteNucleationMap & _map
UserObject providing a map of currently active nuclei.
const DiscreteNucleationInserterBase & getInserter() const
virtual const NucleusList & getNucleusList() const
const DiscreteNucleationInserterBase & _inserter
UserObject that manages nucleus insertin and deletion.
std::pair< Real, Real > getRadiusAndWidth() const
const DiscreteNucleationInserterBase::NucleusList & _nucleus_list
list of nuclei maintained bu the inserter object
int _periodic
variable number to use for minPeriodicDistance calls (i.e. use the periodicity of this variable) ...
const Real _int_width
Nucleus interface width.
const Real _radius
Nucleus radius.

Member Function Documentation

◆ computeElementMarker()

Marker::MarkerValue DiscreteNucleationMarker::computeElementMarker ( )
overrideprotectedvirtual

Definition at line 37 of file DiscreteNucleationMarker.C.

38 {
39  const RealVectorValue centroid = _current_elem->centroid();
40  const Real size = 0.5 * _current_elem->hmax();
41 
42  // check if the surface of a nucleus might touch the element
43  for (unsigned i = 0; i < _nucleus_list.size(); ++i)
44  {
45  // use a non-periodic or periodic distance
46  const Real r = _periodic < 0
47  ? (centroid - _nucleus_list[i].second).norm()
48  : _mesh.minPeriodicDistance(_periodic, centroid, _nucleus_list[i].second);
49  if (r < _radius + size && r > _radius - size && size > _int_width)
50  return REFINE;
51  }
52 
53  // We return don't mark to allow coarsening when used in a ComboMarker
54  return DONT_MARK;
55 }
const DiscreteNucleationInserterBase::NucleusList & _nucleus_list
list of nuclei maintained bu the inserter object
int _periodic
variable number to use for minPeriodicDistance calls (i.e. use the periodicity of this variable) ...
const Real _int_width
Nucleus interface width.
const Real _radius
Nucleus radius.

Member Data Documentation

◆ _inserter

const DiscreteNucleationInserterBase& DiscreteNucleationMarker::_inserter
protected

UserObject that manages nucleus insertin and deletion.

Definition at line 40 of file DiscreteNucleationMarker.h.

◆ _int_width

const Real DiscreteNucleationMarker::_int_width
protected

Nucleus interface width.

Definition at line 46 of file DiscreteNucleationMarker.h.

Referenced by computeElementMarker().

◆ _map

const DiscreteNucleationMap& DiscreteNucleationMarker::_map
protected

UserObject providing a map of currently active nuclei.

Definition at line 34 of file DiscreteNucleationMarker.h.

◆ _nucleus_list

const DiscreteNucleationInserterBase::NucleusList& DiscreteNucleationMarker::_nucleus_list
protected

list of nuclei maintained bu the inserter object

Definition at line 49 of file DiscreteNucleationMarker.h.

Referenced by computeElementMarker().

◆ _periodic

int DiscreteNucleationMarker::_periodic
protected

variable number to use for minPeriodicDistance calls (i.e. use the periodicity of this variable)

Definition at line 37 of file DiscreteNucleationMarker.h.

Referenced by computeElementMarker().

◆ _radius

const Real DiscreteNucleationMarker::_radius
protected

Nucleus radius.

Definition at line 43 of file DiscreteNucleationMarker.h.

Referenced by computeElementMarker().


The documentation for this class was generated from the following files: