https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctorMaterial.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 "FunctorMaterial.h"
11
14{
15 auto params = Material::validParams();
16 params.suppressParameter<bool>("use_displaced_mesh");
17
18 // Functor materials define functors, and the functor caching is defined by the execute_on
20 ExecFlagEnum & exec_enum = params.set<ExecFlagEnum>("execute_on", true);
22 // Default is no-caching. Same default as not passing a clearance schedule when adding a functor
23 params.set<ExecFlagEnum>("execute_on") = {EXEC_ALWAYS};
24
25 // Do not allow functor materials in the regular Materials block
26 params.registerBase("FunctorMaterial");
27
28 // Remove MaterialBase parameters that are not used
29 params.suppressParameter<bool>("compute");
30 params.suppressParameter<std::vector<BoundaryName>>("boundary");
31 params.suppressParameter<MooseEnum>("constant_on");
32 params.suppressParameter<MaterialPropertyName>("prop_getter_suffix");
33 params.suppressParameter<bool>("use_interpolated_state");
34
35 return params;
36}
37
38FunctorMaterial::FunctorMaterial(const InputParameters & parameters) : Material(parameters) {}
const ExecFlagType EXEC_ALWAYS
Definition Moose.C:53
A MultiMooseEnum object to hold "execute_on" flags.
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
friend class FunctorMaterial
To let it access the declaration suffix.
Materials compute MaterialProperties.
Definition Material.h:36
static InputParameters validParams()
Definition Material.C:14
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
static InputParameters validParams()