19 MooseEnum const_option(
"NONE=0 ELEMENT=1 SUBDOMAIN=2",
"none");
23 "When ELEMENT, MOOSE will only call computeQpProperties() for the 0th " 24 "quadrature point, and then copy that value to the other qps." 25 "When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th " 26 "quadrature point, and then copy that value to the other qps. Evaluations on element qps " 38 _q_point(_bnd ? (_neighbor ? _assembly.qPointsFaceNeighbor() : _assembly.qPointsFace())
39 : _assembly.qPoints()),
40 _qrule(_bnd ? (_neighbor ? _assembly.qRuleNeighbor() : _assembly.qRuleFace())
42 _JxW(_bnd ? _assembly.JxWFace() : _assembly.JxW()),
43 _current_elem(_neighbor ? _assembly.neighbor() : _assembly.elem()),
44 _current_subdomain_id(_neighbor ? _assembly.currentNeighborSubdomainID()
45 : _assembly.currentSubdomainID()),
46 _current_side(_neighbor ? _assembly.neighborSide() : _assembly.side()),
47 _constant_option(computeConstantOption()),
56 bool has_fe_vars =
false;
57 bool has_fv_vars =
false;
58 for (
auto *
const var : coupled_vars)
73 if (has_fe_vars && has_fv_vars)
77 " couples in both FE and FV vars. To support ghost calculations which some FV " 78 "consumers may need, multiphysics simulations should define separate materials for " 79 "coupling in finite element and finite volume variables because we do not have a user " 80 "friendly way of running DerivedMaterial::computeQpProperties and saying 'compute this " 81 "property because it doesn't depend on finite element variables' or 'don't compute this " 82 "property because it *does* depend on finite element variables'");
94 props[prop_id].
resize(nqp);
105 for (decltype(nqp) qp = 1; qp < nqp; ++qp)
106 props[prop_id].qpCopy(qp, props[prop_id], 0);
132 auto nqp =
_qrule->n_points();
133 for (decltype(nqp) qp = 1; qp < nqp; ++qp)
134 props[prop_id].qpCopy(qp, props[prop_id], 0);
145 auto co = getParam<MooseEnum>(
"constant_on").getEnum<ConstantTypeEnum>();
160 mooseError(
"To ensure dependency resolution, discrete materials must be retrieved during " 161 "initial setup. This is a code problem.");
170 _requested_props.insert(discrete_requested.begin(), discrete_requested.end());
180 proxy->resolve(*
this);
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual void checkMaterialProperty(const std::string &name, const unsigned int state)
A helper method for checking material properties This method was required to avoid a compiler problem...
FEProblemBase & _fe_problem
const QBase *const & _qrule
ConstantTypeEnum computeConstantOption()
virtual void computeQpProperties()
Users must override this method.
virtual bool boundaryRestricted() const
Returns true if this object has been restricted to a boundary.
virtual const MaterialData & materialData() const override
static InputParameters validParams()
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
const ConstantTypeEnum _constant_option
Options of the constantness level of the material.
virtual void computeProperties() override
Performs the quadrature point loop, calling computeQpProperties.
bool _ghostable
Whether this material can be computed in a ghosted context.
static InputParameters validParams()
virtual const std::set< std::string > & getRequestedItems() override
Return a set of properties accessed with getMaterialProperty.
virtual void subdomainSetup() override
Subdomain setup evaluating material properties when required.
virtual const std::string & name() const
Get the name of the class.
void resize(const std::size_t size, const WriteKey)
MaterialData & _material_data
The material data class that stores properties.
std::set< std::string > _requested_props
Set of properties accessed via get method.
virtual void checkMaterialProperty(const std::string &name, const unsigned int state) override
A helper method for checking material properties This method was required to avoid a compiler problem...
static InputParameters validParams()
std::unordered_set< unsigned int > _active_prop_ids
The ids of the current active supplied properties.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const MaterialProperties & props(const unsigned int state=0) const
std::set< unsigned int > _supplied_prop_ids
The ids of the supplied properties, i.e.
MaterialBase & getMaterialByName(const std::string &name, bool no_warn=false, bool no_dep=false)
Retrieve the discrete material named "name".
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Interface for objects that needs coupling capabilities.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
MaterialBase & getMaterialByName(const std::string &name, bool no_warn=false)
An interface for accessing Materials.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< Material > > > _optional_property_proxies
optional material properties
virtual void resolveOptionalProperties() override
resolve all optional properties
MaterialBases compute MaterialProperties.
Material(const InputParameters ¶meters)
unsigned int getMaxQps() const
const ExecFlagType EXEC_INITIAL