Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::AlephMatrix Class Reference

Matrix of a linear system. More...

#include <arcane/aleph/AlephMatrix.h>

Inheritance diagram for Arcane::AlephMatrix:
Collaboration diagram for Arcane::AlephMatrix:

Public Member Functions

 AlephMatrix (AlephKernel *)
void create (void)
void create (IntegerConstArrayView, bool=false)
void create_really (void)
 create_really transmits the creation order to the external library
void reset (void)
 reset to flush the [set&add]Value arrays
Integer reIdx (Integer, Array< Int32 * > &)
 reIdx searches for the correspondence of the AlephIndexing
void reSetValuesIn (AlephMatrix *, Array< Int32 * > &)
 reSetValuesIn re-plays the setValue with the indexes calculated via the AlephIndexing
void reAddValuesIn (AlephMatrix *, Array< Int32 * > &)
 reAddValuesIn re-plays the addValue with the indexes calculated via the AlephIndexing
void updateKnownRowCol (Integer, Integer, Real)
void rowMapMapCol (Integer, Integer, Real)
void addValue (const VariableRef &, const Item &, const VariableRef &, const Item &, const Real)
void addValue (const VariableRef &, const ItemEnumerator &, const VariableRef &, const ItemEnumerator &, const Real)
 addValue from arguments in IVariables, Items, and Real
void setValue (const VariableRef &, const Item &, const VariableRef &, const Item &, const Real)
 setValue from arguments in IVariables, Items, and Real
void setValue (const VariableRef &, const ItemEnumerator &, const VariableRef &, const ItemEnumerator &, const Real)
 setValue from arguments in IVariables, ItemEnumerator, and Real
void addValue (Integer, Integer, Real)
 standard addValue in (i,j,val)
void setValue (Integer, Integer, Real)
 standard setValue from arguments (row,col,val)
void writeToFile (const String)
 Triggers the writing of the matrix to a file.
void startFilling ()
 Allows specifying the start of a filling phase.
void assemble ()
 assemble the matrices before resolution
void assemble_waitAndFill ()
 assemble_waitAndFill waits for the previously posted requests to be processed
void reassemble (Integer &, Real *)
 Triggers the order of retrieving results.
void reassemble_waitAndFill (Integer &, Real *)
 Synchronizes the reception of results.
void solve (AlephVector *, AlephVector *, Integer &, Real *, AlephParams *, bool=false)
 'Post' the solver to the scheduler asynchronously or not
void solveNow (AlephVector *, AlephVector *, AlephVector *, Integer &, Real *, AlephParams *)
 Solves the linear system.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const

Private Types

typedef std::map< Integer, IntegercolMap
typedef std::map< Integer, colMap * > rowColMap

Private Attributes

AlephKernelm_kernel = nullptr
Integer m_index
ArrayView< Integerm_ranks
bool m_participating_in_solver = false
IAlephMatrixm_implementation = nullptr
MultiArray2< AlephIntm_aleph_matrix_buffer_rows
MultiArray2< AlephIntm_aleph_matrix_buffer_cols
MultiArray2< Realm_aleph_matrix_buffer_vals
Integer m_setValue_idx
UniqueArray< AlephIntm_setValue_row
UniqueArray< AlephIntm_setValue_col
UniqueArray< Realm_setValue_val
rowColMap m_row_col_map
Integer m_addValue_idx
UniqueArray< Integerm_addValue_row
UniqueArray< Integerm_addValue_col
UniqueArray< Realm_addValue_val
UniqueArray< Parallel::Requestm_aleph_matrix_mpi_data_requests
UniqueArray< Parallel::Requestm_aleph_matrix_mpi_results_requests
UniqueArray< Int32m_aleph_matrix_buffer_n_iteration
UniqueArray< Realm_aleph_matrix_buffer_residual_norm

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Matrix of a linear system.

Definition at line 31 of file AlephMatrix.h.

Member Typedef Documentation

◆ colMap

typedef std::map<Integer, Integer> Arcane::AlephMatrix::colMap
private

Definition at line 92 of file AlephMatrix.h.

◆ rowColMap

typedef std::map<Integer, colMap*> Arcane::AlephMatrix::rowColMap
private

Definition at line 93 of file AlephMatrix.h.

Constructor & Destructor Documentation

◆ AlephMatrix()

Arcane::AlephMatrix::AlephMatrix ( AlephKernel * kernel)
explicit

Definition at line 27 of file AlephMatrix.cc.

◆ ~AlephMatrix()

Arcane::AlephMatrix::~AlephMatrix ( )

Definition at line 60 of file AlephMatrix.cc.

Member Function Documentation

◆ addValue() [1/3]

void Arcane::AlephMatrix::addValue ( const VariableRef & rowVar,
const Item & rowItm,
const VariableRef & colVar,
const Item & colItm,
const Real val )

Definition at line 125 of file AlephMatrix.cc.

◆ addValue() [2/3]

void Arcane::AlephMatrix::addValue ( const VariableRef & rowVar,
const ItemEnumerator & rowItm,
const VariableRef & colVar,
const ItemEnumerator & colItm,
const Real val )

addValue from arguments in IVariables, Items, and Real

Definition at line 118 of file AlephMatrix.cc.

◆ addValue() [3/3]

void Arcane::AlephMatrix::addValue ( Integer row,
Integer col,
Real val )

standard addValue in (i,j,val)

Definition at line 196 of file AlephMatrix.cc.

◆ assemble()

void Arcane::AlephMatrix::assemble ( void )

assemble the matrices before resolution

Definition at line 305 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug(), Arcane::Array< T >::fill(), Arcane::Array< T >::resize(), and Arcane::AbstractArray< T >::size().

Here is the call graph for this function:

◆ assemble_waitAndFill()

void Arcane::AlephMatrix::assemble_waitAndFill ( void )

assemble_waitAndFill waits for the previously posted requests to be processed

Definition at line 463 of file AlephMatrix.cc.

References create_really(), and Arcane::TraceAccessor::debug().

Here is the call graph for this function:

◆ create() [1/2]

void Arcane::AlephMatrix::create ( IntegerConstArrayView row_nb_element,
bool has_many_elements = false )

Definition at line 94 of file AlephMatrix.cc.

◆ create() [2/2]

void Arcane::AlephMatrix::create ( void )

Definition at line 74 of file AlephMatrix.cc.

◆ create_really()

void Arcane::AlephMatrix::create_really ( void )

create_really transmits the creation order to the external library

Definition at line 444 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Referenced by assemble_waitAndFill().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reAddValuesIn()

void Arcane::AlephMatrix::reAddValuesIn ( AlephMatrix * thisMatrix,
Array< Int32 * > & known_items_own_address )

reAddValuesIn re-plays the addValue with the indexes calculated via the AlephIndexing

Definition at line 290 of file AlephMatrix.cc.

References reIdx().

Here is the call graph for this function:

◆ reassemble()

void Arcane::AlephMatrix::reassemble ( Integer & nb_iteration,
Real * residual_norm )

Triggers the order of retrieving results.

Definition at line 630 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Here is the call graph for this function:

◆ reassemble_waitAndFill()

void Arcane::AlephMatrix::reassemble_waitAndFill ( Integer & nb_iteration,
Real * residual_norm )

Synchronizes the reception of results.

Definition at line 675 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Here is the call graph for this function:

◆ reIdx()

Int32 Arcane::AlephMatrix::reIdx ( Integer ij,
Array< Int32 * > & known_items_own_address )

reIdx searches for the correspondence of the AlephIndexing

Definition at line 266 of file AlephMatrix.cc.

Referenced by reAddValuesIn(), and reSetValuesIn().

Here is the caller graph for this function:

◆ reset()

void Arcane::AlephMatrix::reset ( void )

reset to flush the [set&add]Value arrays

Definition at line 106 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Here is the call graph for this function:

◆ reSetValuesIn()

void Arcane::AlephMatrix::reSetValuesIn ( AlephMatrix * thisMatrix,
Array< Int32 * > & known_items_own_address )

reSetValuesIn re-plays the setValue with the indexes calculated via the AlephIndexing

Definition at line 276 of file AlephMatrix.cc.

References reIdx(), and setValue().

Here is the call graph for this function:

◆ rowMapMapCol()

void Arcane::AlephMatrix::rowMapMapCol ( Integer row,
Integer col,
Real val )

Definition at line 156 of file AlephMatrix.cc.

◆ setValue() [1/3]

void Arcane::AlephMatrix::setValue ( const VariableRef & rowVar,
const Item & rowItm,
const VariableRef & colVar,
const Item & colItm,
const Real val )

setValue from arguments in IVariables, Items, and Real

Definition at line 220 of file AlephMatrix.cc.

References setValue().

Referenced by reSetValuesIn(), setValue(), and setValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setValue() [2/3]

void Arcane::AlephMatrix::setValue ( const VariableRef & rowVar,
const ItemEnumerator & rowItm,
const VariableRef & colVar,
const ItemEnumerator & colItm,
const Real val )

setValue from arguments in IVariables, ItemEnumerator, and Real

Definition at line 209 of file AlephMatrix.cc.

References setValue().

Here is the call graph for this function:

◆ setValue() [3/3]

void Arcane::AlephMatrix::setValue ( Integer row,
Integer col,
Real val )

standard setValue from arguments (row,col,val)

Definition at line 239 of file AlephMatrix.cc.

◆ solve()

void Arcane::AlephMatrix::solve ( AlephVector * x,
AlephVector * b,
Integer & nb_iteration,
Real * residual_norm,
AlephParams * solver_param,
bool async = false )

'Post' the solver to the scheduler asynchronously or not

Definition at line 546 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Here is the call graph for this function:

◆ solveNow()

void Arcane::AlephMatrix::solveNow ( AlephVector * x,
AlephVector * b,
AlephVector * tmp,
Integer & nb_iteration,
Real * residual_norm,
AlephParams * params )

Solves the linear system.

Parameters
xsolution of the system Ax=b (output)
bright-hand side of the system (input)
nb_iterationnumber of system iterations (output)
residual_normconvergence residual of the system (output)
infoparameters of the parallel application (input)
solver_paramParameters of the solver for the system Ax=b (input)

Definition at line 576 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug(), Arcane::String::localstr(), Arcane::TraceAccessor::warning(), and writeToFile().

Here is the call graph for this function:

◆ startFilling()

void Arcane::AlephMatrix::startFilling ( )

Allows specifying the start of a filling phase.

Definition at line 701 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Here is the call graph for this function:

◆ updateKnownRowCol()

void Arcane::AlephMatrix::updateKnownRowCol ( Integer row,
Integer col,
Real val )

Definition at line 140 of file AlephMatrix.cc.

◆ writeToFile()

void Arcane::AlephMatrix::writeToFile ( const String file_name)

Triggers the writing of the matrix to a file.

Definition at line 713 of file AlephMatrix.cc.

References Arcane::TraceAccessor::debug().

Referenced by solveNow().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_addValue_col

UniqueArray<Integer> Arcane::AlephMatrix::m_addValue_col
private

Definition at line 97 of file AlephMatrix.h.

◆ m_addValue_idx

Integer Arcane::AlephMatrix::m_addValue_idx
private

Definition at line 95 of file AlephMatrix.h.

◆ m_addValue_row

UniqueArray<Integer> Arcane::AlephMatrix::m_addValue_row
private

Definition at line 96 of file AlephMatrix.h.

◆ m_addValue_val

UniqueArray<Real> Arcane::AlephMatrix::m_addValue_val
private

Definition at line 98 of file AlephMatrix.h.

◆ m_aleph_matrix_buffer_cols

MultiArray2<AlephInt> Arcane::AlephMatrix::m_aleph_matrix_buffer_cols
private

Definition at line 81 of file AlephMatrix.h.

◆ m_aleph_matrix_buffer_n_iteration

UniqueArray<Int32> Arcane::AlephMatrix::m_aleph_matrix_buffer_n_iteration
private

Definition at line 107 of file AlephMatrix.h.

◆ m_aleph_matrix_buffer_residual_norm

UniqueArray<Real> Arcane::AlephMatrix::m_aleph_matrix_buffer_residual_norm
private

Definition at line 108 of file AlephMatrix.h.

◆ m_aleph_matrix_buffer_rows

MultiArray2<AlephInt> Arcane::AlephMatrix::m_aleph_matrix_buffer_rows
private

Definition at line 80 of file AlephMatrix.h.

◆ m_aleph_matrix_buffer_vals

MultiArray2<Real> Arcane::AlephMatrix::m_aleph_matrix_buffer_vals
private

Definition at line 82 of file AlephMatrix.h.

◆ m_aleph_matrix_mpi_data_requests

UniqueArray<Parallel::Request> Arcane::AlephMatrix::m_aleph_matrix_mpi_data_requests
private

Definition at line 102 of file AlephMatrix.h.

◆ m_aleph_matrix_mpi_results_requests

UniqueArray<Parallel::Request> Arcane::AlephMatrix::m_aleph_matrix_mpi_results_requests
private

Definition at line 103 of file AlephMatrix.h.

◆ m_implementation

IAlephMatrix* Arcane::AlephMatrix::m_implementation = nullptr
private

Definition at line 75 of file AlephMatrix.h.

◆ m_index

Integer Arcane::AlephMatrix::m_index
private

Definition at line 72 of file AlephMatrix.h.

◆ m_kernel

AlephKernel* Arcane::AlephMatrix::m_kernel = nullptr
private

Definition at line 71 of file AlephMatrix.h.

◆ m_participating_in_solver

bool Arcane::AlephMatrix::m_participating_in_solver = false
private

Definition at line 74 of file AlephMatrix.h.

◆ m_ranks

ArrayView<Integer> Arcane::AlephMatrix::m_ranks
private

Definition at line 73 of file AlephMatrix.h.

◆ m_row_col_map

rowColMap Arcane::AlephMatrix::m_row_col_map
private

Definition at line 94 of file AlephMatrix.h.

◆ m_setValue_col

UniqueArray<AlephInt> Arcane::AlephMatrix::m_setValue_col
private

Definition at line 86 of file AlephMatrix.h.

◆ m_setValue_idx

Integer Arcane::AlephMatrix::m_setValue_idx
private

Definition at line 84 of file AlephMatrix.h.

◆ m_setValue_row

UniqueArray<AlephInt> Arcane::AlephMatrix::m_setValue_row
private

Definition at line 85 of file AlephMatrix.h.

◆ m_setValue_val

UniqueArray<Real> Arcane::AlephMatrix::m_setValue_val
private

Definition at line 87 of file AlephMatrix.h.


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