16 #include "libmesh/system.h" 28 params.
set<
bool>(
"matrix_only") =
true;
37 params.
addParam<MaterialPropertyName>(
"density", 1,
"The material property defining the density");
42 :
Kernel(parameters), _density(getMaterialProperty<
Real>(
"density"))
45 mooseError(
"One of 'matrix_tags' or 'extra_matrix_tags' must be provided");
48 cast_ref<NonlinearSystemBase &>(
_sys).getPreconditioner()) &&
50 mooseError(
"Elemental mass matrices likely don't make sense when using static condensation");
56 mooseError(
"Residual should not be calculated for the MassMatrix kernel");
static void setMassMatrixParams(InputParameters ¶ms)
static InputParameters validParams()
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
bool has_static_condensation() const
SystemBase & _sys
Reference to the EquationSystem object.
virtual Real computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
registerMooseObject("MooseApp", MassMatrix)
const MaterialProperty< Real > & _density
The density of the material.
const VariableTestValue & _test
the current test function
libMesh::FEContinuity getContinuity() const override
Return the continuity of this variable.
unsigned int _i
current index for the test function
MassMatrix(const InputParameters ¶meters)
unsigned int _j
current index for the shape function
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Static condensation preconditioner.
Computes a finite element mass matrix.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
const VariablePhiValue & _phi
the current shape functions
static InputParameters validParams()
unsigned int _qp
The current quadrature point index.