https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VoronoiICAux.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
10#include "VoronoiICAux.h"
11
12registerMooseObject("PhaseFieldTestApp", VoronoiICAux);
13
16{
18 params.addRequiredParam<UserObjectName>("polycrystal_ic_uo", "Optional: Polycrystal IC object");
19 return params;
20}
21
23 : AuxKernel(parameters),
24 _poly_ic_uo(getUserObject<PolycrystalUserObjectBase>("polycrystal_ic_uo"))
25{
26 if (isNodal())
27 mooseError("This AuxKernel only supports Elemental fields");
28}
29
30Real
32{
34
35 if (_grain_ids.empty())
36 return 0;
37 else
38 return _grain_ids[0];
39}
registerMooseObject("PhaseFieldTestApp", VoronoiICAux)
const Elem *const & _current_elem
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void mooseError(Args &&... args) const
This object provides the base capability for creating proper polycrystal ICs.
virtual void getGrainsBasedOnElem(const Elem &elem, std::vector< unsigned int > &grains) const
This method may be defined in addition to the point based initialization to speed up lookups.
Visualize the location of grain boundaries in a polycrystalline simulation.
static InputParameters validParams()
std::vector< unsigned int > _grain_ids
VoronoiICAux(const InputParameters &parameters)
const PolycrystalUserObjectBase & _poly_ic_uo
virtual Real computeValue()