NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
NeoN::la::CellBasedIterator::CellBasedData Struct Reference

Pre-computed connectivity required for cell-based assembly. More...

#include <meshIterationStrategies.hpp>

Public Member Functions

 CellBasedData ()=delete
 
template<typename CellFaces , typename FaceNeighbour , typename FaceSign , typename MatrixColumnIdx >
 CellBasedData (localIdx sizeIn, CellFaces &&cellFacesIn, FaceNeighbour &&faceNeighbourIn, FaceSign &&faceSignIn, MatrixColumnIdx &&matrixColumnIdxIn)
 Construct from pre-computed connectivity arrays.
 

Public Attributes

localIdx size
 Number of cells.
 
SegmentedVector< localIdx, localIdxcellFaces
 Cell-to-face stencil; segments correspond to cells, values are face indices.
 
Vector< localIdxfaceNeighbour
 For each stencil entry: the cell on the other side of the face.
 
Vector< scalarfaceSign
 Sign of the face contribution: +1 if this cell owns the face, -1 otherwise.
 
Vector< localIdxmatrixColumnIdx
 Flat index into the CSR matrix values array for each stencil entry.
 

Detailed Description

Pre-computed connectivity required for cell-based assembly.

All arrays are indexed by the flat position within cellFaces, i.e. for cell c the relevant slice runs from cellFaces.offset(c) to cellFaces.offset(c+1).

Definition at line 103 of file meshIterationStrategies.hpp.

Constructor & Destructor Documentation

◆ CellBasedData() [1/2]

NeoN::la::CellBasedIterator::CellBasedData::CellBasedData ( )
delete

◆ CellBasedData() [2/2]

template<typename CellFaces , typename FaceNeighbour , typename FaceSign , typename MatrixColumnIdx >
NeoN::la::CellBasedIterator::CellBasedData::CellBasedData ( localIdx  sizeIn,
CellFaces &&  cellFacesIn,
FaceNeighbour &&  faceNeighbourIn,
FaceSign &&  faceSignIn,
MatrixColumnIdx &&  matrixColumnIdxIn 
)
inline

Construct from pre-computed connectivity arrays.

A user-declared constructor is required (rather than relying on aggregate initialisation) because std::make_shared builds the object through std::construct_at, which performs parenthesised placement-new: new(p)\ CellBasedData(args...). Parenthesised initialisation of aggregates (C++20 P0960) is not implemented by the CUDA 12.4 nvcc/EDG front-end, so make_shared<CellBasedData>(...) fails there with "no instance of constructor ... matches".

The container parameters are templated so the constructor adapts to however the connectivity arrays are spelled at the call site (Vector<localIdx> or Vector<label>), avoiding a brittle exact type match across NeoN revisions.

Definition at line 127 of file meshIterationStrategies.hpp.

Member Data Documentation

◆ cellFaces

SegmentedVector<localIdx, localIdx> NeoN::la::CellBasedIterator::CellBasedData::cellFaces

Cell-to-face stencil; segments correspond to cells, values are face indices.

Definition at line 143 of file meshIterationStrategies.hpp.

◆ faceNeighbour

Vector<localIdx> NeoN::la::CellBasedIterator::CellBasedData::faceNeighbour

For each stencil entry: the cell on the other side of the face.

Definition at line 146 of file meshIterationStrategies.hpp.

◆ faceSign

Vector<scalar> NeoN::la::CellBasedIterator::CellBasedData::faceSign

Sign of the face contribution: +1 if this cell owns the face, -1 otherwise.

Definition at line 150 of file meshIterationStrategies.hpp.

◆ matrixColumnIdx

Vector<localIdx> NeoN::la::CellBasedIterator::CellBasedData::matrixColumnIdx

Flat index into the CSR matrix values array for each stencil entry.

Definition at line 153 of file meshIterationStrategies.hpp.

◆ size

localIdx NeoN::la::CellBasedIterator::CellBasedData::size

Number of cells.

Definition at line 140 of file meshIterationStrategies.hpp.


The documentation for this struct was generated from the following file: