https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LangevinNoise.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 "LangevinNoise.h"
11#include "MooseRandom.h"
12
14
17{
19 params.addClassDescription("Source term for non-conserved Langevin noise");
20 params.addRequiredParam<Real>("amplitude", "Amplitude"); // per sqrt(time)");
21 params.addParam<MaterialPropertyName>(
22 "multiplier",
23 1.0,
24 "Material property to multiply the random numbers with (defaults to 1.0 if omitted)");
25 return params;
26}
28 : Kernel(parameters),
29 _amplitude(getParam<Real>("amplitude")),
30 _multiplier_prop(getMaterialProperty<Real>("multiplier"))
31{
32}
33
34void
36{
37 unsigned int rseed = _t_step;
38 MooseRandom::seed(rseed);
39}
40
41Real
registerMooseObject("PhaseFieldApp", LangevinNoise)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _i
const VariableTestValue & _test
static InputParameters validParams()
const Real _amplitude
static InputParameters validParams()
virtual Real computeQpResidual()
virtual void residualSetup()
const MaterialProperty< Real > & _multiplier_prop
LangevinNoise(const InputParameters &parameters)
static Real rand()
void seed(std::size_t i, unsigned int seed)
int & _t_step