Alien  1.3.0
User documentation
Loading...
Searching...
No Matches
Alien::CompositeVector Class Reference

Composite vector for heterogenous vector. More...

#include <core/alien/data/CompositeVector.h>

Public Types

using Element = CompositeKernel::VectorElement
 Type of submatrix element.

Public Member Functions

 CompositeVector ()
 Constructor.
 CompositeVector (Arccore::Integer nc)
 Constructor.
virtual ~CompositeVector ()
 Free resources.
void visit (ICopyOnWriteVector &) const
 Visit method.
const ISpace & space () const
 Get the space of the global vector.
void resize (Arccore::Integer nc)
 Resize the number of submatrices.
Arccore::Integer size () const
 Get the number of subvectors.
Element composite (Arccore::Integer i)
 Get the i-th element.
IVector & operator[] (Arccore::Integer i)
 Get the i-th subvector.
const IVector & operator[] (Arccore::Integer i) const
 Get the i-th subvector.
void setUserFeature (Arccore::String feature)
 Add a feature to the composite vector.
bool hasUserFeature (Arccore::String feature) const
 Check if the composite vector has a feature.
MultiVectorImpl * impl ()
 Get the multivector implementation.
const MultiVectorImpl * impl () const
 Get the multivector implementation.
void free ()
 Free resources.
void clear ()
 Clear resources.

Additional Inherited Members

Protected Member Functions inherited from Alien::IVector
 IVector ()
 Constructor.

Detailed Description

Composite vector for heterogenous vector.

This class allow to handle vectors made of several vectors

Definition at line 62 of file data/CompositeVector.h.

Member Typedef Documentation

◆ Element

Type of submatrix element.

Definition at line 67 of file data/CompositeVector.h.

Constructor & Destructor Documentation

◆ CompositeVector() [1/2]

Alien::CompositeVector::CompositeVector ( )

Constructor.

Definition at line 53 of file data/CompositeVector.cc.

References CompositeVector().

Referenced by CompositeVector().

◆ CompositeVector() [2/2]

Alien::CompositeVector::CompositeVector ( Arccore::Integer nc)

Constructor.

Parameters
[in]ncThe number of subvectors

◆ ~CompositeVector()

virtual Alien::CompositeVector::~CompositeVector ( )
inlinevirtual

Free resources.

Definition at line 80 of file data/CompositeVector.h.

Member Function Documentation

◆ clear()

void Alien::CompositeVector::clear ( )

Clear resources.

Definition at line 189 of file data/CompositeVector.cc.

References impl(), and size().

Referenced by operator[]().

◆ composite()

CompositeVector::Element Alien::CompositeVector::composite ( Arccore::Integer i)

Get the i-th element.

Parameters
[in]iThe index of the element
Returns
The i-th element

Definition at line 111 of file data/CompositeVector.cc.

◆ free()

void Alien::CompositeVector::free ( )

Free resources.

Definition at line 179 of file data/CompositeVector.cc.

References impl(), and size().

Referenced by operator[]().

◆ hasUserFeature()

bool Alien::CompositeVector::hasUserFeature ( Arccore::String feature) const

Check if the composite vector has a feature.

Returns
Wheteher or not the composite matrix has the feature

Definition at line 145 of file data/CompositeVector.cc.

Referenced by operator[]().

◆ impl() [1/2]

MultiVectorImpl * Alien::CompositeVector::impl ( )
virtual

Get the multivector implementation.

Returns
The multivector implementation

Implements Alien::IVector.

Definition at line 154 of file data/CompositeVector.cc.

References Alien::MultiVectorImpl::get().

Referenced by clear(), free(), Alien::NormalizeOpt::normalize(), and operator[]().

◆ impl() [2/2]

const MultiVectorImpl * Alien::CompositeVector::impl ( ) const
virtual

Get the multivector implementation.

Returns
The multivector implementation

Implements Alien::IVector.

Definition at line 171 of file data/CompositeVector.cc.

References Alien::MultiVectorImpl::get().

◆ operator[]() [1/2]

IVector & Alien::CompositeVector::operator[] ( Arccore::Integer i)

Get the i-th subvector.

Parameters
[in]iThe index of the subvector
Returns
The i-th subvector

References Alien::IVector::IVector().

◆ operator[]() [2/2]

const IVector & Alien::CompositeVector::operator[] ( Arccore::Integer i) const

Get the i-th subvector.

Parameters
[in]iThe index of the subvector
Returns
The i-th subvector

References clear(), free(), hasUserFeature(), impl(), Alien::IVector::IVector(), and setUserFeature().

◆ resize()

void Alien::CompositeVector::resize ( Arccore::Integer nc)

Resize the number of submatrices.

Parameters
[in]ncThe number of submatrices

Definition at line 81 of file data/CompositeVector.cc.

References size().

◆ setUserFeature()

void Alien::CompositeVector::setUserFeature ( Arccore::String feature)

Add a feature to the composite vector.

Parameters
[in]featureThe feature to add

Definition at line 137 of file data/CompositeVector.cc.

Referenced by operator[]().

◆ size()

Integer Alien::CompositeVector::size ( ) const

Get the number of subvectors.

Returns
The number of subvectors

Definition at line 93 of file data/CompositeVector.cc.

Referenced by clear(), free(), and resize().

◆ space()

const ISpace & Alien::CompositeVector::space ( ) const
virtual

Get the space of the global vector.

Returns
The space

Implements Alien::IVector.

Definition at line 102 of file data/CompositeVector.cc.

◆ visit()

void Alien::CompositeVector::visit ( ICopyOnWriteVector & v) const
virtual

Visit method.

Parameters
[in]visitVisit vector method

Implements Alien::IVector.

Definition at line 73 of file data/CompositeVector.cc.


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