LCOV - code coverage report
Current view: top level - include/loops - ComputeJacobianBlocksThread.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 4 4 100.0 %
Date: 2025-07-17 01:28:37 Functions: 2 2 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             : #pragma once
      11             : 
      12             : #include "ComputeFullJacobianThread.h"
      13             : 
      14             : // Forward declarations
      15             : class FEProblemBase;
      16             : 
      17             : /**
      18             :  * Helper class for holding the preconditioning blocks to fill.
      19             :  */
      20             : class JacobianBlock
      21             : {
      22             : public:
      23        1449 :   JacobianBlock(libMesh::System & precond_system,
      24             :                 SparseMatrix<Number> & jacobian,
      25             :                 unsigned int ivar,
      26             :                 unsigned int jvar)
      27        1449 :     : _precond_system(precond_system), _jacobian(jacobian), _ivar(ivar), _jvar(jvar)
      28             :   {
      29        1449 :   }
      30             : 
      31             :   libMesh::System & _precond_system;
      32             :   SparseMatrix<Number> & _jacobian;
      33             :   unsigned int _ivar, _jvar;
      34             : };
      35             : 
      36             : /**
      37             :  * Specialization for filling multiple "small" preconditioning matrices simulatenously.
      38             :  */
      39             : class ComputeJacobianBlocksThread : public ComputeFullJacobianThread
      40             : {
      41             : public:
      42             :   ComputeJacobianBlocksThread(FEProblemBase & fe_problem,
      43             :                               std::vector<JacobianBlock *> & blocks,
      44             :                               const std::set<TagID> & tags);
      45             : 
      46             :   // Splitting Constructor
      47             :   ComputeJacobianBlocksThread(ComputeJacobianBlocksThread & x, Threads::split split);
      48             : 
      49             :   virtual ~ComputeJacobianBlocksThread();
      50             : 
      51          57 :   void join(const ComputeJacobianThread & /*y*/) {}
      52             : 
      53             : protected:
      54             :   virtual void postElement(const Elem * elem) override;
      55             : 
      56             :   virtual void postInternalSide(const Elem * elem, unsigned int side) override;
      57             : 
      58             :   std::vector<JacobianBlock *> _blocks;
      59             : 
      60             : private:
      61             :   std::vector<dof_id_type> _dof_indices;
      62             : 
      63             :   std::vector<dof_id_type> _dof_neighbor_indices;
      64             : };

Generated by: LCOV version 1.14