13#include "libmesh/linear_implicit_system.h"
25 auto & vector_tag_enum = params.set<
MultiMooseEnum>(
"vector_tags",
true);
26 vector_tag_enum = vtags;
28 params.addRequiredParam<LinearVariableName>(
29 "variable",
"The name of the variable whose linear system this object contributes to");
31 params.declareControllable(
"enable");
32 params.set<
bool>(
"_residual_object") =
false;
45 *parameters.getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base"),
51 _fe_problem(*parameters.get<
FEProblemBase *>(
"_fe_problem_base")),
52 _sys(*getCheckedPointerParam<
SystemBase *>(
"_sys")),
53 _linear_system(
libMesh::cast_ref<
libMesh::LinearImplicitSystem &>(_sys.system())),
55 _mesh(_subproblem.
mesh())
61 const std::set<TagID> & matrix_tags)
66 std::set<TagID> vector_intersection;
67 std::set_intersection(vector_tags.begin(),
69 this->getVectorTags({}).begin(),
70 this->getVectorTags({}).end(),
71 std::inserter(vector_intersection, vector_intersection.begin()));
73 std::set<TagID> matrix_intersection;
74 std::set_intersection(matrix_tags.begin(),
76 this->getMatrixTags({}).begin(),
77 this->getMatrixTags({}).end(),
78 std::inserter(matrix_intersection, matrix_intersection.begin()));
80 for (
const auto tag : vector_intersection)
83 for (
const auto tag : matrix_intersection)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Interface for objects that need to use functions.
std::vector< SparseMatrix< Number > * > _matrices
Pointers to the matrices that need contributions from this kernel.
static InputParameters validParams()
std::vector< NumericVector< Number > * > _vectors
Pointers to the vectors that need contributions from this kernel.
LinearSystemContributionObject(const InputParameters ¶meters)
Class constructor.
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.
Interface for notifications that the mesh has changed.
static InputParameters validParams()
Every object that can be built by the factory should be derived from this class.
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
Interface class for classes which interact with Postprocessors.
Interface for objects that need parallel consistent random numbers without patterns over the course o...
static InputParameters validParams()
A class for creating restricted objects.
Base class for a system (of equations)
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
static InputParameters validParams()
Interface for objects that needs transient capabilities.
static InputParameters validParams()
Interface for objects that need to use UserObjects.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...