|
NeoN
A framework for CFD software
|
Iteration strategy that traverses cells and their face stencils. More...
#include <meshIterationStrategies.hpp>
Classes | |
| struct | CellBasedData |
| Pre-computed connectivity required for cell-based assembly. More... | |
Public Member Functions | |
| CellBasedIterator () | |
| std::string | name () const override |
| Returns the strategy name. | |
| size_t | size () const override |
| Returns the number of iteration elements (cells or faces). | |
| ~CellBasedIterator () override | |
| std::shared_ptr< CellBasedData > | getCellBasedData () |
| Returns the pre-computed connectivity data, or nullptr if not yet initialised. | |
| template<typename SparsityType > | |
| void | setComputeCellBasedData (const UnstructuredMesh &mesh, std::shared_ptr< const SparsityType > sparsityPattern, std::shared_ptr< const la::FaceToMatrixAddress > faceToMatrixAddress) |
| Computes and stores the cell-based connectivity data. | |
| template<typename SparsityType > | |
| std::shared_ptr< CellBasedData > | computeCellBasedData (const UnstructuredMesh &mesh, std::shared_ptr< const SparsityType > sparsityPattern, const std::shared_ptr< const la::FaceToMatrixAddress > faceToMatrixAddress) |
| Builds and returns cell-based connectivity data without storing it. | |
Public Member Functions inherited from NeoN::la::MeshIterationStrategy | |
| virtual | ~MeshIterationStrategy () |
Public Attributes | |
| std::shared_ptr< CellBasedData > | cellBasedIteratorData_ |
Iteration strategy that traverses cells and their face stencils.
Pre-computes a cell-centric connectivity table (CellBasedData) so that each cell can independently gather all face contributions during assembly, which is better suited for GPU-parallel execution than the face-based approach.
Definition at line 89 of file meshIterationStrategies.hpp.
| NeoN::la::CellBasedIterator::CellBasedIterator | ( | ) |
|
inlineoverride |
Definition at line 160 of file meshIterationStrategies.hpp.
| std::shared_ptr< CellBasedData > NeoN::la::CellBasedIterator::computeCellBasedData | ( | const UnstructuredMesh & | mesh, |
| std::shared_ptr< const SparsityType > | sparsityPattern, | ||
| const std::shared_ptr< const la::FaceToMatrixAddress > | faceToMatrixAddress | ||
| ) |
Builds and returns cell-based connectivity data without storing it.
Launches a parallel kernel that, for every cell, iterates over its face stencil and records the neighbour cell, the face sign, and the matrix column index for each face.
| SparsityType | Sparsity pattern type (e.g. CsrSparsityPattern, CooSparsityPattern). |
| mesh | The mesh providing owner/neighbour topology. |
| sparsityPattern | Sparsity pattern of the linear system. |
| faceToMatrixAddress | Mapping from faces to matrix row offsets. |
| std::shared_ptr< CellBasedData > NeoN::la::CellBasedIterator::getCellBasedData | ( | ) |
Returns the pre-computed connectivity data, or nullptr if not yet initialised.
|
overridevirtual |
Returns the strategy name.
Implements NeoN::la::MeshIterationStrategy.
| void NeoN::la::CellBasedIterator::setComputeCellBasedData | ( | const UnstructuredMesh & | mesh, |
| std::shared_ptr< const SparsityType > | sparsityPattern, | ||
| std::shared_ptr< const la::FaceToMatrixAddress > | faceToMatrixAddress | ||
| ) |
Computes and stores the cell-based connectivity data.
| SparsityType | Sparsity pattern type (e.g. CsrSparsityPattern, CooSparsityPattern). |
| mesh | The mesh providing owner/neighbour topology. |
| sparsityPattern | Sparsity pattern of the linear system. |
| faceToMatrixAddress | Mapping from faces to matrix row offsets. |
|
overridevirtual |
Returns the number of iteration elements (cells or faces).
Implements NeoN::la::MeshIterationStrategy.
| std::shared_ptr<CellBasedData> NeoN::la::CellBasedIterator::cellBasedIteratorData_ |
Definition at line 200 of file meshIterationStrategies.hpp.