LCOV - code coverage report
Current view: top level - src/bcs - PorousFlowSinkPTDefiner.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 24 26 92.3 %
Date: 2017-11-21 14:47:27 Functions: 6 6 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 "PorousFlowSinkPTDefiner.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12          42 : validParams<PorousFlowSinkPTDefiner>()
      13             : {
      14          42 :   InputParameters params = validParams<PorousFlowSink>();
      15          42 :   return params;
      16             : }
      17             : 
      18          42 : PorousFlowSinkPTDefiner::PorousFlowSinkPTDefiner(const InputParameters & parameters)
      19             :   : PorousFlowSink(parameters),
      20         121 :     _pp(_involves_fluid ? &getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_nodal")
      21             :                         : nullptr),
      22          42 :     _dpp_dvar(_involves_fluid
      23          79 :                   ? &getMaterialProperty<std::vector<std::vector<Real>>>(
      24         116 :                         "dPorousFlow_porepressure_nodal_dvar")
      25             :                   : nullptr),
      26          89 :     _temp(!_involves_fluid ? &getMaterialProperty<Real>("PorousFlow_temperature_nodal") : nullptr),
      27          42 :     _dtemp_dvar(!_involves_fluid
      28          89 :                     ? &getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")
      29         210 :                     : nullptr)
      30             : {
      31          42 :   if (_involves_fluid && (_pp == nullptr || _dpp_dvar == nullptr))
      32           0 :     mooseError("PorousFlowSink: There is no porepressure Material");
      33          42 :   if (!_involves_fluid && (_temp == nullptr || _dtemp_dvar == nullptr))
      34           0 :     mooseError("PorousFlowSink: There is no temperature Material");
      35          42 : }
      36             : 
      37             : Real
      38      890036 : PorousFlowSinkPTDefiner::ptVar() const
      39             : {
      40      890036 :   if (_involves_fluid)
      41     1730424 :     return (*_pp)[_i][_ph];
      42       49648 :   return (*_temp)[_i];
      43             : }
      44             : 
      45             : Real
      46       31160 : PorousFlowSinkPTDefiner::dptVar(unsigned pvar) const
      47             : {
      48       31160 :   if (_involves_fluid)
      49       61696 :     return (*_dpp_dvar)[_i][_ph][pvar];
      50         624 :   return (*_dtemp_dvar)[_i][pvar];
      51        2499 : }

Generated by: LCOV version 1.11