PolyFEM
Loading...
Searching...
No Matches
polyfem::solver::SolveData Class Reference

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, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const assembler::Assembler &assembler, const assembler::AssemblyValsCache &ass_vals_cache, const assembler::AssemblyValsCache &mass_ass_vals_cache, 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 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::RhsAssemblerrhs_assembler
 
std::shared_ptr< assembler::PressureAssemblerpressure_assembler
 
std::shared_ptr< solver::NLProblemnl_problem
 
std::shared_ptr< solver::BCLagrangianFormal_lagr_form
 
std::shared_ptr< solver::BCPenaltyFormal_pen_form
 
std::shared_ptr< solver::MacroStrainLagrangianFormstrain_al_lagr_form
 
std::shared_ptr< solver::MacroStrainALFormstrain_al_pen_form
 
std::shared_ptr< solver::BodyFormbody_form
 
std::shared_ptr< solver::ContactFormcontact_form
 
std::shared_ptr< solver::ElasticFormdamping_form
 
std::shared_ptr< solver::ElasticFormelastic_form
 
std::shared_ptr< solver::FrictionFormfriction_form
 
std::shared_ptr< solver::InertiaForminertia_form
 
std::shared_ptr< solver::PressureFormpressure_form
 
std::shared_ptr< solver::PeriodicContactFormperiodic_contact_form
 
std::shared_ptr< time_integrator::ImplicitTimeIntegratortime_integrator
 

Detailed Description

class to store time stepping data

Definition at line 50 of file SolveData.hpp.

Member Function Documentation

◆ init_forms()

std::vector< std::shared_ptr< Form > > polyfem::solver::SolveData::init_forms ( const Units units,
const int  dim,
const double  t,
const int  n_bases,
const std::vector< basis::ElementBases > &  bases,
const std::vector< basis::ElementBases > &  geom_bases,
const assembler::Assembler assembler,
const assembler::AssemblyValsCache ass_vals_cache,
const assembler::AssemblyValsCache mass_ass_vals_cache,
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 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.

Note
Requires rhs_assembler (and time_integrator) to be initialized.

Definition at line 29 of file SolveData.cpp.

References al_lagr_form, al_pen_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, strain_al_pen_form, time_integrator, and update_dt().

Referenced by polyfem::State::init_homogenization_solve(), and polyfem::State::init_nonlinear_tensor_solve().

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

◆ named_forms()

std::vector< std::pair< std::string, std::shared_ptr< solver::Form > > > polyfem::solver::SolveData::named_forms ( ) const

Definition at line 319 of file SolveData.cpp.

References al_lagr_form, al_pen_form, body_form, contact_form, damping_form, elastic_form, friction_form, inertia_form, periodic_contact_form, pressure_form, strain_al_lagr_form, and strain_al_pen_form.

Referenced by polyfem::io::EnergyCSVWriter::EnergyCSVWriter(), polyfem::State::init_homogenization_solve(), polyfem::io::OutGeometryData::save_volume(), and polyfem::io::EnergyCSVWriter::write().

Here is the caller graph for this function:

◆ update_barrier_stiffness()

void polyfem::solver::SolveData::update_barrier_stiffness ( const Eigen::VectorXd &  x)

update the barrier stiffness for the forms

Parameters
xcurrent solution

Definition at line 283 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().

Here is the caller graph for this function:

◆ update_dt()

void polyfem::solver::SolveData::update_dt ( )

updates the dt inside the different forms

Definition at line 304 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().

Here is the caller graph for this function:

Member Data Documentation

◆ al_lagr_form

std::shared_ptr<solver::BCLagrangianForm> polyfem::solver::SolveData::al_lagr_form

Definition at line 142 of file SolveData.hpp.

Referenced by init_forms(), named_forms(), and polyfem::State::solve_tensor_nonlinear().

◆ al_pen_form

std::shared_ptr<solver::BCPenaltyForm> polyfem::solver::SolveData::al_pen_form

Definition at line 143 of file SolveData.hpp.

Referenced by init_forms(), named_forms(), and polyfem::State::solve_tensor_nonlinear().

◆ body_form

◆ contact_form

◆ damping_form

◆ elastic_form

◆ friction_form

◆ inertia_form

◆ nl_problem

◆ periodic_contact_form

std::shared_ptr<solver::PeriodicContactForm> polyfem::solver::SolveData::periodic_contact_form

◆ pressure_assembler

std::shared_ptr<assembler::PressureAssembler> polyfem::solver::SolveData::pressure_assembler

Definition at line 139 of file SolveData.hpp.

Referenced by init_forms().

◆ pressure_form

◆ rhs_assembler

◆ strain_al_lagr_form

std::shared_ptr<solver::MacroStrainLagrangianForm> polyfem::solver::SolveData::strain_al_lagr_form

◆ strain_al_pen_form

std::shared_ptr<solver::MacroStrainALForm> polyfem::solver::SolveData::strain_al_pen_form

◆ time_integrator


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