PolyFEM
Loading...
Searching...
No Matches
polyfem::IntegrableFunctional Class Reference

#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 &params, 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 &params, 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 &params, 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 &params, 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 &params, 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 &params, 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_
 

Detailed Description

Definition at line 13 of file IntegrableFunctional.hpp.

Member Typedef Documentation

◆ functionalType

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.

Constructor & Destructor Documentation

◆ IntegrableFunctional()

polyfem::IntegrableFunctional::IntegrableFunctional ( )
default

Member Function Documentation

◆ depend_on_gradu()

bool polyfem::IntegrableFunctional::depend_on_gradu ( ) const
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().

Here is the caller graph for this function:

◆ depend_on_gradu_local()

bool polyfem::IntegrableFunctional::depend_on_gradu_local ( ) const
inline

Definition at line 49 of file IntegrableFunctional.hpp.

References has_gradu_local.

Referenced by polyfem::solver::AdjointTools::dJ_du_step().

Here is the caller graph for this function:

◆ depend_on_gradx()

bool polyfem::IntegrableFunctional::depend_on_gradx ( ) const
inline

Definition at line 50 of file IntegrableFunctional.hpp.

References has_gradx.

◆ depend_on_u()

bool polyfem::IntegrableFunctional::depend_on_u ( ) const
inline

Definition at line 47 of file IntegrableFunctional.hpp.

References has_u.

Referenced by polyfem::solver::AdjointTools::dJ_du_step().

Here is the caller graph for this function:

◆ depend_on_x()

bool polyfem::IntegrableFunctional::depend_on_x ( ) const
inline

Definition at line 46 of file IntegrableFunctional.hpp.

References has_x.

Referenced by polyfem::solver::AdjointTools::compute_shape_derivative_functional_term().

Here is the caller graph for this function:

◆ dj_dgradu()

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().

Here is the caller graph for this function:

◆ dj_dgradu_local()

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().

Here is the caller graph for this function:

◆ dj_dgradx()

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().

Here is the caller graph for this function:

◆ dj_du()

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().

Here is the caller graph for this function:

◆ dj_dx()

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().

Here is the caller graph for this function:

◆ evaluate()

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().

Here is the caller graph for this function:

◆ set_dj_dgradu()

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().

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

◆ set_dj_dgradu_local()

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.

Here is the call graph for this function:

◆ set_dj_dgradx()

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.

Here is the call graph for this function:

◆ set_dj_du()

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().

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

◆ set_dj_dx()

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().

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

◆ set_j()

Member Data Documentation

◆ dj_dgradu_func_

functionalType polyfem::IntegrableFunctional::dj_dgradu_func_
private

Definition at line 54 of file IntegrableFunctional.hpp.

Referenced by dj_dgradu(), and set_dj_dgradu().

◆ dj_dgradu_local_func_

functionalType polyfem::IntegrableFunctional::dj_dgradu_local_func_
private

Definition at line 54 of file IntegrableFunctional.hpp.

Referenced by dj_dgradu_local(), and set_dj_dgradu_local().

◆ dj_dgradx_func_

functionalType polyfem::IntegrableFunctional::dj_dgradx_func_
private

Definition at line 54 of file IntegrableFunctional.hpp.

Referenced by dj_dgradx(), and set_dj_dgradx().

◆ dj_du_func_

functionalType polyfem::IntegrableFunctional::dj_du_func_
private

Definition at line 54 of file IntegrableFunctional.hpp.

Referenced by dj_du(), and set_dj_du().

◆ dj_dx_func_

functionalType polyfem::IntegrableFunctional::dj_dx_func_
private

Definition at line 54 of file IntegrableFunctional.hpp.

Referenced by dj_dx(), and set_dj_dx().

◆ has_gradu

bool polyfem::IntegrableFunctional::has_gradu = false
private

◆ has_gradu_local

bool polyfem::IntegrableFunctional::has_gradu_local = false
private

◆ has_gradx

bool polyfem::IntegrableFunctional::has_gradx = false
private

Definition at line 53 of file IntegrableFunctional.hpp.

Referenced by depend_on_gradx(), dj_dgradx(), and set_dj_dgradx().

◆ has_u

bool polyfem::IntegrableFunctional::has_u = false
private

◆ has_x

bool polyfem::IntegrableFunctional::has_x = false
private

Definition at line 53 of file IntegrableFunctional.hpp.

Referenced by depend_on_x(), dj_dx(), and set_dj_dx().

◆ j_func_

functionalType polyfem::IntegrableFunctional::j_func_
private

Definition at line 54 of file IntegrableFunctional.hpp.

Referenced by evaluate(), and set_j().


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