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 
31  libMesh::System & _precond_system;
32  SparseMatrix<Number> & _jacobian;
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  std::vector<JacobianBlock *> _blocks;
57 };
58 
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
static PetscErrorCode Vec x
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Specialization for filling multiple "small" preconditioning matrices simulatenously.
std::vector< std::string > split(const std::string &str, const std::string &delimiter)
Python like split function for strings.
Definition: MooseUtils.C:736
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 &)