PolyFEM
Loading...
Searching...
No Matches
polyfem::solver::PerBody2PerElem Class Reference

#include <Parametrizations.hpp>

Inheritance diagram for polyfem::solver::PerBody2PerElem:
[legend]
Collaboration diagram for polyfem::solver::PerBody2PerElem:
[legend]

Public Member Functions

 PerBody2PerElem (const mesh::Mesh &mesh)
 
int size (const int x_size) const override
 Compute DOF of y given DOF of x.
 
Eigen::VectorXd eval (const Eigen::VectorXd &x) const override
 Eval y = f(x).
 
Eigen::VectorXd apply_jacobian (const Eigen::VectorXd &grad, const Eigen::VectorXd &x) const override
 Apply jacobian for chain rule.
 
- Public Member Functions inherited from polyfem::solver::Parametrization
virtual ~Parametrization ()=default
 
virtual Eigen::VectorXd inverse_eval (const Eigen::VectorXd &y)
 Eval x = f^-1 (y).
 

Private Attributes

const mesh::Meshmesh_
 
int full_size_
 
int reduced_size_
 
std::map< int, std::array< int, 2 > > body_id_map_
 

Detailed Description

Definition at line 99 of file Parametrizations.hpp.

Constructor & Destructor Documentation

◆ PerBody2PerElem()

polyfem::solver::PerBody2PerElem::PerBody2PerElem ( const mesh::Mesh mesh)

Definition at line 260 of file Parametrizations.cpp.

References body_id_map_, polyfem::mesh::Mesh::get_body_id(), polyfem::logger(), polyfem::mesh::Mesh::n_elements(), and reduced_size_.

Here is the call graph for this function:

Member Function Documentation

◆ apply_jacobian()

Eigen::VectorXd polyfem::solver::PerBody2PerElem::apply_jacobian ( const Eigen::VectorXd &  grad_full,
const Eigen::VectorXd &  x 
) const
overridevirtual

Apply jacobian for chain rule.

Let g(y) = g(f(x)). Given ∂g/∂y, compute ∂g/∂x = ∂g/∂y * ∂y/∂x.

Parameters
[in]grad_full∂g/∂y.
[in]xWhere ∂g/∂x is evaluated.
Returns
∂g/∂x.

Implements polyfem::solver::Parametrization.

Definition at line 297 of file Parametrizations.cpp.

References body_id_map_, full_size_, polyfem::mesh::Mesh::get_body_id(), mesh_, polyfem::mesh::Mesh::n_elements(), reduced_size_, size(), and x.

Here is the call graph for this function:

◆ eval()

Eigen::VectorXd polyfem::solver::PerBody2PerElem::eval ( const Eigen::VectorXd &  x) const
overridevirtual

Eval y = f(x).

Parameters
[in]xx.
Returns
y.

Implements polyfem::solver::Parametrization.

Definition at line 275 of file Parametrizations.cpp.

References body_id_map_, full_size_, polyfem::mesh::Mesh::get_body_id(), mesh_, polyfem::mesh::Mesh::n_elements(), reduced_size_, size(), x, and y.

Here is the call graph for this function:

◆ size()

int polyfem::solver::PerBody2PerElem::size ( const int  x_size) const
overridevirtual

Compute DOF of y given DOF of x.

Parameters
[in]x_sizeThe DOF of x.
Returns
DOF of y.

Implements polyfem::solver::Parametrization.

Definition at line 291 of file Parametrizations.cpp.

References full_size_, and reduced_size_.

Referenced by apply_jacobian(), and eval().

Here is the caller graph for this function:

Member Data Documentation

◆ body_id_map_

std::map<int, std::array<int, 2> > polyfem::solver::PerBody2PerElem::body_id_map_
private

Definition at line 112 of file Parametrizations.hpp.

Referenced by apply_jacobian(), eval(), and PerBody2PerElem().

◆ full_size_

int polyfem::solver::PerBody2PerElem::full_size_
private

Definition at line 110 of file Parametrizations.hpp.

Referenced by apply_jacobian(), eval(), and size().

◆ mesh_

const mesh::Mesh& polyfem::solver::PerBody2PerElem::mesh_
private

Definition at line 109 of file Parametrizations.hpp.

Referenced by apply_jacobian(), and eval().

◆ reduced_size_

int polyfem::solver::PerBody2PerElem::reduced_size_
private

Definition at line 111 of file Parametrizations.hpp.

Referenced by apply_jacobian(), eval(), PerBody2PerElem(), and size().


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