www.mooseframework.org
ComputeDiracThread.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 COMPUTEDIRACTHREAD_H
16 #define COMPUTEDIRACTHREAD_H
17 
18 // Moose Includes
19 #include "ThreadedElementLoop.h"
20 
21 #include "libmesh/stored_range.h"
22 
23 // Forward declarations
24 class DiracKernel;
25 template <typename T>
28 
29 typedef StoredRange<std::set<const Elem *>::const_iterator, const Elem *> DistElemRange;
30 
31 class ComputeDiracThread : public ThreadedElementLoop<DistElemRange>
32 {
33 public:
34  ComputeDiracThread(FEProblemBase & feproblem, SparseMatrix<Number> * jacobian = NULL);
35 
36  // Splitting Constructor
37  ComputeDiracThread(ComputeDiracThread & x, Threads::split);
38 
39  virtual ~ComputeDiracThread();
40 
41  virtual void subdomainChanged() override;
42  virtual void pre() override;
43  virtual void onElement(const Elem * elem) override;
44  virtual void postElement(const Elem * /*elem*/) override;
45  virtual void post() override;
46 
47  void join(const ComputeDiracThread & /*y*/);
48 
49 protected:
50  SparseMatrix<Number> * _jacobian;
52 
55 };
56 
57 #endif // COMPUTEDIRACTHREAD_H
Base class for assembly-like calculations.
void join(const ComputeDiracThread &)
virtual void pre() override
Called before the element range loop.
A storage container for MooseObjects that inherit from SetupInterface.
const MooseObjectWarehouse< DiracKernel > & _dirac_kernels
Storage for DiracKernel objects.
virtual void postElement(const Elem *) override
Called after the element assembly is done (including surface assembling)
static PetscErrorCode Vec x
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Nonlinear system to be solved.
SparseMatrix< Number > * _jacobian
NonlinearSystemBase & _nl
StoredRange< std::set< const Elem * >::const_iterator, const Elem * > DistElemRange
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
virtual void post() override
Called after the element range loop.
ComputeDiracThread(FEProblemBase &feproblem, SparseMatrix< Number > *jacobian=NULL)
A DiracKernel is used when you need to add contributions to the residual by means of multiplying some...
Definition: DiracKernel.h:50