const DenseVector<Number> &
NeighborCoupleable::coupledNeighborSolutionDoFs(const std::string & var_name, unsigned int comp)
{
  if (_neighbor_nodal)
    mooseError("nodal objects should not call coupledSolutionDoFs");

  MooseVariable * var = getVar(var_name, comp);
  return (_c_is_implicit) ? var->solutionDoFsNeighbor() : var->solutionDoFsOldNeighbor();
}
Example #2
0
const DenseVector<Number> &
Coupleable::coupledSolutionDoFs(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 coupledSolutionDoFs");

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

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

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