www.mooseframework.org
ComputeResidualThread.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 TimeKernel;
24 class KernelBase;
25 class Kernel;
26 
27 class ComputeResidualThread : public ThreadedElementLoop<ConstElemRange>
28 {
29 public:
30  ComputeResidualThread(FEProblemBase & fe_problem, const std::set<TagID> & tags);
31 
32  // Splitting Constructor
34 
35  virtual ~ComputeResidualThread();
36 
37  virtual void subdomainChanged() override;
38  virtual void onElement(const Elem * elem) override;
39  virtual void onBoundary(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
40  virtual void onInterface(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
41  virtual void onInternalSide(const Elem * elem, unsigned int side) override;
42  virtual void postElement(const Elem * /*elem*/) override;
43  virtual void post() override;
44 
45  void join(const ComputeResidualThread & /*y*/);
46 
47 protected:
49  const std::set<TagID> & _tags;
50  unsigned int _num_cached;
51 
54 
56 
59 
61 
64 
66 
70 
73 };
74 
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing boundary assembling.
Base class for assembly-like calculations.
virtual void postElement(const Elem *) override
Called after the element assembly is done (including surface assembling)
MooseObjectTagWarehouse< KernelBase > & _kernels
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
MooseObjectWarehouse< KernelBase > * _tag_kernels
void join(const ComputeResidualThread &)
static PetscErrorCode Vec x
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Serves as a base class for DGKernel and ADDGKernel.
Definition: DGKernelBase.h:46
Nonlinear system to be solved.
MooseObjectTagWarehouse< InterfaceKernel > & _interface_kernels
Reference to interface kernel storage structure.
std::vector< std::string > split(const std::string &str, const std::string &delimiter)
Python like split function for strings.
Definition: MooseUtils.C:736
This is the common base class for the two main kernel types implemented in MOOSE, EigenKernel and Ker...
Definition: KernelBase.h:44
MooseObjectTagWarehouse< DGKernelBase > & _dg_kernels
Reference to DGKernel storage structure.
boundary_id_type BoundaryID
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
InterfaceKernel is responsible for interfacing physics across subdomains.
MooseObjectWarehouse< InterfaceKernel > * _ik_warehouse
virtual void post() override
Called after the element range loop.
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
ComputeResidualThread(FEProblemBase &fe_problem, const std::set< TagID > &tags)
All time kernels should inherit from this class.
Definition: TimeKernel.h:24
const std::set< TagID > & _tags
NonlinearSystemBase & _nl
Definition: Kernel.h:20
Base class for deriving any boundary condition of a integrated type.
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing interface assembling.
MooseObjectTagWarehouse< IntegratedBCBase > & _integrated_bcs
Reference to BC storage structures.
MooseObjectWarehouse< IntegratedBCBase > * _ibc_warehouse
MooseObjectWarehouse< DGKernelBase > * _dg_warehouse