const VariableValue & Coupleable::coupledValueOld(const std::string & var_name, unsigned int comp) { if (!isCoupled(var_name)) return *getDefaultValue(var_name); validateExecutionerType(var_name); coupledCallback(var_name, true); MooseVariable * var = getVar(var_name, comp); if (!_coupleable_neighbor) { if (_nodal) return (_c_is_implicit) ? var->nodalSlnOld() : var->nodalSlnOlder(); else return (_c_is_implicit) ? var->slnOld() : var->slnOlder(); } else { if (_nodal) return (_c_is_implicit) ? var->nodalSlnOldNeighbor() : var->nodalSlnOlderNeighbor(); else return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor(); } }
const VariableValue & NeighborCoupleable::coupledNeighborValueOld(const std::string & var_name, unsigned int comp) { validateExecutionerType(var_name, "coupledNeighborValueOld"); MooseVariable * var = getVar(var_name, comp); if (_neighbor_nodal) return (_c_is_implicit) ? var->nodalValueOldNeighbor() : var->nodalValueOlderNeighbor(); else return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor(); }
const VariableValue & Coupleable::coupledValueOlder(const std::string & var_name, unsigned int comp) { if (!isCoupled(var_name)) return *getDefaultValue(var_name); validateExecutionerType(var_name); coupledCallback(var_name, true); MooseVariable * var = getVar(var_name, comp); if (!_coupleable_neighbor) { if (_nodal) { if (_c_is_implicit) return var->nodalSlnOlder(); else mooseError("Older values not available for explicit schemes"); } else { if (_c_is_implicit) return var->slnOlder(); else mooseError("Older values not available for explicit schemes"); } } else { if (_nodal) { if (_c_is_implicit) return var->nodalSlnOlderNeighbor(); else mooseError("Older values not available for explicit schemes"); } else { if (_c_is_implicit) return var->slnOlderNeighbor(); else mooseError("Older values not available for explicit schemes"); } } }
const VariableValue & NeighborCoupleable::coupledNeighborValueOlder(const std::string & var_name, unsigned int comp) { validateExecutionerType(var_name, "coupledNeighborValueOlder"); MooseVariable * var = getVar(var_name, comp); if (_neighbor_nodal) { if (_c_is_implicit) return var->nodalValueOlderNeighbor(); else mooseError("Older values not available for explicit schemes"); } else { if (_c_is_implicit) return var->slnOlderNeighbor(); else mooseError("Older values not available for explicit schemes"); } }