https://mooseframework.inl.gov
ConservedLangevinNoise.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 "ConservedLangevinNoise.h"
11 
13 
16 {
18  params.addClassDescription("Source term for noise from a ConservedNoise userobject");
19  params.addRequiredParam<UserObjectName>(
20  "noise", "ConservedNoise userobject that produces the random numbers");
21  return params;
22 }
24  : LangevinNoise(parameters), _noise(getUserObject<ConservedNoiseInterface>("noise"))
25 {
26  if (parameters.isParamSetByUser("seed"))
27  paramError(
28  "seed",
29  "This parameter has no effect in this kernel. The noise is generated in the user object "
30  "specified in the 'noise' parameter. Specify a seed in that user object instead.");
31 }
32 
33 Real
35 {
36  return -_test[_i][_qp] * _noise.getQpValue(_current_elem->id(), _qp) * _amplitude *
38 }
const Real _amplitude
Definition: LangevinNoise.h:27
This Userobject is the base class of Userobjects that generate one random number per timestep and qua...
ConservedLangevinNoise(const InputParameters &parameters)
const MaterialProperty< Real > & _multiplier_prop
Definition: LangevinNoise.h:28
registerMooseObject("PhaseFieldApp", ConservedLangevinNoise)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const VariableTestValue & _test
static InputParameters validParams()
unsigned int _i
void paramError(const std::string &param, Args... args) const
bool isParamSetByUser(const std::string &name) const
static InputParameters validParams()
Definition: LangevinNoise.C:16
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ConservedNoiseInterface & _noise
void addClassDescription(const std::string &doc_string)
const InputParameters & parameters() const
const Elem *const & _current_elem
virtual Real getQpValue(dof_id_type element_id, unsigned int qp) const =0
unsigned int _qp