147 const Teuchos::ParameterList& pL = GetParameterList();
149 RCP<SmootherPrototype> preSmoother, postSmoother;
150 ParameterList preSmootherParams, postSmootherParams;
152 if ((preOrPost &
PRE) && !preSmootherPrototype_.is_null()) {
154 if (currentLevel.
IsAvailable(
"PreSmoother data",
this))
155 preSmoother = currentLevel.
Get<RCP<SmootherPrototype> >(
"PreSmoother data",
this);
157 preSmoother = preSmootherPrototype_->Copy();
160 if (!currentLevel.
GetComm().is_null())
161 oldRank = preSmoother->SetProcRankVerbose(currentLevel.
GetComm()->getRank());
163 preSmoother->Setup(currentLevel);
164 preSmootherParams = preSmoother->GetParameterList();
167 preSmoother->SetProcRankVerbose(oldRank);
169 currentLevel.
Set<RCP<SmootherBase> >(
"PreSmoother", preSmoother,
this);
171 if (pL.get<
bool>(
"keep smoother data"))
172 Set(currentLevel,
"PreSmoother data", preSmoother);
175 if ((preOrPost &
POST) && !postSmootherPrototype_.is_null()) {
176 if (preOrPost ==
BOTH && preSmootherPrototype_ == postSmootherPrototype_) {
179 postSmoother = preSmoother;
207 if (currentLevel.
IsAvailable(
"PostSmoother data",
this)) {
208 postSmoother = currentLevel.
Get<RCP<SmootherPrototype> >(
"PostSmoother data",
this);
213 postSmoother = postSmootherPrototype_->Copy();
217 if (!currentLevel.
GetComm().is_null())
218 oldRank = postSmoother->SetProcRankVerbose(GetProcRankVerbose());
220 postSmoother->Setup(currentLevel);
221 postSmootherParams = postSmoother->GetParameterList();
224 postSmoother->SetProcRankVerbose(oldRank);
227 currentLevel.
Set<RCP<SmootherBase> >(
"PostSmoother", postSmoother,
this);
229 if (pL.get<
bool>(
"keep smoother data"))
230 Set(currentLevel,
"PostSmoother data", postSmoother);
233 ParameterList& paramList =
const_cast<ParameterList&
>(this->GetParameterList());
234 if (postSmoother == preSmoother && !preSmoother.is_null()) {
235 paramList.sublist(
"smoother",
false) = preSmoother->GetParameterList();
238 if (!preSmoother.is_null())
239 paramList.sublist(
"presmoother",
false) = preSmootherParams;
241 if (!postSmoother.is_null())
242 paramList.sublist(
"postsmoother",
false) = postSmootherParams;
262 out0 <<
"PreSmoother : ";
263 if (preSmootherPrototype_.is_null()) {
264 out0 <<
"null" << std::endl;
266 Teuchos::OSTab tab2(out);
267 preSmootherPrototype_->describe(out, verbLevel);
270 out0 <<
"PostSmoother: ";
271 if (postSmootherPrototype_ == preSmootherPrototype_) { out0 <<
"same as PreSmoother" << std::endl; }
272 else if (postSmootherPrototype_ == Teuchos::null) { out0 <<
"null" << std::endl; }
274 Teuchos::OSTab tab2(out);
275 postSmootherPrototype_->describe(out, verbLevel);
276 out0 <<
"PostSmoother is different than PreSmoother (not the same object)" << std::endl;
280 if (verbLevel &
Debug) {
281 if (preSmootherPrototype_ != Teuchos::null || postSmootherPrototype_ != Teuchos::null) { out0 <<
"-" << std::endl; }
282 if (preSmootherPrototype_ != Teuchos::null) { out0 <<
"RCP<preSmootherPrototype_> : " << preSmootherPrototype_ << std::endl; }
283 if (postSmootherPrototype_ != Teuchos::null) { out0 <<
"RCP<postSmootherPrototype_>: " << postSmootherPrototype_ << std::endl; }
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access)....