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