www.mooseframework.org
ADThermalConductivityTest.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
12 registerADMooseObject("HeatConductionTestApp", ADThermalConductivityTest);
13 
16  ADMaterial,
17  params.addRequiredCoupledVar("temperature", "Coupled temperature");
18  params.addRequiredCoupledVar(
19  "c", "Coupled variable used to help verify automatic differentiation capability"););
20 
21 template <ComputeStage compute_stage>
23  const InputParameters & parameters)
24  : ADMaterial<compute_stage>(parameters),
25  _diffusivity(declareADProperty<Real>("thermal_conductivity")),
26  _temperature(adCoupledValue("temperature")),
27  _c(adCoupledValue("c"))
28 {
29 }
30 
31 template <ComputeStage compute_stage>
32 void
34 {
35  _diffusivity[_qp] = _temperature[_qp] * _c[_qp];
36 }
ADThermalConductivityTest
Definition: ADThermalConductivityTest.h:16
ADThermalConductivityTest.h
ADThermalConductivityTest::computeQpProperties
virtual void computeQpProperties()
Definition: ADThermalConductivityTest.C:33
defineADValidParams
defineADValidParams(ADThermalConductivityTest, ADMaterial, params.addRequiredCoupledVar("temperature", "Coupled temperature");params.addRequiredCoupledVar("c", "Coupled variable used to help verify automatic differentiation capability");)
ADThermalConductivityTest::ADThermalConductivityTest
ADThermalConductivityTest(const InputParameters &parameters)
Definition: ADThermalConductivityTest.C:22
registerADMooseObject
registerADMooseObject("HeatConductionTestApp", ADThermalConductivityTest)