117 auto params = T::validParams();
118 params.addCoupledVar(
"coupled_variables",
119 "Vector of nonlinear variable arguments this object depends on");
127 _n_args(this->_coupled_standard_moose_vars.size()),
134 auto number = it.value()->number();
150 "Calling mapJvarToCvar for an invalid Moose variable number. Maybe an AuxVariable?");
153 mooseAssert(cit >= 0,
"Calling mapJvarToCvar for a variable not coupled to this kernel.");
162 "Calling mapJvarToCvar for an invalid Moose variable number. Maybe an AuxVariable?");
163 return jvar_map[jvar];
174 const auto num = this->coupledComponents(parameter_name);
175 for (std::size_t i = 0; i < num; ++i)
177 const auto number = this->getVar(parameter_name, i)->number();
181 jvar_map[number] = i;
208 T::computeOffDiagJacobian(jvar);
220 T::computeOffDiagJacobian(jvar);
Interface class ("Veneer") for IntegratedBC to provide a mapping from 'jvar' in computeJacobianBlock ...
JvarMapIntegratedBCInterface(const InputParameters ¶meters)
virtual void computeOffDiagJacobian(unsigned int jvar) override
Base class ("Veneer") that implements the actual mapping from 'jvar' in into the _coupled_moose_vars ...
const unsigned int _n_args
number of coupled moose variables
const JvarMap & getParameterJvarMap(std::string parameter_name)
Make a specific map for a given parameter name representing a couple variable (vector)
static InputParameters validParams()
JvarMap _jvar_map
look-up table to determine the _coupled_moose_vars index for the jvar parameter
int mapJvarToCvar(unsigned int jvar, const JvarMap &jvar_map)
Return an index into a specific coupled variable vector for a given jvar.
bool mapJvarToCvar(unsigned int jvar, unsigned int &cvar)
Set the cvar value to the mapped jvar value and return true if the mapping exists.
std::vector< int > JvarMap
std::map< std::string, JvarMap > _jvar_local_map
map of local look-up tables for specific parameters
const std::size_t _jvar_max_size
number of nonlinear variables in the system
const JvarMap & getJvarMap()
Obtain the map connecting libmesh variable ID number to its position in the _coupled_moose_vars vecto...
JvarMapInterfaceBase(const InputParameters ¶meters)
unsigned int mapJvarToCvar(unsigned int jvar)
Return index into the _coupled_moose_vars array for a given jvar.
Interface class ("Veneer") for Kernel to provide a mapping from 'jvar' in computeQpOffDiagJacobian in...
JvarMapKernelInterface(const InputParameters ¶meters)
virtual void computeOffDiagJacobian(unsigned int jvar) override
_enumerate_range< Iterator > enumerate(Iterator first, Iterator last, typename std::iterator_traits< Iterator >::difference_type initial)
Enumerate function for iterating over a range and obtaining both a reference to the underlying type a...