LCOV - code coverage report
Current view: top level - src/materials - PorousFlowPermeabilityConstFromVar.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 42 42 100.0 %
Date: 2017-11-16 18:50:22 Functions: 5 5 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 "PorousFlowPermeabilityConstFromVar.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12           2 : validParams<PorousFlowPermeabilityConstFromVar>()
      13             : {
      14           2 :   InputParameters params = validParams<PorousFlowPermeabilityBase>();
      15           6 :   params.addRequiredCoupledVar("perm_xx", "The xx component of the permeability tensor");
      16           6 :   params.addRequiredCoupledVar("perm_yy", "The yy component of the permeability tensor");
      17           6 :   params.addRequiredCoupledVar("perm_zz", "The zz component of the permeability tensor");
      18           6 :   params.addCoupledVar("perm_xy", 0.0, "The xy component of the permeability tensor");
      19           6 :   params.addCoupledVar("perm_xz", 0.0, "The xz component of the permeability tensor");
      20           6 :   params.addCoupledVar("perm_yx", 0.0, "The yx component of the permeability tensor");
      21           6 :   params.addCoupledVar("perm_yz", 0.0, "The yz component of the permeability tensor");
      22           6 :   params.addCoupledVar("perm_zx", 0.0, "The zx component of the permeability tensor");
      23           6 :   params.addCoupledVar("perm_zy", 0.0, "The zy component of the permeability tensor");
      24           4 :   params.addClassDescription(
      25           2 :       "This Material calculates the permeability tensor given by the input variables");
      26           2 :   return params;
      27             : }
      28             : 
      29           6 : PorousFlowPermeabilityConstFromVar::PorousFlowPermeabilityConstFromVar(
      30           6 :     const InputParameters & parameters)
      31             :   : PorousFlowPermeabilityBase(parameters),
      32          12 :     _perm_xx(coupledValue("perm_xx")),
      33          12 :     _perm_xy(coupledValue("perm_xy")),
      34          12 :     _perm_xz(coupledValue("perm_xz")),
      35          12 :     _perm_yx(coupledValue("perm_yx")),
      36          12 :     _perm_yy(coupledValue("perm_yy")),
      37          12 :     _perm_yz(coupledValue("perm_yz")),
      38          12 :     _perm_zx(coupledValue("perm_zx")),
      39          12 :     _perm_zy(coupledValue("perm_zy")),
      40          66 :     _perm_zz(coupledValue("perm_zz"))
      41             : {
      42           6 : }
      43             : 
      44             : void
      45        5184 : PorousFlowPermeabilityConstFromVar::computeQpProperties()
      46             : {
      47        5184 :   RealTensorValue permeability(_perm_xx[_qp],
      48        5184 :                                _perm_xy[_qp],
      49        5184 :                                _perm_xz[_qp],
      50        5184 :                                _perm_yx[_qp],
      51        5184 :                                _perm_yy[_qp],
      52        5184 :                                _perm_yz[_qp],
      53        5184 :                                _perm_zx[_qp],
      54        5184 :                                _perm_zy[_qp],
      55       51840 :                                _perm_zz[_qp]);
      56             : 
      57       10368 :   _permeability_qp[_qp] = permeability;
      58       10368 :   _dpermeability_qp_dvar[_qp].resize(_num_var, RealTensorValue());
      59       10368 :   _dpermeability_qp_dgradvar[_qp].resize(LIBMESH_DIM);
      60             : 
      61       36288 :   for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
      62       31104 :     _dpermeability_qp_dgradvar[_qp][i].resize(_num_var, RealTensorValue());
      63        7683 : }

Generated by: LCOV version 1.11