https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
19#include "RandomInterface.h"
20#include "Restartable.h"
22#include "TaggingInterface.h"
23#include "SystemBase.h"
24
25#include "libmesh/linear_implicit_system.h"
26
27class FEProblemBase;
28class MooseMesh;
29class SubProblem;
32class InputParameters;
33
38 public SetupInterface,
39 public FunctionInterface,
41 public TransientInterface,
44 public RandomInterface,
45 public Restartable,
47 public TaggingInterface
48{
49public:
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
72protected:
75
78
81
84
87
89 std::vector<NumericVector<Number> *> _vectors;
90
92 std::vector<SparseMatrix<Number> *> _matrices;
93};
unsigned int THREAD_ID
Definition MooseTypes.h:237
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Interface for objects that need to use functions.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This is the common base class for objects that give contributions to a linear system.
std::vector< SparseMatrix< Number > * > _matrices
Pointers to the matrices that need contributions from this kernel.
const THREAD_ID _tid
The thread ID for this object.
virtual void addRightHandSideContribution()=0
Add this object's contribution to the system right hand side.
std::vector< NumericVector< Number > * > _vectors
Pointers to the vectors that need contributions from this kernel.
FEProblemBase & _fe_problem
Reference to this object's FEProblemBase.
SystemBase & _sys
Reference to the system this object contributes to.
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.
libMesh::LinearImplicitSystem & _linear_system
Reference to the libmesh linear system this object contributes to.
MooseMesh & _mesh
Reference to the mesh object.
virtual void addMatrixContribution()=0
Add this object's contribution to the system matrix.
virtual const MooseVariableBase & variable() const =0
Returns base class reference of the variable that this object operates on.
Interface for notifications that the mesh has changed.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
Base variable class.
This class provides an interface for common operations on field variables of both FE and FV types wit...
Interface class for classes which interact with Postprocessors.
Interface for objects that need parallel consistent random numbers without patterns over the course o...
A class for creating restricted objects.
Definition Restartable.h:29
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
Base class for a system (of equations)
Definition SystemBase.h:87
Interface for objects that needs transient capabilities.
Interface for objects that need to use UserObjects.