RandomMaterial::RandomMaterial(const InputParameters & parameters) : Material(parameters), _rand_real(declareProperty<Real>("rand_real")), _rand_long(declareProperty<unsigned long>("rand_long")) { setRandomResetFrequency(EXEC_TIMESTEP_END); }
RandomElementalUserObject::RandomElementalUserObject(const std::string & name, InputParameters parameters) : ElementUserObject(name, parameters) { /** * This call turns on Random Number generation for this object, it can be called either in * the constructor or in initialSetup(). */ setRandomResetFrequency(EXEC_RESIDUAL); }
ConservedNoiseInterface::ConservedNoiseInterface(const InputParameters & parameters) : ElementUserObject(parameters), _integral(0), _volume(0), _qp(0) { /** * This call turns on Random Number generation for this object, it can be called either in * the constructor or in initialSetup(). */ setRandomResetFrequency(EXEC_TIMESTEP); }
RandomCorrosion::RandomCorrosion(const InputParameters & parameters) : AuxKernel(parameters), _box(MeshTools::create_bounding_box(_mesh)), _nodal_tol(getParam<Real>("tolerance")), _num_points(getParam<unsigned int>("num_points")), _ref_temperature(getParam<Real>("reference_temperature")), _temperature(getPostprocessorValue("temperature")) { // This class only works with Nodal aux variables if (!isNodal()) mooseError("RandomCorrosion only operates using nodal aux variables."); // Setup the random number generation setRandomResetFrequency(EXEC_TIMESTEP_BEGIN); }
RandomAux::RandomAux(const std::string & name, InputParameters params) : AuxKernel(name, params), _random_uo(params.isParamValid("random_user_object") ? &getUserObject<RandomElementalUserObject>("random_user_object") : NULL), _generate_ints(getParam<bool>("generate_integers")) { /** * This call turns on Random Number generation for this object, it can be called either in * the constructor or in initialSetup(). */ setRandomResetFrequency(EXEC_LINEAR); if (_random_uo) { if (isNodal()) mooseError("Can't use an ElementUserObject with a nodal RandomAux"); else if (_generate_ints) mooseError("Can't get ints out of the RandomElementalUserObject"); } }
DiscreteNucleationInserter::DiscreteNucleationInserter(const InputParameters & parameters) : ElementUserObject(parameters), _probability(getMaterialProperty<Real>("probability")), _hold_time(getParam<Real>("hold_time")), _changes_made(0), _global_nucleus_list(declareRestartableData("global_nucleus_list", NucleusList(0))), _local_nucleus_list(declareRestartableData("local_nucleus_list", NucleusList(0))) { setRandomResetFrequency(EXEC_TIMESTEP_END); // debugging code (this will insert the entry into every processors list, but duplicate entries in // global should be OK) // we also assume that time starts at 0! But hey, this is only for debugging anyways... if (isParamValid("test")) _insert_test = true; else _insert_test = false; // force a map rebuild after restart or recover _changes_made = _app.isRecovering() || _app.isRestarting(); }