PolyFEM
|
class to store time stepping data More...
#include <SolveData.hpp>
Public Member Functions | |
std::vector< std::shared_ptr< Form > > | init_forms (const Units &units, const int dim, const double t, const int n_bases, std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const assembler::Assembler &assembler, assembler::AssemblyValsCache &ass_vals_cache, const assembler::AssemblyValsCache &mass_ass_vals_cache, const double jacobian_threshold, const solver::ElementInversionCheck check_inversion, const int n_pressure_bases, const std::vector< int > &boundary_nodes, const std::vector< mesh::LocalBoundary > &local_boundary, const std::vector< mesh::LocalBoundary > &local_neumann_boundary, const int n_boundary_samples, const Eigen::MatrixXd &rhs, const Eigen::MatrixXd &sol, const assembler::Density &density, const std::vector< mesh::LocalBoundary > &local_pressure_boundary, const std::unordered_map< int, std::vector< mesh::LocalBoundary > > &local_pressure_cavity, const std::shared_ptr< assembler::PressureAssembler > pressure_assembler, const bool ignore_inertia, const StiffnessMatrix &mass, const std::shared_ptr< assembler::ViscousDamping > damping_assembler, const double lagged_regularization_weight, const int lagged_regularization_iterations, const size_t obstacle_ndof, const bool contact_enabled, const ipc::CollisionMesh &collision_mesh, const double dhat, const double avg_mass, const bool use_convergent_contact_formulation, const json &barrier_stiffness, const ipc::BroadPhaseMethod broad_phase, const double ccd_tolerance, const long ccd_max_iterations, const bool enable_shape_derivatives, const assembler::MacroStrainValue ¯o_strain_constraint, const bool periodic_contact, const Eigen::VectorXi &tiled_to_single, const std::shared_ptr< utils::PeriodicBoundary > &periodic_bc, const double friction_coefficient, const double epsv, const int friction_iterations, const json &rayleigh_damping) |
Initialize the forms and return a vector of pointers to them. | |
void | update_barrier_stiffness (const Eigen::VectorXd &x) |
update the barrier stiffness for the forms | |
void | update_dt () |
updates the dt inside the different forms | |
std::vector< std::pair< std::string, std::shared_ptr< solver::Form > > > | named_forms () const |
Public Attributes | |
std::shared_ptr< assembler::RhsAssembler > | rhs_assembler |
std::shared_ptr< assembler::PressureAssembler > | pressure_assembler |
std::shared_ptr< solver::NLProblem > | nl_problem |
std::vector< std::shared_ptr< solver::AugmentedLagrangianForm > > | al_form |
std::shared_ptr< solver::MacroStrainLagrangianForm > | strain_al_lagr_form |
std::shared_ptr< solver::BodyForm > | body_form |
std::shared_ptr< solver::ContactForm > | contact_form |
std::shared_ptr< solver::ElasticForm > | damping_form |
std::shared_ptr< solver::ElasticForm > | elastic_form |
std::shared_ptr< solver::FrictionForm > | friction_form |
std::shared_ptr< solver::InertiaForm > | inertia_form |
std::shared_ptr< solver::PressureForm > | pressure_form |
std::shared_ptr< solver::PeriodicContactForm > | periodic_contact_form |
std::shared_ptr< time_integrator::ImplicitTimeIntegrator > | time_integrator |
class to store time stepping data
Definition at line 56 of file SolveData.hpp.
std::vector< std::shared_ptr< Form > > polyfem::solver::SolveData::init_forms | ( | const Units & | units, |
const int | dim, | ||
const double | t, | ||
const int | n_bases, | ||
std::vector< basis::ElementBases > & | bases, | ||
const std::vector< basis::ElementBases > & | geom_bases, | ||
const assembler::Assembler & | assembler, | ||
assembler::AssemblyValsCache & | ass_vals_cache, | ||
const assembler::AssemblyValsCache & | mass_ass_vals_cache, | ||
const double | jacobian_threshold, | ||
const solver::ElementInversionCheck | check_inversion, | ||
const int | n_pressure_bases, | ||
const std::vector< int > & | boundary_nodes, | ||
const std::vector< mesh::LocalBoundary > & | local_boundary, | ||
const std::vector< mesh::LocalBoundary > & | local_neumann_boundary, | ||
const int | n_boundary_samples, | ||
const Eigen::MatrixXd & | rhs, | ||
const Eigen::MatrixXd & | sol, | ||
const assembler::Density & | density, | ||
const std::vector< mesh::LocalBoundary > & | local_pressure_boundary, | ||
const std::unordered_map< int, std::vector< mesh::LocalBoundary > > & | local_pressure_cavity, | ||
const std::shared_ptr< assembler::PressureAssembler > | pressure_assembler, | ||
const bool | ignore_inertia, | ||
const StiffnessMatrix & | mass, | ||
const std::shared_ptr< assembler::ViscousDamping > | damping_assembler, | ||
const double | lagged_regularization_weight, | ||
const int | lagged_regularization_iterations, | ||
const size_t | obstacle_ndof, | ||
const bool | contact_enabled, | ||
const ipc::CollisionMesh & | collision_mesh, | ||
const double | dhat, | ||
const double | avg_mass, | ||
const bool | use_convergent_contact_formulation, | ||
const json & | barrier_stiffness, | ||
const ipc::BroadPhaseMethod | broad_phase, | ||
const double | ccd_tolerance, | ||
const long | ccd_max_iterations, | ||
const bool | enable_shape_derivatives, | ||
const assembler::MacroStrainValue & | macro_strain_constraint, | ||
const bool | periodic_contact, | ||
const Eigen::VectorXi & | tiled_to_single, | ||
const std::shared_ptr< utils::PeriodicBoundary > & | periodic_bc, | ||
const double | friction_coefficient, | ||
const double | epsv, | ||
const int | friction_iterations, | ||
const json & | rayleigh_damping | ||
) |
Initialize the forms and return a vector of pointers to them.
Definition at line 27 of file SolveData.cpp.
References al_form, body_form, polyfem::Units::characteristic_length(), contact_form, polyfem::solver::RayleighDampingForm::create(), damping_form, elastic_form, friction_form, inertia_form, polyfem::assembler::MacroStrainValue::is_active(), polyfem::utils::json_as_array(), polyfem::log_and_throw_adjoint_error(), periodic_contact_form, pressure_assembler, pressure_form, rhs_assembler, strain_al_lagr_form, time_integrator, and update_dt().
Referenced by polyfem::State::init_homogenization_solve(), and polyfem::State::init_nonlinear_tensor_solve().
std::vector< std::pair< std::string, std::shared_ptr< solver::Form > > > polyfem::solver::SolveData::named_forms | ( | ) | const |
Definition at line 315 of file SolveData.cpp.
References al_form, body_form, contact_form, damping_form, elastic_form, friction_form, inertia_form, periodic_contact_form, pressure_form, and strain_al_lagr_form.
Referenced by polyfem::io::EnergyCSVWriter::EnergyCSVWriter(), polyfem::State::init_homogenization_solve(), polyfem::io::OutGeometryData::save_volume(), and polyfem::io::EnergyCSVWriter::write().
void polyfem::solver::SolveData::update_barrier_stiffness | ( | const Eigen::VectorXd & | x | ) |
update the barrier stiffness for the forms
x | current solution |
Definition at line 279 of file SolveData.cpp.
References body_form, contact_form, elastic_form, inertia_form, pressure_form, and x.
Referenced by polyfem::State::solve_homogenization(), polyfem::State::solve_tensor_nonlinear(), and polyfem::State::solve_transient_tensor_nonlinear().
void polyfem::solver::SolveData::update_dt | ( | ) |
updates the dt inside the different forms
Definition at line 300 of file SolveData.cpp.
References body_form, contact_form, damping_form, elastic_form, friction_form, pressure_form, and time_integrator.
Referenced by init_forms(), polyfem::State::init_linear_solve(), polyfem::State::solve_homogenization(), and polyfem::State::solve_transient_tensor_nonlinear().
std::vector<std::shared_ptr<solver::AugmentedLagrangianForm> > polyfem::solver::SolveData::al_form |
Definition at line 151 of file SolveData.hpp.
Referenced by init_forms(), polyfem::State::init_homogenization_solve(), polyfem::State::init_nonlinear_tensor_solve(), named_forms(), and polyfem::State::solve_tensor_nonlinear().
std::shared_ptr<solver::BodyForm> polyfem::solver::SolveData::body_form |
Definition at line 153 of file SolveData.hpp.
Referenced by polyfem::State::compute_force_jacobian_prev(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), polyfem::State::init_linear_solve(), named_forms(), update_barrier_stiffness(), and update_dt().
std::shared_ptr<solver::ContactForm> polyfem::solver::SolveData::contact_form |
Definition at line 154 of file SolveData.hpp.
Referenced by polyfem::State::cache_transient_adjoint_quantities(), polyfem::solver::ProxyContactForceForm::compute_adjoint_rhs_step(), polyfem::State::compute_force_jacobian_prev(), polyfem::solver::ProxyContactForceForm::compute_partial_gradient_step(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), polyfem::State::init_linear_solve(), polyfem::State::init_nonlinear_tensor_solve(), polyfem::mesh::LocalRelaxationData< M >::init_solve_data(), named_forms(), polyfem::mesh::Remesher::project_quantities(), polyfem::io::OutGeometryData::save_contact_surface(), polyfem::mesh::WildRemesher< wmtk::TetMesh >::smooth_vertices(), update_barrier_stiffness(), update_dt(), and polyfem::solver::ProxyContactForceForm::value_unweighted_step().
std::shared_ptr<solver::ElasticForm> polyfem::solver::SolveData::damping_form |
Definition at line 155 of file SolveData.hpp.
Referenced by polyfem::solver::AdjointTools::dJ_damping_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), polyfem::State::init_linear_solve(), named_forms(), and update_dt().
std::shared_ptr<solver::ElasticForm> polyfem::solver::SolveData::elastic_form |
Definition at line 156 of file SolveData.hpp.
Referenced by polyfem::solver::AdjointTools::dJ_material_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_material_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), polyfem::State::init_linear_solve(), named_forms(), update_barrier_stiffness(), and update_dt().
std::shared_ptr<solver::FrictionForm> polyfem::solver::SolveData::friction_form |
Definition at line 157 of file SolveData.hpp.
Referenced by polyfem::State::cache_transient_adjoint_quantities(), polyfem::State::compute_force_jacobian_prev(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), polyfem::State::init_linear_solve(), named_forms(), polyfem::io::OutGeometryData::save_contact_surface(), and update_dt().
std::shared_ptr<solver::InertiaForm> polyfem::solver::SolveData::inertia_form |
Definition at line 158 of file SolveData.hpp.
Referenced by polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), polyfem::State::init_linear_solve(), named_forms(), and update_barrier_stiffness().
std::shared_ptr<solver::NLProblem> polyfem::solver::SolveData::nl_problem |
Definition at line 149 of file SolveData.hpp.
Referenced by polyfem::State::compute_force_jacobian(), polyfem::solver::SpatialIntegralForm::compute_partial_gradient_step(), polyfem::solver::AdjointForm::compute_reduced_adjoint_rhs(), polyfem::solver::AdjointTools::dJ_periodic_shape_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::State::init_homogenization_solve(), polyfem::State::init_nonlinear_tensor_solve(), polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_energy(), polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation(), polyfem::State::remesh(), polyfem::State::solve_homogenization(), polyfem::State::solve_homogenization_step(), polyfem::State::solve_static_adjoint(), polyfem::State::solve_tensor_nonlinear(), polyfem::State::solve_transient_tensor_nonlinear(), and polyfem::io::EnergyCSVWriter::write().
std::shared_ptr<solver::PeriodicContactForm> polyfem::solver::SolveData::periodic_contact_form |
Definition at line 161 of file SolveData.hpp.
Referenced by polyfem::solver::AdjointTools::dJ_periodic_shape_adjoint_term(), init_forms(), polyfem::State::init_homogenization_solve(), and named_forms().
std::shared_ptr<assembler::PressureAssembler> polyfem::solver::SolveData::pressure_assembler |
Definition at line 148 of file SolveData.hpp.
Referenced by init_forms().
std::shared_ptr<solver::PressureForm> polyfem::solver::SolveData::pressure_form |
Definition at line 159 of file SolveData.hpp.
Referenced by polyfem::solver::AdjointTools::dJ_pressure_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_pressure_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), init_forms(), named_forms(), update_barrier_stiffness(), and update_dt().
std::shared_ptr<assembler::RhsAssembler> polyfem::solver::SolveData::rhs_assembler |
Definition at line 147 of file SolveData.hpp.
Referenced by polyfem::State::assemble_rhs(), init_forms(), polyfem::State::init_linear_solve(), polyfem::State::init_solve(), polyfem::State::initial_acceleration(), polyfem::State::initial_solution(), polyfem::State::initial_velocity(), polyfem::State::remesh(), polyfem::State::solve_linear(), polyfem::State::solve_linear(), polyfem::State::solve_navier_stokes(), polyfem::State::solve_transient_linear(), polyfem::State::solve_transient_navier_stokes(), and polyfem::State::solve_transient_navier_stokes_split().
std::shared_ptr<solver::MacroStrainLagrangianForm> polyfem::solver::SolveData::strain_al_lagr_form |
Definition at line 152 of file SolveData.hpp.
Referenced by init_forms(), polyfem::State::init_homogenization_solve(), named_forms(), and polyfem::State::solve_homogenization_step().
std::shared_ptr<time_integrator::ImplicitTimeIntegrator> polyfem::solver::SolveData::time_integrator |
Definition at line 163 of file SolveData.hpp.
Referenced by polyfem::State::cache_transient_adjoint_quantities(), polyfem::solver::ProxyContactForceForm::compute_adjoint_rhs_step(), polyfem::State::compute_force_jacobian_prev(), polyfem::solver::ProxyContactForceForm::compute_partial_gradient_step(), init_forms(), polyfem::State::init_linear_solve(), polyfem::State::init_nonlinear_tensor_solve(), polyfem::State::remesh(), polyfem::io::OutGeometryData::save_contact_surface(), polyfem::io::OutGeometryData::save_volume(), polyfem::State::solve_transient_tensor_nonlinear(), update_dt(), polyfem::solver::ProxyContactForceForm::value_unweighted_step(), and polyfem::io::EnergyCSVWriter::write().