NeoN
A framework for CFD software
Loading...
Searching...
No Matches
include
NeoN
linearAlgebra
utilities.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// SPDX-FileCopyrightText: 2024-2025 NeoN authors
3
4
#pragma once
5
6
#include "
NeoN/core/primitives/scalar.hpp
"
7
#include "
NeoN/core/vector/vector.hpp
"
8
#include "
NeoN/linearAlgebra/CSRMatrix.hpp
"
9
10
11
namespace
NeoN::la
12
{
13
14
/* @brief given a linear system consisting of A, b and x the operator computes the residual vector
15
* Ax-b
16
*
17
* @param[in] mtx, the corresponding matrix
18
* @param[in] b, rhs vector b
19
* @param[in] x, initial guess vector x
20
* @param[out]
21
*/
22
void
computeResidual
(
23
const
CSRMatrix<scalar, localIdx>
& mtx,
24
const
Vector<scalar>
& b,
25
const
Vector<scalar>
& x,
26
Vector<scalar>
& res
27
);
28
29
}
CSRMatrix.hpp
NeoN::Vector
A class to contain the data and executors for a field and define some basic operations.
Definition
vector.hpp:28
NeoN::la::CSRMatrix
Sparse matrix class with compact storage by row (CSR) format.
Definition
CSRMatrix.hpp:84
NeoN::la
Definition
CSRMatrix.hpp:10
NeoN::la::computeResidual
void computeResidual(const CSRMatrix< scalar, localIdx > &mtx, const Vector< scalar > &b, const Vector< scalar > &x, Vector< scalar > &res)
scalar.hpp
vector.hpp
Generated by
1.9.8