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 (unsigned int 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 45 of file JvarMapInterface.h.

Constructor & Destructor Documentation

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

Definition at line 122 of file JvarMapInterface.h.

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

Member Function Documentation

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

Definition at line 141 of file JvarMapInterface.h.

142 {
143  // the Kernel is not coupled to the variable; no need to loop over QPs
144  if (this->_jvar_map[jvar] < 0)
145  return;
146 
147  // call the underlying class' off-diagonal Jacobian
148  T::computeJacobianBlock(jvar);
149 }
std::vector< int > _jvar_map
look-up table to determine the _coupled_moose_vars index for the jvar parameter
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 105 of file JvarMapInterface.h.

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