Example #1
0
const DenseVector<Number> &
Coupleable::coupledSolutionDoFsOld(const std::string & var_name, unsigned int comp)
{
  // default coupling is not available for elemental solutions
  if (!isCoupled(var_name))
    mooseError("invalid variable name for coupledSolutionDoFsOld");

  if (_nodal)
    mooseError("nodal objects should not call coupledSolutionDoFsOld");

  validateExecutionerType(var_name);
  coupledCallback(var_name, true);
  MooseVariable * var = getVar(var_name, comp);

  if (!_coupleable_neighbor)
    return (_c_is_implicit) ? var->solutionDoFsOld() : var->solutionDoFsOlder();
  else
    return (_c_is_implicit) ? var->solutionDoFsOldNeighbor() : var->solutionDoFsOlderNeighbor();
}