Skip to content

Commit

Permalink
Add RandomInterface for Material (idaholab#5476)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jul 29, 2015
1 parent 751717b commit 984edf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/include/materials/Material.h
Expand Up @@ -38,6 +38,7 @@
#include "ZeroInterface.h"
#include "MeshChangedInterface.h"
#include "OutputInterface.h"
#include "RandomInterface.h"

// libMesh includes
#include "libmesh/quadrature_gauss.h"
Expand Down Expand Up @@ -81,7 +82,8 @@ class Material :
public Restartable,
public ZeroInterface,
public MeshChangedInterface,
public OutputInterface
public OutputInterface,
public RandomInterface
{
public:
Material(const InputParameters & parameters);
Expand Down
3 changes: 3 additions & 0 deletions framework/src/materials/Material.C
Expand Up @@ -25,6 +25,7 @@ InputParameters validParams<Material>()
InputParameters params = validParams<MooseObject>();
params += validParams<BlockRestrictable>();
params += validParams<BoundaryRestrictable>();
params += validParams<RandomInterface>();

params.addParam<bool>("use_displaced_mesh", false, "Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.");

Expand Down Expand Up @@ -62,6 +63,7 @@ Material::Material(const InputParameters & parameters) :
// The false flag disables the automatic call buildOutputVariableHideList;
// for Material objects the hide lists are handled by MaterialOutputAction
OutputInterface(parameters, false),
RandomInterface(parameters, *parameters.get<FEProblem *>("_fe_problem"), parameters.get<THREAD_ID>("_tid"), false),
_subproblem(*parameters.get<SubProblem *>("_subproblem")),
_fe_problem(*parameters.get<FEProblem *>("_fe_problem")),
_tid(parameters.get<THREAD_ID>("_tid")),
Expand Down Expand Up @@ -252,6 +254,7 @@ Material::Material(const std::string & deprecated_name, InputParameters deprecat
// The false flag disables the automatic call buildOutputVariableHideList;
// for Material objects the hide lists are handled by MaterialOutputAction
OutputInterface(parameters(), false),
RandomInterface(parameters(), *getParam<FEProblem *>("_fe_problem"), getParam<THREAD_ID>("_tid"), false),
_subproblem(*getParam<SubProblem *>("_subproblem")),
_fe_problem(*getParam<FEProblem *>("_fe_problem")),
_tid(getParam<THREAD_ID>("_tid")),
Expand Down

0 comments on commit 984edf0

Please sign in to comment.