https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADConstantMaterial.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 "ADConstantMaterial.h"
11
12registerMooseObject("ThermalHydraulicsApp", ADConstantMaterial);
13
16{
18 params.addParam<Real>("value", 0., "Constant value being assigned into the property");
19 params.addRequiredParam<std::string>("property_name", "The property name to declare");
20 params.addClassDescription("Defines a constant AD material property");
21 return params;
22}
23
25 : Material(parameters),
26 _value(getParam<Real>("value")),
27 _property_name(getParam<std::string>("property_name")),
28 _property(declareADProperty<Real>(_property_name))
29{
30}
31
32void
registerMooseObject("ThermalHydraulicsApp", ADConstantMaterial)
Constant material with zero-valued derivatives.
ADMaterialProperty< Real > & _property
static InputParameters validParams()
virtual void computeQpProperties()
ADConstantMaterial(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()