www.mooseframework.org
heat_conduction
test
src
materials
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
10
#include "
ADThermalConductivityTest.h
"
11
12
registerADMooseObject
(
"HeatConductionTestApp"
,
ADThermalConductivityTest
);
13
14
defineADValidParams
(
15
ADThermalConductivityTest
,
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>
22
ADThermalConductivityTest<compute_stage>::ADThermalConductivityTest
(
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
33
ADThermalConductivityTest<compute_stage>::computeQpProperties
()
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 ¶meters)
Definition:
ADThermalConductivityTest.C:22
registerADMooseObject
registerADMooseObject("HeatConductionTestApp", ADThermalConductivityTest)
Generated on Sat Jan 25 2020 12:04:37 for www.mooseframework.org by
1.8.16