PolyFEM
|
Namespaces | |
namespace | assembler |
Used for test only. | |
namespace | autogen |
namespace | basis |
namespace | io |
namespace | mesh |
namespace | problem |
namespace | quadrature |
namespace | refinement |
namespace | renderer |
namespace | solver |
namespace | time_integrator |
namespace | utils |
Classes | |
class | AutoDiffAllocator |
class | AutoDiffAllocator< double > |
class | BSplineParametrization |
class | BSplineParametrization2D |
class | BSplineParametrization3D |
class | CubicHermiteSplineParametrization |
class | IntegrableFunctional |
class | LazyCubicInterpolator |
class | OptState |
main class that contains the polyfem adjoint solver and all its state More... | |
class | State |
main class that contains the polyfem solver and all its state More... | |
class | Units |
Typedefs | |
using | json = nlohmann::json |
typedef DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > > | AutodiffScalarGrad |
typedef DScalar2< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 >, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, 3, 3 > > | AutodiffScalarHessian |
typedef Eigen::Matrix< AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1 > | AutodiffGradPt |
typedef Eigen::Matrix< AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1 > | AutodiffHessianPt |
typedef std::array< double, 2 > | DampingParameters |
typedef Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > | VectorNd |
typedef Eigen::Matrix< int, Eigen::Dynamic, 1, 0, 3, 1 > | VectorNi |
typedef Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > | RowVectorNd |
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 3, 3 > | MatrixNd |
typedef Eigen::Matrix< double, Eigen::Dynamic, 1, 0, MAX_QUAD_POINTS, 1 > | QuadratureVector |
typedef Eigen::SparseMatrix< double, Eigen::ColMajor > | StiffnessMatrix |
Enumerations | |
enum class | CacheLevel { None , Solution , Derivatives } |
enum class | ElasticityTensorType { CAUCHY , PK1 , PK2 , F } |
Functions | |
void | compute_integral_constraints (const Mesh3D &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, Eigen::MatrixXd &basis_integrals) |
double | convert_to_lambda (const bool is_volume, const double E, const double nu) |
double | convert_to_mu (const double E, const double nu) |
Eigen::Matrix2d | d_lambda_mu_d_E_nu (const bool is_volume, const double E, const double nu) |
Eigen::Matrix2d | d_E_nu_d_lambda_mu (const bool is_volume, const double lambda, const double mu) |
double | convert_to_E (const bool is_volume, const double lambda, const double mu) |
double | convert_to_nu (const bool is_volume, const double lambda, const double mu) |
Eigen::VectorXd | gradient_from_energy (const int size, const int n_bases, const assembler::NonLinearAssemblerData &data, const std::function< DScalar1< double, Eigen::Matrix< double, 6, 1 > >(const assembler::NonLinearAssemblerData &)> &fun6, const std::function< DScalar1< double, Eigen::Matrix< double, 8, 1 > >(const assembler::NonLinearAssemblerData &)> &fun8, const std::function< DScalar1< double, Eigen::Matrix< double, 12, 1 > >(const assembler::NonLinearAssemblerData &)> &fun12, const std::function< DScalar1< double, Eigen::Matrix< double, 18, 1 > >(const assembler::NonLinearAssemblerData &)> &fun18, const std::function< DScalar1< double, Eigen::Matrix< double, 24, 1 > >(const assembler::NonLinearAssemblerData &)> &fun24, const std::function< DScalar1< double, Eigen::Matrix< double, 30, 1 > >(const assembler::NonLinearAssemblerData &)> &fun30, const std::function< DScalar1< double, Eigen::Matrix< double, 60, 1 > >(const assembler::NonLinearAssemblerData &)> &fun60, const std::function< DScalar1< double, Eigen::Matrix< double, 81, 1 > >(const assembler::NonLinearAssemblerData &)> &fun81, const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, SMALL_N, 1 > >(const assembler::NonLinearAssemblerData &)> &funN, const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, BIG_N, 1 > >(const assembler::NonLinearAssemblerData &)> &funBigN, const std::function< DScalar1< double, Eigen::VectorXd >(const assembler::NonLinearAssemblerData &)> &funn) |
Eigen::MatrixXd | hessian_from_energy (const int size, const int n_bases, const assembler::NonLinearAssemblerData &data, const std::function< DScalar2< double, Eigen::Matrix< double, 6, 1 >, Eigen::Matrix< double, 6, 6 > >(const assembler::NonLinearAssemblerData &)> &fun6, const std::function< DScalar2< double, Eigen::Matrix< double, 8, 1 >, Eigen::Matrix< double, 8, 8 > >(const assembler::NonLinearAssemblerData &)> &fun8, const std::function< DScalar2< double, Eigen::Matrix< double, 12, 1 >, Eigen::Matrix< double, 12, 12 > >(const assembler::NonLinearAssemblerData &)> &fun12, const std::function< DScalar2< double, Eigen::Matrix< double, 18, 1 >, Eigen::Matrix< double, 18, 18 > >(const assembler::NonLinearAssemblerData &)> &fun18, const std::function< DScalar2< double, Eigen::Matrix< double, 24, 1 >, Eigen::Matrix< double, 24, 24 > >(const assembler::NonLinearAssemblerData &)> &fun24, const std::function< DScalar2< double, Eigen::Matrix< double, 30, 1 >, Eigen::Matrix< double, 30, 30 > >(const assembler::NonLinearAssemblerData &)> &fun30, const std::function< DScalar2< double, Eigen::Matrix< double, 60, 1 >, Eigen::Matrix< double, 60, 60 > >(const assembler::NonLinearAssemblerData &)> &fun60, const std::function< DScalar2< double, Eigen::Matrix< double, 81, 1 >, Eigen::Matrix< double, 81, 81 > >(const assembler::NonLinearAssemblerData &)> &fun81, const std::function< DScalar2< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, SMALL_N, 1 >, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, SMALL_N, SMALL_N > >(const assembler::NonLinearAssemblerData &)> &funN, const std::function< DScalar2< double, Eigen::VectorXd, Eigen::MatrixXd >(const assembler::NonLinearAssemblerData &)> &funn) |
void | compute_diplacement_grad (const int size, const ElementAssemblyValues &vals, const Eigen::MatrixXd &local_pts, const int p, const Eigen::MatrixXd &displacement, Eigen::MatrixXd &displacement_grad) |
void | compute_diplacement_grad (const int size, const ElementBases &bs, const ElementAssemblyValues &vals, const Eigen::MatrixXd &local_pts, const int p, const Eigen::MatrixXd &displacement, Eigen::MatrixXd &displacement_grad) |
double | von_mises_stress_for_stress_tensor (const Eigen::MatrixXd &stress) |
Eigen::MatrixXd | pk1_from_cauchy (const Eigen::MatrixXd &stress, const Eigen::MatrixXd &F) |
Eigen::MatrixXd | pk2_from_cauchy (const Eigen::MatrixXd &stress, const Eigen::MatrixXd &F) |
Eigen::VectorXd | gradient_from_energy (const int size, const int n_bases, const assembler::NonLinearAssemblerData &data, const std::function< DScalar1< double, Eigen::Matrix< double, 6, 1 > >(const assembler::NonLinearAssemblerData &)> &fun6, const std::function< DScalar1< double, Eigen::Matrix< double, 8, 1 > >(const assembler::NonLinearAssemblerData &)> &fun8, const std::function< DScalar1< double, Eigen::Matrix< double, 12, 1 > >(const assembler::NonLinearAssemblerData &)> &fun12, const std::function< DScalar1< double, Eigen::Matrix< double, 18, 1 > >(const assembler::NonLinearAssemblerData &)> &fun18, const std::function< DScalar1< double, Eigen::Matrix< double, 24, 1 > >(const assembler::NonLinearAssemblerData &)> &fun24, const std::function< DScalar1< double, Eigen::Matrix< double, 30, 1 > >(const assembler::NonLinearAssemblerData &)> &fun30, const std::function< DScalar1< double, Eigen::Matrix< double, 60, 1 > >(const assembler::NonLinearAssemblerData &)> &fun60, const std::function< DScalar1< double, Eigen::Matrix< double, 81, 1 > >(const assembler::NonLinearAssemblerData &)> &fun81, const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, SMALL_N, 1 > >(const assembler::NonLinearAssemblerData &)> &funN, const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 1000, 1 > >(const assembler::NonLinearAssemblerData &)> &funBigN, const std::function< DScalar1< double, Eigen::VectorXd >(const assembler::NonLinearAssemblerData &)> &funn) |
template<typename AutoDiffVect > | |
void | get_local_disp (const assembler::NonLinearAssemblerData &data, const int size, AutoDiffVect &local_disp) |
template<typename AutoDiffVect , typename AutoDiffGradMat > | |
void | compute_disp_grad_at_quad (const assembler::NonLinearAssemblerData &data, const AutoDiffVect &local_disp, const int p, const int size, AutoDiffGradMat &def_grad) |
template<typename AutoDiffGradMat > | |
AutoDiffGradMat::Scalar | first_invariant (const AutoDiffGradMat &B) |
template<typename AutoDiffGradMat > | |
AutoDiffGradMat::Scalar | second_invariant (const AutoDiffGradMat &B) |
template<typename AutoDiffGradMat > | |
AutoDiffGradMat::Scalar | third_invariant (const AutoDiffGradMat &B) |
spdlog::logger & | adjoint_logger () |
Retrieves the current logger for adjoint. | |
spdlog::logger & | logger () |
Retrieves the current logger. | |
void | set_logger (std::shared_ptr< spdlog::logger > logger) |
Setup a logger object to be used by Polyfem. | |
void | set_adjoint_logger (std::shared_ptr< spdlog::logger > logger) |
Setup a logger object to be used by adjoint Polyfem. | |
void | log_and_throw_error (const std::string &msg) |
void | log_and_throw_adjoint_error (const std::string &msg) |
template<typename... Args> | |
void | log_and_throw_error (const std::string &msg, const Args &...args) |
template<typename... Args> | |
void | log_and_throw_adjoint_error (const std::string &msg, const Args &...args) |
Variables | |
constexpr int | SMALL_N = POLYFEM_SMALL_N |
constexpr int | BIG_N = POLYFEM_BIG_N |
typedef Eigen::Matrix<AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1> polyfem::AutodiffGradPt |
Definition at line 13 of file AutodiffTypes.hpp.
typedef Eigen::Matrix<AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1> polyfem::AutodiffHessianPt |
Definition at line 14 of file AutodiffTypes.hpp.
typedef DScalar1<double, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> > polyfem::AutodiffScalarGrad |
Definition at line 10 of file AutodiffTypes.hpp.
typedef DScalar2<double, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1>, Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 0, 3, 3> > polyfem::AutodiffScalarHessian |
Definition at line 11 of file AutodiffTypes.hpp.
typedef std::array<double, 2> polyfem::DampingParameters |
Definition at line 68 of file ElasticityUtils.hpp.
using polyfem::json = typedef nlohmann::json |
Definition at line 9 of file Common.hpp.
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 3, 3> polyfem::MatrixNd |
typedef Eigen::Matrix<double, Eigen::Dynamic, 1, 0, MAX_QUAD_POINTS, 1> polyfem::QuadratureVector |
typedef Eigen::Matrix<double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3> polyfem::RowVectorNd |
typedef Eigen::SparseMatrix<double, Eigen::ColMajor> polyfem::StiffnessMatrix |
typedef Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> polyfem::VectorNd |
typedef Eigen::Matrix<int, Eigen::Dynamic, 1, 0, 3, 1> polyfem::VectorNi |
|
strong |
|
strong |
Enumerator | |
---|---|
CAUCHY | |
PK1 | |
PK2 | |
F |
Definition at line 21 of file ElasticityUtils.hpp.
spdlog::logger & polyfem::adjoint_logger | ( | ) |
Retrieves the current logger for adjoint.
Definition at line 28 of file Logger.cpp.
Referenced by polyfem::solver::AdjointNLProblem::after_line_search_custom_operation(), polyfem::mesh::apply_slim(), polyfem::OptState::create_states(), polyfem::solver::AdjointNLProblem::gradient(), polyfem::OptState::init(), polyfem::OptState::init_logger(), polyfem::solver::AMIPSForm::is_step_valid(), polyfem::solver::AdjointNLProblem::is_step_valid(), log_and_throw_adjoint_error(), polyfem::solver::AdjointOptUtils::make_nl_solver(), polyfem::solver::CollisionBarrierForm::max_step_size(), polyfem::solver::AdjointNLProblem::save_to_file(), polyfem::OptState::set_log_level(), polyfem::solver::TargetForm::set_reference(), polyfem::solver::AdjointNLProblem::solve_pde(), polyfem::State::solve_static_adjoint(), polyfem::State::solve_transient_adjoint(), and polyfem::solver::AdjointForm::value().
void polyfem::compute_diplacement_grad | ( | const int | size, |
const ElementAssemblyValues & | vals, | ||
const Eigen::MatrixXd & | local_pts, | ||
const int | p, | ||
const Eigen::MatrixXd & | displacement, | ||
Eigen::MatrixXd & | displacement_grad | ||
) |
Definition at line 276 of file ElasticityUtils.cpp.
References polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::assembler::ElementAssemblyValues::jac_it, and vals.
Referenced by polyfem::assembler::FixedCorotational::assign_stress_tensor(), polyfem::assembler::HookeLinearElasticity::assign_stress_tensor(), polyfem::assembler::IncompressibleLinearElasticityDispacement::assign_stress_tensor(), polyfem::assembler::LinearElasticity::assign_stress_tensor(), polyfem::assembler::MooneyRivlin3ParamSymbolic::assign_stress_tensor(), polyfem::assembler::NeoHookeanElasticity::assign_stress_tensor(), polyfem::assembler::SaintVenantElasticity::assign_stress_tensor(), polyfem::assembler::NeoHookeanElasticity::compute_stiffness_value(), and polyfem::assembler::GenericElastic< AMIPSEnergyAutodiff >::compute_stress_grad_multiply_vect().
void polyfem::compute_diplacement_grad | ( | const int | size, |
const ElementBases & | bs, | ||
const ElementAssemblyValues & | vals, | ||
const Eigen::MatrixXd & | local_pts, | ||
const int | p, | ||
const Eigen::MatrixXd & | displacement, | ||
Eigen::MatrixXd & | displacement_grad | ||
) |
Definition at line 301 of file ElasticityUtils.cpp.
References polyfem::basis::ElementBases::bases, polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::basis::Basis::global(), polyfem::assembler::ElementAssemblyValues::jac_it, and vals.
void polyfem::compute_disp_grad_at_quad | ( | const assembler::NonLinearAssemblerData & | data, |
const AutoDiffVect & | local_disp, | ||
const int | p, | ||
const int | size, | ||
AutoDiffGradMat & | def_grad | ||
) |
Definition at line 106 of file ElasticityUtils.hpp.
References polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::assembler::ElementAssemblyValues::jac_it, and polyfem::assembler::NonLinearAssemblerData::vals.
Referenced by polyfem::assembler::FixedCorotational::compute_energy_aux(), polyfem::assembler::GenericElastic< Derived >::compute_energy_aux(), polyfem::assembler::HookeLinearElasticity::compute_energy_aux(), polyfem::assembler::LinearElasticity::compute_energy_aux(), polyfem::assembler::MooneyRivlin3ParamSymbolic::compute_energy_aux(), polyfem::assembler::NeoHookeanElasticity::compute_energy_aux(), and polyfem::assembler::SaintVenantElasticity::compute_energy_aux().
void polyfem::compute_integral_constraints | ( | const Mesh3D & | mesh, |
const int | n_bases, | ||
const std::vector< basis::ElementBases > & | bases, | ||
const std::vector< basis::ElementBases > & | gbases, | ||
Eigen::MatrixXd & | basis_integrals | ||
) |
Definition at line 404 of file State.cpp.
References polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::assembler::ElementAssemblyValues::compute(), polyfem::assembler::ElementAssemblyValues::det, polyfem::assembler::AssemblyValues::global, polyfem::assembler::AssemblyValues::grad_t_m, polyfem::mesh::Mesh3D::is_volume(), logger(), polyfem::mesh::Mesh::n_elements(), polyfem::assembler::ElementAssemblyValues::quadrature, polyfem::assembler::AssemblyValues::val, polyfem::assembler::ElementAssemblyValues::val, vals, and polyfem::quadrature::Quadrature::weights.
double polyfem::convert_to_E | ( | const bool | is_volume, |
const double | lambda, | ||
const double | mu | ||
) |
Definition at line 65 of file ElasticityUtils.cpp.
Referenced by polyfem::solver::ENu2LambdaMu::inverse_eval().
double polyfem::convert_to_lambda | ( | const bool | is_volume, |
const double | E, | ||
const double | nu | ||
) |
Definition at line 12 of file ElasticityUtils.cpp.
Referenced by polyfem::solver::ENu2LambdaMu::eval(), and polyfem::assembler::LameParameters::lambda_mu().
double polyfem::convert_to_mu | ( | const double | E, |
const double | nu | ||
) |
Definition at line 20 of file ElasticityUtils.cpp.
Referenced by polyfem::solver::ENu2LambdaMu::eval(), and polyfem::assembler::LameParameters::lambda_mu().
double polyfem::convert_to_nu | ( | const bool | is_volume, |
const double | lambda, | ||
const double | mu | ||
) |
Definition at line 73 of file ElasticityUtils.cpp.
Referenced by polyfem::solver::ENu2LambdaMu::inverse_eval().
Eigen::Matrix2d polyfem::d_E_nu_d_lambda_mu | ( | const bool | is_volume, |
const double | lambda, | ||
const double | mu | ||
) |
Definition at line 44 of file ElasticityUtils.cpp.
Eigen::Matrix2d polyfem::d_lambda_mu_d_E_nu | ( | const bool | is_volume, |
const double | E, | ||
const double | nu | ||
) |
Definition at line 25 of file ElasticityUtils.cpp.
Referenced by polyfem::solver::ENu2LambdaMu::apply_jacobian().
AutoDiffGradMat::Scalar polyfem::first_invariant | ( | const AutoDiffGradMat & | B | ) |
Definition at line 140 of file ElasticityUtils.hpp.
Referenced by polyfem::assembler::MooneyRivlinElasticity::elastic_energy(), and polyfem::assembler::MooneyRivlin3ParamSymbolic::elastic_energy().
void polyfem::get_local_disp | ( | const assembler::NonLinearAssemblerData & | data, |
const int | size, | ||
AutoDiffVect & | local_disp | ||
) |
Definition at line 71 of file ElasticityUtils.hpp.
References polyfem::assembler::ElementAssemblyValues::basis_values, DiffScalarBase::setVariableCount(), polyfem::assembler::NonLinearAssemblerData::vals, and polyfem::assembler::NonLinearAssemblerData::x.
Referenced by polyfem::assembler::AMIPSEnergy::compute_energy_aux(), polyfem::assembler::FixedCorotational::compute_energy_aux(), polyfem::assembler::GenericElastic< Derived >::compute_energy_aux(), polyfem::assembler::HookeLinearElasticity::compute_energy_aux(), polyfem::assembler::LinearElasticity::compute_energy_aux(), polyfem::assembler::MooneyRivlin3ParamSymbolic::compute_energy_aux(), polyfem::assembler::NeoHookeanElasticity::compute_energy_aux(), and polyfem::assembler::SaintVenantElasticity::compute_energy_aux().
Eigen::VectorXd polyfem::gradient_from_energy | ( | const int | size, |
const int | n_bases, | ||
const assembler::NonLinearAssemblerData & | data, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 6, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun6, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 8, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun8, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 12, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun12, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 18, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun18, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 24, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun24, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 30, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun30, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 60, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun60, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 81, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun81, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, SMALL_N, 1 > >(const assembler::NonLinearAssemblerData &)> & | funN, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 1000, 1 > >(const assembler::NonLinearAssemblerData &)> & | funBigN, | ||
const std::function< DScalar1< double, Eigen::VectorXd >(const assembler::NonLinearAssemblerData &)> & | funn | ||
) |
Eigen::VectorXd polyfem::gradient_from_energy | ( | const int | size, |
const int | n_bases, | ||
const assembler::NonLinearAssemblerData & | data, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 6, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun6, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 8, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun8, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 12, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun12, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 18, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun18, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 24, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun24, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 30, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun30, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 60, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun60, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, 81, 1 > >(const assembler::NonLinearAssemblerData &)> & | fun81, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, SMALL_N, 1 > >(const assembler::NonLinearAssemblerData &)> & | funN, | ||
const std::function< DScalar1< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, BIG_N, 1 > >(const assembler::NonLinearAssemblerData &)> & | funBigN, | ||
const std::function< DScalar1< double, Eigen::VectorXd >(const assembler::NonLinearAssemblerData &)> & | funn | ||
) |
Definition at line 81 of file ElasticityUtils.cpp.
References BIG_N, logger(), and SMALL_N.
Referenced by polyfem::assembler::GenericElastic< Derived >::assemble_gradient(), polyfem::assembler::HookeLinearElasticity::assemble_gradient(), polyfem::assembler::LinearElasticity::assemble_gradient(), and polyfem::assembler::SaintVenantElasticity::assemble_gradient().
Eigen::MatrixXd polyfem::hessian_from_energy | ( | const int | size, |
const int | n_bases, | ||
const assembler::NonLinearAssemblerData & | data, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 6, 1 >, Eigen::Matrix< double, 6, 6 > >(const assembler::NonLinearAssemblerData &)> & | fun6, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 8, 1 >, Eigen::Matrix< double, 8, 8 > >(const assembler::NonLinearAssemblerData &)> & | fun8, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 12, 1 >, Eigen::Matrix< double, 12, 12 > >(const assembler::NonLinearAssemblerData &)> & | fun12, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 18, 1 >, Eigen::Matrix< double, 18, 18 > >(const assembler::NonLinearAssemblerData &)> & | fun18, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 24, 1 >, Eigen::Matrix< double, 24, 24 > >(const assembler::NonLinearAssemblerData &)> & | fun24, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 30, 1 >, Eigen::Matrix< double, 30, 30 > >(const assembler::NonLinearAssemblerData &)> & | fun30, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 60, 1 >, Eigen::Matrix< double, 60, 60 > >(const assembler::NonLinearAssemblerData &)> & | fun60, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, 81, 1 >, Eigen::Matrix< double, 81, 81 > >(const assembler::NonLinearAssemblerData &)> & | fun81, | ||
const std::function< DScalar2< double, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, SMALL_N, 1 >, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, SMALL_N, SMALL_N > >(const assembler::NonLinearAssemblerData &)> & | funN, | ||
const std::function< DScalar2< double, Eigen::VectorXd, Eigen::MatrixXd >(const assembler::NonLinearAssemblerData &)> & | funn | ||
) |
Definition at line 180 of file ElasticityUtils.cpp.
References logger(), and SMALL_N.
Referenced by polyfem::assembler::GenericElastic< Derived >::assemble_hessian(), polyfem::assembler::HookeLinearElasticity::assemble_hessian(), polyfem::assembler::LinearElasticity::assemble_hessian(), and polyfem::assembler::SaintVenantElasticity::assemble_hessian().
void polyfem::log_and_throw_adjoint_error | ( | const std::string & | msg | ) |
Definition at line 77 of file Logger.cpp.
References adjoint_logger().
Referenced by polyfem::solver::AdjointNLProblem::after_line_search_custom_operation(), polyfem::solver::ProxyContactForceForm::build_collision_mesh(), polyfem::solver::MaxStressForm::compute_adjoint_rhs_step(), polyfem::solver::FrictionCoeffientVariableToSimulation::compute_adjoint_term(), polyfem::solver::DampingCoeffientVariableToSimulation::compute_adjoint_term(), polyfem::solver::InitialConditionVariableToSimulation::compute_adjoint_term(), polyfem::solver::DirichletVariableToSimulation::compute_adjoint_term(), polyfem::assembler::Assembler::compute_dstress_dmu_dlambda(), polyfem::State::compute_force_jacobian(), polyfem::solver::MinJacobianForm::compute_partial_gradient(), polyfem::solver::MaxStressForm::compute_partial_gradient_step(), polyfem::solver::ElasticEnergyForm::compute_partial_gradient_step(), polyfem::solver::StressNormForm::compute_partial_gradient_step(), polyfem::solver::StressForm::compute_partial_gradient_step(), polyfem::solver::NodeTargetForm::compute_partial_gradient_step(), polyfem::assembler::Assembler::compute_stress_grad(), polyfem::assembler::Assembler::compute_stress_grad_multiply_mat(), polyfem::assembler::Assembler::compute_stress_prev_grad(), polyfem::solver::AdjointOptUtils::compute_variable_size(), polyfem::solver::VariableToSimulation::create(), polyfem::solver::AdjointOptUtils::create_form(), polyfem::solver::AdjointOptUtils::create_parametrization(), polyfem::solver::AdjointOptUtils::create_simple_form(), polyfem::solver::AdjointOptUtils::create_states(), polyfem::solver::DeformedCollisionBarrierForm::DeformedCollisionBarrierForm(), polyfem::solver::AdjointForm::first_derivative_unweighted(), polyfem::State::get_adjoint_mat(), polyfem::solver::ElasticEnergyForm::get_integral_functional(), polyfem::solver::ComplianceForm::get_integral_functional(), polyfem::solver::AccelerationForm::get_integral_functional(), polyfem::solver::KineticForm::get_integral_functional(), polyfem::solver::StressForm::get_integral_functional(), polyfem::solver::TargetForm::get_integral_functional(), polyfem::solver::VariableToSimulation::get_output_indexing(), polyfem::solver::AdjointNLProblem::hessian(), polyfem::solver::SolveData::init_forms(), polyfem::solver::InsertConstantMap::InsertConstantMap(), polyfem::solver::VariableToSimulation::inverse_eval(), polyfem::solver::ShapeVariableToSimulation::inverse_eval(), polyfem::solver::ElasticVariableToSimulation::inverse_eval(), polyfem::solver::FrictionCoeffientVariableToSimulation::inverse_eval(), polyfem::solver::DampingCoeffientVariableToSimulation::inverse_eval(), polyfem::solver::DirichletVariableToSimulation::inverse_eval(), polyfem::solver::PressureVariableToSimulation::inverse_eval(), polyfem::solver::Parametrization::inverse_eval(), polyfem::solver::SliceMap::inverse_eval(), polyfem::solver::PeriodicMeshToMesh::inverse_eval(), polyfem::solver::AdjointOptUtils::make_nl_solver(), polyfem::solver::NodeTargetForm::NodeTargetForm(), polyfem::solver::PerBody2PerNode::PerBody2PerNode(), polyfem::solver::AdjointForm::second_derivative_unweighted(), polyfem::solver::VariableToSimulation::set_output_indexing(), polyfem::solver::SliceMap::SliceMap(), polyfem::State::solve_transient_adjoint(), polyfem::State::solve_transient_linear(), polyfem::solver::VariableToSimulation::update_state(), polyfem::solver::InitialConditionVariableToSimulation::update_state(), and polyfem::solver::VariableToBoundaryNodesExclusive::VariableToBoundaryNodesExclusive().
void polyfem::log_and_throw_adjoint_error | ( | const std::string & | msg, |
const Args &... | args | ||
) |
Definition at line 50 of file Logger.hpp.
References log_and_throw_error().
void polyfem::log_and_throw_error | ( | const std::string & | msg | ) |
Definition at line 71 of file Logger.cpp.
References logger().
Referenced by polyfem::mesh::Obstacle::append_mesh(), polyfem::utils::apply_common_params(), polyfem::assembler::Assembler::assemble(), polyfem::assembler::Assembler::assemble_energy(), polyfem::assembler::Assembler::assemble_energy_per_element(), polyfem::assembler::Assembler::assemble_gradient(), polyfem::assembler::Assembler::assemble_hessian(), polyfem::time_integrator::BDF::BDF(), polyfem::BSplineParametrization2D::BSplineParametrization2D(), polyfem::BSplineParametrization3D::BSplineParametrization3D(), polyfem::utils::Selection::build(), polyfem::utils::Interpolation::build(), polyfem::State::build_basis(), polyfem::mesh::build_collision_proxy(), polyfem::mesh::build_collision_proxy_displacement_map(), polyfem::State::build_periodic_collision_mesh(), polyfem::utils::Selection::build_selections(), polyfem::State::cache_transient_adjoint_quantities(), polyfem::solver::PeriodicShapeVariableToSimulation::compute_adjoint_term(), polyfem::assembler::PressureAssembler::compute_cavity_energy_hess(), polyfem::assembler::Assembler::compute_rhs(), polyfem::assembler::Assembler::compute_stiffness_value(), polyfem::assembler::Assembler::compute_stress_grad_multiply_vect(), polyfem::mesh::construct_affine_transformation(), polyfem::Units::convert(), polyfem::io::OutStatsData::count_flipped_elements(), polyfem::solver::RayleighDampingForm::create(), polyfem::solver::AdjointOptUtils::create_form(), polyfem::solver::BSplineParametrization1DTo2D::eval(), polyfem::solver::BSplineParametrization2DTo3D::eval(), polyfem::solver::BoundedBiharmonicWeights2Dto3D::eval(), polyfem::solver::NLHomoProblem::full_to_reduced(), polyfem::utils::PiecewiseInterpolation::init(), polyfem::mesh::LocalRelaxationData< M >::init_boundary_conditions(), polyfem::State::init_nonlinear_tensor_solve(), polyfem::State::init_time(), polyfem::mesh::WildRemesher< WMTKMesh >::invariants(), polyfem::solver::PeriodicShapeVariableToSimulation::inverse_eval(), polyfem::solver::BoundedBiharmonicWeights2Dto3D::inverse_eval(), polyfem::mesh::irregular_triangle(), polyfem::assembler::Assembler::kernel(), polyfem::State::load_mesh(), log_and_throw_adjoint_error(), log_and_throw_error(), main(), polyfem::assembler::AssemblerUtils::make_assembler(), polyfem::assembler::AssemblerUtils::make_mixed_assembler(), polyfem::solver::ContactForm::max_step_size(), polyfem::solver::TransientNavierStokesSolver::minimize_aux(), polyfem::assembler::GenericTensorProblem::neumann_nodal_value(), polyfem::assembler::GenericScalarProblem::neumann_nodal_value(), polyfem::utils::ExpressionValue::operator()(), polyfem::utils::PeriodicBoundary::PeriodicBoundary(), polyfem::solver::PeriodicMeshToMesh::PeriodicMeshToMesh(), polyfem::mesh::read_fem_geometry(), polyfem::mesh::read_fem_mesh(), polyfem::mesh::read_obstacle_geometry(), polyfem::mesh::read_obstacle_mesh(), polyfem::solver::SDFTargetForm::set_bspline_target(), polyfem::solver::SDFTargetForm::set_bspline_target(), polyfem::assembler::GenericTensorProblem::set_parameters(), polyfem::assembler::GenericScalarProblem::set_parameters(), polyfem::time_integrator::BDF::set_parameters(), polyfem::solver::MeshTargetForm::set_surface_mesh_target(), polyfem::State::solve_homogenization(), polyfem::solver::ALSolver::solve_reduced(), polyfem::State::solve_transient_navier_stokes_split(), polyfem::mesh::TetOperationCache::swap_32(), polyfem::mesh::WildRemesher< WMTKMesh >::swap_edges(), and polyfem::assembler::Assembler::update_lame_params().
void polyfem::log_and_throw_error | ( | const std::string & | msg, |
const Args &... | args | ||
) |
Definition at line 44 of file Logger.hpp.
References log_and_throw_error().
spdlog::logger & polyfem::logger | ( | ) |
Retrieves the current logger.
Definition at line 42 of file Logger.cpp.
Referenced by polyfem::solver::apply_objective_json_spec(), polyfem::solver::AdjointOptUtils::apply_opt_json_spec(), polyfem::mesh::apply_slim(), polyfem::State::assemble_mass_mat(), polyfem::State::assemble_rhs(), polyfem::io::Evaluator::average_grad_based_function(), polyfem::BSplineParametrization2D::BSplineParametrization2D(), polyfem::BSplineParametrization3D::BSplineParametrization3D(), polyfem::State::build_basis(), polyfem::State::build_collision_mesh(), polyfem::io::OutGeometryData::build_grid(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::State::build_node_mapping(), polyfem::State::build_polygonal_basis(), polyfem::State::build_stiffness_mat(), polyfem::io::Evaluator::check_scalar_value(), polyfem::io::OutStatsData::compute_errors(), compute_integral_constraints(), polyfem::io::OutStatsData::compute_mesh_size(), polyfem::io::OutStatsData::compute_mesh_stats(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::basis::RBFWithQuadratic::compute_weights(), polyfem::basis::RBFWithQuadraticLagrange::compute_weights(), polyfem::basis::RBFWithLinear::compute_weights(), polyfem::time_integrator::ImplicitTimeIntegrator::construct_time_integrator(), polyfem::io::OutStatsData::count_flipped_elements(), polyfem::mesh::Mesh::create(), polyfem::mesh::Mesh::create(), polyfem::CubicHermiteSplineParametrization::CubicHermiteSplineParametrization(), polyfem::mesh::WildRemesher< WMTKMesh >::execute(), polyfem::State::export_data(), polyfem::io::OutGeometryData::export_data(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::utils::FileSelection::FileSelection(), polyfem::State::formulation(), forward_simulation(), polyfem::utils::SparseMatrixCache::get_matrix(), polyfem::problem::ProblemFactory::get_problem(), gradient_from_energy(), hessian_from_energy(), polyfem::utils::RBFInterpolation::init(), polyfem::State::init(), polyfem::utils::ExpressionValue::init(), polyfem::utils::ExpressionValue::init(), polyfem::State::init_homogenization_solve(), polyfem::State::init_logger(), polyfem::State::init_time(), polyfem::solver::OperatorSplittingSolver::initialize_hashtable(), polyfem::mesh::instantiate_pattern(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::io::Evaluator::interpolate_function(), polyfem::solver::BoundedBiharmonicWeights2Dto3D::inverse_eval(), polyfem::problem::NodeValues::load(), polyfem::io::MshReader::load(), polyfem::State::load_mesh(), polyfem::State::load_mesh(), polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation(), log_and_throw_error(), polyfem::utils::Timer::log_msg(), polyfem::mesh::Remesher::log_timings(), polyfem::assembler::RhsAssembler::lsq_bc(), polyfem::State::make_nl_solver(), polyfem::solver::ContactForm::max_step_size(), polyfem::solver::TransientNavierStokesSolver::minimize(), polyfem::solver::NavierStokesSolver::minimize(), polyfem::solver::TransientNavierStokesSolver::minimize_aux(), polyfem::solver::NavierStokesSolver::minimize_aux(), polyfem::mesh::CMesh2D::normalize(), polyfem::mesh::CMesh3D::normalize(), polyfem::utils::ExpressionValue::operator()(), polyfem::solver::OperatorSplittingSolver::OperatorSplittingSolver(), optimization_simulation(), polyfem::mesh::MeshProcessing3D::orient_volume_mesh(), polyfem::refinement::APriori::p_refine(), polyfem::refinement::APriori::p_refine(), polyfem::solver::PerBody2PerElem::PerBody2PerElem(), polyfem::solver::PerBody2PerNode::PerBody2PerNode(), polyfem::solver::ContactForm::post_step(), polyfem::assembler::PressureAssembler::PressureAssembler(), polyfem::io::OBJReader::read(), polyfem::io::OBJReader::read(), polyfem::io::OBJReader::read(), polyfem::mesh::read_fem_mesh(), polyfem::io::read_matrix_ascii(), polyfem::io::read_matrix_binary(), polyfem::mesh::read_surface_mesh(), polyfem::State::save_json(), polyfem::State::save_json(), polyfem::io::OutStatsData::save_json(), polyfem::State::save_timestep(), polyfem::io::OutGeometryData::save_vtu(), polyfem::State::set_log_level(), polyfem::utils::GeogramUtils::set_logger(), polyfem::assembler::Assembler::set_materials(), polyfem::assembler::GenericTensorProblem::set_parameters(), polyfem::utils::ExpressionValue::set_t(), polyfem::utils::show_matrix_stats(), polyfem::mesh::WildRemesher< wmtk::TetMesh >::smooth_vertices(), polyfem::State::sol_to_pressure(), polyfem::State::solve(), polyfem::solver::ALSolver::solve_al(), polyfem::State::solve_homogenization(), polyfem::State::solve_homogenization_step(), polyfem::State::solve_linear(), polyfem::State::solve_linear(), polyfem::State::solve_problem(), polyfem::solver::ALSolver::solve_reduced(), polyfem::State::solve_tensor_nonlinear(), polyfem::State::solve_transient_linear(), polyfem::State::solve_transient_navier_stokes(), polyfem::State::solve_transient_navier_stokes_split(), polyfem::State::solve_transient_tensor_nonlinear(), polyfem::mesh::SizingFieldRemesher< WMTKMesh >::split_edges(), polyfem::mesh::MeshProcessing3D::straight_sweeping(), polyfem::mesh::Navigation::switch_face(), polyfem::assembler::RhsAssembler::time_bc(), polyfem::mesh::unconstrained_L2_projection(), polyfem::solver::ContactForm::update_barrier_stiffness(), polyfem::solver::LaggedRegForm::update_lagging(), polyfem::solver::DampingCoeffientVariableToSimulation::update_state(), polyfem::solver::DirichletVariableToSimulation::update_state(), polyfem::solver::PressureVariableToSimulation::update_state(), polyfem::io::write_matrix(), polyfem::io::write_matrix_ascii(), polyfem::io::write_matrix_binary(), and polyfem::io::write_sparse_matrix_csv().
Eigen::MatrixXd polyfem::pk1_from_cauchy | ( | const Eigen::MatrixXd & | stress, |
const Eigen::MatrixXd & | F | ||
) |
Definition at line 349 of file ElasticityUtils.cpp.
References F.
Referenced by polyfem::assembler::FixedCorotational::assign_stress_tensor(), polyfem::assembler::HookeLinearElasticity::assign_stress_tensor(), polyfem::assembler::IncompressibleLinearElasticityDispacement::assign_stress_tensor(), polyfem::assembler::LinearElasticity::assign_stress_tensor(), polyfem::assembler::MooneyRivlin3ParamSymbolic::assign_stress_tensor(), polyfem::assembler::NeoHookeanElasticity::assign_stress_tensor(), polyfem::assembler::SaintVenantElasticity::assign_stress_tensor(), and polyfem::assembler::GenericElastic< AMIPSEnergyAutodiff >::compute_stress_grad_multiply_vect().
Eigen::MatrixXd polyfem::pk2_from_cauchy | ( | const Eigen::MatrixXd & | stress, |
const Eigen::MatrixXd & | F | ||
) |
Definition at line 354 of file ElasticityUtils.cpp.
References F.
Referenced by polyfem::assembler::FixedCorotational::assign_stress_tensor(), polyfem::assembler::HookeLinearElasticity::assign_stress_tensor(), polyfem::assembler::IncompressibleLinearElasticityDispacement::assign_stress_tensor(), polyfem::assembler::LinearElasticity::assign_stress_tensor(), polyfem::assembler::MooneyRivlin3ParamSymbolic::assign_stress_tensor(), polyfem::assembler::NeoHookeanElasticity::assign_stress_tensor(), polyfem::assembler::SaintVenantElasticity::assign_stress_tensor(), and polyfem::assembler::GenericElastic< AMIPSEnergyAutodiff >::compute_stress_grad_multiply_vect().
AutoDiffGradMat::Scalar polyfem::second_invariant | ( | const AutoDiffGradMat & | B | ) |
Definition at line 146 of file ElasticityUtils.hpp.
Referenced by polyfem::assembler::MooneyRivlinElasticity::elastic_energy(), and polyfem::assembler::MooneyRivlin3ParamSymbolic::elastic_energy().
void polyfem::set_adjoint_logger | ( | std::shared_ptr< spdlog::logger > | logger | ) |
Setup a logger object to be used by adjoint Polyfem.
Calling this function with other Polyfem function is not thread-safe.
[in] | logger | New logger object to be used by adjoint Polyfem. Ownership is shared with Polyfem. |
Definition at line 66 of file Logger.cpp.
Referenced by polyfem::OptState::init_logger().
void polyfem::set_logger | ( | std::shared_ptr< spdlog::logger > | logger | ) |
Setup a logger object to be used by Polyfem.
Calling this function with other Polyfem function is not thread-safe.
[in] | logger | New logger object to be used by Polyfem. Ownership is shared with Polyfem. |
Definition at line 60 of file Logger.cpp.
Referenced by polyfem::State::init_logger().
AutoDiffGradMat::Scalar polyfem::third_invariant | ( | const AutoDiffGradMat & | B | ) |
Definition at line 152 of file ElasticityUtils.hpp.
References polyfem::utils::determinant().
double polyfem::von_mises_stress_for_stress_tensor | ( | const Eigen::MatrixXd & | stress | ) |
Definition at line 328 of file ElasticityUtils.cpp.
Referenced by polyfem::assembler::ElasticityAssembler::compute_von_mises_stresses().
|
constexpr |
Definition at line 19 of file ElasticityUtils.hpp.
Referenced by gradient_from_energy().
|
constexpr |
Definition at line 18 of file ElasticityUtils.hpp.
Referenced by gradient_from_energy(), and hessian_from_energy().