https://mooseframework.inl.gov
LinearSystemContributionObject.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "MooseObject.h"
13 #include "SetupInterface.h"
14 #include "FunctionInterface.h"
15 #include "UserObjectInterface.h"
16 #include "TransientInterface.h"
17 #include "PostprocessorInterface.h"
19 #include "RandomInterface.h"
20 #include "Restartable.h"
21 #include "MeshChangedInterface.h"
22 #include "TaggingInterface.h"
23 #include "SystemBase.h"
24 
25 #include "libmesh/linear_implicit_system.h"
26 
27 class FEProblemBase;
28 class MooseMesh;
29 class SubProblem;
30 class MooseVariableBase;
32 class InputParameters;
33 
38  public SetupInterface,
39  public FunctionInterface,
40  public UserObjectInterface,
41  public TransientInterface,
44  public RandomInterface,
45  public Restartable,
46  public MeshChangedInterface,
47  public TaggingInterface
48 {
49 public:
51 
57 
59  virtual void addMatrixContribution() = 0;
60 
62  virtual void addRightHandSideContribution() = 0;
63 
65  virtual const MooseVariableBase & variable() const = 0;
66 
69  void linkTaggedVectorsAndMatrices(const std::set<TagID> & vector_tags,
70  const std::set<TagID> & matrix_tags);
71 
72 protected:
75 
78 
81 
83  const THREAD_ID _tid;
84 
87 
89  std::vector<NumericVector<Number> *> _vectors;
90 
92  std::vector<SparseMatrix<Number> *> _matrices;
93 };
Interface for objects that need parallel consistent random numbers without patterns over the course o...
virtual const MooseVariableBase & variable() const =0
Returns base class reference of the variable that this object operates on.
A class for creating restricted objects.
Definition: Restartable.h:28
libMesh::LinearImplicitSystem & _linear_system
Reference to the libmesh linear system this object contributes to.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class provides an interface for common operations on field variables of both FE and FV types wit...
void linkTaggedVectorsAndMatrices(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Function which sets up the vectors and matrices this kernel will contribute to.
Base class for a system (of equations)
Definition: SystemBase.h:84
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< NumericVector< Number > * > _vectors
Pointers to the vectors that need contributions from this kernel.
const THREAD_ID _tid
The thread ID for this object.
Interface for objects that needs transient capabilities.
Interface for notifications that the mesh has changed.
std::vector< SparseMatrix< Number > * > _matrices
Pointers to the matrices that need contributions from this kernel.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
Interface for objects that need to use UserObjects.
virtual void addRightHandSideContribution()=0
Add this object&#39;s contribution to the system right hand side.
MooseMesh & _mesh
Reference to the mesh object.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
virtual void addMatrixContribution()=0
Add this object&#39;s contribution to the system matrix.
This is the common base class for objects that give contributions to a linear system.
const InputParameters & parameters() const
Get the parameters of the object.
FEProblemBase & _fe_problem
Reference to this object&#39;s FEProblemBase.
SystemBase & _sys
Reference to the system this object contributes to.
Interface for objects that need to use functions.
Interface class for classes which interact with Postprocessors.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
LinearSystemContributionObject(const InputParameters &parameters)
Class constructor.