www.mooseframework.org
ComputeJacobianThread.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 COMPUTEJACOBIANTHREAD_H
16 #define COMPUTEJACOBIANTHREAD_H
17 
18 #include "ThreadedElementLoop.h"
19 
20 #include "libmesh/elem_range.h"
21 
22 // Forward declarations
23 class FEProblemBase;
25 class IntegratedBC;
26 class DGKernel;
27 class InterfaceKernel;
28 class KernelWarehouse;
29 
30 class ComputeJacobianThread : public ThreadedElementLoop<ConstElemRange>
31 {
32 public:
34  SparseMatrix<Number> & jacobian,
35  Moose::KernelType kernel_type = Moose::KT_ALL);
36 
37  // Splitting Constructor
38  ComputeJacobianThread(ComputeJacobianThread & x, Threads::split split);
39 
40  virtual ~ComputeJacobianThread();
41 
42  virtual void subdomainChanged() override;
43  virtual void onElement(const Elem * elem) override;
44  virtual void onBoundary(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
45  virtual void onInternalSide(const Elem * elem, unsigned int side) override;
46  virtual void onInterface(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
47  virtual void postElement(const Elem * /*elem*/) override;
48  virtual void post() override;
49 
50  void join(const ComputeJacobianThread & /*y*/);
51 
52 protected:
53  SparseMatrix<Number> & _jacobian;
55 
56  unsigned int _num_cached;
57 
58  // Reference to BC storage structures
60 
61  // Reference to DGKernel storage structure
63 
64  // Reference to interface kernel storage structure
66 
67  // Reference to Kernel storage structure
69 
71 
72  virtual void computeJacobian();
73  virtual void computeFaceJacobian(BoundaryID bnd_id);
74  virtual void computeInternalFaceJacobian(const Elem * neighbor);
75  virtual void computeInternalInterFaceJacobian(BoundaryID bnd_id);
76 };
77 
78 #endif // COMPUTEJACOBIANTHREAD_H
virtual void post() override
Called after the element range loop.
Moose::KernelType _kernel_type
virtual void postElement(const Elem *) override
Called after the element assembly is done (including surface assembling)
Base class for assembly-like calculations.
SparseMatrix< Number > & _jacobian
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
static PetscErrorCode Vec x
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Nonlinear system to be solved.
The DGKernel class is responsible for calculating the residuals for various physics on internal sides...
Definition: DGKernel.h:47
ComputeJacobianThread(FEProblemBase &fe_problem, SparseMatrix< Number > &jacobian, Moose::KernelType kernel_type=Moose::KT_ALL)
virtual void computeInternalInterFaceJacobian(BoundaryID bnd_id)
Base class for deriving any boundary condition of a integrated type.
Definition: IntegratedBC.h:33
InterfaceKernel is responsible for interfacing physics across subdomains.
KernelType
Definition: MooseTypes.h:162
NonlinearSystemBase & _nl
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
const MooseObjectWarehouse< DGKernel > & _dg_kernels
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing boundary assembling.
Holds kernels and provides some services.
virtual void computeFaceJacobian(BoundaryID bnd_id)
void join(const ComputeJacobianThread &)
virtual void computeInternalFaceJacobian(const Elem *neighbor)
const KernelWarehouse & _kernels
const MooseObjectWarehouse< InterfaceKernel > & _interface_kernels
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing interface assembling.
const MooseObjectWarehouse< IntegratedBC > & _integrated_bcs
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
boundary_id_type BoundaryID
Definition: MooseTypes.h:75