const DenseVector<Number> & NeighborCoupleable::coupledNeighborSolutionDoFsOld(const std::string & var_name, unsigned int comp) { if (_neighbor_nodal) mooseError("nodal objects should not call coupledSolutionDoFsOld"); validateExecutionerType(var_name, "coupledNeighborSolutionDoFsOld"); MooseVariable * var = getVar(var_name, comp); return (_c_is_implicit) ? var->solutionDoFsOldNeighbor() : var->solutionDoFsOlderNeighbor(); }
const DenseVector<Number> & NeighborCoupleable::coupledNeighborSolutionDoFsOlder(const std::string & var_name, unsigned int comp) { if (_neighbor_nodal) mooseError("nodal objects should not call coupledSolutionDoFsOlder"); validateExecutionerType(var_name, "coupledNeighborSolutionDoFsOlder"); MooseVariable * var = getVar(var_name, comp); if (_c_is_implicit) return var->solutionDoFsOlderNeighbor(); else mooseError("Older values not available for explicit schemes"); }
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(); }