www.mooseframework.org
ComputeJacobianThread.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 
12 #include "ThreadedElementLoop.h"
14 
15 #include "libmesh/elem_range.h"
16 
17 // Forward declarations
18 class FEProblemBase;
20 class IntegratedBCBase;
21 class DGKernelBase;
22 class InterfaceKernel;
23 class Kernel;
24 
25 class ComputeJacobianThread : public ThreadedElementLoop<ConstElemRange>
26 {
27 public:
28  ComputeJacobianThread(FEProblemBase & fe_problem, const std::set<TagID> & tags);
29 
30  // Splitting Constructor
32 
33  virtual ~ComputeJacobianThread();
34 
35  virtual void subdomainChanged() override;
36  virtual void onElement(const Elem * elem) override;
37  virtual void onBoundary(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
38  virtual void onInternalSide(const Elem * elem, unsigned int side) override;
39  virtual void onInterface(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
40  virtual void postElement(const Elem * /*elem*/) override;
41  virtual void post() override;
42 
43  void join(const ComputeJacobianThread & /*y*/);
44 
45 protected:
47 
48  unsigned int _num_cached;
49 
50  // Reference to BC storage structures
52 
54 
55  // Reference to DGKernel storage structure
57 
59 
60  // Reference to interface kernel storage structure
62 
64 
65  // Reference to Kernel storage structure
67 
68  // A pointer to different warehouse
70 
73 
76 
77  const std::set<TagID> & _tags;
78 
79  virtual void computeJacobian();
80  virtual void computeFaceJacobian(BoundaryID bnd_id);
81  virtual void computeInternalFaceJacobian(const Elem * neighbor);
82  virtual void computeInternalInterFaceJacobian(BoundaryID bnd_id);
83 };
84 
virtual void post() override
Called after the element range loop.
virtual void postElement(const Elem *) override
Called after the element assembly is done (including surface assembling)
Base class for assembly-like calculations.
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
MooseObjectTagWarehouse< KernelBase > & _kernels
MooseObjectTagWarehouse< IntegratedBCBase > & _integrated_bcs
static PetscErrorCode Vec x
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
MooseObjectWarehouse< InterfaceKernel > * _ik_warehouse
Serves as a base class for DGKernel and ADDGKernel.
Definition: DGKernelBase.h:46
const std::set< TagID > & _tags
Nonlinear system to be solved.
std::vector< std::string > split(const std::string &str, const std::string &delimiter)
Python like split function for strings.
Definition: MooseUtils.C:736
MooseObjectTagWarehouse< KernelBase > & _ad_jacobian_kernels
Reference to ADKernel<JACOBIAN> storage structure.
MooseObjectWarehouse< KernelBase > * _adjk_warehouse
Pointer to tags.
virtual void computeInternalInterFaceJacobian(BoundaryID bnd_id)
boundary_id_type BoundaryID
MooseObjectTagWarehouse< DGKernelBase > & _dg_kernels
MooseObjectWarehouse< KernelBase > * _warehouse
InterfaceKernel is responsible for interfacing physics across subdomains.
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse
NonlinearSystemBase & _nl
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
ComputeJacobianThread(FEProblemBase &fe_problem, const std::set< TagID > &tags)
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing boundary assembling.
virtual void computeFaceJacobian(BoundaryID bnd_id)
void join(const ComputeJacobianThread &)
Definition: Kernel.h:20
Base class for deriving any boundary condition of a integrated type.
virtual void computeInternalFaceJacobian(const Elem *neighbor)
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing interface assembling.
MooseObjectTagWarehouse< InterfaceKernel > & _interface_kernels
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.