PolyFEM
|
Base class of all automatic differentiation types. More...
#include <autodiff.h>
Static Public Member Functions | |
Configuration | |
static void | setVariableCount (size_t value) |
Set the independent variable count used by the automatic differentiation layer. | |
static size_t | getVariableCount () |
Get the variable count used by the automatic differentiation layer. | |
Static Public Attributes | |
static thread_local size_t | m_variableCount |
Base class of all automatic differentiation types.
This class records the number of independent variables with respect to which derivatives are computed.
Definition at line 40 of file autodiff.h.
|
inlinestatic |
Get the variable count used by the automatic differentiation layer.
Definition at line 60 of file autodiff.h.
References m_variableCount.
Referenced by DScalar1< _Scalar, _Gradient >::DScalar1(), DScalar1< _Scalar, _Gradient >::DScalar1(), DScalar2< _Scalar, _Gradient, _Hessian >::DScalar2(), and DScalar2< _Scalar, _Gradient, _Hessian >::DScalar2().
|
inlinestatic |
Set the independent variable count used by the automatic differentiation layer.
This function must be called before doing any computations with DScalar1 or DScalar2. The value will be recorded in thread-local storage.
Definition at line 54 of file autodiff.h.
References m_variableCount.
Referenced by polyfem::assembler::AMIPSEnergy::compute_energy_hessian_aux_fast(), polyfem::assembler::GenericElastic< Derived >::compute_stress_grad_multiply_mat(), polyfem::assembler::GenericElastic< Derived >::compute_stress_grad_multiply_stress(), polyfem::assembler::GenericElastic< Derived >::compute_stress_grad_multiply_vect(), polyfem::solver::AdjointTools::edge_normal_gradient(), polyfem::problem::KernelProblem::eval_fun(), polyfem::problem::ElasticCantileverExact::exact_grad(), polyfem::problem::ProblemWithSolution::exact_grad(), polyfem::solver::AdjointTools::face_normal_gradient(), polyfem::assembler::MooneyRivlin3ParamSymbolic::get_grad_hess_autodiff(), polyfem::get_local_disp(), polyfem::problem::ElasticCantileverExact::neumann_bc(), polyfem::problem::ElasticCantileverExact::rhs(), polyfem::problem::ProblemWithSolution::rhs(), and polyfem::basis::RBFWithQuadratic::setup_monomials_strong_2d().
|
static |
Definition at line 73 of file autodiff.h.
Referenced by getVariableCount(), and setVariableCount().