MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
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 (real_t *data_r_, real_t *data_i, int *ipiv_)
 
virtual bool Factor (int m, real_t TOL=0.0)
 Compute the LU factorization of the current matrix.
 
virtual std::complex< real_tDet (int m) const
 
void Mult (int m, int n, real_t *X_r, real_t *X_i) const
 
void Mult (int m, int n, std::complex< real_t > *X) const
 
void LSolve (int m, int n, real_t *X_r, real_t *X_i) const
 
void USolve (int m, int n, real_t *X_r, real_t *X_i) const
 
virtual void Solve (int m, int n, real_t *X_r, real_t *X_i) const
 
void RightSolve (int m, int n, real_t *X_r, real_t *X_i) const
 
virtual void GetInverseMatrix (int m, real_t *X_r, real_t *X_i) const
 Assuming L.U = P.A factored data of size (m x m), compute X <- A^{-1}.
 
- Public Member Functions inherited from mfem::ComplexFactors
 ComplexFactors ()
 
 ComplexFactors (real_t *data_r_, real_t *data_i_)
 
void SetComplexData (int m)
 
void ResetComplexData (int m)
 
virtual ~ComplexFactors ()
 

Public Attributes

int * ipiv
 
- Public Attributes inherited from mfem::ComplexFactors
real_tdata_r = nullptr
 
real_tdata_i = nullptr
 
std::complex< real_t > * data = nullptr
 

Static Public Attributes

static const int ipiv_base = 1
 

Additional Inherited Members

- Protected Member Functions inherited from mfem::ComplexFactors
std::complex< real_t > * RealToComplex (int m, const real_t *x_r, const real_t *x_i) const
 
void ComplexToReal (int m, const std::complex< real_t > *x, real_t *x_r, real_t *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 ( real_t * data_r_,
real_t * data_i,
int * ipiv_ )
inline

Definition at line 137 of file complex_densemat.hpp.

Member Function Documentation

◆ Det()

std::complex< real_t > 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 556 of file complex_densemat.cpp.

◆ Factor()

bool mfem::ComplexLUFactors::Factor ( int m,
real_t 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 490 of file complex_densemat.cpp.

◆ GetInverseMatrix()

void mfem::ComplexLUFactors::GetInverseMatrix ( int m,
real_t * X_r,
real_t * 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 743 of file complex_densemat.cpp.

◆ LSolve()

void mfem::ComplexLUFactors::LSolve ( int m,
int n,
real_t * X_r,
real_t * 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 609 of file complex_densemat.cpp.

◆ Mult() [1/2]

void mfem::ComplexLUFactors::Mult ( int m,
int n,
real_t * X_r,
real_t * 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 573 of file complex_densemat.cpp.

◆ Mult() [2/2]

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

◆ RightSolve()

void mfem::ComplexLUFactors::RightSolve ( int m,
int n,
real_t * X_r,
real_t * 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 679 of file complex_densemat.cpp.

◆ Solve()

void mfem::ComplexLUFactors::Solve ( int m,
int n,
real_t * X_r,
real_t * 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 656 of file complex_densemat.cpp.

◆ USolve()

void mfem::ComplexLUFactors::USolve ( int m,
int n,
real_t * X_r,
real_t * 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 635 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: