LCOV - code coverage report
Current view: top level - src/bcs - MassMatrixIntegratedBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 17 21 81.0 %
Date: 2025-08-14 10:14:56 Functions: 3 4 75.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 "MassMatrixIntegratedBC.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", MassMatrixIntegratedBC);
      13             : 
      14             : InputParameters
      15          71 : MassMatrixIntegratedBC::validParams()
      16             : {
      17          71 :   InputParameters params = IntegratedBC::validParams();
      18          71 :   params.addClassDescription("Computes a finite element mass matrix meant for use in "
      19             :                              "preconditioning schemes which require one");
      20         142 :   params.addParam<Real>("density", 1, "Optional density for scaling the computed mass.");
      21         142 :   params.set<MultiMooseEnum>("vector_tags") = "";
      22         142 :   params.set<MultiMooseEnum>("matrix_tags") = "";
      23          71 :   params.suppressParameter<MultiMooseEnum>("vector_tags");
      24          71 :   params.suppressParameter<std::vector<TagName>>("extra_vector_tags");
      25          71 :   params.suppressParameter<std::vector<TagName>>("absolute_value_vector_tags");
      26          71 :   params.set<bool>("matrix_only") = true;
      27          71 :   return params;
      28           0 : }
      29             : 
      30          39 : MassMatrixIntegratedBC::MassMatrixIntegratedBC(const InputParameters & parameters)
      31          78 :   : IntegratedBC(parameters), _density(getParam<Real>("density"))
      32             : {
      33          78 :   if (!isParamValid("matrix_tags") && !isParamValid("extra_matrix_tags"))
      34           0 :     mooseError("One of 'matrix_tags' or 'extra_matrix_tags' must be provided");
      35          39 : }
      36             : 
      37             : Real
      38           0 : MassMatrixIntegratedBC::computeQpResidual()
      39             : {
      40           0 :   mooseError("should never be called");
      41             : }
      42             : 
      43             : Real
      44      446580 : MassMatrixIntegratedBC::computeQpJacobian()
      45             : {
      46      446580 :   return _test[_i][_qp] * _density * _phi[_j][_qp];
      47             : }

Generated by: LCOV version 1.14