KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Classes | List of all members
Kratos::SparseContiguousRowGraph< TIndexType > Class Template Referencefinal

Short class definition. More...

#include <sparse_contiguous_row_graph.h>

Collaboration diagram for Kratos::SparseContiguousRowGraph< TIndexType >:

Classes

class  const_iterator_adaptor
 

Public Member Functions

Life Cycle
 SparseContiguousRowGraph ()
 Default constructor. - needs to be public for communicator, but it will fail if used in any other mode. More...
 
 SparseContiguousRowGraph (IndexType GraphSize)
 
 ~SparseContiguousRowGraph ()
 Destructor. More...
 
SparseContiguousRowGraphoperator= (SparseContiguousRowGraph const &rOther)=delete
 Assignment operator. TODO: decide if we do want to allow it. More...
 
 SparseContiguousRowGraph (const SparseContiguousRowGraph &rOther)
 Copy constructor. More...
 
const DataCommunicatorGetComm () const
 
const DataCommunicatorpGetComm () const
 
Operators
void Clear ()
 
IndexType Size () const
 
bool Has (const IndexType I, const IndexType J) const
 
const GraphType::value_typeoperator[] (const IndexType &Key) const
 
IndexType LocalIndex (const IndexType GlobalIndex) const
 
IndexType GlobalIndex (const IndexType LocalIndex) const
 
void AddEntry (const IndexType RowIndex, const IndexType ColIndex)
 
template<class TContainerType >
void AddEntries (const IndexType RowIndex, const TContainerType &rColIndices)
 
template<class TIteratorType >
void AddEntries (const IndexType RowIndex, const TIteratorType &rColBegin, const TIteratorType &rColEnd)
 
template<class TContainerType >
void AddEntries (const TContainerType &rIndices)
 
template<class TContainerType >
void AddEntries (const TContainerType &rRowIndices, const TContainerType &rColIndices)
 
void AddEntries (const SparseContiguousRowGraph &rOtherGraph)
 
void Finalize ()
 
const GraphTypeGetGraph () const
 
template<class TVectorType = DenseVector<IndexType>>
IndexType ExportCSRArrays (TVectorType &rRowIndices, TVectorType &rColIndices) const
 
IndexType ExportCSRArrays (Kratos::span< IndexType > &rRowIndices, Kratos::span< IndexType > &rColIndices) const =delete
 
IndexType ExportCSRArrays (IndexType *&pRowIndicesData, IndexType &rRowDataSize, IndexType *&pColIndicesData, IndexType &rColDataSize) const
 
std::vector< IndexTypeExportSingleVectorRepresentation ()
 
void AddFromSingleVectorRepresentation (const std::vector< IndexType > &rSingleVectorRepresentation)
 
Access
const_iterator_adaptor begin () const
 
const_iterator_adaptor end () const
 
Input and output
std::string Info () const
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Type Definitions

typedef TIndexType IndexType
 
typedef DenseVector< std::unordered_set< IndexType > > GraphType
 
typedef GraphType::const_iterator const_row_iterator
 
 KRATOS_CLASS_POINTER_DEFINITION (SparseContiguousRowGraph)
 Pointer definition of SparseContiguousRowGraph. More...
 

Private Operators

class Serializer
 

Detailed Description

template<typename TIndexType = std::size_t>
class Kratos::SparseContiguousRowGraph< TIndexType >

Short class definition.

This class is designed to store a matrix graph, aimed at the fast construction of other sparse matrix formats (particularly CSR) IMPORTANT NOTE: AddEntries IS threasafe

Member Typedef Documentation

◆ const_row_iterator

template<typename TIndexType = std::size_t>
typedef GraphType::const_iterator Kratos::SparseContiguousRowGraph< TIndexType >::const_row_iterator

◆ GraphType

template<typename TIndexType = std::size_t>
typedef DenseVector<std::unordered_set<IndexType> > Kratos::SparseContiguousRowGraph< TIndexType >::GraphType

◆ IndexType

template<typename TIndexType = std::size_t>
typedef TIndexType Kratos::SparseContiguousRowGraph< TIndexType >::IndexType

Constructor & Destructor Documentation

◆ SparseContiguousRowGraph() [1/3]

template<typename TIndexType = std::size_t>
Kratos::SparseContiguousRowGraph< TIndexType >::SparseContiguousRowGraph ( )
inline

Default constructor. - needs to be public for communicator, but it will fail if used in any other mode.

◆ SparseContiguousRowGraph() [2/3]

template<typename TIndexType = std::size_t>
Kratos::SparseContiguousRowGraph< TIndexType >::SparseContiguousRowGraph ( IndexType  GraphSize)
inline

◆ ~SparseContiguousRowGraph()

template<typename TIndexType = std::size_t>
Kratos::SparseContiguousRowGraph< TIndexType >::~SparseContiguousRowGraph ( )
inline

Destructor.

◆ SparseContiguousRowGraph() [3/3]

template<typename TIndexType = std::size_t>
Kratos::SparseContiguousRowGraph< TIndexType >::SparseContiguousRowGraph ( const SparseContiguousRowGraph< TIndexType > &  rOther)
inline

Copy constructor.

Member Function Documentation

◆ AddEntries() [1/5]

template<typename TIndexType = std::size_t>
template<class TContainerType >
void Kratos::SparseContiguousRowGraph< TIndexType >::AddEntries ( const IndexType  RowIndex,
const TContainerType &  rColIndices 
)
inline

◆ AddEntries() [2/5]

template<typename TIndexType = std::size_t>
template<class TIteratorType >
void Kratos::SparseContiguousRowGraph< TIndexType >::AddEntries ( const IndexType  RowIndex,
const TIteratorType &  rColBegin,
const TIteratorType &  rColEnd 
)
inline

◆ AddEntries() [3/5]

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::AddEntries ( const SparseContiguousRowGraph< TIndexType > &  rOtherGraph)
inline

◆ AddEntries() [4/5]

template<typename TIndexType = std::size_t>
template<class TContainerType >
void Kratos::SparseContiguousRowGraph< TIndexType >::AddEntries ( const TContainerType &  rIndices)
inline

◆ AddEntries() [5/5]

template<typename TIndexType = std::size_t>
template<class TContainerType >
void Kratos::SparseContiguousRowGraph< TIndexType >::AddEntries ( const TContainerType &  rRowIndices,
const TContainerType &  rColIndices 
)
inline

◆ AddEntry()

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::AddEntry ( const IndexType  RowIndex,
const IndexType  ColIndex 
)
inline

◆ AddFromSingleVectorRepresentation()

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::AddFromSingleVectorRepresentation ( const std::vector< IndexType > &  rSingleVectorRepresentation)
inline

◆ begin()

template<typename TIndexType = std::size_t>
const_iterator_adaptor Kratos::SparseContiguousRowGraph< TIndexType >::begin ( ) const
inline

◆ Clear()

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::Clear ( )
inline

◆ end()

template<typename TIndexType = std::size_t>
const_iterator_adaptor Kratos::SparseContiguousRowGraph< TIndexType >::end ( ) const
inline

◆ ExportCSRArrays() [1/3]

template<typename TIndexType = std::size_t>
IndexType Kratos::SparseContiguousRowGraph< TIndexType >::ExportCSRArrays ( IndexType *&  pRowIndicesData,
IndexType rRowDataSize,
IndexType *&  pColIndicesData,
IndexType rColDataSize 
) const
inline

◆ ExportCSRArrays() [2/3]

template<typename TIndexType = std::size_t>
IndexType Kratos::SparseContiguousRowGraph< TIndexType >::ExportCSRArrays ( Kratos::span< IndexType > &  rRowIndices,
Kratos::span< IndexType > &  rColIndices 
) const
delete

◆ ExportCSRArrays() [3/3]

template<typename TIndexType = std::size_t>
template<class TVectorType = DenseVector<IndexType>>
IndexType Kratos::SparseContiguousRowGraph< TIndexType >::ExportCSRArrays ( TVectorType &  rRowIndices,
TVectorType &  rColIndices 
) const
inline

◆ ExportSingleVectorRepresentation()

template<typename TIndexType = std::size_t>
std::vector<IndexType> Kratos::SparseContiguousRowGraph< TIndexType >::ExportSingleVectorRepresentation ( )
inline

◆ Finalize()

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::Finalize ( )
inline

◆ GetComm()

template<typename TIndexType = std::size_t>
const DataCommunicator& Kratos::SparseContiguousRowGraph< TIndexType >::GetComm ( ) const
inline

◆ GetGraph()

template<typename TIndexType = std::size_t>
const GraphType& Kratos::SparseContiguousRowGraph< TIndexType >::GetGraph ( ) const
inline

◆ GlobalIndex()

template<typename TIndexType = std::size_t>
IndexType Kratos::SparseContiguousRowGraph< TIndexType >::GlobalIndex ( const IndexType  LocalIndex) const
inline

◆ Has()

template<typename TIndexType = std::size_t>
bool Kratos::SparseContiguousRowGraph< TIndexType >::Has ( const IndexType  I,
const IndexType  J 
) const
inline

◆ Info()

template<typename TIndexType = std::size_t>
std::string Kratos::SparseContiguousRowGraph< TIndexType >::Info ( ) const
inline

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<typename TIndexType = std::size_t>
Kratos::SparseContiguousRowGraph< TIndexType >::KRATOS_CLASS_POINTER_DEFINITION ( SparseContiguousRowGraph< TIndexType >  )

Pointer definition of SparseContiguousRowGraph.

◆ LocalIndex()

template<typename TIndexType = std::size_t>
IndexType Kratos::SparseContiguousRowGraph< TIndexType >::LocalIndex ( const IndexType  GlobalIndex) const
inline

◆ operator=()

template<typename TIndexType = std::size_t>
SparseContiguousRowGraph& Kratos::SparseContiguousRowGraph< TIndexType >::operator= ( SparseContiguousRowGraph< TIndexType > const &  rOther)
delete

Assignment operator. TODO: decide if we do want to allow it.

◆ operator[]()

template<typename TIndexType = std::size_t>
const GraphType::value_type& Kratos::SparseContiguousRowGraph< TIndexType >::operator[] ( const IndexType Key) const
inline

◆ pGetComm()

template<typename TIndexType = std::size_t>
const DataCommunicator* Kratos::SparseContiguousRowGraph< TIndexType >::pGetComm ( ) const
inline

◆ PrintData()

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::PrintData ( std::ostream &  rOStream) const
inline

Print object's data.

◆ PrintInfo()

template<typename TIndexType = std::size_t>
void Kratos::SparseContiguousRowGraph< TIndexType >::PrintInfo ( std::ostream &  rOStream) const
inline

Print information about this object.

◆ Size()

template<typename TIndexType = std::size_t>
IndexType Kratos::SparseContiguousRowGraph< TIndexType >::Size ( ) const
inline

Friends And Related Function Documentation

◆ Serializer

template<typename TIndexType = std::size_t>
friend class Serializer
friend

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