PolyFEM
|
#include <IntegrableFunctional.hpp>
Classes | |
struct | ParameterType |
Parameters for the functional evaluation. More... | |
Public Types | |
typedef std::function< void(const Eigen::MatrixXd &, const Eigen::MatrixXd &, const Eigen::MatrixXd &, const Eigen::MatrixXd &, const Eigen::VectorXd &, const Eigen::VectorXd &, const Eigen::MatrixXd &, const assembler::ElementAssemblyValues &, const ParameterType &, Eigen::MatrixXd &)> | functionalType |
Public Member Functions | |
IntegrableFunctional ()=default | |
void | set_j (const functionalType &j) |
void | set_dj_dx (const functionalType &dj_dx) |
void | set_dj_du (const functionalType &dj_du) |
void | set_dj_dgradu (const functionalType &dj_dgradu) |
void | set_dj_dgradu_local (const functionalType &dj_dgradu_local) |
void | set_dj_dgradx (const functionalType &dj_dgradx) |
void | evaluate (const Eigen::MatrixXd &elastic_params, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &u, const Eigen::MatrixXd &grad_u, const Eigen::MatrixXd &reference_normals, const assembler::ElementAssemblyValues &vals, ParameterType ¶ms, Eigen::MatrixXd &val) const |
void | dj_dx (const Eigen::MatrixXd &elastic_params, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &u, const Eigen::MatrixXd &grad_u, const Eigen::MatrixXd &reference_normals, const assembler::ElementAssemblyValues &vals, ParameterType ¶ms, Eigen::MatrixXd &val) const |
void | dj_du (const Eigen::MatrixXd &elastic_params, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &u, const Eigen::MatrixXd &grad_u, const Eigen::MatrixXd &reference_normals, const assembler::ElementAssemblyValues &vals, ParameterType ¶ms, Eigen::MatrixXd &val) const |
void | dj_dgradu (const Eigen::MatrixXd &elastic_params, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &u, const Eigen::MatrixXd &grad_u, const Eigen::MatrixXd &reference_normals, const assembler::ElementAssemblyValues &vals, ParameterType ¶ms, Eigen::MatrixXd &val) const |
void | dj_dgradu_local (const Eigen::MatrixXd &elastic_params, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &u, const Eigen::MatrixXd &grad_u, const Eigen::MatrixXd &reference_normals, const assembler::ElementAssemblyValues &vals, ParameterType ¶ms, Eigen::MatrixXd &val) const |
void | dj_dgradx (const Eigen::MatrixXd &elastic_params, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &u, const Eigen::MatrixXd &grad_u, const Eigen::MatrixXd &reference_normals, const assembler::ElementAssemblyValues &vals, ParameterType ¶ms, Eigen::MatrixXd &val) const |
bool | depend_on_x () const |
bool | depend_on_u () const |
bool | depend_on_gradu () const |
bool | depend_on_gradu_local () const |
bool | depend_on_gradx () const |
Private Attributes | |
bool | has_x = false |
bool | has_u = false |
bool | has_gradu = false |
bool | has_gradu_local = false |
bool | has_gradx = false |
functionalType | j_func_ |
functionalType | dj_dx_func_ |
functionalType | dj_du_func_ |
functionalType | dj_dgradu_func_ |
functionalType | dj_dgradu_local_func_ |
functionalType | dj_dgradx_func_ |
Definition at line 13 of file IntegrableFunctional.hpp.
typedef std::function<void(const Eigen::MatrixXd &, const Eigen::MatrixXd &, const Eigen::MatrixXd &, const Eigen::MatrixXd &, const Eigen::VectorXd &, const Eigen::VectorXd &, const Eigen::MatrixXd &, const assembler::ElementAssemblyValues &, const ParameterType &, Eigen::MatrixXd &)> polyfem::IntegrableFunctional::functionalType |
Definition at line 28 of file IntegrableFunctional.hpp.
|
default |
|
inline |
Definition at line 48 of file IntegrableFunctional.hpp.
References has_gradu.
Referenced by polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), and polyfem::solver::AdjointTools::dJ_du_step().
|
inline |
Definition at line 49 of file IntegrableFunctional.hpp.
References has_gradu_local.
Referenced by polyfem::solver::AdjointTools::dJ_du_step().
|
inline |
Definition at line 50 of file IntegrableFunctional.hpp.
References has_gradx.
|
inline |
Definition at line 47 of file IntegrableFunctional.hpp.
References has_u.
Referenced by polyfem::solver::AdjointTools::dJ_du_step().
|
inline |
Definition at line 46 of file IntegrableFunctional.hpp.
References has_x.
Referenced by polyfem::solver::AdjointTools::compute_shape_derivative_functional_term().
void polyfem::IntegrableFunctional::dj_dgradu | ( | const Eigen::MatrixXd & | elastic_params, |
const Eigen::MatrixXd & | local_pts, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXd & | u, | ||
const Eigen::MatrixXd & | grad_u, | ||
const Eigen::MatrixXd & | reference_normals, | ||
const assembler::ElementAssemblyValues & | vals, | ||
ParameterType & | params, | ||
Eigen::MatrixXd & | val | ||
) | const |
Definition at line 56 of file IntegrableFunctional.cpp.
References dj_dgradu_func_, has_gradu, val, and vals.
Referenced by polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::solver::AdjointTools::dJ_du_step(), and set_dj_dgradu().
void polyfem::IntegrableFunctional::dj_dgradu_local | ( | const Eigen::MatrixXd & | elastic_params, |
const Eigen::MatrixXd & | local_pts, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXd & | u, | ||
const Eigen::MatrixXd & | grad_u, | ||
const Eigen::MatrixXd & | reference_normals, | ||
const assembler::ElementAssemblyValues & | vals, | ||
ParameterType & | params, | ||
Eigen::MatrixXd & | val | ||
) | const |
Definition at line 62 of file IntegrableFunctional.cpp.
References dj_dgradu_local_func_, has_gradu_local, val, and vals.
Referenced by set_dj_dgradu_local().
void polyfem::IntegrableFunctional::dj_dgradx | ( | const Eigen::MatrixXd & | elastic_params, |
const Eigen::MatrixXd & | local_pts, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXd & | u, | ||
const Eigen::MatrixXd & | grad_u, | ||
const Eigen::MatrixXd & | reference_normals, | ||
const assembler::ElementAssemblyValues & | vals, | ||
ParameterType & | params, | ||
Eigen::MatrixXd & | val | ||
) | const |
Definition at line 68 of file IntegrableFunctional.cpp.
References dj_dgradx_func_, has_gradx, val, and vals.
Referenced by set_dj_dgradx().
void polyfem::IntegrableFunctional::dj_du | ( | const Eigen::MatrixXd & | elastic_params, |
const Eigen::MatrixXd & | local_pts, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXd & | u, | ||
const Eigen::MatrixXd & | grad_u, | ||
const Eigen::MatrixXd & | reference_normals, | ||
const assembler::ElementAssemblyValues & | vals, | ||
ParameterType & | params, | ||
Eigen::MatrixXd & | val | ||
) | const |
Definition at line 50 of file IntegrableFunctional.cpp.
References dj_du_func_, has_u, val, and vals.
Referenced by polyfem::solver::AdjointTools::dJ_du_step(), and set_dj_du().
void polyfem::IntegrableFunctional::dj_dx | ( | const Eigen::MatrixXd & | elastic_params, |
const Eigen::MatrixXd & | local_pts, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXd & | u, | ||
const Eigen::MatrixXd & | grad_u, | ||
const Eigen::MatrixXd & | reference_normals, | ||
const assembler::ElementAssemblyValues & | vals, | ||
ParameterType & | params, | ||
Eigen::MatrixXd & | val | ||
) | const |
Definition at line 44 of file IntegrableFunctional.cpp.
References dj_dx_func_, has_x, val, and vals.
Referenced by polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), and set_dj_dx().
void polyfem::IntegrableFunctional::evaluate | ( | const Eigen::MatrixXd & | elastic_params, |
const Eigen::MatrixXd & | local_pts, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXd & | u, | ||
const Eigen::MatrixXd & | grad_u, | ||
const Eigen::MatrixXd & | reference_normals, | ||
const assembler::ElementAssemblyValues & | vals, | ||
ParameterType & | params, | ||
Eigen::MatrixXd & | val | ||
) | const |
Definition at line 38 of file IntegrableFunctional.cpp.
References j_func_, val, and vals.
Referenced by polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::solver::SDFTargetForm::get_integral_functional(), polyfem::solver::MeshTargetForm::get_integral_functional(), and polyfem::solver::AdjointTools::integrate_objective().
void polyfem::IntegrableFunctional::set_dj_dgradu | ( | const functionalType & | dj_dgradu | ) |
Definition at line 20 of file IntegrableFunctional.cpp.
References dj_dgradu(), dj_dgradu_func_, has_gradu, has_gradu_local, and has_u.
Referenced by polyfem::solver::ElasticEnergyForm::get_integral_functional(), polyfem::solver::StressNormForm::get_integral_functional(), polyfem::solver::ComplianceForm::get_integral_functional(), and polyfem::solver::StressForm::get_integral_functional().
void polyfem::IntegrableFunctional::set_dj_dgradu_local | ( | const functionalType & | dj_dgradu_local | ) |
Definition at line 26 of file IntegrableFunctional.cpp.
References dj_dgradu_local(), dj_dgradu_local_func_, has_gradu, has_gradu_local, and has_u.
void polyfem::IntegrableFunctional::set_dj_dgradx | ( | const functionalType & | dj_dgradx | ) |
Definition at line 32 of file IntegrableFunctional.cpp.
References dj_dgradx(), dj_dgradx_func_, and has_gradx.
void polyfem::IntegrableFunctional::set_dj_du | ( | const functionalType & | dj_du | ) |
Definition at line 14 of file IntegrableFunctional.cpp.
References dj_du(), dj_du_func_, has_gradu, has_gradu_local, and has_u.
Referenced by polyfem::solver::PositionForm::get_integral_functional(), polyfem::solver::AccelerationForm::get_integral_functional(), polyfem::solver::KineticForm::get_integral_functional(), polyfem::solver::TargetForm::get_integral_functional(), polyfem::solver::SDFTargetForm::get_integral_functional(), and polyfem::solver::MeshTargetForm::get_integral_functional().
void polyfem::IntegrableFunctional::set_dj_dx | ( | const functionalType & | dj_dx | ) |
Definition at line 9 of file IntegrableFunctional.cpp.
References dj_dx(), dj_dx_func_, and has_x.
Referenced by polyfem::solver::PositionForm::get_integral_functional(), polyfem::solver::TargetForm::get_integral_functional(), polyfem::solver::SDFTargetForm::get_integral_functional(), and polyfem::solver::MeshTargetForm::get_integral_functional().
void polyfem::IntegrableFunctional::set_j | ( | const functionalType & | j | ) |
Definition at line 5 of file IntegrableFunctional.cpp.
References j_func_.
Referenced by polyfem::solver::ElasticEnergyForm::get_integral_functional(), polyfem::solver::StressNormForm::get_integral_functional(), polyfem::solver::ComplianceForm::get_integral_functional(), polyfem::solver::PositionForm::get_integral_functional(), polyfem::solver::AccelerationForm::get_integral_functional(), polyfem::solver::KineticForm::get_integral_functional(), polyfem::solver::StressForm::get_integral_functional(), polyfem::solver::VolumeForm::get_integral_functional(), polyfem::solver::TargetForm::get_integral_functional(), polyfem::solver::SDFTargetForm::get_integral_functional(), and polyfem::solver::MeshTargetForm::get_integral_functional().
|
private |
Definition at line 54 of file IntegrableFunctional.hpp.
Referenced by dj_dgradu(), and set_dj_dgradu().
|
private |
Definition at line 54 of file IntegrableFunctional.hpp.
Referenced by dj_dgradu_local(), and set_dj_dgradu_local().
|
private |
Definition at line 54 of file IntegrableFunctional.hpp.
Referenced by dj_dgradx(), and set_dj_dgradx().
|
private |
Definition at line 54 of file IntegrableFunctional.hpp.
Referenced by dj_du(), and set_dj_du().
|
private |
Definition at line 54 of file IntegrableFunctional.hpp.
Referenced by dj_dx(), and set_dj_dx().
|
private |
Definition at line 53 of file IntegrableFunctional.hpp.
Referenced by depend_on_gradu(), dj_dgradu(), set_dj_dgradu(), set_dj_dgradu_local(), and set_dj_du().
|
private |
Definition at line 53 of file IntegrableFunctional.hpp.
Referenced by depend_on_gradu_local(), dj_dgradu_local(), set_dj_dgradu(), set_dj_dgradu_local(), and set_dj_du().
|
private |
Definition at line 53 of file IntegrableFunctional.hpp.
Referenced by depend_on_gradx(), dj_dgradx(), and set_dj_dgradx().
|
private |
Definition at line 53 of file IntegrableFunctional.hpp.
Referenced by depend_on_u(), dj_du(), set_dj_dgradu(), set_dj_dgradu_local(), and set_dj_du().
|
private |
Definition at line 53 of file IntegrableFunctional.hpp.
Referenced by depend_on_x(), dj_dx(), and set_dj_dx().
|
private |
Definition at line 54 of file IntegrableFunctional.hpp.
Referenced by evaluate(), and set_j().