[newchem-cpp] transcribe gaussj#393
Conversation
…_dust' into gen2024_transcribe_gaussj
mabruzzo
left a comment
There was a problem hiding this comment.
I took a quick look to investigate why CI is failing. (I haven't had a chance to look at everything in context yet, but let's get CI working first)
I made a few suggestions to address the issues:
- you aren't including
<cmath>(to take absolute values). Plus, I don't think you need to be including <numeric> - I suggested the use of
std::fabsoverstd::abs(this isn't essential, but I generally think it is a little less confusing to people more familiar with C)
You are also going to need to adjust the loops. CI is complaining about mixing unsigned indices with signed loop bounds
After you do all that, you are going to need to format this file (this is why pre-commit.ci is failing). I would strongly recommend that you use pre-commit for this rather than directly invoking clang-format.1 The easiest thing to do is add a GitHub comment that just says:
pre-commit.ci autofix
The continuous integration will then push a commit to your branch to adjusti the formatting. (If you really want to run it locally, the documentation provides additional context)
Footnotes
-
If you choose to manually invoke clang-format, you'll need to match the exact version of clang-format referenced in the pre-commit file. ↩
…s for readability
…gs due to comparison with matrix size type
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
| // See LICENSE file for license and copyright information | ||
|
|
||
| /// @file gaussj_g.hpp | ||
| /// @brief Implementation of Gauss-Jordan elimination for solving linear systems |
There was a problem hiding this comment.
| // See LICENSE file for license and copyright information | |
| /// @file gaussj_g.hpp | |
| /// @brief Implementation of Gauss-Jordan elimination for solving linear systems | |
| //===----------------------------------------------------------------------===// | |
| // | |
| // See the LICENSE file for license and copyright information | |
| // SPDX-License-Identifier: NCSA AND BSD-3-Clause | |
| // | |
| //===----------------------------------------------------------------------===// | |
| /// | |
| /// @file | |
| /// Declares the function for Gauss-Jordan elimination | |
| /// | |
| //===----------------------------------------------------------------------===// |
| @@ -0,0 +1,77 @@ | |||
| #include <cmath> | |||
There was a problem hiding this comment.
| #include <cmath> | |
| //===----------------------------------------------------------------------===// | |
| // | |
| // See the LICENSE file for license and copyright information | |
| // SPDX-License-Identifier: NCSA AND BSD-3-Clause | |
| // | |
| //===----------------------------------------------------------------------===// | |
| /// | |
| /// @file | |
| /// Implementation of Gauss-Jordan elimination for solving linear systems | |
| /// | |
| //===----------------------------------------------------------------------===// | |
| #include <cmath> |
…transcribe_gaussj
…ristopherBignamini/grackle into newchem-cpp_transcribe_gaussj
…transcribe_gaussj
|
@mabruzzo @brittonsmith the 4x4 LinAlgCase was failing with an error of 4e-15, the same test now passes after increasing the tolerance to 5e-15. If you prefer, I can try to change the precision by using long double. |
Uh oh!
There was an error while loading. Please reload this page.