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"),
52 _sys(*getCheckedPointerParam<
SystemBase *>(
"_sys")),
55 _mesh(_subproblem.
mesh())
61 const std::set<TagID> & matrix_tags)
66 std::set<TagID> vector_intersection;
67 std::set_intersection(vector_tags.begin(),
71 std::inserter(vector_intersection, vector_intersection.begin()));
73 std::set<TagID> matrix_intersection;
74 std::set_intersection(matrix_tags.begin(),
78 std::inserter(matrix_intersection, matrix_intersection.begin()));
80 for (
const auto tag : vector_intersection)
83 for (
const auto tag : matrix_intersection)
Interface for objects that need parallel consistent random numbers without patterns over the course o...
A class for creating restricted objects.
Tnew cast_ref(Told &oldvar)
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
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.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
static InputParameters validParams()
Base class for a system (of equations)
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.
Interface for objects that needs transient capabilities.
static InputParameters validParams()
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.
static InputParameters validParams()
Interface for objects that need to use UserObjects.
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
const std::set< TagID > & getMatrixTags(MatrixTagsKey) const
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
static InputParameters validParams()
static InputParameters validParams()
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
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.
const std::set< TagID > & getVectorTags(VectorTagsKey) const
LinearSystemContributionObject(const InputParameters ¶meters)
Class constructor.