www.mooseframework.org
ComputeJacobianBlocksThread.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
13 
14 // Forward declarations
15 class FEProblemBase;
16 
21 {
22 public:
23  JacobianBlock(libMesh::System & precond_system,
24  SparseMatrix<Number> & jacobian,
25  unsigned int ivar,
26  unsigned int jvar)
27  : _precond_system(precond_system), _jacobian(jacobian), _ivar(ivar), _jvar(jvar)
28  {
29  }
30 
33  unsigned int _ivar, _jvar;
34 };
35 
40 {
41 public:
43  std::vector<JacobianBlock *> & blocks,
44  const std::set<TagID> & tags);
45 
46  // Splitting Constructor
48 
50 
51  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 };
Helper class for holding the preconditioning blocks to fill.
virtual void postElement(const Elem *elem) override
Called after the element assembly is done (including surface assembling)
ComputeJacobianBlocksThread(FEProblemBase &fe_problem, std::vector< JacobianBlock *> &blocks, const std::set< TagID > &tags)
SparseMatrix< Number > & _jacobian
virtual void postInternalSide(const Elem *elem, unsigned int side) override
Called after evaluations on an element internal side.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Specialization for filling multiple "small" preconditioning matrices simulatenously.
libMesh::System & _precond_system
JacobianBlock(libMesh::System &precond_system, SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar)
std::vector< dof_id_type > _dof_indices
std::vector< JacobianBlock * > _blocks
tbb::split split
std::vector< dof_id_type > _dof_neighbor_indices
void join(const ComputeJacobianThread &)