PolyFEM
Loading...
Searching...
No Matches
polyfem::assembler::LocalHessian Class Reference

Reusable element matrix with inline storage for small blocks and a dynamic fallback for high-order elements. More...

#include <LocalHessian.hpp>

Public Types

using SmallMatrix = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, SmallDofs, SmallDofs >
 

Public Member Functions

void resize (const Eigen::Index rows, const Eigen::Index cols)
 
Eigen::Index rows () const
 
Eigen::Index cols () const
 
template<typename Derived >
void assign (const Eigen::MatrixBase< Derived > &matrix)
 
template<typename F >
decltype(auto) visit (F &&f)
 
template<typename F >
decltype(auto) visit (F &&f) const
 

Static Public Attributes

static constexpr int SmallDofs = 30
 

Private Attributes

SmallMatrix small_
 
Eigen::MatrixXd large_
 
bool use_small_ = true
 

Detailed Description

Reusable element matrix with inline storage for small blocks and a dynamic fallback for high-order elements.

Visiting exposes the actual Eigen type.

Definition at line 12 of file LocalHessian.hpp.

Member Typedef Documentation

◆ SmallMatrix

using polyfem::assembler::LocalHessian::SmallMatrix = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, SmallDofs, SmallDofs>

Definition at line 17 of file LocalHessian.hpp.

Member Function Documentation

◆ assign()

template<typename Derived >
void polyfem::assembler::LocalHessian::assign ( const Eigen::MatrixBase< Derived > &  matrix)
inline

Definition at line 34 of file LocalHessian.hpp.

References resize(), and visit().

Referenced by polyfem::hessian_from_energy().

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

◆ cols()

Eigen::Index polyfem::assembler::LocalHessian::cols ( ) const
inline

Definition at line 31 of file LocalHessian.hpp.

References large_, small_, and use_small_.

Referenced by resize().

Here is the caller graph for this function:

◆ resize()

void polyfem::assembler::LocalHessian::resize ( const Eigen::Index  rows,
const Eigen::Index  cols 
)
inline

◆ rows()

Eigen::Index polyfem::assembler::LocalHessian::rows ( ) const
inline

Definition at line 30 of file LocalHessian.hpp.

References large_, small_, and use_small_.

Referenced by resize().

Here is the caller graph for this function:

◆ visit() [1/2]

◆ visit() [2/2]

template<typename F >
decltype(auto) polyfem::assembler::LocalHessian::visit ( F &&  f) const
inline

Definition at line 49 of file LocalHessian.hpp.

References large_, small_, and use_small_.

Member Data Documentation

◆ large_

Eigen::MatrixXd polyfem::assembler::LocalHessian::large_
private

Definition at line 59 of file LocalHessian.hpp.

Referenced by cols(), resize(), rows(), visit(), and visit().

◆ small_

SmallMatrix polyfem::assembler::LocalHessian::small_
private

Definition at line 57 of file LocalHessian.hpp.

Referenced by cols(), resize(), rows(), visit(), and visit().

◆ SmallDofs

constexpr int polyfem::assembler::LocalHessian::SmallDofs = 30
staticconstexpr

Definition at line 16 of file LocalHessian.hpp.

Referenced by resize().

◆ use_small_

bool polyfem::assembler::LocalHessian::use_small_ = true
private

Definition at line 60 of file LocalHessian.hpp.

Referenced by cols(), resize(), rows(), visit(), and visit().


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