#include "BelosConfigDefs.hpp"#include "BelosLinearProblem.hpp"#include "BelosOutputManager.hpp"#include "BelosStatusTestMaxIters.hpp"#include "BelosStatusTestResNorm.hpp"#include "BelosStatusTestOutputter.hpp"#include "BelosStatusTestCombo.hpp"#include "BelosBlockCG.hpp"#include "Teuchos_CommandLineProcessor.hpp"#include "MyMultiVec.hpp"#include "MyBetterOperator.hpp"Include dependency graph for test_bl_cg_complex_hb.cpp:

Go to the source code of this file.
Typedefs | |
| typedef ScalarTraits< ST > | SCT |
| typedef SCT::magnitudeType | MT |
| typedef Belos::MultiVec< ST > | MV |
| typedef Belos::Operator< ST > | OP |
| typedef Belos::MultiVecTraits< ST, MV > | MVT |
| typedef Belos::OperatorTraits< ST, MV, OP > | OPT |
Functions | |
| int | main (int argc, char *argv[]) |
| std::string | filename ("mhd1280b.cua") |
| CommandLineProcessor | cmdp (false, true) |
| cmdp | setOption ("verbose","quiet",&verbose,"Print messages and results.") |
| cmdp | setOption ("frequency",&frequency,"Solvers frequency for printing residuals (#iters).") |
| cmdp | setOption ("filename",&filename,"Filename for Harwell-Boeing test matrix.") |
| cmdp | setOption ("tol",&tol,"Relative residual tolerance used by CG solver.") |
| cmdp | setOption ("num-rhs",&numrhs,"Number of right-hand sides to be solved for.") |
| cmdp | setOption ("block-size",&blockSize,"Block size to be used by CG solver.") |
| if (cmdp.parse(argc, argv)!=CommandLineProcessor::PARSE_SUCCESSFUL) | |
| if (proc_verbose) | |
| if (!verbose) frequency | |
| test3 | set_resNormStatusTest (rcp(&test2, false)) |
| test3 | set_outputManager (MyOM) |
| MyBlockCG | Solve () |
| if (MyTest->GetStatus()!=Belos::Converged) | |
Variables | |
| ST | ONE = SCT::one() |
| int | info = 0 |
| int | MyPID = 0 |
| bool | verbose = false proc_verbose = false |
| int | frequency = -1 |
| int | numrhs = 1 |
| int | blockSize = 1 |
| MT | tol = 1.0e-5 |
| proc_verbose = verbose && (MyPID==0) | |
| cout<< "This test requires Triutils. Please configure with --enable-triutils."< < endl;if(MyPID==0){cout< < "End Result: TEST FAILED"< < endl;}return-1;int dim, dim2, nnz;double *dvals;int *colptr,*rowind;ST *cvals;nnz=-1;info=readHB_newmat_double(filename.c_str(),&dim,&dim2, &nnz,&colptr,&rowind,&dvals);if(info==0||nnz< 0){if(MyPID==0){cout<< "Error reading '"< < filename<< "'"<< endl;cout< < "End Result: TEST FAILED"< < endl;}return-1;}cvals=new ST | SetVerbosity [nnz];for(int ii=0;ii< nnz;ii++){cvals[ii]=ST(dvals[ii *2], dvals[ii *2+1]);}RefCountPtr< MyBetterOperator< ST > > A=rcp(new MyBetterOperator< ST >dim, colptr, nnz, rowind, cvals));int maxits=dim/blockSize;RefCountPtr< MyMultiVec< ST > > soln=rcp(new MyMultiVec< ST >dim, numrhs));RefCountPtr< MyMultiVec< ST > > rhs=rcp(new MyMultiVec< ST >dim, numrhs));if(numrhs==1){MVT::MvInit(*soln, SCT::one());OPT::Apply(*A,*soln,*rhs);MVT::MvInit(*soln, SCT::zero());}else{MVT::MvRandom(*soln);OPT::Apply(*A,*soln,*rhs);MVT::MvInit(*soln, SCT::zero());}RefCountPtr< Belos::LinearProblem< ST, MV, OP > > MyLP=rcp(new Belos::LinearProblem< ST, MV, OP > A, soln, rhs));MyLP->SetBlockSize(blockSize);RefCountPtr< Belos::OutputManager< ST > > MyOM=rcp(new Belos::OutputManager< ST > MyPID));if(verbose){MyOM->(Belos::Errors+Belos::Warnings+Belos::TimingDetails+Belos::FinalSummary) |
| Belos::StatusTestMaxIters< ST, MV, OP > | test1 (maxits) |
| Belos::StatusTestResNorm< ST, MV, OP > | test2 (tol) |
| Belos::StatusTestOutputter< ST, MV, OP > | test3 (frequency, false) |
| RefCountPtr< Belos::StatusTestCombo< ST, MV, OP > > | MyTest = rcp( new Belos::StatusTestCombo<ST,MV,OP>( Belos::StatusTestCombo<ST,MV,OP>::OR, test1, test3 ) ) |
| Belos::BlockCG< ST, MV, OP > | MyBlockCG (MyLP, MyTest, MyOM) |
|
|
Definition at line 69 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 70 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 71 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 72 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 73 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 74 of file test_bl_cg_complex_hb.cpp. |
|
||||||||||||
|
Definition at line 55 of file test_bl_cg_complex_hb.cpp. |
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
Definition at line 103 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 111 of file test_bl_cg_complex_hb.cpp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 238 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 75 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 77 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 78 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 89 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 90 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 91 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 92 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 94 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 110 of file test_bl_cg_complex_hb.cpp. |
|
|
Definition at line 194 of file test_bl_cg_complex_hb.cpp. |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 205 of file test_bl_cg_complex_hb.cpp. |
|
|
|
1.3.9.1