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.
List of all members
Kratos::KratosSpace< TDataType, TMatrixType, TVectorType > Class Template Reference

Short class definition. More...

#include <kratos_space.h>

Collaboration diagram for Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >:

Public Member Functions

Life Cycle
 KratosSpace ()
 Default constructor. More...
 
virtual ~KratosSpace ()
 Destructor. More...
 

Static Public Member Functions

Operations
static MatrixPointerType CreateEmptyMatrixPointer ()
 
static VectorPointerType CreateEmptyVectorPointer ()
 
static IndexType Size (VectorType const &rV)
 return size of vector rV More...
 
static IndexType Size1 (MatrixType const &rM)
 return number of rows of rM More...
 
static IndexType Size2 (MatrixType const &rM)
 return number of columns of rM More...
 
template<typename TColumnType >
static void GetColumn (unsigned int j, Matrix &rM, TColumnType &rX)
 rXi = rMij More...
 
template<typename TColumnType >
static void SetColumn (unsigned int j, Matrix &rM, TColumnType &rX)
 
static void Copy (MatrixType const &rX, MatrixType &rY)
 rY = rX More...
 
static void Copy (VectorType const &rX, VectorType &rY)
 rY = rX More...
 
static TDataType Dot (VectorType const &rX, VectorType const &rY)
 rX * rY More...
 
static TDataType TwoNorm (VectorType const &rX)
 ||rX||2 More...
 
static TDataType TwoNorm (const Matrix &rA)
 
static TDataType TwoNorm (const CsrMatrix< TDataType > &rA)
 
static TDataType TwoNorm (const DistributedCsrMatrix< TDataType > &rA)
 
static TDataType JacobiNorm (const Matrix &rA)
 
static TDataType JacobiNorm (const CsrMatrix< TDataType > &rA)
 
static void Mult (const Matrix &rA, VectorType &rX, VectorType &rY)
 
static void Mult (const CsrMatrix< TDataType > &rA, VectorType &rX, VectorType &rY)
 
template<class TOtherMatrixType >
static void TransposeMult (TOtherMatrixType &rA, VectorType &rX, VectorType &rY)
 
static SizeType GraphDegree (IndexType i, const CsrMatrix< TDataType > &rA)
 
static void GraphNeighbors (IndexType i, const CsrMatrix< TDataType > &rA, std::vector< IndexType > &neighbors)
 
static void InplaceMult (VectorType &rX, const double A)
 
static void Assign (VectorType &rX, const double A, const VectorType &rY)
 
static void UnaliasedAdd (VectorType &rX, const double A, const VectorType &rY)
 
static void ScaleAndAdd (const double A, const VectorType &rX, const double B, const VectorType &rY, VectorType &rZ)
 
static void ScaleAndAdd (const double A, const VectorType &rX, const double B, VectorType &rY)
 
static double RowDot (unsigned int i, MatrixType &rA, VectorType &rX)
 rA[i] * rX More...
 
static void SetValue (VectorType &rX, IndexType local_i, TDataType value)
 
static void Set (VectorType &rX, TDataType A)
 rX = A More...
 
static void Resize (MatrixType &rA, SizeType m, SizeType n)
 
static void Resize (MatrixPointerType &pA, SizeType m, SizeType n)
 
static void Resize (VectorType &rX, SizeType n)
 
static void Resize (VectorPointerType &pX, SizeType n)
 
static void Clear (MatrixPointerType &pA)
 
static void Clear (VectorPointerType &pX)
 
template<class TOtherMatrixType >
static void ResizeData (TOtherMatrixType &rA, SizeType m)
 
static void ResizeData (CsrMatrix< TDataType > &rA, SizeType m)
 
static void ResizeData (VectorType &rX, SizeType m)
 
template<class TOtherMatrixType >
static void SetToZero (TOtherMatrixType &rA)
 
static void SetToZero (CsrMatrix< TDataType > &rA)
 
static void SetToZero (VectorType &rX)
 
template<class TOtherMatrixType , class TEquationIdVectorType >
static void AssembleLHS (MatrixType &A, TOtherMatrixType &LHS_Contribution, TEquationIdVectorType &EquationId)
 

Type Definitions

typedef TDataType DataType
 
typedef TMatrixType MatrixType
 
typedef TVectorType VectorType
 
typedef std::size_t IndexType
 
typedef std::size_t SizeType
 
typedef Kratos::shared_ptr< TMatrixType > MatrixPointerType
 
typedef Kratos::shared_ptr< TVectorType > VectorPointerType
 
typedef DofUpdater< KratosSpace< TDataType, TMatrixType, TVectorType > > DofUpdaterType
 
typedef DofUpdaterType::UniquePointer DofUpdaterPointerType
 
 KRATOS_CLASS_POINTER_DEFINITION (KratosSpace)
 Pointer definition of KratosSpace. More...
 

Input and output

virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
static constexpr bool IsDistributed ()
 
static TDataType GetValue (const VectorType &x, IndexType LocalI)
 
static void GatherValues (const VectorType &x, const std::vector< IndexType > &IndexArray, TDataType *pValues)
 
template<class TOtherMatrixType >
static bool WriteMatrixMarketMatrix (const char *pFileName, TOtherMatrixType &rM, const bool Symmetric)
 
template<class VectorType >
static bool WriteMatrixMarketVector (const char *pFileName, const VectorType &rV)
 
static DofUpdaterPointerType CreateDofUpdater ()
 

Detailed Description

template<class TDataType, class TMatrixType, class TVectorType>
class Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >

Short class definition.

Detail class definition.

Member Typedef Documentation

◆ DataType

template<class TDataType , class TMatrixType , class TVectorType >
typedef TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::DataType

◆ DofUpdaterPointerType

template<class TDataType , class TMatrixType , class TVectorType >
typedef DofUpdaterType::UniquePointer Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::DofUpdaterPointerType

◆ DofUpdaterType

template<class TDataType , class TMatrixType , class TVectorType >
typedef DofUpdater< KratosSpace<TDataType,TMatrixType,TVectorType> > Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::DofUpdaterType

◆ IndexType

template<class TDataType , class TMatrixType , class TVectorType >
typedef std::size_t Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::IndexType

◆ MatrixPointerType

template<class TDataType , class TMatrixType , class TVectorType >
typedef Kratos::shared_ptr< TMatrixType > Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::MatrixPointerType

◆ MatrixType

template<class TDataType , class TMatrixType , class TVectorType >
typedef TMatrixType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::MatrixType

◆ SizeType

template<class TDataType , class TMatrixType , class TVectorType >
typedef std::size_t Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::SizeType

◆ VectorPointerType

template<class TDataType , class TMatrixType , class TVectorType >
typedef Kratos::shared_ptr< TVectorType > Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::VectorPointerType

◆ VectorType

template<class TDataType , class TMatrixType , class TVectorType >
typedef TVectorType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::VectorType

Constructor & Destructor Documentation

◆ KratosSpace()

template<class TDataType , class TMatrixType , class TVectorType >
Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::KratosSpace ( )
inline

Default constructor.

◆ ~KratosSpace()

template<class TDataType , class TMatrixType , class TVectorType >
virtual Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::~KratosSpace ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AssembleLHS()

template<class TDataType , class TMatrixType , class TVectorType >
template<class TOtherMatrixType , class TEquationIdVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::AssembleLHS ( MatrixType A,
TOtherMatrixType &  LHS_Contribution,
TEquationIdVectorType &  EquationId 
)
inlinestatic

◆ Assign()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Assign ( VectorType rX,
const double  A,
const VectorType rY 
)
inlinestatic

◆ Clear() [1/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Clear ( MatrixPointerType pA)
inlinestatic

◆ Clear() [2/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Clear ( VectorPointerType pX)
inlinestatic

◆ Copy() [1/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Copy ( MatrixType const &  rX,
MatrixType rY 
)
inlinestatic

rY = rX

◆ Copy() [2/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Copy ( VectorType const &  rX,
VectorType rY 
)
inlinestatic

rY = rX

◆ CreateDofUpdater()

template<class TDataType , class TMatrixType , class TVectorType >
static DofUpdaterPointerType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::CreateDofUpdater ( )
inlinestatic

◆ CreateEmptyMatrixPointer()

template<class TDataType , class TMatrixType , class TVectorType >
static MatrixPointerType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::CreateEmptyMatrixPointer ( )
inlinestatic

◆ CreateEmptyVectorPointer()

template<class TDataType , class TMatrixType , class TVectorType >
static VectorPointerType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::CreateEmptyVectorPointer ( )
inlinestatic

◆ Dot()

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Dot ( VectorType const &  rX,
VectorType const &  rY 
)
inlinestatic

rX * rY

◆ GatherValues()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::GatherValues ( const VectorType x,
const std::vector< IndexType > &  IndexArray,
TDataType *  pValues 
)
inlinestatic

◆ GetColumn()

template<class TDataType , class TMatrixType , class TVectorType >
template<typename TColumnType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::GetColumn ( unsigned int  j,
Matrix rM,
TColumnType &  rX 
)
inlinestatic

rXi = rMij

◆ GetValue()

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::GetValue ( const VectorType x,
IndexType  LocalI 
)
inlinestatic

◆ GraphDegree()

template<class TDataType , class TMatrixType , class TVectorType >
static SizeType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::GraphDegree ( IndexType  i,
const CsrMatrix< TDataType > &  rA 
)
inlinestatic

◆ GraphNeighbors()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::GraphNeighbors ( IndexType  i,
const CsrMatrix< TDataType > &  rA,
std::vector< IndexType > &  neighbors 
)
inlinestatic

◆ Info()

template<class TDataType , class TMatrixType , class TVectorType >
virtual std::string Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ InplaceMult()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::InplaceMult ( VectorType rX,
const double  A 
)
inlinestatic

◆ IsDistributed()

template<class TDataType , class TMatrixType , class TVectorType >
static constexpr bool Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::IsDistributed ( )
inlinestaticconstexpr

◆ JacobiNorm() [1/2]

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::JacobiNorm ( const CsrMatrix< TDataType > &  rA)
inlinestatic

◆ JacobiNorm() [2/2]

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::JacobiNorm ( const Matrix rA)
inlinestatic

This method computes the Jacobi norm

Parameters
rAThe matrix to compute the Jacobi norm
Returns
aux_sum: The Jacobi norm

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TDataType , class TMatrixType , class TVectorType >
Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::KRATOS_CLASS_POINTER_DEFINITION ( KratosSpace< TDataType, TMatrixType, TVectorType >  )

Pointer definition of KratosSpace.

◆ Mult() [1/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Mult ( const CsrMatrix< TDataType > &  rA,
VectorType rX,
VectorType rY 
)
inlinestatic

◆ Mult() [2/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Mult ( const Matrix rA,
VectorType rX,
VectorType rY 
)
inlinestatic

◆ PrintData()

template<class TDataType , class TMatrixType , class TVectorType >
virtual void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo()

template<class TDataType , class TMatrixType , class TVectorType >
virtual void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ Resize() [1/4]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Resize ( MatrixPointerType pA,
SizeType  m,
SizeType  n 
)
inlinestatic

◆ Resize() [2/4]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Resize ( MatrixType rA,
SizeType  m,
SizeType  n 
)
inlinestatic

◆ Resize() [3/4]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Resize ( VectorPointerType pX,
SizeType  n 
)
inlinestatic

◆ Resize() [4/4]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Resize ( VectorType rX,
SizeType  n 
)
inlinestatic

◆ ResizeData() [1/3]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::ResizeData ( CsrMatrix< TDataType > &  rA,
SizeType  m 
)
inlinestatic

◆ ResizeData() [2/3]

template<class TDataType , class TMatrixType , class TVectorType >
template<class TOtherMatrixType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::ResizeData ( TOtherMatrixType &  rA,
SizeType  m 
)
inlinestatic

◆ ResizeData() [3/3]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::ResizeData ( VectorType rX,
SizeType  m 
)
inlinestatic

◆ RowDot()

template<class TDataType , class TMatrixType , class TVectorType >
static double Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::RowDot ( unsigned int  i,
MatrixType rA,
VectorType rX 
)
inlinestatic

rA[i] * rX

◆ ScaleAndAdd() [1/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::ScaleAndAdd ( const double  A,
const VectorType rX,
const double  B,
const VectorType rY,
VectorType rZ 
)
inlinestatic

◆ ScaleAndAdd() [2/2]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::ScaleAndAdd ( const double  A,
const VectorType rX,
const double  B,
VectorType rY 
)
inlinestatic

◆ Set()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Set ( VectorType rX,
TDataType  A 
)
inlinestatic

rX = A

◆ SetColumn()

template<class TDataType , class TMatrixType , class TVectorType >
template<typename TColumnType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::SetColumn ( unsigned int  j,
Matrix rM,
TColumnType &  rX 
)
inlinestatic

◆ SetToZero() [1/3]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::SetToZero ( CsrMatrix< TDataType > &  rA)
inlinestatic

◆ SetToZero() [2/3]

template<class TDataType , class TMatrixType , class TVectorType >
template<class TOtherMatrixType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::SetToZero ( TOtherMatrixType &  rA)
inlinestatic

◆ SetToZero() [3/3]

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::SetToZero ( VectorType rX)
inlinestatic

◆ SetValue()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::SetValue ( VectorType rX,
IndexType  local_i,
TDataType  value 
)
inlinestatic

◆ Size()

template<class TDataType , class TMatrixType , class TVectorType >
static IndexType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Size ( VectorType const &  rV)
inlinestatic

return size of vector rV

◆ Size1()

template<class TDataType , class TMatrixType , class TVectorType >
static IndexType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Size1 ( MatrixType const &  rM)
inlinestatic

return number of rows of rM

◆ Size2()

template<class TDataType , class TMatrixType , class TVectorType >
static IndexType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::Size2 ( MatrixType const &  rM)
inlinestatic

return number of columns of rM

◆ TransposeMult()

template<class TDataType , class TMatrixType , class TVectorType >
template<class TOtherMatrixType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::TransposeMult ( TOtherMatrixType &  rA,
VectorType rX,
VectorType rY 
)
inlinestatic

◆ TwoNorm() [1/4]

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::TwoNorm ( const CsrMatrix< TDataType > &  rA)
inlinestatic

◆ TwoNorm() [2/4]

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::TwoNorm ( const DistributedCsrMatrix< TDataType > &  rA)
inlinestatic

◆ TwoNorm() [3/4]

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::TwoNorm ( const Matrix rA)
inlinestatic

◆ TwoNorm() [4/4]

template<class TDataType , class TMatrixType , class TVectorType >
static TDataType Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::TwoNorm ( VectorType const &  rX)
inlinestatic

||rX||2

◆ UnaliasedAdd()

template<class TDataType , class TMatrixType , class TVectorType >
static void Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::UnaliasedAdd ( VectorType rX,
const double  A,
const VectorType rY 
)
inlinestatic

◆ WriteMatrixMarketMatrix()

template<class TDataType , class TMatrixType , class TVectorType >
template<class TOtherMatrixType >
static bool Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::WriteMatrixMarketMatrix ( const char *  pFileName,
TOtherMatrixType &  rM,
const bool  Symmetric 
)
inlinestatic

◆ WriteMatrixMarketVector()

template<class TDataType , class TMatrixType , class TVectorType >
template<class VectorType >
static bool Kratos::KratosSpace< TDataType, TMatrixType, TVectorType >::WriteMatrixMarketVector ( const char *  pFileName,
const VectorType rV 
)
inlinestatic

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