-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#203: NOX: Provide Tpetra
version of test_BroydenOp.C
#204
base: NGA-FY23-develop
Are you sure you want to change the base?
#203: NOX: Provide Tpetra
version of test_BroydenOp.C
#204
Conversation
⚡ Code quality check ⚡ 🔴 clang-tidy found 64 issues! Click here to see details.Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 49 to 54 in 5fa13f5
!Line: 49 - warning: #includes are not sorted properly [llvm-include-order] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 54 to 59 in 5fa13f5
!Line: 54 - warning: #includes are not sorted properly [llvm-include-order] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 63 to 68 in 5fa13f5
!Line: 63 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 63 to 68 in 5fa13f5
!Line: 63 - warning: use a trailing return type for this function [modernize-use-trailing-return-type] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 63 to 68 in 5fa13f5
!Line: 63 - warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 79 to 84 in 5fa13f5
!Line: 79 - warning: variable 'session' of type 'Teuchos::GlobalMPISession' can be declared 'const' [misc-const-correctness] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 86 to 91 in 5fa13f5
!Line: 86 - warning: 'getDefaultComm' must resolve to a function declared within the '__llvm_libc' namespace [llvmlibc-callee-namespace] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 88 to 93 in 5fa13f5
!Line: 88 - warning: initializing non-owner 'int *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 88 to 93 in 5fa13f5
!Line: 88 - warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 89 to 94 in 5fa13f5
!Line: 89 - warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
!Line: 88 - note: variable declared here Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 91 to 96 in 5fa13f5
!Line: 91 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 92 to 97 in 5fa13f5
!Line: 92 - warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 92 to 97 in 5fa13f5
!Line: 92 - warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 92 to 97 in 5fa13f5
!Line: 92 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 101 to 106 in 5fa13f5
!Line: 101 - warning: variable 'noxParams' of type 'Teuchos::ParameterList &' can be declared 'const' [misc-const-correctness] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 101 to 106 in 5fa13f5
!Line: 101 - warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 107 to 112 in 5fa13f5
!Line: 107 - warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 109 to 114 in 5fa13f5
!Line: 109 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 118 to 123 in 5fa13f5
!Line: 118 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 125 to 130 in 5fa13f5
!Line: 125 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 137 to 142 in 5fa13f5
!Line: 137 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 145 to 150 in 5fa13f5
!Line: 145 - warning: variable 'status' of type 'int' can be declared 'const' [misc-const-correctness] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 149 to 154 in 5fa13f5
!Line: 149 - warning: variable 'abstol' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 150 to 155 in 5fa13f5
!Line: 150 - warning: variable 'reltol' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 153 to 158 in 5fa13f5
!Line: 153 - warning: variable 'numGlobalElems' of type 'int' can be declared 'const' [misc-const-correctness] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 154 to 159 in 5fa13f5
!Line: 154 - warning: variable 'broydenRowMap' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 155 to 160 in 5fa13f5
!Line: 155 - warning: variable 'broydenWorkVec' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 156 to 161 in 5fa13f5
!Line: 156 - warning: variable 'broydenWorkGraph' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 158 to 163 in 5fa13f5
!Line: 158 - warning: variable 'globalIndices' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 159 to 164 in 5fa13f5
!Line: 159 - warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 159 to 164 in 5fa13f5
!Line: 159 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 162 to 167 in 5fa13f5
!Line: 162 - warning: variable 'myGlobalIndices' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 179 to 184 in 5fa13f5
!Line: 179 - warning: variable 'broydenWorkMatrix' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 190 to 195 in 5fa13f5
!Line: 190 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 193 to 198 in 5fa13f5
!Line: 193 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 195 to 200 in 5fa13f5
!Line: 195 - warning: 3.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 201 to 206 in 5fa13f5
!Line: 201 - warning: variable 'goldMatrix' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 203 to 208 in 5fa13f5
!Line: 203 - warning: variable 'numCols' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 204 to 209 in 5fa13f5
!Line: 204 - warning: variable 'values' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 208 to 213 in 5fa13f5
!Line: 208 - warning: 6.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 209 to 214 in 5fa13f5
!Line: 209 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 212 to 217 in 5fa13f5
!Line: 212 - warning: 5.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 217 to 222 in 5fa13f5
!Line: 217 - warning: 7.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 219 to 224 in 5fa13f5
!Line: 219 - warning: 0.2 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 226 to 231 in 5fa13f5
!Line: 226 - warning: variable 'broydenWorkGraph2' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 240 to 245 in 5fa13f5
!Line: 240 - warning: variable 'broydenWorkMatrix2' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 250 to 255 in 5fa13f5
!Line: 250 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 253 to 258 in 5fa13f5
!Line: 253 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 255 to 260 in 5fa13f5
!Line: 255 - warning: 3.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 261 to 266 in 5fa13f5
!Line: 261 - warning: variable 'goldMatrix2' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 265 to 270 in 5fa13f5
!Line: 265 - warning: 7.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 267 to 272 in 5fa13f5
!Line: 267 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 270 to 275 in 5fa13f5
!Line: 270 - warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 271 to 276 in 5fa13f5
!Line: 271 - warning: 4.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 272 to 277 in 5fa13f5
!Line: 272 - warning: 4.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 277 to 282 in 5fa13f5
!Line: 277 - warning: 8.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 279 to 284 in 5fa13f5
!Line: 279 - warning: variable 'scaleF' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 286 to 291 in 5fa13f5
!Line: 286 - warning: variable 'inactiveGraph' is not initialized [cppcoreguidelines-init-variables] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 317 to 322 in 5fa13f5
!Line: 317 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 319 to 324 in 5fa13f5
!Line: 319 - warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 322 to 327 in 5fa13f5
!Line: 322 - warning: 'getRank' must resolve to a function declared within the '__llvm_libc' namespace [llvmlibc-callee-namespace] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 322 to 327 in 5fa13f5
!Line: 322 - warning: 'operator<<' must resolve to a function declared within the '__llvm_libc' namespace [llvmlibc-callee-namespace] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 327 to 332 in 5fa13f5
!Line: 327 - warning: declaration must be declared within the '__llvm_libc' namespace [llvmlibc-implementation-in-namespace] Trilinos/packages/nox/test/tpetra/Tpetra_test_BroydenOp.cpp Lines 327 to 332 in 5fa13f5
!Line: 327 - warning: use a trailing return type for this function [modernize-use-trailing-return-type] |
That's correct. Let's drop this test for the tpetra porting work. There's no template for a similar capability at this point and I don't think anyone has used this operator in years. |
@stmcgovern This PR is mosty completed, but the absence of a Tpetra-fied |
Fixes #203