MueLu  Version of the Day
MueLu_Facade_BGS2x2_def.hpp
Go to the documentation of this file.
1 // @HEADER
2 //
3 // ***********************************************************************
4 //
5 // MueLu: A package for multigrid based preconditioning
6 // Copyright 2012 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact
39 // Jonathan Hu (jhu@sandia.gov)
40 // Andrey Prokopenko (aprokop@sandia.gov)
41 // Ray Tuminaro (rstumin@sandia.gov)
42 // Tobias Wiesner (tawiesn@sandia.gov)
43 //
44 // ***********************************************************************
45 //
46 // @HEADER
47 #ifndef PACKAGES_MUELU_SRC_INTERFACE_FACADECLASSES_BGS2x2_DEF_HPP_
48 #define PACKAGES_MUELU_SRC_INTERFACE_FACADECLASSES_BGS2x2_DEF_HPP_
49 
52 
53 
54 #include "MueLu_Exceptions.hpp"
55 
57 
58 namespace MueLu {
59 
60  template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
62  }
63 
64 
65  template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
67 
68  // obtain ParameterList with default input parameters for this facade class
70  Teuchos::RCP<ParameterList> defaultList = Teuchos::getParametersFromXmlString(defaultString);
71 
72  // validate user input parameters (and set defaults if necessary)
73  Teuchos::ParameterList inputParameters = paramList;
74  inputParameters.validateParametersAndSetDefaults(*defaultList);
75 
76  TEUCHOS_TEST_FOR_EXCEPTION(inputParameters.get<std::string>("MueLu preconditioner") == "undefined", MueLu::Exceptions::RuntimeError, "FacadeBGS2x2: undefined MueLu preconditioner. Set the \"MueLu preconditioner\" parameter correctly in your input file.");
77 
78  // create copy of template string which is updated with in-place string replacements
80 
81  // logical code for more complicated distinctions
82 
83 
84 
85 
86  std::string smoother1 = inputParameters.get<std::string>("Block 1: smoother");
87  if(smoother1 == "ILU") {
88  this->ReplaceString(finalString, "XYZSmoother1XYZ", "mySmooILUFact1");
89  } else if (smoother1 == "Symmetric Gauss-Seidel" || smoother1 == "SGS") {
90  this->ReplaceString(finalString, "XXXBlock 1: relaxation: typeYYY", "Symmetric Gauss-Seidel");
91  this->ReplaceString(finalString, "XYZSmoother1XYZ", "mySmooFact1");
92  } else if (smoother1 == "Symmetric Gauss-Seidel" || smoother1 == "GS") {
93  this->ReplaceString(finalString, "XXXBlock 1: relaxation: typeYYY", "Gauss-Seidel");
94  this->ReplaceString(finalString, "XYZSmoother1XYZ", "mySmooFact1");
95  } else if (smoother1 == "Jacobi") {
96  this->ReplaceString(finalString, "XXXBlock 1: relaxation: typeYYY", "Jacobi");
97  this->ReplaceString(finalString, "XYZSmoother1XYZ", "mySmooFact1");
98  } else if (smoother1 == "Direct") {
99  this->ReplaceString(finalString, "XYZSmoother1XYZ", "mySmooDirectFact1");
100  } else {
101  this->GetOStream(Errors) << "Invalid smoother type for block 1: " << smoother1 << ". Valid options are: \"SGS\", \"GS\", \"Jacobi\", \"ILU\" or \"Direct\"." << std::endl;
102  }
103 
104  std::string smoother2 = inputParameters.get<std::string>("Block 2: smoother");
105  if(smoother2 == "ILU") {
106  this->ReplaceString(finalString, "XYZSmoother2XYZ", "mySmooILUFact2");
107  } else if (smoother2 == "Symmetric Gauss-Seidel" || smoother2 == "SGS") {
108  this->ReplaceString(finalString, "XXXBlock 2: relaxation: typeYYY", "Symmetric Gauss-Seidel");
109  this->ReplaceString(finalString, "XYZSmoother2XYZ", "mySmooFact2");
110  } else if (smoother2 == "Symmetric Gauss-Seidel" || smoother2 == "GS") {
111  this->ReplaceString(finalString, "XXXBlock 2: relaxation: typeYYY", "Gauss-Seidel");
112  this->ReplaceString(finalString, "XYZSmoother2XYZ", "mySmooFact2");
113  } else if (smoother2 == "Jacobi") {
114  this->ReplaceString(finalString, "XXXBlock 2: relaxation: typeYYY", "Gauss-Seidel");
115  this->ReplaceString(finalString, "XYZSmoother2XYZ", "mySmooFact2");
116  } else if (smoother2 == "Direct") {
117  this->ReplaceString(finalString, "XYZSmoother2XYZ", "mySmooDirectFact2");
118  } else {
119  this->GetOStream(Errors) << "Invalid smoother type for block 2: " << smoother2 << ". Valid options are: \"SGS\", \"GS\", \"Jacobi\", \"ILU\" or \"Direct\"." << std::endl;
120  }
121 
122  if(inputParameters.get<bool>("Block 1: transfer smoothing") == true) {
123  this->ReplaceString(finalString, "XXXBlock 1: prolongatorYYY", "myPFact1");
124  this->ReplaceString(finalString, "XXXBlock 1: restrictor YYY", "myRFact1");
125  } else {
126  this->ReplaceString(finalString, "XXXBlock 1: prolongatorYYY", "myTentativePFact1");
127  this->ReplaceString(finalString, "XXXBlock 1: restrictor YYY", "myTransPFact1");
128  }
129  if(inputParameters.get<bool>("Block 2: transfer smoothing") == true) {
130  this->ReplaceString(finalString, "XXXBlock 2: prolongatorYYY", "myPFact2");
131  this->ReplaceString(finalString, "XXXBlock 2: restrictor YYY", "myRFact2");
132  } else {
133  this->ReplaceString(finalString, "XXXBlock 2: prolongatorYYY", "myTentativePFact2");
134  this->ReplaceString(finalString, "XXXBlock 2: restrictor YYY", "myTransPFact2");
135  }
136  // end logical code
137 
138  // loop over all input parameters
139  for(Teuchos::ParameterList::ConstIterator it = inputParameters.begin(); it != inputParameters.end(); it++) {
140  // form replacement string
141  std::string par_name = inputParameters.name(it);
142  std::stringstream ss;
143  ss << "XXX" << par_name << "YYY";
144 
145  // update final string with parameters
146  Teuchos::ParameterEntry par_entry = inputParameters.entry(it);
147  this->ReplaceString(finalString,
148  ss.str(), Teuchos::toString(par_entry.getAny()));
149  }
150 
151  Teuchos::RCP<ParameterList> ret = Teuchos::getParametersFromXmlString(finalString);
152  return ret;
153  }
154 
155  // Note all parameters are of type string (we use it for string replacement)
156  template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
158 "<ParameterList name=\"Input\">"
159 "<Parameter name=\"MueLu preconditioner\" type=\"string\" value=\"undefined\"/>"
160 "<Parameter name=\"Block 1: dofs per node\" type=\"int\" value=\"1\"/>"
161  "<Parameter name=\"Block 2: dofs per node\" type=\"int\" value=\"1\"/>"
162  "<Parameter name=\"Block 1: smoother\" type=\"string\" value=\"Symmetric Gauss-Seidel\"/>"
163  "<Parameter name=\"Block 1: level-of-fill\" type=\"int\" value=\"0\"/>"
164  "<Parameter name=\"Block 1: relaxation: sweeps\" type=\"int\" value=\"1\"/>"
165  "<Parameter name=\"Block 1: relaxation: damping factor\" type=\"double\" value=\"1.0\"/>"
166  "<Parameter name=\"Block 1: transfer smoothing\" type=\"bool\" value=\"true\"/>"
167  "<Parameter name=\"Block 2: smoother\" type=\"string\" value=\"Symmetric Gauss-Seidel\"/>"
168  "<Parameter name=\"Block 2: level-of-fill\" type=\"int\" value=\"0\"/>"
169  "<Parameter name=\"Block 2: relaxation: sweeps\" type=\"int\" value=\"1\"/>"
170  "<Parameter name=\"Block 2: relaxation: damping factor\" type=\"double\" value=\"1.0\"/>"
171  "<Parameter name=\"Block 2: transfer smoothing\" type=\"bool\" value=\"true\"/>"
172  "<Parameter name=\"BGS: damping factor\" type=\"double\" value=\"1.0\"/>"
173  "<Parameter name=\"max levels\" type=\"int\" value=\"5\"/>"
174  "<Parameter name=\"coarse: max size\" type=\"int\" value=\"25000\"/>"
175  "<Parameter name=\"verbosity\" type=\"string\" value=\"High\"/>"
176  "</ParameterList>"
177 ;
178  // template string for preconditioner layout (factory based parameters)
179  template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
181 
182 "<ParameterList name=\"MueLu\">"
183 " <ParameterList name=\"Factories\">"
184 " <ParameterList name=\"mySubBlockAFactory1\">"
185 " <Parameter name=\"factory\" type=\"string\" value=\"SubBlockAFactory\"/>"
186 " <Parameter name=\"block row\" type=\"int\" value=\"0\"/>"
187 " <Parameter name=\"block col\" type=\"int\" value=\"0\"/>"
188 " <Parameter name=\"Range map: Striding info\" type=\"string\" value=\"{ XXXBlock 1: dofs per nodeYYY }\"/>"
189 " <Parameter name=\"Domain map: Striding info\" type=\"string\" value=\"{ XXXBlock 1: dofs per nodeYYY }\"/>"
190 " </ParameterList>"
191 ""
192 " <ParameterList name=\"myAggFact1\">"
193 " <Parameter name=\"factory\" type=\"string\" value=\"UncoupledAggregationFactory\"/>"
194 " <Parameter name=\"aggregation: min agg size\" type=\"int\" value=\"5\"/>"
195 " <Parameter name=\"aggregation: max selected neighbors\" type=\"int\" value=\"1\"/>"
196 " </ParameterList>"
197 ""
198 " <!-- tell the tenative prolongator that we have 2 DOFs per node on the coarse levels -->"
199 " <ParameterList name=\"myCoarseMap1\">"
200 " <Parameter name=\"factory\" type=\"string\" value=\"CoarseMapFactory\"/>"
201 " <Parameter name=\"Striding info\" type=\"string\" value=\"{ XXXBlock 1: dofs per nodeYYY }\"/>"
202 " <Parameter name=\"Strided block id\" type=\"int\" value=\"-1\"/>"
203 " </ParameterList>"
204 ""
205 " <ParameterList name=\"myTentativePFact1\">"
206 " <Parameter name=\"factory\" type=\"string\" value=\"TentativePFactory\"/>"
207 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory1\"/>"
208 " <Parameter name=\"Aggregates\" type=\"string\" value=\"myAggFact1\"/>"
209 " <Parameter name=\"CoarseMap\" type=\"string\" value=\"myCoarseMap1\"/>"
210 " </ParameterList>"
211 ""
212 " <ParameterList name=\"myPFact1\">"
213 " <Parameter name=\"factory\" type=\"string\" value=\"PgPFactory\"/>"
214 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory1\"/>"
215 " <Parameter name=\"P\" type=\"string\" value=\"myTentativePFact1\"/>"
216 " </ParameterList>"
217 ""
218 " <ParameterList name=\"myRFact1\">"
219 " <Parameter name=\"factory\" type=\"string\" value=\"GenericRFactory\"/>"
220 " <Parameter name=\"P\" type=\"string\" value=\"myPFact1\"/>"
221 " </ParameterList>"
222 ""
223 " <!-- We have to use Nullspace1 here. If \"Nullspace1\" is not set the"
224 " Factory creates the default null space containing of constant"
225 " vectors -->"
226 " <ParameterList name=\"myNspFact1\">"
227 " <Parameter name=\"factory\" type=\"string\" value=\"NullspaceFactory\"/>"
228 " <Parameter name=\"Fine level nullspace\" type=\"string\" value=\"Nullspace1\"/>"
229 " <Parameter name=\"Nullspace1\" type=\"string\" value=\"myTentativePFact1\"/>"
230 " </ParameterList>"
231 ""
232 " <!-- BLOCK 2 (for submatrix A_{11}) PRESSURE PART -->"
233 " <ParameterList name=\"mySubBlockAFactory2\">"
234 " <Parameter name=\"factory\" type=\"string\" value=\"SubBlockAFactory\"/>"
235 " <Parameter name=\"block row\" type=\"int\" value=\"1\"/>"
236 " <Parameter name=\"block col\" type=\"int\" value=\"1\"/>"
237 " <Parameter name=\"Range map: Striding info\" type=\"string\" value=\"{ XXXBlock 2: dofs per nodeYYY }\"/>"
238 " <Parameter name=\"Domain map: Striding info\" type=\"string\" value=\"{ XXXBlock 2: dofs per nodeYYY }\"/>"
239 " </ParameterList>"
240 ""
241 " <!-- tell the tenative prolongator that we have 2 DOFs per node on the coarse levels -->"
242 " <ParameterList name=\"myCoarseMap2\">"
243 " <Parameter name=\"factory\" type=\"string\" value=\"CoarseMapFactory\"/>"
244 " <Parameter name=\"Striding info\" type=\"string\" value=\"{ XXXBlock 2: dofs per nodeYYY }\"/>"
245 " <Parameter name=\"Strided block id\" type=\"int\" value=\"-1\"/>"
246 " </ParameterList>"
247 ""
248 " <ParameterList name=\"myTentativePFact2\">"
249 " <Parameter name=\"factory\" type=\"string\" value=\"TentativePFactory\"/>"
250 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory2\"/>"
251 " <Parameter name=\"Aggregates\" type=\"string\" value=\"myAggFact1\"/>"
252 " <Parameter name=\"CoarseMap\" type=\"string\" value=\"myCoarseMap2\"/>"
253 " </ParameterList>"
254 ""
255 " <ParameterList name=\"myPFact2\">"
256 " <Parameter name=\"factory\" type=\"string\" value=\"SaPFactory\"/>"
257 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory2\"/>"
258 " <Parameter name=\"P\" type=\"string\" value=\"myTentativePFact2\"/>"
259 " </ParameterList>"
260 ""
261 " <ParameterList name=\"myRFact2\">"
262 " <Parameter name=\"factory\" type=\"string\" value=\"TransPFactory\"/>"
263 " <Parameter name=\"P\" type=\"string\" value=\"myPFact2\"/>"
264 " </ParameterList>"
265 ""
266 " <ParameterList name=\"myNspFact2\">"
267 " <Parameter name=\"factory\" type=\"string\" value=\"NullspaceFactory\"/>"
268 " <Parameter name=\"Fine level nullspace\" type=\"string\" value=\"Nullspace2\"/>"
269 " <Parameter name=\"Nullspace2\" type=\"string\" value=\"myTentativePFact2\"/>"
270 " </ParameterList>"
271 ""
272 " <!-- FACTORY MANAGERS -->"
273 ""
274 " <!-- Multigrid setup for velocity block (A_{00}) -->"
275 " <ParameterList name=\"myFirstGroup\">"
276 " <Parameter name=\"group\" type=\"string\" value=\"FactoryManager\"/>"
277 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory1\"/>"
278 " <Parameter name=\"P\" type=\"string\" value=\"myPFact1\"/>"
279 " <Parameter name=\"R\" type=\"string\" value=\"myRFact1\"/>"
280 " <Parameter name=\"Aggregates\" type=\"string\" value=\"myAggFact1\"/>"
281 " <Parameter name=\"Nullspace\" type=\"string\" value=\"myNspFact1\"/>"
282 " <Parameter name=\"CoarseMap\" type=\"string\" value=\"myCoarseMap1\"/>"
283 " </ParameterList>"
284 ""
285 " <!-- Multigrid setup for pressure block (A_{11}) -->"
286 " <ParameterList name=\"mySecondGroup\">"
287 " <Parameter name=\"group\" type=\"string\" value=\"FactoryManager\"/>"
288 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory2\"/>"
289 " <Parameter name=\"P\" type=\"string\" value=\"myPFact2\"/>"
290 " <Parameter name=\"R\" type=\"string\" value=\"myRFact2\"/>"
291 " <Parameter name=\"Aggregates\" type=\"string\" value=\"myAggFact1\"/><!-- reuse aggs from PRESSURE block! -->"
292 " <Parameter name=\"Nullspace\" type=\"string\" value=\"myNspFact2\"/>"
293 " <Parameter name=\"CoarseMap\" type=\"string\" value=\"myCoarseMap2\"/>"
294 " </ParameterList>"
295 ""
296 " <!-- BLOCK TRANSFER operators -->"
297 ""
298 " <ParameterList name=\"myBlockedPFact\">"
299 " <Parameter name=\"factory\" type=\"string\" value=\"BlockedPFactory\"/>"
300 " <!-- factory manager for block 1 -->"
301 " <ParameterList name=\"block1\">"
302 " <Parameter name=\"group\" type=\"string\" value=\"myFirstGroup\"/>"
303 " </ParameterList>"
304 " <!-- factory manager for block 2 -->"
305 " <ParameterList name=\"block2\">"
306 " <Parameter name=\"group\" type=\"string\" value=\"mySecondGroup\"/>"
307 " </ParameterList>"
308 " </ParameterList>"
309 ""
310 " <ParameterList name=\"myBlockedRFact\">"
311 " <Parameter name=\"factory\" type=\"string\" value=\"GenericRFactory\"/>"
312 " <Parameter name=\"P\" type=\"string\" value=\"myBlockedPFact\"/>"
313 " </ParameterList>"
314 ""
315 " <ParameterList name=\"myBlockedRAPFact\">"
316 " <Parameter name=\"factory\" type=\"string\" value=\"BlockedRAPFactory\"/>"
317 " <Parameter name=\"P\" type=\"string\" value=\"myBlockedPFact\"/>"
318 " <Parameter name=\"R\" type=\"string\" value=\"myBlockedRFact\"/>"
319 " </ParameterList>"
320 ""
321 " <!-- BLOCK SMOOTHERS -->"
322 " <ParameterList name=\"mySmooFact1\">"
323 " <Parameter name=\"factory\" type=\"string\" value=\"TrilinosSmoother\"/>"
324 " <Parameter name=\"type\" type=\"string\" value=\"RELAXATION\"/>"
325 " <ParameterList name=\"ParameterList\">"
326 " <Parameter name=\"relaxation: type\" type=\"string\" value=\"XXXBlock 1: relaxation: typeYYY\"/>"
327 " <Parameter name=\"relaxation: sweeps\" type=\"int\" value=\"XXXBlock 1: relaxation: sweepsYYY\"/>"
328 " <Parameter name=\"relaxation: damping factor\" type=\"double\" value=\"XXXBlock 1: relaxation: damping factorYYY\"/>"
329 " </ParameterList>"
330 " </ParameterList>"
331 ""
332 " <ParameterList name=\"mySmooILUFact1\">"
333 " <Parameter name=\"factory\" type=\"string\" value=\"TrilinosSmoother\"/>"
334 " <Parameter name=\"type\" type=\"string\" value=\"ILU\"/>"
335 " <ParameterList name=\"ParameterList\">"
336 " <Parameter name=\"fact: level-of-fill\" type=\"int\" value=\"XXXBlock 1: level-of-fillYYY\"/>"
337 " </ParameterList>"
338 " </ParameterList>"
339 ""
340 " <ParameterList name=\"mySmooDirectFact1\">"
341 " <Parameter name=\"factory\" type=\"string\" value=\"DirectSolver\"/>"
342 " </ParameterList>"
343 ""
344 " <ParameterList name=\"mySmooFact2\">"
345 " <Parameter name=\"factory\" type=\"string\" value=\"TrilinosSmoother\"/>"
346 " <Parameter name=\"type\" type=\"string\" value=\"RELAXATION\"/>"
347 " <ParameterList name=\"ParameterList\">"
348 " <Parameter name=\"relaxation: type\" type=\"string\" value=\"XXXBlock 2: relaxation: typeYYY\"/>"
349 " <Parameter name=\"relaxation: sweeps\" type=\"int\" value=\"XXXBlock 2: relaxation: sweepsYYY\"/>"
350 " <Parameter name=\"relaxation: damping factor\" type=\"double\" value=\"XXXBlock 2: relaxation: damping factorYYY\"/>"
351 " </ParameterList>"
352 " </ParameterList>"
353 ""
354 " <ParameterList name=\"mySmooILUFact2\">"
355 " <Parameter name=\"factory\" type=\"string\" value=\"TrilinosSmoother\"/>"
356 " <Parameter name=\"type\" type=\"string\" value=\"ILU\"/>"
357 " <ParameterList name=\"ParameterList\">"
358 " <Parameter name=\"fact: level-of-fill\" type=\"int\" value=\"XXXBlock 2: level-of-fillYYY\"/>"
359 " </ParameterList>"
360 " </ParameterList>"
361 ""
362 " <ParameterList name=\"mySmooDirectFact2\">"
363 " <Parameter name=\"factory\" type=\"string\" value=\"DirectSolver\"/>"
364 " </ParameterList>"
365 ""
366 " <ParameterList name=\"myBlockSmoother\">"
367 " <Parameter name=\"factory\" type=\"string\" value=\"BlockedGaussSeidelSmoother\"/>"
368 " <Parameter name=\"Sweeps\" type=\"int\" value=\"1\"/>"
369 " <Parameter name=\"Damping factor\" type=\"double\" value=\"XXXBGS: damping factorYYY\"/>"
370 " <!-- factory manager for block 1 -->"
371 " <ParameterList name=\"block1\">"
372 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory1\"/>"
373 " <Parameter name=\"Smoother\" type=\"string\" value=\"XYZSmoother1XYZ\"/>"
374 " </ParameterList>"
375 " <!-- factory manager for block 2 -->"
376 " <ParameterList name=\"block2\">"
377 " <Parameter name=\"A\" type=\"string\" value=\"mySubBlockAFactory2\"/>"
378 " <Parameter name=\"Smoother\" type=\"string\" value=\"XYZSmoother2XYZ\"/>"
379 " </ParameterList>"
380 " </ParameterList>"
381 ""
382 " </ParameterList>"
383 " <!-- end Factories -->"
384 ""
385 " <!-- Definition of the multigrid preconditioner -->"
386 " <ParameterList name=\"Hierarchy\">"
387 ""
388 " <Parameter name=\"max levels\" type=\"int\" value=\"XXXmax levelsYYY\"/>"
389 " <Parameter name=\"coarse: max size\" type=\"int\" value=\"XXXcoarse: max sizeYYY\"/>"
390 " <Parameter name=\"verbosity\" type=\"string\" value=\"XXXverbosityYYY\"/>"
391 ""
392 " <ParameterList name=\"AllLevel\">"
393 " <Parameter name=\"startLevel\" type=\"int\" value=\"0\"/>"
394 " <Parameter name=\"Smoother\" type=\"string\" value=\"myBlockSmoother\"/>"
395 " <Parameter name=\"CoarseSolver\" type=\"string\" value=\"myBlockSmoother\"/>"
396 " <Parameter name=\"P\" type=\"string\" value=\"myBlockedPFact\"/>"
397 " <Parameter name=\"R\" type=\"string\" value=\"myBlockedRFact\"/>"
398 " <Parameter name=\"A\" type=\"string\" value=\"myBlockedRAPFact\"/>"
399 " </ParameterList>"
400 ""
401 " </ParameterList>"
402 "</ParameterList>"
403  ;
404 } // end namespace MueLu
405 #endif
ConstIterator begin() const
T & get(const std::string &name, T def_value)
const ParameterEntry & entry(ConstIterator i) const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Namespace for MueLu classes and methods.
ConstIterator end() const
params_t::ConstIterator ConstIterator
void validateParametersAndSetDefaults(ParameterList const &validParamList, int const depth=1000)
const std::string & name() const
any & getAny(bool activeQry=true)
Teuchos::RCP< Teuchos::ParameterList > SetParameterList(const Teuchos::ParameterList &paramList)
Set parameter list for FacadeClass interpreter.
Exception throws to report errors in the internal logical of the program.
std::string toString(const T &t)