www.mooseframework.org
ComputeJacobianBlocksThread.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef COMPUTEJACOBIANBLOCKSTHREAD_H
16 #define COMPUTEJACOBIANBLOCKSTHREAD_H
17 
19 
20 // Forward declarations
21 class FEProblemBase;
22 
27 {
28 public:
29  JacobianBlock(libMesh::System & precond_system,
30  SparseMatrix<Number> & jacobian,
31  unsigned int ivar,
32  unsigned int jvar)
33  : _precond_system(precond_system), _jacobian(jacobian), _ivar(ivar), _jvar(jvar)
34  {
35  }
36 
37  libMesh::System & _precond_system;
38  SparseMatrix<Number> & _jacobian;
39  unsigned int _ivar, _jvar;
40 };
41 
46 {
47 public:
48  ComputeJacobianBlocksThread(FEProblemBase & fe_problem, std::vector<JacobianBlock *> & blocks);
49 
50  // Splitting Constructor
52 
53  virtual ~ComputeJacobianBlocksThread();
54 
55  void join(const ComputeJacobianThread & /*y*/) {}
56 
57 protected:
58  virtual void postElement(const Elem * elem) override;
59 
60  std::vector<JacobianBlock *> _blocks;
61 };
62 
63 #endif // COMPUTEJACOBIANBLOCKSTHREAD_H
Helper class for holding the preconditioning blocks to fill.
SparseMatrix< Number > & _jacobian
static PetscErrorCode Vec x
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< JacobianBlock * > _blocks
void join(const ComputeJacobianThread &)