Summary description for SparseGridMtx. More...
#include <SparseGridMtxLDL.h>
Public Member Functions | |
void | AddValue (long bi, long bj, long si, long sj, double val) |
void | AlocateMemoryByPattern (IConectMatrix *bskl) |
virtual double & | ElementAt (int i, int j) |
virtual void | Factorize () |
virtual void | Factorize_Incomplete () |
void | FactorizeOMP () |
double | GetValue (long bi, long bj, long si, long sj, long &aux_bi_idx, long &aux_bj_idx) |
virtual void | LoadMatrixNumbers (SparseMatrixF &sm) |
virtual void | LoadZeros () |
virtual void | MultiplyByVector (const LargeVectorAttach &x, LargeVectorAttach &y) |
virtual void | SchurComplementFactorization (int fixed_blocks) |
void | SetValue (long bi, long bj, long si, long sj, double val, long &aux_bi_idx, long &aux_bj_idx) |
virtual void | Solve (double *b, double *x) |
virtual void | SolveA11 (double *x, long fixed_blocks) |
void | SolveLDL (double *x, long fixed_blocks=0) |
void | SolveLDL_block_perm (const LargeVector &b, LargeVector &x) |
void | SolveLDL_node_perm (const LargeVector &b, LargeVector &x) |
virtual void | SolveLV (const LargeVector &b, LargeVector &x) |
SparseGridMtxLDL (SparseMatrixF &sm, BYTE block_size, Ordering *block_order, Ordering *node_order, MathTracer *eMT, BOOL load_data=1) | |
SparseGridMtxLDL (SparseMatrixF &sm, BYTE block_size, Ordering *block_order, MathTracer *eMT, BOOL load_data=1) | |
virtual void | Sub_A11inv_A12 (double *x, long fixed_blocks) |
virtual void | Sub_A21_A11inv (double *x, long fixed_blocks) |
virtual void | WriteCondensedMatrixA22 (double *a, Ordering *mcn, IntArrayList *lncn) |
virtual | ~SparseGridMtxLDL () |
Public Attributes | |
double * | Columns_data |
LargeVector * | tmp_vector_BS |
LargeVector * | tmp_vector_BS_nodes |
Private Member Functions | |
void | BackSubstLT (double *x, long fixed_blocks) |
void | ForwardSubstL (double *x, long fixed_blocks) |
void | SolveD (double *x, long fixed_blocks) |
void | SubMultL12 (double *px, double *py, long fixed_blocks) |
y -= L12 * x | |
void | SubMultL12T (double *px, double *py, long fixed_blocks) |
y -= L12^T * x |
Summary description for SparseGridMtx.
Definition at line 13 of file SparseGridMtxLDL.h.
SparseGridMtxLDL | ( | SparseMatrixF & | sm, | |
BYTE | block_size, | |||
Ordering * | block_order, | |||
MathTracer * | eMT, | |||
BOOL | load_data = 1 | |||
) |
Definition at line 9 of file SparseGridMtxLDL.cpp.
References SparseMatrixF::a, AlocateMemoryByPattern(), Ordering::cm, SparseGridMtx::ComputeBlocks(), and LoadMatrixNumbers().
SparseGridMtxLDL | ( | SparseMatrixF & | sm, | |
BYTE | block_size, | |||
Ordering * | block_order, | |||
Ordering * | node_order, | |||
MathTracer * | eMT, | |||
BOOL | load_data = 1 | |||
) |
Definition at line 22 of file SparseGridMtxLDL.cpp.
References SparseMatrixF::a, AlocateMemoryByPattern(), Ordering::cm, SparseGridMtx::ComputeBlocks(), and LoadMatrixNumbers().
~SparseGridMtxLDL | ( | ) | [virtual] |
Definition at line 150 of file SparseGridMtxLDL.cpp.
References Columns_data.
void AddValue | ( | long | bi, | |
long | bj, | |||
long | si, | |||
long | sj, | |||
double | val | |||
) | [inline] |
Definition at line 58 of file SparseGridMtxLDL.h.
References SparseGridColumn::AddValue(), SparseGridMtx::block_storage, SparseGridMtx::Columns, and Columns_data.
void AlocateMemoryByPattern | ( | IConectMatrix * | bskl | ) |
Reimplemented from SparseGridMtx.
Definition at line 156 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_storage, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridMtx::columns_data_length, IConectMatrix::DetachIndexesAboveDiagonalInColumn(), SparseGridColumn::Entries, long(), IMatrix::N(), SparseGridMtx::n_blocks, TraceableMatrix::Write(), and TraceableMatrix::Writeln().
Referenced by SparseGridMtxLDL().
void BackSubstLT | ( | double * | x, | |
long | fixed_blocks | |||
) | [private] |
Definition at line 884 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridColumn::Entries, SparseGridColumn::IndexesUfa, IntArrayList::Items, SparseGridMtx::N(), SparseGridMtx::n_blocks, no, Ordering::order, and DenseMatrixArithmetics::SubMultBlockByVector().
Referenced by SolveLDL(), and Sub_A11inv_A12().
double & ElementAt | ( | int | i, | |
int | j | |||
) | [virtual] |
Implements ILargeMatrix.
Definition at line 193 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridColumn::FindExistingBlockIndex(), IntArrayList::Items, SparseGridMtx::node_order, and Ordering::perm.
void Factorize | ( | ) | [virtual] |
Implements SparseGridMtx.
Definition at line 304 of file SparseGridMtxLDL.cpp.
References MathTracer::act_block, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, MathTracer::break_flag, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridMtx::ComputeBlocks(), Array::Copy(), TraceableMatrix::eMT, SparseGridColumn::Entries, DenseMatrixArithmetics::FactorizeBlock(), SparseGridColumn::IndexesUfa, IntArrayList::Items, long(), memset(), SparseGridMtx::n_blocks, SparseGridMtx::no_multiplications, DenseMatrixArithmetics::SubATBproduct(), DenseMatrixArithmetics::SubstSolveBlock(), TraceableMatrix::Write(), and DenseMatrixArithmetics::zero_pivots.
void Factorize_Incomplete | ( | ) | [virtual] |
Definition at line 518 of file SparseGridMtxLDL.cpp.
References MathTracer::act_block, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, MathTracer::break_flag, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridMtx::ComputeBlocks(), Array::Copy(), TraceableMatrix::eMT, SparseGridColumn::Entries, DenseMatrixArithmetics::FactorizeBlock(), SparseGridColumn::IndexesUfa, IntArrayList::Items, long(), memset(), SparseGridMtx::n_blocks, DenseMatrixArithmetics::SubATBproduct(), DenseMatrixArithmetics::SubstSolveBlock(), TraceableMatrix::Write(), and DenseMatrixArithmetics::zero_pivots.
void FactorizeOMP | ( | ) |
Definition at line 409 of file SparseGridMtxLDL.cpp.
References MathTracer::act_block, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, MathTracer::break_flag, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridMtx::ComputeBlocks(), Array::Copy(), TraceableMatrix::eMT, SparseGridColumn::Entries, DenseMatrixArithmetics::FactorizeBlock(), SparseGridColumn::IndexesUfa, IntArrayList::Items, long(), memset(), SparseGridMtx::n_blocks, SparseGridMtx::no_multiplications, DenseMatrixArithmetics::SubATBproduct(), DenseMatrixArithmetics::SubstSolveBlock(), TraceableMatrix::Write(), and DenseMatrixArithmetics::zero_pivots.
void ForwardSubstL | ( | double * | x, | |
long | fixed_blocks | |||
) | [private] |
Definition at line 851 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridColumn::Entries, SparseGridColumn::IndexesUfa, IntArrayList::Items, SparseGridMtx::N(), SparseGridMtx::n_blocks, no, Ordering::order, and DenseMatrixArithmetics::SubMultTBlockByVector().
Referenced by SolveLDL(), and Sub_A21_A11inv().
double GetValue | ( | long | bi, | |
long | bj, | |||
long | si, | |||
long | sj, | |||
long & | aux_bi_idx, | |||
long & | aux_bj_idx | |||
) | [inline] |
Definition at line 46 of file SparseGridMtxLDL.h.
References SparseGridMtx::block_storage, SparseGridMtx::Columns, Columns_data, and SparseGridColumn::GetValue().
Referenced by WriteCondensedMatrixA22().
void LoadMatrixNumbers | ( | SparseMatrixF & | sm | ) | [virtual] |
Implements SparseGridMtx.
Definition at line 55 of file SparseGridMtxLDL.cpp.
References SparseMatrixF::a, SparseMatrixF::Adr(), SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseMatrixF::Ci(), SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridColumn::FindExistingBlockIndex(), IntArrayList::Items, LoadZeros(), long(), SparseMatrixF::neq, SparseGridMtx::node_order, SparseGridMtx::nonzeros, and Ordering::perm.
Referenced by SparseGridMtxLDL().
void LoadZeros | ( | ) | [virtual] |
Implements ILargeMatrix.
Definition at line 33 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, Columns_data, SparseGridMtx::columns_data_length, IntArrayList::Items, memset(), SparseGridMtx::n_blocks, SparseGridMtx::node_order, SparseGridMtx::noDummyDOFs, and Ordering::perm.
Referenced by LoadMatrixNumbers().
void MultiplyByVector | ( | const LargeVectorAttach & | x, | |
LargeVectorAttach & | y | |||
) | [virtual] |
Reimplemented from SparseGridMtx.
Definition at line 280 of file SparseGridMtxLDL.cpp.
References DenseMatrixArithmetics::AddMultBlockByVectorSym(), SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, LargeVectorAttach::DataPtr(), SparseGridColumn::Entries, SparseGridColumn::IndexesUfa, LargeVectorAttach::Initialize(), IntArrayList::Items, DenseMatrixArithmetics::MultDiagonalBlockByVector(), and SparseGridMtx::n_blocks.
void SchurComplementFactorization | ( | int | fixed_blocks | ) | [virtual] |
Implements SparseGridMtx.
Definition at line 650 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_storage, SparseGridMtx::BlockArith, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridMtx::ComputeBlocks(), Array::Copy(), SparseGridColumn::Entries, DenseMatrixArithmetics::FactorizeBlock(), SparseGridColumn::IndexesUfa, IntArrayList::Items, memset(), SparseGridMtx::n_blocks, DenseMatrixArithmetics::SubATBproduct(), DenseMatrixArithmetics::SubstSolveBlock(), and DenseMatrixArithmetics::zero_pivots.
void SetValue | ( | long | bi, | |
long | bj, | |||
long | si, | |||
long | sj, | |||
double | val, | |||
long & | aux_bi_idx, | |||
long & | aux_bj_idx | |||
) | [inline] |
Definition at line 34 of file SparseGridMtxLDL.h.
References SparseGridMtx::block_storage, SparseGridMtx::Columns, Columns_data, and SparseGridColumn::SetValue().
void Solve | ( | double * | b, | |
double * | x | |||
) | [virtual] |
Implements SparseGridMtx.
Definition at line 761 of file SparseGridMtxLDL.cpp.
References Array::Copy(), SparseGridMtx::n, and SolveLDL().
Referenced by SolveLDL_block_perm().
void SolveA11 | ( | double * | x, | |
long | fixed_blocks | |||
) | [virtual] |
Implements SparseGridMtx.
Definition at line 904 of file SparseGridMtxLDL.cpp.
References SolveLDL().
void SolveD | ( | double * | x, | |
long | fixed_blocks | |||
) | [private] |
Definition at line 872 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, Columns_data, IntArrayList::Items, SparseGridMtx::N(), SparseGridMtx::n_blocks, Ordering::order, and DenseMatrixArithmetics::SubstSolve().
Referenced by SolveLDL(), and Sub_A21_A11inv().
void SolveLDL | ( | double * | x, | |
long | fixed_blocks = 0 | |||
) |
Definition at line 793 of file SparseGridMtxLDL.cpp.
References BackSubstLT(), ForwardSubstL(), and SolveD().
Referenced by Solve(), and SolveA11().
void SolveLDL_block_perm | ( | const LargeVector & | b, | |
LargeVector & | x | |||
) |
Definition at line 787 of file SparseGridMtxLDL.cpp.
References LargeVectorAttach::DataPtr(), and Solve().
Referenced by SolveLDL_node_perm().
void SolveLDL_node_perm | ( | const LargeVector & | b, | |
LargeVector & | x | |||
) |
Definition at line 773 of file SparseGridMtxLDL.cpp.
References LargeVectorAttach::GetPermuted_1Vector(), LargeVectorAttach::GetPermutedVector(), IntArrayList::Items, SparseGridMtx::node_order, Ordering::perm, SolveLDL_block_perm(), and tmp_vector_BS_nodes.
Referenced by SolveLV().
void SolveLV | ( | const LargeVector & | b, | |
LargeVector & | x | |||
) | [virtual] |
Implements SparseGridMtx.
Definition at line 768 of file SparseGridMtxLDL.cpp.
References SolveLDL_node_perm().
void Sub_A11inv_A12 | ( | double * | x, | |
long | fixed_blocks | |||
) | [virtual] |
Implements SparseGridMtx.
Definition at line 916 of file SparseGridMtxLDL.cpp.
References BackSubstLT(), and SubMultL12().
void Sub_A21_A11inv | ( | double * | x, | |
long | fixed_blocks | |||
) | [virtual] |
Implements SparseGridMtx.
Definition at line 909 of file SparseGridMtxLDL.cpp.
References ForwardSubstL(), SolveD(), and SubMultL12T().
void SubMultL12 | ( | double * | px, | |
double * | py, | |||
long | fixed_blocks | |||
) | [private] |
y -= L12 * x
Definition at line 826 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridColumn::Entries, SparseGridColumn::IndexesUfa, IntArrayList::Items, SparseGridMtx::n_blocks, no, Ordering::order, and DenseMatrixArithmetics::SubMultBlockByVector().
Referenced by Sub_A11inv_A12().
void SubMultL12T | ( | double * | px, | |
double * | py, | |||
long | fixed_blocks | |||
) | [private] |
y -= L12^T * x
Definition at line 801 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::block_size, SparseGridMtx::block_storage, SparseGridMtx::BlockArith, SparseGridColumn::column_start_idx, SparseGridMtx::Columns, Columns_data, SparseGridColumn::Entries, SparseGridColumn::IndexesUfa, IntArrayList::Items, SparseGridMtx::n_blocks, no, Ordering::order, and DenseMatrixArithmetics::SubMultTBlockByVector().
Referenced by Sub_A21_A11inv().
void WriteCondensedMatrixA22 | ( | double * | a, | |
Ordering * | mcn, | |||
IntArrayList * | lncn | |||
) | [virtual] |
Implements SparseGridMtx.
Definition at line 922 of file SparseGridMtxLDL.cpp.
References SparseGridMtx::block_order, SparseGridMtx::BlockSize(), IntArrayList::Count, GetValue(), IntArrayList::Items, and Ordering::perm.
double* Columns_data |
Definition at line 29 of file SparseGridMtxLDL.h.
Referenced by AddValue(), AlocateMemoryByPattern(), BackSubstLT(), ElementAt(), Factorize(), Factorize_Incomplete(), FactorizeOMP(), ForwardSubstL(), GetValue(), LoadMatrixNumbers(), LoadZeros(), MultiplyByVector(), SchurComplementFactorization(), SetValue(), SolveD(), SubMultL12(), SubMultL12T(), and ~SparseGridMtxLDL().
Definition at line 86 of file SparseGridMtxLDL.h.
Definition at line 83 of file SparseGridMtxLDL.h.
Referenced by SolveLDL_node_perm().