PolyFEM
Loading...
Searching...
No Matches
polyfem::utils::AutoFlipSVD< MatrixType > Class Template Reference

#include <svd.hpp>

Inheritance diagram for polyfem::utils::AutoFlipSVD< MatrixType >:
[legend]
Collaboration diagram for polyfem::utils::AutoFlipSVD< MatrixType >:
[legend]

Public Member Functions

 AutoFlipSVD (void)
 
 AutoFlipSVD (const MatrixType &mtr, unsigned int computationOptions=0)
 
template<int dim = MatrixType::RowsAtCompileTime>
std::enable_if< dim==3, AutoFlipSVD< MatrixType > >::type & compute (const MatrixType &mtr, unsigned int computationOptions)
 
template<int dim = MatrixType::RowsAtCompileTime>
std::enable_if< dim==2, AutoFlipSVD< MatrixType > >::type & compute (const MatrixType &mtr, unsigned int computationOptions)
 
void set (const Eigen::Matrix3d &U, const Eigen::Vector3d &Sigma, const Eigen::Matrix3d &V)
 
const Eigen::JacobiSVD< MatrixType >::SingularValuesType & singularValues (void) const
 
const MatrixType & matrixU (void) const
 
const MatrixType & matrixV (void) const
 
void setIdentity (void)
 

Protected Member Functions

void flip2d (const MatrixType &mtr, unsigned int computationOptions)
 
template<int dim>
void computeCofactorMtr (const Eigen::Matrix< double, dim, dim > &F, Eigen::Matrix< double, dim, dim > &A)
 
void fastEigenvalues (const Eigen::Matrix3d &A_Sym, Eigen::Vector3d &lambda)
 
void fastEigenvectors (const Eigen::Matrix3d &A_Sym, const Eigen::Vector3d &lambda, Eigen::Matrix3d &V)
 
void fastSolveEigenproblem (const Eigen::Matrix3d &A_Sym, Eigen::Vector3d &lambda, Eigen::Matrix3d &V)
 
void fastSVD3d (const Eigen::Matrix3d &A, Eigen::Matrix3d &U, Eigen::Vector3d &singular_values, Eigen::Matrix3d &V)
 
void fastComputeSingularValues3d (const Eigen::Matrix3d &A, Eigen::Vector3d &singular_values)
 

Protected Attributes

bool flipped_U
 
bool flipped_V
 
bool flipped_sigma
 
Eigen::JacobiSVD< MatrixType >::SingularValuesType singularValues_flipped
 
MatrixType matrixU_flipped
 
MatrixType matrixV_flipped
 

Detailed Description

template<typename MatrixType>
class polyfem::utils::AutoFlipSVD< MatrixType >

Definition at line 14 of file svd.hpp.

Constructor & Destructor Documentation

◆ AutoFlipSVD() [1/2]

template<typename MatrixType >
polyfem::utils::AutoFlipSVD< MatrixType >::AutoFlipSVD ( void  )
inline

Definition at line 22 of file svd.hpp.

◆ AutoFlipSVD() [2/2]

template<typename MatrixType >
polyfem::utils::AutoFlipSVD< MatrixType >::AutoFlipSVD ( const MatrixType &  mtr,
unsigned int  computationOptions = 0 
)
inline

Definition at line 23 of file svd.hpp.

References polyfem::utils::AutoFlipSVD< MatrixType >::compute().

Here is the call graph for this function:

Member Function Documentation

◆ compute() [1/2]

template<typename MatrixType >
template<int dim = MatrixType::RowsAtCompileTime>
std::enable_if< dim==3, AutoFlipSVD< MatrixType > >::type & polyfem::utils::AutoFlipSVD< MatrixType >::compute ( const MatrixType &  mtr,
unsigned int  computationOptions 
)
inline

◆ compute() [2/2]

template<typename MatrixType >
template<int dim = MatrixType::RowsAtCompileTime>
std::enable_if< dim==2, AutoFlipSVD< MatrixType > >::type & polyfem::utils::AutoFlipSVD< MatrixType >::compute ( const MatrixType &  mtr,
unsigned int  computationOptions 
)
inline

◆ computeCofactorMtr()

template<typename MatrixType >
template<int dim>
void polyfem::utils::AutoFlipSVD< MatrixType >::computeCofactorMtr ( const Eigen::Matrix< double, dim, dim > &  F,
Eigen::Matrix< double, dim, dim > &  A 
)
inlineprotected

Definition at line 125 of file svd.hpp.

References polyfem::F.

◆ fastComputeSingularValues3d()

template<typename MatrixType >
void polyfem::utils::AutoFlipSVD< MatrixType >::fastComputeSingularValues3d ( const Eigen::Matrix3d &  A,
Eigen::Vector3d &  singular_values 
)
inlineprotected

Definition at line 300 of file svd.hpp.

References polyfem::utils::AutoFlipSVD< MatrixType >::fastEigenvalues(), and polyfem::utils::singular_values().

Referenced by polyfem::utils::AutoFlipSVD< MatrixType >::compute().

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

◆ fastEigenvalues()

template<typename MatrixType >
void polyfem::utils::AutoFlipSVD< MatrixType >::fastEigenvalues ( const Eigen::Matrix3d &  A_Sym,
Eigen::Vector3d &  lambda 
)
inlineprotected

Definition at line 153 of file svd.hpp.

Referenced by polyfem::utils::AutoFlipSVD< MatrixType >::fastComputeSingularValues3d(), and polyfem::utils::AutoFlipSVD< MatrixType >::fastSolveEigenproblem().

Here is the caller graph for this function:

◆ fastEigenvectors()

template<typename MatrixType >
void polyfem::utils::AutoFlipSVD< MatrixType >::fastEigenvectors ( const Eigen::Matrix3d &  A_Sym,
const Eigen::Vector3d &  lambda,
Eigen::Matrix3d &  V 
)
inlineprotected

Definition at line 185 of file svd.hpp.

References V.

Referenced by polyfem::utils::AutoFlipSVD< MatrixType >::fastSolveEigenproblem().

Here is the caller graph for this function:

◆ fastSolveEigenproblem()

template<typename MatrixType >
void polyfem::utils::AutoFlipSVD< MatrixType >::fastSolveEigenproblem ( const Eigen::Matrix3d &  A_Sym,
Eigen::Vector3d &  lambda,
Eigen::Matrix3d &  V 
)
inlineprotected

Definition at line 248 of file svd.hpp.

References polyfem::utils::AutoFlipSVD< MatrixType >::fastEigenvalues(), polyfem::utils::AutoFlipSVD< MatrixType >::fastEigenvectors(), and V.

Referenced by polyfem::utils::AutoFlipSVD< MatrixType >::fastSVD3d().

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

◆ fastSVD3d()

template<typename MatrixType >
void polyfem::utils::AutoFlipSVD< MatrixType >::fastSVD3d ( const Eigen::Matrix3d &  A,
Eigen::Matrix3d &  U,
Eigen::Vector3d &  singular_values,
Eigen::Matrix3d &  V 
)
inlineprotected

Definition at line 257 of file svd.hpp.

References polyfem::utils::AutoFlipSVD< MatrixType >::fastSolveEigenproblem(), polyfem::utils::singular_values(), and V.

Referenced by polyfem::utils::AutoFlipSVD< MatrixType >::compute().

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

◆ flip2d()

template<typename MatrixType >
void polyfem::utils::AutoFlipSVD< MatrixType >::flip2d ( const MatrixType &  mtr,
unsigned int  computationOptions 
)
inlineprotected

!! this flip algorithm is only valid in 2D

Definition at line 76 of file svd.hpp.

References polyfem::utils::determinant(), polyfem::utils::AutoFlipSVD< MatrixType >::flipped_sigma, polyfem::utils::AutoFlipSVD< MatrixType >::flipped_U, polyfem::utils::AutoFlipSVD< MatrixType >::flipped_V, polyfem::utils::AutoFlipSVD< MatrixType >::matrixU_flipped, polyfem::utils::AutoFlipSVD< MatrixType >::matrixV_flipped, polyfem::utils::AutoFlipSVD< MatrixType >::singularValues(), and polyfem::utils::AutoFlipSVD< MatrixType >::singularValues_flipped.

Referenced by polyfem::utils::AutoFlipSVD< MatrixType >::compute().

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

◆ matrixU()

template<typename MatrixType >
const MatrixType & polyfem::utils::AutoFlipSVD< MatrixType >::matrixU ( void  ) const
inline

◆ matrixV()

template<typename MatrixType >
const MatrixType & polyfem::utils::AutoFlipSVD< MatrixType >::matrixV ( void  ) const
inline

◆ set()

◆ setIdentity()

◆ singularValues()

template<typename MatrixType >
const Eigen::JacobiSVD< MatrixType >::SingularValuesType & polyfem::utils::AutoFlipSVD< MatrixType >::singularValues ( void  ) const
inline

Member Data Documentation

◆ flipped_sigma

◆ flipped_U

◆ flipped_V

◆ matrixU_flipped

◆ matrixV_flipped

◆ singularValues_flipped


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