Driver code for 2D Poisson problem.
318 Teuchos::ParameterList ml_parameters;
319 ML_Epetra::SetDefaults(
"SA", ml_parameters);
321 std::cout <<
"hello" << std::endl;
351 cout <<
"==================================="
352 <<
"=================================" << endl;
353 cout <<
"Testing Trilinos solver preconditioned with "
354 <<
"TrilinosMLPreconditioner" << endl;
355 cout <<
"======================================="
356 <<
"=============================" << endl;
368 problem.linear_solver_pt() = linear_solver_pt;
373 for (
unsigned s=0;
s<=2;
s++)
379 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::CG;
380 cout <<
"Using CG as solver" << endl;
381 cout <<
"==================" << endl;
384 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::GMRES;
385 cout <<
"Using GMRES as solver" << endl;
386 cout <<
"=====================" << endl;
389 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::BiCGStab;
390 cout <<
"Using BiCGStab as solver" << endl;
391 cout <<
"========================" << endl;
393 default: cout <<
"Error selecting solver" << endl;
400 problem.doc_solution(doc_info);
403 << std::endl << std::endl;
404 conv_file <<
problem.newton_count() << std::endl;
409 delete linear_solver_pt;
410 delete preconditioner_pt;
419 cout <<
"================================="
420 <<
"=======================================" << endl;
421 cout <<
"Testing Trilinos solver preconditioned"
422 <<
" with TrilinosIFPACKPreconditioner" << endl;
423 cout <<
"==========================================="
424 <<
"=============================" << endl;
437 problem.linear_solver_pt() = linear_solver_pt;
442 for (
unsigned s=0;
s<=2;
s++)
448 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::CG;
449 cout <<
"Using CG as solver" << endl;
450 cout <<
"==================" << endl;
453 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::GMRES;
454 cout <<
"Using GMRES as solver" << endl;
455 cout <<
"=====================" << endl;
458 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::BiCGStab;
459 cout <<
"Using BiCGStab as solver" << endl;
460 cout <<
"========================" << endl;
462 default: cout <<
"Error selecting solver" << endl;
469 problem.doc_solution(doc_info);
472 << std::endl << std::endl;
473 conv_file <<
problem.newton_count() << std::endl;
478 delete linear_solver_pt;
479 delete preconditioner_pt;
490 <<
"======================================"
491 <<
"=================================="
494 <<
"Testing oomph-lib iterative linear solvers "
495 <<
"with Trilinos preconditioners"
498 <<
"======================================="
499 <<
"================================="
500 << endl << endl << endl;
508 for (
unsigned i_prec=0;i_prec<2;i_prec++)
518 cout <<
"Using TrilinosIFPACKPreconditioner as preconditioner" << endl;
519 cout <<
"=====================================================" << endl;
525 cout <<
"Using TrilinosMLPreconditioner as preconditioner" << endl;
526 cout <<
"=================================================" << endl;
532 cout <<
"CG iterative solver" << endl;
533 cout <<
"-------------------" << endl;
536 problem.linear_solver_pt() = linear_solver_pt;
540 preconditioner_pt()= preconditioner_pt;
547 problem.doc_solution(doc_info);
550 << std::endl << std::endl;
551 conv_file <<
problem.newton_count() << std::endl;
553 delete linear_solver_pt;
558 cout <<
"BiCGStab iterative solver" << endl;
559 cout <<
"-------------------------" << endl;
562 problem.linear_solver_pt() = linear_solver_pt;
572 problem.doc_solution(doc_info);
575 << std::endl << std::endl;
576 conv_file <<
problem.newton_count() << std::endl;
578 delete linear_solver_pt;
583 cout <<
"GMRES iterative solver" << endl;
584 cout <<
"----------------------" << endl;
587 problem.linear_solver_pt() = linear_solver_pt;
597 problem.doc_solution(doc_info);
600 << std::endl << std::endl;
601 conv_file <<
problem.newton_count() << std::endl;
603 delete linear_solver_pt;
606 delete preconditioner_pt;
616 cout <<
"=================================="
617 <<
"=======================================" << endl;
618 cout <<
"Testing Trilinos solver preconditioned with"
619 <<
" MatrixBasedDiagPreconditioner" << endl;
620 cout <<
"======================================="
621 <<
"==================================" << endl;
634 problem.linear_solver_pt() = linear_solver_pt;
639 for (
unsigned s=0;
s<=2;
s++)
645 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::CG;
646 cout <<
"Using CG as solver" << endl;
647 cout <<
"==================" << endl;
650 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::GMRES;
651 cout <<
"Using GMRES as solver" << endl;
652 cout <<
"=====================" << endl;
655 linear_solver_pt->
solver_type() = TrilinosAztecOOSolver::BiCGStab;
656 cout <<
"Using BiCGStab as solver" << endl;
657 cout <<
"========================" << endl;
659 default: cout <<
"Error selecting solver" << endl;
666 problem.doc_solution(doc_info);
669 << std::endl << std::endl;
670 conv_file <<
problem.newton_count() << std::endl;
675 delete linear_solver_pt;
678 delete preconditioner_pt;
685 bool never_get_here=
true;
Micky mouse Poisson problem.
Definition: HypreSolver_test.cc:81
The conjugate gradient method.
Definition: iterative_linear_solver.h:410
The conjugate gradient method.
Definition: iterative_linear_solver.h:284
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
The GMRES method.
Definition: iterative_linear_solver.h:1227
Definition: iterative_linear_solver.h:54
Preconditioner *& preconditioner_pt()
Access function to preconditioner.
Definition: iterative_linear_solver.h:95
Definition: linear_solver.h:68
void enable_doc_time()
Enable documentation of solve times.
Definition: linear_solver.h:110
Matrix-based diagonal preconditioner.
Definition: general_purpose_preconditioners.h:49
Definition: preconditioner.h:54
Definition: trilinos_solver.h:267
unsigned & solver_type()
Access function to Solver_type.
Definition: trilinos_solver.h:442
Definition: trilinos_preconditioners.h:268
Definition: trilinos_preconditioners.h:152
RealScalar s
Definition: level1_cplx_impl.h:130
string filename
Definition: MergeRestartFiles.py:39
double TanPhi
Parameter for angle Phi of "step".
Definition: HypreSolver_test.cc:51
void source_function(const Vector< double > &x, double &source)
Source function required to make the solution above an exact solution.
Definition: HypreSolver_test.cc:60
double Alpha
Parameter for steepness of step.
Definition: extrude_with_macro_element_representation.cc:185
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213