LCOV - code coverage report
Current view: top level - src/kernels - PorousFlowHeatConduction.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 26 26 100.0 %
Date: 2017-11-17 17:48:31 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       3             : /*                                                              */
       4             : /*          All contents are licensed under LGPL V2.1           */
       5             : /*             See LICENSE for full restrictions                */
       6             : /****************************************************************/
       7             : 
       8             : #include "PorousFlowHeatConduction.h"
       9             : 
      10             : // MOOSE includes
      11             : #include "MooseVariable.h"
      12             : 
      13             : template <>
      14             : InputParameters
      15          12 : validParams<PorousFlowHeatConduction>()
      16             : {
      17          12 :   InputParameters params = validParams<Kernel>();
      18          36 :   params.addRequiredParam<UserObjectName>(
      19          12 :       "PorousFlowDictator", "The UserObject that holds the list of PorousFlow variable names");
      20          24 :   params.addClassDescription("Heat conduction in the Porous Flow module");
      21          12 :   return params;
      22             : }
      23             : 
      24          12 : PorousFlowHeatConduction::PorousFlowHeatConduction(const InputParameters & parameters)
      25             :   : Kernel(parameters),
      26          24 :     _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
      27          24 :     _la(getMaterialProperty<RealTensorValue>("PorousFlow_thermal_conductivity_qp")),
      28             :     _dla_dvar(getMaterialProperty<std::vector<RealTensorValue>>(
      29          24 :         "dPorousFlow_thermal_conductivity_qp_dvar")),
      30          24 :     _grad_t(getMaterialProperty<RealGradient>("PorousFlow_grad_temperature_qp")),
      31             :     _dgrad_t_dvar(
      32          24 :         getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_grad_temperature_qp_dvar")),
      33             :     _dgrad_t_dgradvar(
      34          96 :         getMaterialProperty<std::vector<Real>>("dPorousFlow_grad_temperature_qp_dgradvar"))
      35             : {
      36          12 : }
      37             : 
      38             : Real
      39      356968 : PorousFlowHeatConduction::computeQpResidual()
      40             : {
      41     1427872 :   return _grad_test[_i][_qp] * (_la[_qp] * _grad_t[_qp]);
      42             : }
      43             : 
      44             : Real
      45     1351488 : PorousFlowHeatConduction::computeQpJacobian()
      46             : {
      47     1351488 :   return computeQpOffDiagJacobian(_var.number());
      48             : }
      49             : 
      50             : Real
      51     6694016 : PorousFlowHeatConduction::computeQpOffDiagJacobian(unsigned int jvar)
      52             : {
      53     6694016 :   if (_dictator.notPorousFlowVariable(jvar))
      54             :     return 0.0;
      55             : 
      56             :   /// The PorousFlow variable index corresponding to the variable number jvar
      57     6694016 :   const unsigned int pvar = _dictator.porousFlowVariableNum(jvar);
      58             : 
      59     6694016 :   return _grad_test[_i][_qp] *
      60    26776064 :          ((_dla_dvar[_qp][pvar] * _grad_t[_qp] + _la[_qp] * _dgrad_t_dvar[_qp][pvar]) *
      61     6694016 :               _phi[_j][_qp] +
      62    26776064 :           _la[_qp] * _dgrad_t_dgradvar[_qp][pvar] * _grad_phi[_j][_qp]);
      63        2499 : }

Generated by: LCOV version 1.11