www.mooseframework.org
Public Member Functions | List of all members
JvarMapIntegratedBCInterface< T > Class Template Reference

Interface class ("Veneer") for IntegratedBC to provide a mapping from 'jvar' in computeJacobianBlock into the _coupled_moose_vars array. More...

#include <JvarMapInterface.h>

Inheritance diagram for JvarMapIntegratedBCInterface< T >:
[legend]

Public Member Functions

 JvarMapIntegratedBCInterface (const InputParameters &parameters)
 
virtual void computeJacobianBlock (MooseVariableFEBase &jvar) override
 
unsigned int mapJvarToCvar (unsigned int jvar)
 Return index into the _coupled_moose_vars array for a given jvar. More...
 
bool mapJvarToCvar (unsigned int jvar, unsigned int &cvar)
 Set the cvar value to the mapped jvar value and return true if the mapping exists. More...
 

Detailed Description

template<class T>
class JvarMapIntegratedBCInterface< T >

Interface class ("Veneer") for IntegratedBC to provide a mapping from 'jvar' in computeJacobianBlock into the _coupled_moose_vars array.

This class is useful in conjunction with DerivativeMaterialInterface, where vectors of material property derviatives with respect to all coupled variables (iterating over _coupled_moose_vars array) are generated. The mapping enabled the look up of the correct material property derivatives for the current jvar.

Definition at line 49 of file JvarMapInterface.h.

Constructor & Destructor Documentation

◆ JvarMapIntegratedBCInterface()

template<class T >
JvarMapIntegratedBCInterface< T >::JvarMapIntegratedBCInterface ( const InputParameters parameters)

Definition at line 126 of file JvarMapInterface.h.

127  : JvarMapInterfaceBase<T>(parameters)
128 {
129 }
Base class ("Veneer") that implements the actual mapping from &#39;jvar&#39; in into the _coupled_moose_vars ...

Member Function Documentation

◆ computeJacobianBlock()

template<class T >
void JvarMapIntegratedBCInterface< T >::computeJacobianBlock ( MooseVariableFEBase jvar)
overridevirtual

Definition at line 145 of file JvarMapInterface.h.

146 {
147  // the Kernel is not coupled to the variable; no need to loop over QPs
148  if (this->_jvar_map[jvar.number()] < 0)
149  return;
150 
151  // call the underlying class' off-diagonal Jacobian
152  T::computeJacobianBlock(jvar);
153 }
unsigned int number() const
Get variable number coming from libMesh.
std::vector< int > _jvar_map
look-up table to determine the _coupled_moose_vars index for the jvar parameter

◆ mapJvarToCvar() [1/2]

template<class T >
unsigned int JvarMapInterfaceBase< T >::mapJvarToCvar ( unsigned int  jvar)
inherited

Return index into the _coupled_moose_vars array for a given jvar.

Definition at line 109 of file JvarMapInterface.h.

110 {
111  mooseAssert(jvar < _jvar_map.size(),
112  "Calling mapJvarToCvar for an invalid Moose variable number. Maybe an AuxVariable?");
113  int cit = _jvar_map[jvar];
114 
115  mooseAssert(cit >= 0, "Calling mapJvarToCvar for a variable not coupled to this kernel.");
116  return cit;
117 }
std::vector< int > _jvar_map
look-up table to determine the _coupled_moose_vars index for the jvar parameter

◆ mapJvarToCvar() [2/2]

template<class T>
bool JvarMapInterfaceBase< T >::mapJvarToCvar ( unsigned int  jvar,
unsigned int &  cvar 
)
inherited

Set the cvar value to the mapped jvar value and return true if the mapping exists.

Otherwise return false.

Parameters
[in]jvarVariable number passed as argument to computeQpOffDiagJacobian
[out]cvarCorresponding index into the _coupled_moose_vars array
Returns
true if the requested variable is coupled, false otherwise

The documentation for this class was generated from the following file: