LCOV - code coverage report
Current view: top level - src/kernels - CoupledBEKinetic.C (source / functions) Hit Total Coverage
Test: idaholab/moose chemical_reactions: #31405 (292dce) with base fef103 Lines: 16 17 94.1 %
Date: 2025-09-04 07:52:33 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       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 "CoupledBEKinetic.h"
      11             : 
      12             : registerMooseObject("ChemicalReactionsApp", CoupledBEKinetic);
      13             : 
      14             : InputParameters
      15         935 : CoupledBEKinetic::validParams()
      16             : {
      17         935 :   InputParameters params = TimeDerivative::validParams();
      18        1870 :   params.addRequiredParam<std::vector<Real>>("weight",
      19             :                                              "The weight of kinetic species concentration");
      20        1870 :   params.addCoupledVar("v", "List of kinetic species being coupled by concentration");
      21         935 :   params.addClassDescription("Derivative of kinetic species concentration wrt time");
      22         935 :   return params;
      23           0 : }
      24             : 
      25         503 : CoupledBEKinetic::CoupledBEKinetic(const InputParameters & parameters)
      26             :   : TimeDerivative(parameters),
      27         503 :     _porosity(getMaterialProperty<Real>("porosity")),
      28        1006 :     _weight(getParam<std::vector<Real>>("weight")),
      29         503 :     _vals(coupledValues("v")),
      30        1006 :     _vals_old(coupledValuesOld("v"))
      31             : {
      32         503 : }
      33             : 
      34             : Real
      35     5209376 : CoupledBEKinetic::computeQpResidual()
      36             : {
      37             :   Real assemble_conc = 0.0;
      38             : 
      39    10452672 :   for (MooseIndex(_vals) i = 0; i < _vals.size(); ++i)
      40     5243296 :     assemble_conc += _weight[i] * ((*_vals[i])[_qp] - (*_vals_old[i])[_qp]) / _dt;
      41             : 
      42     5209376 :   return _porosity[_qp] * _test[_i][_qp] * assemble_conc;
      43             : }

Generated by: LCOV version 1.14