MFEM  v4.6.0
Finite element discretization library
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
mfem::ComplexLUFactors Class Reference

#include <complex_densemat.hpp>

Inheritance diagram for mfem::ComplexLUFactors:
[legend]
Collaboration diagram for mfem::ComplexLUFactors:
[legend]

Public Member Functions

 ComplexLUFactors ()
 
 ComplexLUFactors (double *data_r_, double *data_i, int *ipiv_)
 
virtual bool Factor (int m, double TOL=0.0)
 Compute the LU factorization of the current matrix. More...
 
virtual std::complex< double > Det (int m) const
 
void Mult (int m, int n, double *X_r, double *X_i) const
 
void Mult (int m, int n, std::complex< double > *X) const
 
void LSolve (int m, int n, double *X_r, double *X_i) const
 
void USolve (int m, int n, double *X_r, double *X_i) const
 
virtual void Solve (int m, int n, double *X_r, double *X_i) const
 
void RightSolve (int m, int n, double *X_r, double *X_i) const
 
virtual void GetInverseMatrix (int m, double *X_r, double *X_i) const
 Assuming L.U = P.A factored data of size (m x m), compute X <- A^{-1}. More...
 
- Public Member Functions inherited from mfem::ComplexFactors
 ComplexFactors ()
 
 ComplexFactors (double *data_r_, double *data_i_)
 
void SetComplexData (int m)
 
void ResetComplexData (int m)
 
virtual ~ComplexFactors ()
 

Public Attributes

int * ipiv
 
- Public Attributes inherited from mfem::ComplexFactors
double * data_r = nullptr
 
double * data_i = nullptr
 
std::complex< double > * data = nullptr
 

Static Public Attributes

static const int ipiv_base = 1
 

Additional Inherited Members

- Protected Member Functions inherited from mfem::ComplexFactors
std::complex< double > * RealToComplex (int m, const double *x_r, const double *x_i) const
 
void ComplexToReal (int m, const std::complex< double > *x, double *x_r, double *x_i) const
 

Detailed Description

Class that computes factorization of external data and perform various operations with the factored data.

Definition at line 123 of file complex_densemat.hpp.

Constructor & Destructor Documentation

◆ ComplexLUFactors() [1/2]

mfem::ComplexLUFactors::ComplexLUFactors ( )
inline

With this constructor, the (public) data and ipiv members should be set explicitly before calling class methods.

Definition at line 135 of file complex_densemat.hpp.

◆ ComplexLUFactors() [2/2]

mfem::ComplexLUFactors::ComplexLUFactors ( double *  data_r_,
double *  data_i,
int *  ipiv_ 
)
inline

Definition at line 137 of file complex_densemat.hpp.

Member Function Documentation

◆ Det()

std::complex< double > mfem::ComplexLUFactors::Det ( int  m) const
virtual

Assuming L.U = P.A factored data of size (m x m), compute |A| from the diagonal values of U and the permutation information.

Reimplemented from mfem::ComplexFactors.

Definition at line 508 of file complex_densemat.cpp.

◆ Factor()

bool mfem::ComplexLUFactors::Factor ( int  m,
double  TOL = 0.0 
)
virtual

Compute the LU factorization of the current matrix.

Factorize the current matrix of size (m x m) overwriting it with the LU factors. The factorization is such that L.U = P.A, where A is the original matrix and P is a permutation matrix represented by ipiv.

Parameters
[in]msize of the square matrix
[in]TOLoptional fuzzy comparison tolerance. Defaults to 0.0.
Returns
status set to true if successful, otherwise, false.

Reimplemented from mfem::ComplexFactors.

Definition at line 447 of file complex_densemat.cpp.

◆ GetInverseMatrix()

void mfem::ComplexLUFactors::GetInverseMatrix ( int  m,
double *  X_r,
double *  X_i 
) const
virtual

Assuming L.U = P.A factored data of size (m x m), compute X <- A^{-1}.

Reimplemented from mfem::ComplexFactors.

Definition at line 682 of file complex_densemat.cpp.

◆ LSolve()

void mfem::ComplexLUFactors::LSolve ( int  m,
int  n,
double *  X_r,
double *  X_i 
) const

Assuming L.U = P.A factored data of size (m x m), compute X <- L^{-1} P X, for a matrix X of size (m x n).

Definition at line 561 of file complex_densemat.cpp.

◆ Mult() [1/2]

void mfem::ComplexLUFactors::Mult ( int  m,
int  n,
double *  X_r,
double *  X_i 
) const

Assuming L.U = P.A factored data of size (m x m), compute X <- A X, for a matrix X of size (m x n).

Definition at line 525 of file complex_densemat.cpp.

◆ Mult() [2/2]

void mfem::ComplexLUFactors::Mult ( int  m,
int  n,
std::complex< double > *  X 
) const

◆ RightSolve()

void mfem::ComplexLUFactors::RightSolve ( int  m,
int  n,
double *  X_r,
double *  X_i 
) const

Assuming L.U = P.A factored data of size (m x m), compute X <- X A^{-1}, for a matrix X of size (n x m).

Definition at line 625 of file complex_densemat.cpp.

◆ Solve()

void mfem::ComplexLUFactors::Solve ( int  m,
int  n,
double *  X_r,
double *  X_i 
) const
virtual

Assuming L.U = P.A factored data of size (m x m), compute X <- A^{-1} X, for a matrix X of size (m x n).

Reimplemented from mfem::ComplexFactors.

Definition at line 608 of file complex_densemat.cpp.

◆ USolve()

void mfem::ComplexLUFactors::USolve ( int  m,
int  n,
double *  X_r,
double *  X_i 
) const

Assuming L.U = P.A factored data of size (m x m), compute X <- U^{-1} X, for a matrix X of size (m x n).

Definition at line 587 of file complex_densemat.cpp.

Member Data Documentation

◆ ipiv

int* mfem::ComplexLUFactors::ipiv

Definition at line 126 of file complex_densemat.hpp.

◆ ipiv_base

static const int mfem::ComplexLUFactors::ipiv_base = 1
static

Definition at line 128 of file complex_densemat.hpp.


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