From 9d829789368632d28b5c6ae292c7033c94ef4d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Dutheillet-Lamonth=C3=A9zie?= Date: Tue, 26 Sep 2023 10:57:04 +0200 Subject: [PATCH] #210: formatting and consistency across examples --- .../belos/tpetra/example/BlockCG/BlockCGTpetraExFile.cpp | 9 ++++----- .../tpetra/example/BlockGmres/BlockGmresTpetraExFile.cpp | 1 - packages/belos/tpetra/example/RCG/RCGTpetraExFile.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/belos/tpetra/example/BlockCG/BlockCGTpetraExFile.cpp b/packages/belos/tpetra/example/BlockCG/BlockCGTpetraExFile.cpp index 8efd30a4dc08..53104acca9d7 100644 --- a/packages/belos/tpetra/example/BlockCG/BlockCGTpetraExFile.cpp +++ b/packages/belos/tpetra/example/BlockCG/BlockCGTpetraExFile.cpp @@ -72,7 +72,6 @@ #include "BelosLinearProblem.hpp" #include "BelosTpetraAdapter.hpp" - template int run(int argc, char *argv[]) { @@ -130,13 +129,13 @@ int run(int argc, char *argv[]) { // Get the problem RCP A; Tpetra::Utils::readHBMatrix(filename,Comm,A); - RCP Map = A->getDomainMap(); + RCP map = A->getDomainMap(); // Create initial vectors RCP B, X; - X = rcp( new MV(Map,numrhs) ); + X = rcp( new MV(map,numrhs) ); MVT::MvRandom( *X ); - B = rcp( new MV(Map,numrhs) ); + B = rcp( new MV(map,numrhs) ); OPT::Apply( *A, *X, *B ); MVT::MvInit( *X, 0.0 ); @@ -197,7 +196,7 @@ int run(int argc, char *argv[]) { bool badRes = false; std::vector actualResids( numrhs ); std::vector rhsNorm( numrhs ); - MV resid(Map, numrhs); + MV resid(map, numrhs); OPT::Apply( *A, *X, resid ); MVT::MvAddMv( -1.0, resid, 1.0, *B, resid ); MVT::MvNorm( resid, actualResids ); diff --git a/packages/belos/tpetra/example/BlockGmres/BlockGmresTpetraExFile.cpp b/packages/belos/tpetra/example/BlockGmres/BlockGmresTpetraExFile.cpp index e204382e3e7d..057d757de2b5 100644 --- a/packages/belos/tpetra/example/BlockGmres/BlockGmresTpetraExFile.cpp +++ b/packages/belos/tpetra/example/BlockGmres/BlockGmresTpetraExFile.cpp @@ -71,7 +71,6 @@ #include "BelosBlockGmresSolMgr.hpp" #include "BelosLinearProblem.hpp" - template int run(int argc, char *argv[]) { diff --git a/packages/belos/tpetra/example/RCG/RCGTpetraExFile.cpp b/packages/belos/tpetra/example/RCG/RCGTpetraExFile.cpp index 55c9e3f25a23..57e9fb06b0ce 100644 --- a/packages/belos/tpetra/example/RCG/RCGTpetraExFile.cpp +++ b/packages/belos/tpetra/example/RCG/RCGTpetraExFile.cpp @@ -124,15 +124,15 @@ int run(int argc, char *argv[]) // Get the problem RCP A; Tpetra::Utils::readHBMatrix(filename, comm, A); - RCP rowMap = A->getDomainMap(); + RCP map = A->getDomainMap(); proc_verbose = ( verbose && (MyPID==0) ); // Construct initial guess and right-hand sides RCP B, X; - X = rcp(new MV(rowMap, numrhs)); + X = rcp(new MV(map, numrhs)); MVT::MvRandom(*X); - B = rcp(new MV( rowMap, numrhs)); + B = rcp(new MV( map, numrhs)); OPT::Apply( *A, *X, *B ); MVT::MvInit( *X, 0.0 ); @@ -188,7 +188,7 @@ int run(int argc, char *argv[]) bool badRes = false; std::vector actual_resids( numrhs ); std::vector rhs_norm( numrhs ); - MV resid(rowMap, numrhs); + MV resid(map, numrhs); OPT::Apply( *A, *X, resid ); MVT::MvAddMv( -1.0, resid, 1.0, *B, resid ); MVT::MvNorm( resid, actual_resids );