|
NeoN
A framework for CFD software
|
Classes | |
| class | CellBasedIterator |
| Iteration strategy that traverses cells and their face stencils. More... | |
| class | CooSparsityPattern |
| row and column index representation of a mesh More... | |
| class | CsrSparsityPattern |
| row and column index representation of a mesh More... | |
| class | DiagonalSolver |
| struct | Dimensions |
| hold the number of rows and columns of a matrix More... | |
| class | FaceBasedIterator |
| Iteration strategy that traverses internal faces. More... | |
| class | FaceToMatrixAddress |
| struct | FaceToMatrixView |
| class | LinearSystem |
| A class representing a linear system of equations. More... | |
| struct | LinearSystemView |
| A view linear into a linear system's data. More... | |
| class | Matrix |
| Sparse matrix class with compact storage by row (CSR) format. More... | |
| struct | MatrixView |
| A view struct to allow easy read/write on all executors. More... | |
| class | MeshIterationStrategy |
| Abstract base class defining the interface for mesh iteration strategies. More... | |
| class | MeshIteratorContext |
| Holds and exposes the active MeshIterationStrategy. More... | |
| struct | SharedSparsityBundle |
| class | Solver |
| class | SolverFactory |
| struct | SolverStats |
| struct | SolverStatsEntry |
| struct | SparsityView |
| A view struct to allow easy read/write on all executors. More... | |
Typedefs | |
| template<typename ValueType , typename IndexType > | |
| using | CSRMatrix = Matrix< ValueType, la::CsrSparsityPattern< IndexType > > |
| template<typename ValueType , typename IndexType > | |
| using | COOMatrix = Matrix< ValueType, la::CooSparsityPattern< IndexType > > |
Functions | |
| template<typename SparsityType > | |
| std::pair< std::shared_ptr< const SparsityType >, std::shared_ptr< const FaceToMatrixAddress > > | createSparsityPatternFaceToMatrixAddress (const UnstructuredMesh &mesh) |
| template<typename SparsityType > | |
| std::shared_ptr< const SparsityType > | createBoundarySparsityPattern (const UnstructuredMesh &mesh, const FaceToMatrixAddress &faceToMatrixAddress) |
| template<typename SparsityType > | |
| std::shared_ptr< const SparsityType > | createOffDiagonalSparsityPattern (const UnstructuredMesh &mesh, const FaceToMatrixAddress &faceToMatrixAddress) |
| template<typename SystemSparsityType , typename BoundarySparsityType > | |
| SharedSparsityBundle< SystemSparsityType, BoundarySparsityType > | readOrCreateSparsityBundle (const UnstructuredMesh &mesh) |
| template<typename ValueType , typename RHSValueType = ValueType, typename SystemMatrixType = CSRMatrix<ValueType, localIdx>, typename BoundaryMatrixType = COOMatrix<ValueType, localIdx>> | |
| LinearSystem< ValueType, RHSValueType, SystemMatrixType, BoundaryMatrixType > | createEmptyLinearSystem (const UnstructuredMesh &mesh, std::shared_ptr< MeshIterationStrategy > strategy=std::make_shared< FaceBasedIterator >()) |
| template<typename MatrixValueType , typename RHSValueType , typename SystemMatrixType , typename BoundaryMatrixType > | |
| la::LinearSystem< MatrixValueType, RHSValueType, SystemMatrixType, BoundaryMatrixType > | removeBoundaryContributions (const la::LinearSystem< MatrixValueType, RHSValueType, SystemMatrixType, BoundaryMatrixType > &lsIn) |
| for testing purposes, this function reverses boundary contributions previously applied to the matrix diagonal and RHS for some operators (e.g., div). | |
| template<typename ValueType , typename IndexType > | |
| Vector< ValueType > | upper (const CSRMatrix< ValueType, IndexType > &) |
| extract the upper triangular of the matrix | |
| Vector< scalar > | scaledInverseDiag (const CSRMatrix< Vec3, localIdx > &, const Vector< scalar > &) |
| computes the inverted diagonal of a matrix and scales it by a, ie. a*D^-1 | |
| void | scaledInverseDiag (const CSRMatrix< Vec3, localIdx > &mtx, const Vector< scalar > &a, Vector< scalar > &out) |
| Vector< scalar > | scaledInverseDiag (const CSRMatrix< Vec3, localIdx > &, const FaceToMatrixAddress &mi, const Vector< scalar > &) |
| computes the inverted diagonal of a matrix and scales it by a, ie. a*D^-1 | |
| void | scaledInverseDiag (const CSRMatrix< Vec3, localIdx > &mtx, const FaceToMatrixAddress &mi, const Vector< scalar > &a, Vector< scalar > &out) |
| Vector< scalar > | scaledInverseDiag (const CSRMatrix< scalar, localIdx > &, const FaceToMatrixAddress &mi, const Vector< scalar > &) |
| scalar-matrix variant of scaledInverseDiag for the segregated vector-solve form | |
| void | scaledInverseDiag (const CSRMatrix< scalar, localIdx > &mtx, const FaceToMatrixAddress &mi, const Vector< scalar > &a, Vector< scalar > &out) |
| template<unsigned int I> | |
| auto | getComponent (const CSRMatrix< Vec3, localIdx > &in) |
| void | negLUx (const CSRMatrix< Vec3, localIdx > &mtx, const Vector< Vec3 > &a, const Vector< Vec3 > &b, const Vector< scalar > &rAU, const Vector< scalar > &vol, Vector< Vec3 > &out) |
| computes out = -(L+U) x | |
| void | scaledInvDiagNegLUx (const CSRMatrix< Vec3, localIdx > &mtx, const Vector< Vec3 > &a, const Vector< Vec3 > &b, const Vector< scalar > &vol, Vector< scalar > &rAU, Vector< Vec3 > &out) |
| computes out = -(L+U) x | |
| void | scaledInvDiagNegLUx (const CSRMatrix< scalar, localIdx > &mtx, const Vector< Vec3 > &a, const Vector< Vec3 > &b, const Vector< scalar > &vol, Vector< scalar > &rAU, Vector< Vec3 > &out) |
| scalar-matrix / Vec3-rhs variant of scaledInvDiagNegLUx | |
| Vector< localIdx > | unpackColIdx (const Vector< localIdx > &in, const Vector< localIdx > &unpackedRowOffs, const Vector< localIdx > &packedRowOffs) |
| Vector< localIdx > | unpackRowOffs (const Vector< localIdx > &in) |
| Vector< scalar > | unpackVecValues (const Vector< Vec3 > &in) |
| void | packVecValues (const Vector< scalar > &in, Vector< Vec3 > &out) |
| Vector< scalar > | unpackMtxValues (const Vector< Vec3 > &in, const Vector< localIdx > &rowOffs, const Vector< localIdx > &newRowOffs) |
| template<typename MatrixType , typename ValueType = scalar> | |
| void | computeResidual (const MatrixType &mtx, const Vector< ValueType > &b, const Vector< ValueType > &x, Vector< ValueType > &res) |
| given a linear system consisting of A, b and x the operator computes the residual vector Ax-b | |
| template<typename IndexType > | |
| Vector< IndexType > | rowsToRowOffs (const Vector< IndexType > &rows) |
| given a set off row idx this function converts to rowOffsets | |
| using NeoN::la::COOMatrix = typedef Matrix<ValueType, la::CooSparsityPattern<IndexType> > |
Definition at line 260 of file matrix.hpp.
| using NeoN::la::CSRMatrix = typedef Matrix<ValueType, la::CsrSparsityPattern<IndexType> > |
Definition at line 257 of file matrix.hpp.
| void NeoN::la::computeResidual | ( | const MatrixType & | mtx, |
| const Vector< ValueType > & | b, | ||
| const Vector< ValueType > & | x, | ||
| Vector< ValueType > & | res | ||
| ) |
given a linear system consisting of A, b and x the operator computes the residual vector Ax-b
| [in] | mtx,the | corresponding matrix |
| [in] | b,rhs | vector b |
| [in] | x,initial | guess vector x |
| [out] |
| std::shared_ptr< const SparsityType > NeoN::la::createBoundarySparsityPattern | ( | const UnstructuredMesh & | mesh, |
| const FaceToMatrixAddress & | faceToMatrixAddress | ||
| ) |
| LinearSystem< ValueType, RHSValueType, SystemMatrixType, BoundaryMatrixType > NeoN::la::createEmptyLinearSystem | ( | const UnstructuredMesh & | mesh, |
| std::shared_ptr< MeshIterationStrategy > | strategy = std::make_shared<FaceBasedIterator>() |
||
| ) |
Definition at line 353 of file linearSystem.hpp.
| std::shared_ptr< const SparsityType > NeoN::la::createOffDiagonalSparsityPattern | ( | const UnstructuredMesh & | mesh, |
| const FaceToMatrixAddress & | faceToMatrixAddress | ||
| ) |
| std::pair< std::shared_ptr< const SparsityType >, std::shared_ptr< const FaceToMatrixAddress > > NeoN::la::createSparsityPatternFaceToMatrixAddress | ( | const UnstructuredMesh & | mesh | ) |
Definition at line 309 of file matrix.hpp.
| void NeoN::la::negLUx | ( | const CSRMatrix< Vec3, localIdx > & | mtx, |
| const Vector< Vec3 > & | a, | ||
| const Vector< Vec3 > & | b, | ||
| const Vector< scalar > & | rAU, | ||
| const Vector< scalar > & | vol, | ||
| Vector< Vec3 > & | out | ||
| ) |
computes out = -(L+U) x
@notes explicitly sets out values to zero
| SharedSparsityBundle< SystemSparsityType, BoundarySparsityType > NeoN::la::readOrCreateSparsityBundle | ( | const UnstructuredMesh & | mesh | ) |
|
inline |
for testing purposes, this function reverses boundary contributions previously applied to the matrix diagonal and RHS for some operators (e.g., div).
Definition at line 448 of file linearSystem.hpp.
| Vector< IndexType > NeoN::la::rowsToRowOffs | ( | const Vector< IndexType > & | rows | ) |
given a set off row idx this function converts to rowOffsets
| void NeoN::la::scaledInvDiagNegLUx | ( | const CSRMatrix< scalar, localIdx > & | mtx, |
| const Vector< Vec3 > & | a, | ||
| const Vector< Vec3 > & | b, | ||
| const Vector< scalar > & | vol, | ||
| Vector< scalar > & | rAU, | ||
| Vector< Vec3 > & | out | ||
| ) |
scalar-matrix / Vec3-rhs variant of scaledInvDiagNegLUx
Mirrors the Vec3-matrix overload but for a scalar coefficient matrix assembled from a vector field (segregated vector-solve form). The scalar diagonal/off-diagonal entries scale all three rhs components equally.
@notes explicitly sets out values to zero
| void NeoN::la::scaledInvDiagNegLUx | ( | const CSRMatrix< Vec3, localIdx > & | mtx, |
| const Vector< Vec3 > & | a, | ||
| const Vector< Vec3 > & | b, | ||
| const Vector< scalar > & | vol, | ||
| Vector< scalar > & | rAU, | ||
| Vector< Vec3 > & | out | ||
| ) |
computes out = -(L+U) x
@notes explicitly sets out values to zero
| Vector< scalar > NeoN::la::scaledInverseDiag | ( | const CSRMatrix< scalar, localIdx > & | , |
| const FaceToMatrixAddress & | mi, | ||
| const Vector< scalar > & | |||
| ) |
scalar-matrix variant of scaledInverseDiag for the segregated vector-solve form
| void NeoN::la::scaledInverseDiag | ( | const CSRMatrix< scalar, localIdx > & | mtx, |
| const FaceToMatrixAddress & | mi, | ||
| const Vector< scalar > & | a, | ||
| Vector< scalar > & | out | ||
| ) |
| Vector< scalar > NeoN::la::scaledInverseDiag | ( | const CSRMatrix< Vec3, localIdx > & | , |
| const FaceToMatrixAddress & | mi, | ||
| const Vector< scalar > & | |||
| ) |
computes the inverted diagonal of a matrix and scales it by a, ie. a*D^-1
| Vector< scalar > NeoN::la::scaledInverseDiag | ( | const CSRMatrix< Vec3, localIdx > & | , |
| const Vector< scalar > & | |||
| ) |
computes the inverted diagonal of a matrix and scales it by a, ie. a*D^-1
| void NeoN::la::scaledInverseDiag | ( | const CSRMatrix< Vec3, localIdx > & | mtx, |
| const FaceToMatrixAddress & | mi, | ||
| const Vector< scalar > & | a, | ||
| Vector< scalar > & | out | ||
| ) |
| void NeoN::la::scaledInverseDiag | ( | const CSRMatrix< Vec3, localIdx > & | mtx, |
| const Vector< scalar > & | a, | ||
| Vector< scalar > & | out | ||
| ) |
| Vector< localIdx > NeoN::la::unpackColIdx | ( | const Vector< localIdx > & | in, |
| const Vector< localIdx > & | unpackedRowOffs, | ||
| const Vector< localIdx > & | packedRowOffs | ||
| ) |
| Vector< scalar > NeoN::la::unpackMtxValues | ( | const Vector< Vec3 > & | in, |
| const Vector< localIdx > & | rowOffs, | ||
| const Vector< localIdx > & | newRowOffs | ||
| ) |