|
PolyFEM
|
Maps to average of neighboring. More...
#include <Parametrizations.hpp>
Public Member Functions | |
| LinearFilter (const mesh::Mesh &mesh, const double radius) | |
| int | size (const int x_size) const override |
| Compute DOF of y given DOF of x. | |
| int | inverse_size (int y_size) const override |
| Compute DOF of x given DOF of y. | |
| Eigen::VectorXd | eval (const Eigen::VectorXd &x) const override |
| Eval y = f(x). | |
| Eigen::VectorXd | inverse_eval (const Eigen::VectorXd &y) const override |
| Eval x = f^-1 (y). | |
| 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 |
Private Attributes | |
| Eigen::SparseMatrix< double > | tt_radius_adjacency |
| Eigen::VectorXd | tt_radius_adjacency_row_sum |
Maps to average of neighboring.
Definition at line 159 of file Parametrizations.hpp.
| polyfem::solver::LinearFilter::LinearFilter | ( | const mesh::Mesh & | mesh, |
| const double | radius | ||
| ) |
Definition at line 597 of file Parametrizations.cpp.
References polyfem::mesh::Mesh::bounding_box(), polyfem::mesh::Mesh::cell_barycenters(), polyfem::mesh::Mesh::face_barycenters(), polyfem::mesh::Mesh::is_volume(), tt_radius_adjacency, and tt_radius_adjacency_row_sum.
|
overridevirtual |
Apply jacobian for chain rule.
Let g(y) = g(f(x)). Given ∂g/∂y, compute ∂g/∂x = ∂g/∂y * ∂y/∂x.
| [in] | grad_full | ∂g/∂y. |
| [in] | x | Where ∂g/∂x is evaluated. |
Implements polyfem::solver::Parametrization.
Definition at line 661 of file Parametrizations.cpp.
References tt_radius_adjacency, tt_radius_adjacency_row_sum, and x.
|
overridevirtual |
Eval y = f(x).
| [in] | x | x. |
Implements polyfem::solver::Parametrization.
Definition at line 649 of file Parametrizations.cpp.
References tt_radius_adjacency, tt_radius_adjacency_row_sum, and x.
|
overridevirtual |
Eval x = f^-1 (y).
This is not a strict inverse in mathematical sense, one may choose "reasonable" x even if f is not one-to-one.
| [in] | y | y. |
| std::runtime_error | Throw if inverse not implemented or is impossible. |
Implements polyfem::solver::Parametrization.
Definition at line 655 of file Parametrizations.cpp.
References y.
|
overridevirtual |
Compute DOF of x given DOF of y.
| [in] | y_size | DOF of y. |
| std::runtime_error | Throw if inverse not impossible or y_size is invalid. |
Implements polyfem::solver::Parametrization.
Definition at line 634 of file Parametrizations.cpp.
References polyfem::log_and_throw_adjoint_error(), and tt_radius_adjacency.
|
overridevirtual |
Compute DOF of y given DOF of x.
| [in] | x_size | The DOF of x. |
Implements polyfem::solver::Parametrization.
Definition at line 644 of file Parametrizations.cpp.
|
private |
Definition at line 171 of file Parametrizations.hpp.
Referenced by apply_jacobian(), eval(), inverse_size(), and LinearFilter().
|
private |
Definition at line 172 of file Parametrizations.hpp.
Referenced by apply_jacobian(), eval(), and LinearFilter().