Example #1
0
VariableSecond &
Coupleable::coupledSecondOld(const std::string & var_name, unsigned int comp)
{
  coupledCallback(var_name, true);
  if (_nodal)
    mooseError("Nodal variables do not have second derivatives");

  validateExecutionerType(var_name);
  MooseVariable * var = getVar(var_name, comp);
  return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
}
Example #2
0
const VariableSecond &
Coupleable::coupledSecondOld(const std::string & var_name, unsigned int comp)
{
  if (!isCoupled(var_name)) // Return default 0
    return _default_second;

  coupledCallback(var_name, true);
  if (_nodal)
    mooseError("Nodal variables do not have second derivatives");

  validateExecutionerType(var_name);
  MooseVariable * var = getVar(var_name, comp);
  if (!_coupleable_neighbor)
    return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
  else
    return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
}