LCOV - code coverage report
Current view: top level - src/kernels - PorousFlowFullySaturatedDarcyFlow.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 22 25 88.0 %
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 "PorousFlowFullySaturatedDarcyFlow.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12          13 : validParams<PorousFlowFullySaturatedDarcyFlow>()
      13             : {
      14          13 :   InputParameters params = validParams<PorousFlowFullySaturatedDarcyBase>();
      15          39 :   params.addParam<unsigned int>(
      16          13 :       "fluid_component", 0, "The index corresponding to the fluid component for this kernel");
      17          26 :   params.addClassDescription("Darcy flux suitable for models involving a fully-saturated single "
      18          13 :                              "phase, multi-component fluid.  No upwinding is used");
      19          13 :   return params;
      20             : }
      21             : 
      22          14 : PorousFlowFullySaturatedDarcyFlow::PorousFlowFullySaturatedDarcyFlow(
      23          14 :     const InputParameters & parameters)
      24             :   : PorousFlowFullySaturatedDarcyBase(parameters),
      25          28 :     _mfrac(getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp")),
      26             :     _dmfrac_dvar(getMaterialProperty<std::vector<std::vector<std::vector<Real>>>>(
      27          28 :         "dPorousFlow_mass_frac_qp_dvar")),
      28          84 :     _fluid_component(getParam<unsigned int>("fluid_component"))
      29             : {
      30          14 :   if (_fluid_component >= _porousflow_dictator.numComponents())
      31           0 :     mooseError("PorousFlowFullySaturatedDarcyFlow: The dictator proclaims the number of fluid "
      32             :                "components is ",
      33           0 :                _porousflow_dictator.numComponents(),
      34             :                " whereas you set the fluid_component = ",
      35             :                _fluid_component,
      36           0 :                ".  Happyness equals perfection.");
      37          14 : }
      38             : 
      39             : Real
      40      775104 : PorousFlowFullySaturatedDarcyFlow::mobility() const
      41             : {
      42             :   const unsigned ph = 0;
      43     1550208 :   return _mfrac[_qp][ph][_fluid_component] * PorousFlowFullySaturatedDarcyBase::mobility();
      44             : }
      45             : 
      46             : Real
      47      505440 : PorousFlowFullySaturatedDarcyFlow::dmobility(unsigned pvar) const
      48             : {
      49             :   const unsigned ph = 0;
      50      505440 :   const Real darcy_mob = PorousFlowFullySaturatedDarcyBase::mobility();
      51      505440 :   const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
      52     1010880 :   return _dmfrac_dvar[_qp][ph][_fluid_component][pvar] * darcy_mob +
      53     1010880 :          _mfrac[_qp][ph][_fluid_component] * ddarcy_mob;
      54        2499 : }

Generated by: LCOV version 1.11