|
PolyFEM
|
Variational form for the (displacement, growth) problem built on the GrowthElasticity mixed assembler, structured like ThermoElasticVarForm without the transient machinery. More...
#include <GrowthElasticVarForm.hpp>
Classes | |
| struct | GrowthLawSettings |
| Growth law (material "growth_law"): rate-independent, per-element threshold (given, or built from the state), irreversibility theta >= theta_n enforced by a primal-dual active set (pinned DOFs are Dirichlet at theta_n through BCLagrangianForm; free DOFs are unconstrained). More... | |
Public Member Functions | |
| std::string | name () const override |
| Get the name of the variational formulation. | |
| void | init (const std::string &formulation, const Units &units, const json &args, const std::string &out_path) override |
| Initialize the variational formulation with the given parameters. | |
| void | validate_time_dependence () const override |
| Solved growth steps its own pseudo-time (growth_law.n_steps, t_end), so its displacement problem is time dependent (the Dirichlet data follow t) without a "time" block, which init refuses. | |
| io::OutStatsData | compute_errors (const Eigen::MatrixXd &solution) override |
| Get the error statistics of the variational formulation, for output purposes. | |
| void | serialize_checkpoint (io::CheckpointWriter &writer, const Eigen::MatrixXd &solution, const io::CheckpointMetadata &metadata) const override |
| both blocks of the stacked (displacement, growth) solution, each with its node ordering, as for the other mixed formulations | |
| void | deserialize_checkpoint (const io::CheckpointReader &reader, Eigen::MatrixXd &solution) override |
| void | export_data (const Eigen::MatrixXd &solution) const override |
| const Eigen::VectorXi & | growth_activation_step () const |
| growth_law: first increment in which each growth DOF grew (0 = never); empty before a solved run. | |
| const Eigen::VectorXd & | growth_shear_supply () const |
| growth_law threshold from_state: f_gamma per element used by the last increment, and the threshold phi_e in use (empty / the given values otherwise). | |
| const Eigen::VectorXd & | growth_threshold () const |
| const Eigen::VectorXd & | growth_threshold_parallel () const |
| const Eigen::VectorXd & | growth_attainment () const |
| const Eigen::VectorXd & | growth_lag_residual () const |
| const Eigen::VectorXd & | growth_dissipation () const |
| const Eigen::VectorXd & | growth_shear_supply_work () const |
| std::vector< io::OutputField > | output_fields (const io::OutputSample &sample, const Eigen::MatrixXd &solution, const io::OutputFieldOptions &options) const override |
| Get the output fields of the variational formulation, for output purposes. | |
Public Member Functions inherited from polyfem::varform::NonlinearElasticVarForm | |
| void | init (const std::string &formulation, const Units &units, const json &args, const std::string &out_path) override |
| Initialize the variational formulation with the given parameters. | |
| bool | is_contact_enabled () const override |
| Check if contact is enabled for the variational formulation, for output purposes. | |
| io::OutputSpace | output_space () const override |
| Get the output space of the variational formulation, for output purposes. | |
| std::vector< io::OutputField > | output_fields (const io::OutputSample &sample, const Eigen::MatrixXd &solution, const io::OutputFieldOptions &options) const override |
| Get the output fields of the variational formulation, for output purposes. | |
| void | prepare_for_embedding () |
| Prepare the standard nonlinear-elastic assembly state for use as a block in a larger nonlinear problem. | |
| void | initial_solution_for_embedding (Eigen::MatrixXd &solution, const std::string &state_prefix="") const |
| void | init_forms_for_embedding (Eigen::MatrixXd &solution, double t, const std::string &state_prefix="") |
| void | advance_for_embedding (const Eigen::VectorXd &solution) |
| void | update_barrier_stiffness_for_embedding (const Eigen::VectorXd &solution) |
| bool | save_timestep_for_embedding (double time, int step, double dt, const Eigen::MatrixXd &solution, paraviewo::VTMWriter &vtm, const std::string &block_prefix, io::OutGeometryData::WriteJobs *writes=nullptr) const |
| int | embedding_ndof () const |
| const std::vector< std::shared_ptr< solver::Form > > & | embedding_forms () const |
| const std::vector< std::shared_ptr< solver::AugmentedLagrangianForm > > & | embedding_al_forms () const |
| const StiffnessMatrix & | embedding_norm_matrix () const |
| const std::shared_ptr< time_integrator::ImplicitTimeIntegrator > & | embedding_time_integrator () const |
| const FESpace & | embedding_space () const |
Public Member Functions inherited from polyfem::varform::ElasticVarForm | |
| void | save_json (const Eigen::MatrixXd &solution, std::ostream &out) const override |
| Save the solution to a JSON file, for output purposes. | |
| VarForm (const io::ResourceIO &resources) | |
Public Member Functions inherited from polyfem::varform::VarForm | |
| VarForm (const io::ResourceIO &resources) | |
| virtual | ~VarForm ()=default |
| void | set_args (const json &args) |
| Reset the internal state of the variational formulation, e.g. | |
| void | set_checkpoint_reader (const io::CheckpointReader &reader) |
| void | set_mesh (std::unique_ptr< mesh::Mesh > mesh, const double loading_mesh_time=0) |
| Set the mesh for the variational formulation. | |
| void | set_geometry (mesh::LoadedGeometry geometry, double loading_mesh_time=0) |
| void | solve (Eigen::MatrixXd &sol, const InitialConditionOverride *initial_condition_override=nullptr, const ForwardStepCallback &post_step={}) |
| Solve the variational formulation and store the solution in the given matrix. | |
| void | set_time_callback (const std::function< void(int, int, double, double)> &callback) |
| int | problem_dimension () const |
| Get the problem dimension of the variational formulation, for output purposes. | |
| bool | should_save_timestep (int step) const |
| Whether the output index and frame selection include this timestep. | |
| const io::OutRuntimeData & | output_timings () const |
| Get the runtime timings of the variational formulation, for output purposes. | |
| void | save_json (const Eigen::MatrixXd &solution) const |
| Save the solution to a JSON file, for output purposes. | |
Private Member Functions | |
| io::OutputFieldFunction | snapshot_output_fields (const Eigen::MatrixXd &, const io::OutGeometryData::ExportOptions &, const io::OutputSpace &, double, double) const override |
| Capture mutable timestep data for deferred field evaluation. | |
| void | reset () override |
| void | load_mesh (const mesh::Mesh &mesh, const json &args) override |
| void | build_basis (mesh::Mesh &mesh, const bool iso_parametric, const json &args) override |
| void | assemble_rhs (const mesh::Mesh &mesh) override |
| void | assemble_mass_mat (const mesh::Mesh &mesh, const json &args) override |
| void | solve_problem (Eigen::MatrixXd &sol, const InitialConditionOverride *initial_condition_override, const ForwardStepCallback &post_step) override |
| void | build_rhs_assembler () override |
| void | read_material_space_ids (const json &args) |
| json | elastic_material_args () const |
| void | grown_stress_at (const int e, const Eigen::MatrixXd &local_pts, const double t, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &growth, Eigen::MatrixXd &cauchy, Eigen::MatrixXd &pk1, Eigen::MatrixXd &pk2, Eigen::MatrixXd &von_mises, Eigen::MatrixXd &energy) const |
| Grown-material stresses and energy density (GrowthElasticity::grown_stresses) at local points of element e, flattened column-major like the elastic tensor output: cauchy, pk1, pk2 (n x 9), von Mises of the Cauchy stress and the energy density (n x 1). | |
| void | replace_stress_fields (const io::OutputSample &sample, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &growth, std::vector< io::OutputField > &fields) const |
| The elastic base evaluates von_mises, cauchy_stess_*, pk1_stess_*, pk2_stess_* (and the *_avg variants), energy and energy_avg with the ungrown material at the total F; overwrite the ones it emitted with the grown-material values. | |
| void | build_displacement_boundary (mesh::Mesh &mesh) |
| void | build_growth_basis (mesh::Mesh &mesh, const bool iso_parametric, const json &args) |
| void | build_growth_boundary (mesh::Mesh &mesh) |
| void | build_forms (Eigen::MatrixXd &solution, const double t) |
| void | make_nl_problem (const Eigen::MatrixXd &sol, const double t) |
| NLProblem over the current forms and AL forms, initialized at sol, t. | |
| void | solve_nonlinear_step (const int step, Eigen::MatrixXd &solution, double grad_tol_factor=1.0) |
| void | read_growth_law (const json &args) |
| void | compute_growth_node_weights () |
| void | assemble_growth_node_weights () |
| w_a = sum_e vn_e phi_e int_e N_a dV from threshold_per_element_ (and the nodal volumes); called once (fixed threshold) or per update (from_state). | |
| void | threshold_target (const Eigen::MatrixXd &solution, double t, Eigen::VectorXd &par, Eigen::VectorXd &gam, Eigen::VectorXd &clamped) |
| the threshold the state implies (from_state): G(x) = (PHI_PAR, f_gamma) at C_check of the state; f_gamma = f_I(Ce) - f_I(Ce with the transverse shears
removed and Ce_nn at the layer value), PHI_PAR = max(f_par, 0) | |
| void | set_threshold (const Eigen::VectorXd &par, const Eigen::VectorXd &gam, const Eigen::VectorXd &clamped, double t, double omega) |
| install a threshold (parts), rebuild the node weights, log | |
| void | evaluate_threshold_state (const Eigen::VectorXd &u, double t, Eigen::VectorXd &phi_full, Eigen::VectorXd &phi_no_shear, Eigen::VectorXd &theta_tot) |
| The state-built threshold at C_check of displacement u, per element: f_I(Ce) (phi_full), f_I(Ce shear-free, layer thickness) (phi_no_shear), and the total in-plane area stretch theta_tot. | |
| Eigen::VectorXd | element_mean_growth (const Eigen::VectorXd &theta) |
| element mean of a nodal growth field (growth quadrature) | |
| void | report_lag_residual (int step, double t, const Eigen::MatrixXd &solution) |
| lag residual phi(converged state) - phi used, and attainment, logged per increment | |
| void | accumulate_dissipation (int step, double t, const Eigen::VectorXd &dtheta) |
| split of the increment's dissipation term (D, S), accumulated and logged | |
| void | log_kkt_residual (int step, double t, const Eigen::MatrixXd &solution, const Eigen::VectorXd &mult, const std::vector< char > &pinned) |
| phi - f_I per v_n-weighted nodal volume on the settled set: free and pinned | |
| void | solve_growth_law (Eigen::MatrixXd &solution) |
| int | advance_increment (int step, double t_from, double t_to, Eigen::MatrixXd &solution, int depth) |
| one increment (t_from, t_to], split recursively on failure; returns passes | |
| void | commit_increment (int step, double t, Eigen::MatrixXd &solution) |
| D/S accumulation, theta_n update and activation marking after a converged (sub)increment. | |
| void | save_growth_increment (int step, double t, const Eigen::MatrixXd &solution) |
growth_law.save_increments: the converged stacked state of increment step (pseudo-time t) as growth_step_<step>.vtu, and growth_steps.pvd rewritten to list steps 1..step. | |
| int | solve_growth_increment (const int step, const double t, Eigen::MatrixXd &solution) |
| One increment: primal-dual active-set loop on theta >= theta_n. | |
| void | solve_with_current_pins (const int step, const double t, Eigen::MatrixXd &solution, double grad_tol_factor=1.0) |
| Eigen::VectorXd | growth_multiplier (const Eigen::MatrixXd &solution) const |
| d Pi_inc / d theta at the solution: stacked energy gradient plus the dissipation weights (the KKT residual; >= 0 where pinned, ~0 where free). | |
| void | initial_growth_solution (Eigen::MatrixXd &solution) const |
| const Eigen::MatrixXd & | prescribed_growth_field () const |
| void | split_solution (const Eigen::MatrixXd &solution, Eigen::MatrixXd &displacement, Eigen::MatrixXd &growth) const |
| Eigen::MatrixXd | stacked_solution (const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &growth) const |
| int | displacement_ndof () const |
| int | growth_ndof () const |
| int | total_ndof () const |
Static Private Member Functions | |
| static double | median_of (const Eigen::VectorXd &v) |
Private Attributes | |
| FESpace | growth_space_ |
| VarFormBoundaryState | growth_boundary_ |
| std::shared_ptr< assembler::Problem > | growth_problem_ |
| assembler::AssemblyValsCache | growth_ass_vals_cache_ |
| assembler::AssemblyValsCache | growth_mass_ass_vals_cache_ |
| std::shared_ptr< assembler::Assembler > | growth_assembler_ |
| std::shared_ptr< assembler::MixedNLAssembler > | growthelastic_assembler_ |
| std::shared_ptr< assembler::Mass > | growth_mass_assembler_ |
| std::shared_ptr< assembler::RhsAssembler > | growth_rhs_assembler_ |
| std::shared_ptr< assembler::Density > | growth_rhs_density_ |
| StiffnessMatrix | growth_mass_ |
| StiffnessMatrix | stacked_lumped_mass_ |
| Eigen::MatrixXd | growth_rhs_ |
| std::shared_ptr< solver::MixedAssemblerForm > | growth_coupling_form_ |
| std::shared_ptr< solver::StackedForm > | stacked_form_ |
| Eigen::MatrixXd | converged_solution_ |
| Converged stacked (u, growth) solution cached at the end of solve_problem. | |
| Eigen::MatrixXd | prescribed_growth_ |
| Whole-field growth prescription (boundary_conditions.growth_nodal_field): nodal theta values loaded lazily from file; when set, EVERY growth DOF is Dirichlet with these targets (via BCLagrangianForm's tabulated-target constructor) and the same field is the growth initial solution. | |
| int | displacement_space_id_ = -1 |
| int | growth_space_id_ = -1 |
| std::string | elastic_formulation_ = "MaterialSum" |
| struct polyfem::varform::GrowthElasticVarForm::GrowthLawSettings | growth_law_ |
| Eigen::VectorXd | threshold_per_element_ |
| phi_e [Pa] in use (from_state: phi_par + f_gamma) | |
| Eigen::VectorXd | threshold_parallel_ |
| from_state: phi_par,e of the last update [Pa] | |
| Eigen::VectorXd | shear_supply_ |
| from_state: f_gamma,e of the last update [Pa] | |
| bool | setup_logged_ = false |
| the setup line is logged once, not per update | |
| Eigen::VectorXd | threshold_clamped_ |
| 1 where f_par(C_check) < 0 (zero floor), when computed here | |
| Eigen::VectorXd | lag_residual_ |
| phi(converged state) - phi used, last increment [Pa] | |
| Eigen::VectorXd | attainment_ |
| vartheta^e / theta_crit at the last converged increment | |
| Eigen::VectorXd | dissipation_ |
| cumulative D = sum v_n max(f_par,0) dtheta per element [Pa] | |
| Eigen::VectorXd | shear_work_ |
| cumulative S = sum v_n f_gamma dtheta per element [Pa] | |
| Eigen::VectorXd | element_volume_ |
| reference element volumes (growth quadrature) | |
| Eigen::VectorXd | normal_growth_per_element_ |
| vn_e (1 when not given) | |
| Eigen::VectorXd | growth_node_volume_ |
| int N_a dV | |
| Eigen::VectorXd | growth_node_vn_volume_ |
| int vn N_a dV (KKT residual in Pa) | |
| Eigen::VectorXd | growth_node_weights_ |
| int vn phi N_a dV | |
| Eigen::VectorXd | theta_n_ |
| converged growth of the previous increment | |
| std::vector< int > | pinned_growth_nodes_ |
| member: BCLagrangianForm keeps a reference | |
| std::vector< char > | growth_pinned_mask_ |
| last solved pass: 1 = pinned at theta_n | |
| Eigen::VectorXi | growth_activation_step_ |
| first increment in which a growth DOF grew (0 = never) | |
| std::shared_ptr< solver::GrowthDissipationForm > | dissipation_form_ |
Additional Inherited Members | |
Static Public Member Functions inherited from polyfem::varform::NonlinearElasticVarForm | |
| static void | build_collision_mesh (const mesh::Mesh &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const std::vector< mesh::LocalBoundary > &total_local_boundary, const mesh::Obstacle &obstacle, const json &args, const io::ResourceIO &resources, const Eigen::VectorXi &in_node_to_node, ipc::CollisionMesh &collision_mesh) |
Protected Member Functions inherited from polyfem::varform::NonlinearElasticVarForm | |
| io::OutputFieldFunction | snapshot_output_fields (const Eigen::MatrixXd &solution, const io::OutGeometryData::ExportOptions &opts, const io::OutputSpace &space, double time, double dt) const override |
| Capture mutable timestep data for deferred field evaluation. | |
| void | reset () override |
| void | set_obstacle (mesh::Obstacle &&obstacle) override |
| void | load_mesh (const mesh::Mesh &mesh, const json &args) override |
| void | build_basis (mesh::Mesh &mesh, const bool iso_parametric, const json &args) override |
| void | build_rhs_assembler () override |
| void | init_solve (Eigen::MatrixXd &sol, double t, const InitialConditionOverride *initial_condition_override) |
| void | init_solve_data (Eigen::MatrixXd &sol, double t, const std::string &state_prefix, const InitialConditionOverride *initial_condition_override=nullptr) |
| virtual void | init_forms (const json &args, int dim, Eigen::MatrixXd &sol, double t) |
| bool | has_macro_strain () const |
| Eigen::VectorXd | init_homogenization_solve (Eigen::MatrixXd &solution, double time, const InitialConditionOverride *initial_condition_override) |
| Return the initial extended solution [periodic displacement fluctuation | flatten(G)]. | |
| void | solve_homogenization_step (int step, double time, Eigen::VectorXd &extended_solution, Eigen::MatrixXd &solution, const ForwardStepCallback &post_step) |
| virtual void | solve_tensor_nonlinear (int step, Eigen::MatrixXd &sol, bool init_lagging=true) |
| std::shared_ptr< assembler::PressureAssembler > | build_pressure_assembler () const |
| void | build_collision_mesh (const mesh::Mesh &mesh, const json &args) |
| void | build_periodic_collision_mesh () |
| void | preprocess_contact_parameters () |
| int | n_obstacle_vertices () const override |
Protected Member Functions inherited from polyfem::varform::ElasticVarForm | |
| io::OutputFieldFunction | snapshot_elastic_output_fields (const Eigen::MatrixXd &solution, const io::OutGeometryData::ExportOptions &opts, const mesh::Obstacle *obstacle, const time_integrator::ImplicitTimeIntegrator *time_integrator, const std::vector< std::pair< std::string, std::shared_ptr< solver::Form > > > &named_forms, const solver::Form *elastic_form, const solver::ContactForm *contact_form=nullptr) const |
| void | build_elastic_basis (mesh::Mesh &mesh, const bool iso_parametric, const json &args, const int fe_space_id) |
| void | initial_solution (Eigen::MatrixXd &solution, const InitialConditionOverride *override=nullptr, const std::string &state_prefix="") const |
| void | initial_velocity (Eigen::MatrixXd &velocity, const InitialConditionOverride *override=nullptr, const std::string &state_prefix="") const |
| void | initial_acceleration (Eigen::MatrixXd &acceleration, const InitialConditionOverride *override=nullptr, const std::string &state_prefix="") const |
| QuadratureOrders | elastic_boundary_samples () const |
| std::vector< int > | elastic_primitive_to_node () const |
| std::vector< int > | elastic_node_to_primitive () const |
| void | build_mesh_matrices (Eigen::MatrixXd &V, Eigen::MatrixXi &F) const |
| void | save_elastic_step_state (const double t0, const double dt, const int t, const Eigen::MatrixXd &solution, const time_integrator::ImplicitTimeIntegrator *time_integrator) const |
| std::vector< io::OutputField > | elastic_output_fields (const io::OutputSample &sample, const Eigen::MatrixXd &solution, const io::OutputFieldOptions &options, const mesh::Obstacle *obstacle, const time_integrator::ImplicitTimeIntegrator *time_integrator, const std::vector< std::pair< std::string, std::shared_ptr< solver::Form > > > &named_forms, const solver::Form *elastic_form, const solver::ContactForm *contact_form=nullptr, const ElasticOutputState *output_state=nullptr) const |
| void | append_primary_output_fields (std::vector< io::OutputField > &fields, const io::OutputSample &sample, const Eigen::MatrixXd &solution, const io::OutputFieldOptions &options, const mesh::Obstacle *obstacle=nullptr, const StiffnessMatrix *interpolation=nullptr) const |
| Eigen::MatrixXd | displaced_output_normals (const io::OutputSample &sample, const Eigen::MatrixXd &solution) const |
Protected Member Functions inherited from polyfem::varform::VarForm | |
| void | prepare () |
| Prepare all discretization and assembly data without running a solve. | |
| std::string | resolve_output_path (const std::string &path) const |
| void | set_materials (assembler::Assembler &assembler, const int size) const |
| void | restore_checkpoint_integrator (const std::shared_ptr< time_integrator::ImplicitTimeIntegrator > &integrator, const std::string &group, double dt, const std::string &ordering, const FESpace &space, int block_size) const |
| void | write_checkpoint_ordering (io::CheckpointWriter &writer, const std::string &name, const FESpace &space) const |
| void | reorder_checkpoint_block (const io::CheckpointReader &reader, const std::string &name, const FESpace &space, int block_size, int row_offset, Eigen::MatrixXd &value) const |
| Eigen::VectorXi | checkpoint_ordering (const FESpace &space) const |
| void | validate_checkpoint_solution (const Eigen::MatrixXd &solution, int expected_rows) const |
| bool | checkpoint_reorder_enabled () const |
| void | assign_discr_orders (const json &space_args, const mesh::Mesh &mesh, Eigen::VectorXi &disc_orders, Eigen::VectorXi &disc_ordersq) |
| void | assign_discr_orders (const json &space_args, const int fe_space_id, const mesh::Mesh &mesh, Eigen::VectorXi &disc_orders, Eigen::VectorXi &disc_ordersq) |
| QuadratureOrders | n_boundary_samples (const int discr_order, const int discr_orderq, const int gdiscr_order) const |
| void | build_fe_space (mesh::Mesh &mesh, const bool iso_parametric, const Eigen::VectorXi &disc_orders, const Eigen::VectorXi &disc_ordersq, const std::string &basis_type, const std::string &poly_basis_type, const assembler::Assembler &space_assembler, const int value_dim, const int quadrature_order, const int mass_quadrature_order, const bool use_corner_quadrature, const int n_harmonic_samples, const int integral_constraints, FESpace &space, VarFormBoundaryState &boundary, std::shared_ptr< GeometryMapping > geometry=nullptr) |
| void | build_node_mapping (const mesh::Mesh &mesh, const std::string &basis_type, const FESpace &space, Eigen::VectorXi &space_in_node_to_node, Eigen::VectorXi &space_in_primitive_to_primitive) const |
| Input-order -> internal node map of an FE space. | |
| void | save_step_state (const double t0, const double dt, const int t, const Eigen::MatrixXd &solution, const time_integrator::ImplicitTimeIntegrator *time_integrator) const |
| void | ensure_output_sampler () const |
| void | save_timestep (const double time, const int t, const double t0, const double dt, const Eigen::MatrixXd &solution) const |
| bool | save_timestep_to_vtm (const double time, const int t, const double dt, const Eigen::MatrixXd &solution, paraviewo::VTMWriter &vtm, const std::string &block_prefix, io::OutGeometryData::WriteJobs *writes=nullptr) const |
| void | save_subsolve (const int i, const int t, const Eigen::MatrixXd &solution) const |
| int | output_file_index (const int t) const |
| void | notify_time_step (const int t, const int time_steps, const double t0, const double dt) const |
| void | init_child_varform (VarForm &child, const std::string &formulation, const Units &units, const json &args, const std::string &out_path) const |
| io::OutGeometryData::ExportOptions | export_options (const io::OutputSpace &space) const |
| io::OutputFieldFunction | output_field_function (const Eigen::MatrixXd &solution, const io::OutGeometryData::ExportOptions &opts) const |
| void | flush_output () const |
Static Protected Member Functions inherited from polyfem::varform::VarForm | |
| static void | rebuild_node_positions (const std::vector< basis::ElementBases > &bases, const std::vector< int > &node_ids, std::vector< RowVectorNd > &positions) |
Protected Attributes inherited from polyfem::varform::NonlinearElasticVarForm | |
| ipc::CollisionMesh | collision_mesh_ |
| ipc::CollisionMesh | periodic_collision_mesh_ |
| Eigen::VectorXi | periodic_collision_mesh_to_basis_ |
| std::shared_ptr< assembler::PressureAssembler > | elasticity_pressure_assembler = nullptr |
| std::shared_ptr< assembler::ViscousDamping > | damping_assembler_ = nullptr |
| std::shared_ptr< assembler::ViscousDampingPrev > | damping_prev_assembler_ = nullptr |
| mesh::Obstacle | obstacle |
| assembler::MacroStrainValue | macro_strain_constraint_ |
| Prescribed macro displacement-gradient values and fixed components. | |
| Eigen::MatrixXd | displacement_gradient_ |
| For periodic structure, displacement u = periodic fluctuation Å© + macro strain GX. | |
| solver::SolveData | solve_data_ |
| std::vector< std::shared_ptr< solver::Form > > | forms |
| bool | contact_dhat_was_explicit_ = false |
Protected Attributes inherited from polyfem::varform::ElasticVarForm | |
| FESpace | space_ |
| VarFormBoundaryState | boundary_ |
| assembler::AssemblyValsCache | ass_vals_cache_ |
| assembler::AssemblyValsCache | mass_ass_vals_cache_ |
| assembler::AssemblyValsCache | pure_mass_ass_vals_cache_ |
| std::shared_ptr< assembler::RhsAssembler > | rhs_assembler_ |
| StiffnessMatrix | mass_ |
| StiffnessMatrix | pure_mass_ |
| double | avg_mass_ = 0 |
| Eigen::MatrixXd | rhs_ |
| std::shared_ptr< assembler::Assembler > | primary_assembler_ = nullptr |
| std::shared_ptr< assembler::Mass > | mass_assembler_ = nullptr |
| std::shared_ptr< assembler::HRZMass > | pure_mass_assembler_ = nullptr |
| double | t0 = 0 |
| int | time_steps = 0 |
| double | dt = 0 |
Protected Attributes inherited from polyfem::varform::VarForm | |
| std::shared_ptr< assembler::Problem > | problem |
| current problem, it contains rhs and bc | |
| Units | units |
| json | args |
| io::OutStatsData | stats |
| io::OutRuntimeData | timings |
| runtime statistics | |
| std::string | output_path |
| std::optional< std::reference_wrapper< const io::CheckpointReader > > | checkpoint_reader_ |
| std::unique_ptr< mesh::Mesh > | mesh_ |
| std::function< void(int, int, double, double)> | time_callback |
| io::OutGeometryData | output_geometry_ |
| bool | output_sampler_initialized_ = false |
| io::OutputWriter * | output_writer_ = nullptr |
| bool | prepared_ = false |
| int | output_index_offset_ = 0 |
| const io::ResourceIO & | resources_ |
Variational form for the (displacement, growth) problem built on the GrowthElasticity mixed assembler, structured like ThermoElasticVarForm without the transient machinery.
Two modes:
Definition at line 46 of file GrowthElasticVarForm.hpp.
|
private |
split of the increment's dissipation term (D, S), accumulated and logged
Definition at line 1483 of file GrowthElasticVarForm.cpp.
References polyfem::varform::FESpace::basis_list(), polyfem::assembler::AssemblyValsCache::compute(), dissipation_, element_mean_growth(), element_volume_, polyfem::varform::FESpace::geometry_basis_list(), growth_ass_vals_cache_, growth_space_, polyfem::logger(), polyfem::varform::VarForm::mesh_, normal_growth_per_element_, shear_supply_, shear_work_, polyfem::io::OutStatsData::solver_info, polyfem::varform::VarForm::stats, threshold_parallel_, threshold_per_element_, and vals.
Referenced by commit_increment().
|
private |
one increment (t_from, t_to], split recursively on failure; returns passes
Definition at line 1752 of file GrowthElasticVarForm.cpp.
References advance_increment(), commit_increment(), growth_law_, growth_node_weights_, growth_pinned_mask_, polyfem::logger(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::max_increment_splits, shear_supply_, solve_growth_increment(), polyfem::io::OutStatsData::solver_info, polyfem::varform::VarForm::stats, threshold_clamped_, threshold_parallel_, and threshold_per_element_.
Referenced by advance_increment(), and solve_growth_law().
|
private |
w_a = sum_e vn_e phi_e int_e N_a dV from threshold_per_element_ (and the nodal volumes); called once (fixed threshold) or per update (from_state).
Definition at line 1287 of file GrowthElasticVarForm.cpp.
References polyfem::varform::FESpace::basis_list(), polyfem::assembler::AssemblyValsCache::compute(), da, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::from_state, polyfem::varform::FESpace::geometry_basis_list(), growth_ass_vals_cache_, growth_law_, growth_ndof(), growth_node_vn_volume_, growth_node_volume_, growth_node_weights_, growth_space_, polyfem::logger(), polyfem::varform::VarForm::mesh_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::n_steps, normal_growth_per_element_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::relag_max_updates, setup_logged_, source, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::t_end, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_crit, threshold_per_element_, and vals.
Referenced by compute_growth_node_weights(), and set_threshold().
|
overrideprivatevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 791 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::io::OutRuntimeData::assembling_mass_mat_time, polyfem::varform::ElasticVarForm::avg_mass_, polyfem::varform::FESpace::basis_list(), displacement_ndof(), polyfem::varform::FESpace::geometry_basis_list(), growth_mass_, growth_mass_ass_vals_cache_, growth_mass_assembler_, growth_ndof(), growth_space_, polyfem::mesh::Mesh::is_volume(), polyfem::logger(), polyfem::utils::lump_matrix(), polyfem::varform::ElasticVarForm::mass_, polyfem::varform::ElasticVarForm::mass_ass_vals_cache_, polyfem::varform::ElasticVarForm::mass_assembler_, polyfem::io::OutStatsData::mat_size, polyfem::varform::FESpace::n_bases, polyfem::io::OutStatsData::nn_zero, polyfem::io::OutStatsData::num_dofs, polyfem::varform::ElasticVarForm::pure_mass_, polyfem::varform::ElasticVarForm::pure_mass_ass_vals_cache_, polyfem::varform::ElasticVarForm::pure_mass_assembler_, polyfem::varform::ElasticVarForm::space_, stacked_lumped_mass_, polyfem::varform::VarForm::stats, and polyfem::varform::VarForm::timings.
|
overrideprivatevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 755 of file GrowthElasticVarForm.cpp.
References polyfem::io::OutRuntimeData::assigning_rhs_time, polyfem::mesh::Mesh::bounding_box(), build_rhs_assembler(), growth_problem_, growth_rhs_, growth_rhs_assembler_, growth_rhs_density_, polyfem::mesh::Mesh::is_volume(), polyfem::logger(), polyfem::varform::ElasticVarForm::mass_assembler_, polyfem::varform::ElasticVarForm::primary_assembler_, polyfem::varform::VarForm::problem, polyfem::varform::VarForm::resources_, polyfem::varform::ElasticVarForm::rhs_, polyfem::varform::ElasticVarForm::rhs_assembler_, and polyfem::varform::VarForm::timings.
|
overrideprivatevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 459 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::varform::ElasticVarForm::ass_vals_cache_, polyfem::varform::VarForm::assign_discr_orders(), polyfem::varform::FESpace::basis_list(), polyfem::varform::ElasticVarForm::boundary_, polyfem::varform::VarFormBoundaryState::boundary_nodes, polyfem::varform::NonlinearElasticVarForm::build_collision_mesh(), build_displacement_boundary(), polyfem::varform::VarForm::build_fe_space(), build_growth_basis(), build_growth_boundary(), polyfem::io::OutStatsData::compute_mesh_size(), polyfem::io::OutStatsData::count_flipped_elements(), polyfem::mesh::Mesh::dimension(), displacement_space_id_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::enabled, polyfem::varform::FESpace::geometry_basis_list(), growth_ass_vals_cache_, growth_assembler_, growth_law_, growth_mass_ass_vals_cache_, growth_problem_, growth_space_, polyfem::assembler::AssemblyValsCache::init(), polyfem::assembler::AssemblyValsCache::init_empty(), polyfem::mesh::Mesh::is_volume(), polyfem::logger(), polyfem::varform::ElasticVarForm::mass_ass_vals_cache_, polyfem::io::OutStatsData::mesh_size, polyfem::varform::FESpace::n_bases, polyfem::io::OutStatsData::n_flipped, polyfem::mesh::Obstacle::n_vertices(), polyfem::varform::VarFormBoundaryState::normalize_boundary_nodes(), polyfem::varform::NonlinearElasticVarForm::obstacle, polyfem::refinement::APriori::p_refine(), polyfem::varform::NonlinearElasticVarForm::preprocess_contact_parameters(), polyfem::varform::ElasticVarForm::primary_assembler_, polyfem::varform::VarForm::problem, polyfem::varform::ElasticVarForm::pure_mass_ass_vals_cache_, polyfem::varform::ElasticVarForm::space_, polyfem::varform::FESpace::space_in_node_to_node, and polyfem::varform::VarForm::stats.
|
private |
Definition at line 572 of file GrowthElasticVarForm.cpp.
References polyfem::varform::FESpace::basis_list(), polyfem::varform::ElasticVarForm::boundary_, polyfem::varform::VarFormBoundaryState::boundary_nodes, polyfem::varform::VarFormBoundaryState::clear_boundary_conditions(), polyfem::mesh::Mesh::dimension(), polyfem::assembler::Dirichlet, polyfem::varform::VarFormBoundaryState::dirichlet_nodes, polyfem::varform::VarFormBoundaryState::dirichlet_nodes_position, displacement_space_id_, polyfem::varform::VarFormBoundaryState::local_boundary, polyfem::varform::VarFormBoundaryState::local_neumann_boundary, polyfem::varform::FESpace::mesh_nodes, polyfem::varform::FESpace::n_bases, polyfem::assembler::Neumann, polyfem::varform::VarFormBoundaryState::neumann_nodes, polyfem::varform::VarFormBoundaryState::neumann_nodes_position, polyfem::varform::FESpace::node_tag(), polyfem::varform::VarFormBoundaryState::normalize_boundary_nodes(), polyfem::varform::VarForm::problem, polyfem::varform::VarForm::rebuild_node_positions(), polyfem::varform::ElasticVarForm::space_, and polyfem::varform::VarFormBoundaryState::total_local_boundary.
Referenced by build_basis().
|
private |
Definition at line 935 of file GrowthElasticVarForm.cpp.
References polyfem::solver::SolveData::al_form, polyfem::varform::VarForm::args, polyfem::varform::ElasticVarForm::ass_vals_cache_, polyfem::varform::FESpace::basis_list(), polyfem::varform::ElasticVarForm::boundary_, polyfem::varform::VarFormBoundaryState::boundary_nodes, polyfem::varform::FESpace::disc_orders, polyfem::varform::FESpace::disc_ordersq, displacement_ndof(), dissipation_form_, polyfem::varform::ElasticVarForm::elastic_boundary_samples(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::enabled, polyfem::varform::NonlinearElasticVarForm::forms, polyfem::varform::FESpace::geometry_basis_list(), growth_ass_vals_cache_, growth_boundary_, growth_coupling_form_, growth_law_, growth_mass_, growth_ndof(), growth_node_weights_, growth_rhs_assembler_, growth_space_, growthelastic_assembler_, polyfem::varform::NonlinearElasticVarForm::init_forms(), polyfem::varform::VarFormBoundaryState::local_boundary, polyfem::varform::VarFormBoundaryState::local_neumann_boundary, polyfem::log_and_throw_error(), polyfem::logger(), polyfem::varform::ElasticVarForm::mass_, polyfem::varform::VarForm::mesh_, polyfem::varform::FESpace::n_bases, polyfem::varform::VarForm::n_boundary_samples(), polyfem::mesh::Obstacle::n_vertices(), polyfem::varform::NonlinearElasticVarForm::obstacle, polyfem::varform::VarForm::output_path, pinned_growth_nodes_, prescribed_growth_field(), polyfem::varform::ElasticVarForm::rhs_assembler_, polyfem::varform::NonlinearElasticVarForm::solve_data_, polyfem::varform::ElasticVarForm::space_, split_solution(), stacked_form_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_floor_fraction, theta_n_, polyfem::solver::SolveData::time_integrator, and total_ndof().
Referenced by solve_problem(), and solve_with_current_pins().
|
private |
Definition at line 622 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::varform::VarForm::assign_discr_orders(), polyfem::varform::VarForm::build_fe_space(), polyfem::varform::VarForm::build_node_mapping(), polyfem::varform::FESpace::disc_orders, polyfem::varform::FESpace::geometry, growth_assembler_, growth_boundary_, growth_space_, growth_space_id_, polyfem::log_and_throw_error(), polyfem::logger(), polyfem::varform::FESpace::mesh_nodes, polyfem::varform::FESpace::n_bases, polyfem::mesh::Mesh::n_vertices(), polyfem::varform::ElasticVarForm::space_, polyfem::varform::FESpace::space_in_node_to_node, and polyfem::varform::FESpace::space_in_primitive_to_primitive.
Referenced by build_basis().
|
private |
Definition at line 678 of file GrowthElasticVarForm.cpp.
References polyfem::varform::FESpace::basis_list(), polyfem::varform::VarFormBoundaryState::boundary_nodes, polyfem::varform::VarFormBoundaryState::clear_boundary_conditions(), polyfem::assembler::Dirichlet, polyfem::varform::VarFormBoundaryState::dirichlet_nodes, polyfem::varform::VarFormBoundaryState::dirichlet_nodes_position, growth_boundary_, growth_problem_, growth_space_, growth_space_id_, polyfem::varform::VarFormBoundaryState::local_boundary, polyfem::varform::VarFormBoundaryState::local_neumann_boundary, polyfem::varform::FESpace::mesh_nodes, polyfem::varform::FESpace::n_bases, polyfem::assembler::Neumann, polyfem::varform::VarFormBoundaryState::neumann_nodes, polyfem::varform::VarFormBoundaryState::neumann_nodes_position, polyfem::varform::VarFormBoundaryState::normalize_boundary_nodes(), polyfem::varform::VarForm::rebuild_node_positions(), polyfem::varform::FESpace::space_in_node_to_node, and polyfem::varform::VarFormBoundaryState::total_local_boundary.
Referenced by build_basis().
|
overrideprivatevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 725 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::varform::FESpace::basis_list(), polyfem::varform::ElasticVarForm::boundary_, polyfem::varform::VarFormBoundaryState::dirichlet_nodes, polyfem::varform::VarFormBoundaryState::dirichlet_nodes_position, displacement_space_id_, polyfem::varform::FESpace::geometry_basis_list(), growth_assembler_, growth_boundary_, growth_mass_ass_vals_cache_, growth_problem_, growth_rhs_assembler_, growth_space_, growth_space_id_, polyfem::varform::ElasticVarForm::mass_ass_vals_cache_, polyfem::varform::VarForm::mesh_, polyfem::varform::FESpace::mesh_nodes, polyfem::varform::FESpace::n_bases, polyfem::varform::VarFormBoundaryState::neumann_nodes, polyfem::varform::VarFormBoundaryState::neumann_nodes_position, polyfem::varform::NonlinearElasticVarForm::obstacle, polyfem::varform::ElasticVarForm::primary_assembler_, polyfem::varform::VarForm::problem, polyfem::varform::VarForm::resources_, polyfem::solver::SolveData::rhs_assembler, polyfem::varform::ElasticVarForm::rhs_assembler_, polyfem::varform::NonlinearElasticVarForm::solve_data_, and polyfem::varform::ElasticVarForm::space_.
Referenced by assemble_rhs().
|
private |
D/S accumulation, theta_n update and activation marking after a converged (sub)increment.
Definition at line 1789 of file GrowthElasticVarForm.cpp.
References accumulate_dissipation(), displacement_ndof(), growth_activation_step_, growth_ndof(), growth_pinned_mask_, and theta_n_.
Referenced by advance_increment().
|
overridevirtual |
Get the error statistics of the variational formulation, for output purposes.
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 1857 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::varform::FESpace::basis_list(), polyfem::io::OutStatsData::compute_errors(), polyfem::varform::FESpace::geometry_basis_list(), polyfem::varform::VarForm::mesh_, polyfem::varform::FESpace::n_bases, polyfem::varform::VarForm::problem, polyfem::varform::ElasticVarForm::space_, split_solution(), and polyfem::varform::VarForm::stats.
|
private |
Definition at line 1230 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, assemble_growth_node_weights(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::from_state, growth_law_, polyfem::log_and_throw_error(), polyfem::varform::VarForm::mesh_, normal_growth_per_element_, polyfem::assembler::read_growth_cell_array(), polyfem::varform::VarForm::resources_, shear_supply_, threshold_clamped_, threshold_parallel_, and threshold_per_element_.
Referenced by solve_growth_law().
|
overridevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 296 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::deserialize_checkpoint(), displacement_ndof(), growth_space_, polyfem::varform::VarForm::mesh_, polyfem::varform::VarForm::reorder_checkpoint_block(), polyfem::varform::ElasticVarForm::space_, total_ndof(), and polyfem::varform::VarForm::validate_checkpoint_solution().
|
inlineprivate |
Definition at line 188 of file GrowthElasticVarForm.hpp.
References polyfem::varform::FESpace::ndof(), and polyfem::varform::ElasticVarForm::space_.
Referenced by assemble_mass_mat(), build_forms(), commit_increment(), deserialize_checkpoint(), report_lag_residual(), solve_growth_increment(), solve_nonlinear_step(), split_solution(), stacked_solution(), threshold_target(), and total_ndof().
|
private |
Definition at line 419 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args.
Referenced by load_mesh().
|
private |
element mean of a nodal growth field (growth quadrature)
Definition at line 1430 of file GrowthElasticVarForm.cpp.
References polyfem::varform::FESpace::basis_list(), polyfem::assembler::AssemblyValsCache::compute(), da, polyfem::varform::FESpace::geometry_basis_list(), growth_ass_vals_cache_, growth_space_, polyfem::varform::VarForm::mesh_, and vals.
Referenced by accumulate_dissipation(), and report_lag_residual().
|
private |
The state-built threshold at C_check of displacement u, per element: f_I(Ce) (phi_full), f_I(Ce shear-free, layer thickness) (phi_no_shear), and the total in-plane area stretch theta_tot.
f_par = phi_no_shear, f_gamma = phi_full - phi_no_shear.
Definition at line 1329 of file GrowthElasticVarForm.cpp.
References polyfem::varform::ElasticVarForm::ass_vals_cache_, polyfem::varform::FESpace::basis_list(), polyfem::assembler::AssemblyValsCache::compute(), da, polyfem::F, polyfem::varform::FESpace::geometry_basis_list(), growth_law_, growthelastic_assembler_, polyfem::log_and_throw_error(), polyfem::varform::VarForm::mesh_, normal_growth_per_element_, polyfem::varform::ElasticVarForm::space_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_crit, and vals.
Referenced by report_lag_residual(), and threshold_target().
|
overridevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 1841 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::varform::ElasticVarForm::export_data(), polyfem::logger(), and split_solution().
|
private |
Grown-material stresses and energy density (GrowthElasticity::grown_stresses) at local points of element e, flattened column-major like the elastic tensor output: cauchy, pk1, pk2 (n x 9), von Mises of the Cauchy stress and the energy density (n x 1).
Definition at line 1869 of file GrowthElasticVarForm.cpp.
References polyfem::varform::FESpace::basis_list(), polyfem::assembler::ElementAssemblyValues::compute(), polyfem::compute_diplacement_grad(), polyfem::F, polyfem::varform::FESpace::geometry_basis_list(), growth_space_, growthelastic_assembler_, polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::log_and_throw_error(), polyfem::varform::VarForm::mesh_, polyfem::varform::ElasticVarForm::space_, vals, and polyfem::von_mises_stress_for_stress_tensor().
Referenced by replace_stress_fields().
|
inline |
growth_law: first increment in which each growth DOF grew (0 = never); empty before a solved run.
Also exported as growth_activation_step.
Definition at line 68 of file GrowthElasticVarForm.hpp.
References growth_activation_step_.
|
inline |
Definition at line 74 of file GrowthElasticVarForm.hpp.
References attainment_.
|
inline |
Definition at line 76 of file GrowthElasticVarForm.hpp.
References dissipation_.
|
inline |
Definition at line 75 of file GrowthElasticVarForm.hpp.
References lag_residual_.
|
private |
d Pi_inc / d theta at the solution: stacked energy gradient plus the dissipation weights (the KKT residual; >= 0 where pinned, ~0 where free).
Definition at line 1563 of file GrowthElasticVarForm.cpp.
References growth_ndof(), and stacked_form_.
Referenced by solve_growth_increment().
|
inlineprivate |
Definition at line 189 of file GrowthElasticVarForm.hpp.
References growth_space_, and polyfem::varform::FESpace::ndof().
Referenced by assemble_growth_node_weights(), assemble_mass_mat(), build_forms(), commit_increment(), growth_multiplier(), prescribed_growth_field(), report_lag_residual(), solve_growth_increment(), solve_growth_law(), split_solution(), stacked_solution(), and total_ndof().
|
inline |
growth_law threshold from_state: f_gamma per element used by the last increment, and the threshold phi_e in use (empty / the given values otherwise).
Definition at line 71 of file GrowthElasticVarForm.hpp.
References shear_supply_.
|
inline |
Definition at line 77 of file GrowthElasticVarForm.hpp.
References shear_work_.
|
inline |
Definition at line 72 of file GrowthElasticVarForm.hpp.
References threshold_per_element_.
|
inline |
Definition at line 73 of file GrowthElasticVarForm.hpp.
References threshold_parallel_.
|
overridevirtual |
Initialize the variational formulation with the given parameters.
| formulation | name of the variational formulation |
| units | unit system to use for the formulation |
| args | json input arguments, used to initialize the formulation |
| out_path | output path for the formulation, used to save intermediate data |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 317 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::varform::NonlinearElasticVarForm::contact_dhat_was_explicit_, polyfem::varform::ElasticVarForm::dt, elastic_formulation_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::enabled, growth_assembler_, growth_law_, growth_mass_assembler_, growth_problem_, growthelastic_assembler_, polyfem::varform::VarForm::init(), polyfem::log_and_throw_error(), polyfem::assembler::AssemblerUtils::make_assembler(), polyfem::assembler::AssemblerUtils::make_mixed_nl_assembler(), polyfem::varform::ElasticVarForm::mass_assembler_, polyfem::varform::ElasticVarForm::primary_assembler_, polyfem::varform::VarForm::problem, polyfem::varform::ElasticVarForm::pure_mass_assembler_, read_growth_law(), read_material_space_ids(), polyfem::varform::VarForm::resources_, polyfem::varform::ElasticVarForm::t0, polyfem::varform::ElasticVarForm::time_steps, and polyfem::varform::VarForm::units.
|
private |
Definition at line 885 of file GrowthElasticVarForm.cpp.
References growth_rhs_assembler_, polyfem::logger(), and prescribed_growth_field().
Referenced by solve_problem().
|
overrideprivatevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 432 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::mesh::Mesh::dimension(), elastic_material_args(), polyfem::mesh::Mesh::get_body_id(), growth_assembler_, growth_mass_assembler_, growth_problem_, growthelastic_assembler_, polyfem::varform::ElasticVarForm::mass_assembler_, polyfem::varform::VarForm::mesh_, polyfem::mesh::Mesh::n_elements(), polyfem::varform::ElasticVarForm::primary_assembler_, polyfem::varform::VarForm::problem, polyfem::varform::ElasticVarForm::pure_mass_assembler_, polyfem::varform::VarForm::resources_, and polyfem::varform::VarForm::units.
|
private |
phi - f_I per v_n-weighted nodal volume on the settled set: free and pinned
Definition at line 1449 of file GrowthElasticVarForm.cpp.
References growth_node_vn_volume_, polyfem::logger(), polyfem::io::OutStatsData::solver_info, and polyfem::varform::VarForm::stats.
Referenced by solve_growth_increment().
|
private |
NLProblem over the current forms and AL forms, initialized at sol, t.
Definition at line 1193 of file GrowthElasticVarForm.cpp.
References polyfem::solver::SolveData::al_form, polyfem::varform::VarForm::args, polyfem::varform::NonlinearElasticVarForm::forms, polyfem::logger(), polyfem::varform::VarForm::mesh_, polyfem::solver::SolveData::nl_problem, polyfem::varform::NonlinearElasticVarForm::solve_data_, stacked_lumped_mass_, and total_ndof().
Referenced by solve_problem(), and solve_with_current_pins().
|
staticprivate |
Definition at line 1278 of file GrowthElasticVarForm.cpp.
Referenced by set_threshold().
|
inlineoverridevirtual |
Get the name of the variational formulation.
Implements polyfem::varform::VarForm.
Definition at line 50 of file GrowthElasticVarForm.hpp.
Referenced by output_fields(), and save_growth_increment().
|
overridevirtual |
Get the output fields of the variational formulation, for output purposes.
| sample | Output sample |
| solution | Solution matrix |
| options | Output field options |
Implements polyfem::varform::VarForm.
Definition at line 2119 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::io::OutputSample::Contact, converged_solution_, polyfem::io::OutputSample::domain, polyfem::io::OutputSample::element_ids, polyfem::io::OutputFieldOptions::export_field(), polyfem::io::OutputSample::local_points, polyfem::varform::VarForm::mesh_, name(), polyfem::io::OutputSample::node_ids, polyfem::varform::NonlinearElasticVarForm::output_fields(), polyfem::io::OutputField::Point, polyfem::io::OutputSample::points, replace_stress_fields(), split_solution(), polyfem::io::OutputSample::time, and total_ndof().
|
private |
Definition at line 835 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, polyfem::io::ResourceIO::describe(), growth_ndof(), growth_space_, polyfem::log_and_throw_error(), polyfem::io::ResourceIO::open(), prescribed_growth_, polyfem::varform::VarForm::resources_, and polyfem::varform::FESpace::space_in_node_to_node.
Referenced by build_forms(), and initial_growth_solution().
|
private |
Definition at line 206 of file GrowthElasticVarForm.cpp.
References polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::active_set_tol, polyfem::varform::VarForm::args, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::enabled, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::feasibility_tol, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::final_tol_factor, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::from_state, growth_law_, polyfem::utils::json_as_array(), polyfem::log_and_throw_error(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::max_active_set_iterations, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::max_increment_splits, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::n_steps, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::relag_max_updates, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::relag_tol, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::save_increments, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::t_end, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_crit, and polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_floor_fraction.
Referenced by init().
|
private |
Definition at line 407 of file GrowthElasticVarForm.cpp.
References polyfem::varform::VarForm::args, displacement_space_id_, elastic_formulation_, growth_space_id_, and polyfem::log_and_throw_error().
Referenced by init().
|
private |
The elastic base evaluates von_mises, cauchy_stess_*, pk1_stess_*, pk2_stess_* (and the *_avg variants), energy and energy_avg with the ungrown material at the total F; overwrite the ones it emitted with the grown-material values.
Definition at line 1915 of file GrowthElasticVarForm.cpp.
References polyfem::basis::ElementBases::bases, polyfem::varform::FESpace::basis_list(), polyfem::assembler::ElementAssemblyValues::compute(), polyfem::varform::FESpace::disc_orders, polyfem::varform::FESpace::disc_ordersq, polyfem::io::OutputSample::element_ids, polyfem::utils::flatten(), polyfem::varform::FESpace::geometry_basis_list(), grown_stress_at(), growthelastic_assembler_, polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::OutputSample::local_points, polyfem::varform::VarForm::mesh_, polyfem::varform::FESpace::n_bases, polyfem::io::OutputSample::node_ids, polyfem::autogen::p_nodes_3d(), point, polyfem::autogen::prism_nodes_3d(), polyfem::autogen::q_nodes_3d(), polyfem::varform::ElasticVarForm::space_, polyfem::io::OutputSample::time, and vals.
Referenced by output_fields().
|
private |
lag residual phi(converged state) - phi used, and attainment, logged per increment
Definition at line 1527 of file GrowthElasticVarForm.cpp.
References attainment_, displacement_ndof(), element_mean_growth(), evaluate_threshold_state(), growth_law_, growth_ndof(), lag_residual_, polyfem::logger(), polyfem::io::OutStatsData::solver_info, polyfem::varform::VarForm::stats, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_crit, and threshold_per_element_.
Referenced by solve_growth_law().
|
overrideprivatevirtual |
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 162 of file GrowthElasticVarForm.cpp.
References attainment_, converged_solution_, displacement_space_id_, dissipation_, dissipation_form_, elastic_formulation_, element_volume_, growth_activation_step_, growth_ass_vals_cache_, growth_assembler_, growth_boundary_, growth_coupling_form_, growth_law_, growth_mass_, growth_mass_ass_vals_cache_, growth_mass_assembler_, growth_node_volume_, growth_node_weights_, growth_pinned_mask_, growth_problem_, growth_rhs_, growth_rhs_assembler_, growth_rhs_density_, growth_space_, growth_space_id_, growthelastic_assembler_, polyfem::assembler::AssemblyValsCache::init_empty(), lag_residual_, normal_growth_per_element_, pinned_growth_nodes_, prescribed_growth_, polyfem::varform::FESpace::reset(), polyfem::varform::VarFormBoundaryState::reset(), polyfem::varform::NonlinearElasticVarForm::reset(), setup_logged_, shear_supply_, shear_work_, stacked_form_, stacked_lumped_mass_, theta_n_, threshold_clamped_, threshold_parallel_, and threshold_per_element_.
|
private |
growth_law.save_increments: the converged stacked state of increment step (pseudo-time t) as growth_step_<step>.vtu, and growth_steps.pvd rewritten to list steps 1..step.
Definition at line 1811 of file GrowthElasticVarForm.cpp.
References converged_solution_, polyfem::varform::ElasticVarForm::dt, polyfem::varform::VarForm::ensure_output_sampler(), polyfem::varform::VarForm::export_options(), growth_law_, polyfem::logger(), polyfem::io::OutputSpace::mesh, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::n_steps, name(), polyfem::varform::VarForm::output_field_function(), polyfem::varform::VarForm::output_geometry_, polyfem::varform::NonlinearElasticVarForm::output_space(), polyfem::varform::VarForm::resolve_output_path(), polyfem::io::OutGeometryData::save_vtu(), and polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::t_end.
Referenced by solve_growth_law().
|
overridevirtual |
both blocks of the stacked (displacement, growth) solution, each with its node ordering, as for the other mixed formulations
Reimplemented from polyfem::varform::ElasticVarForm.
Definition at line 286 of file GrowthElasticVarForm.cpp.
References growth_space_, polyfem::varform::VarForm::serialize_checkpoint(), polyfem::varform::ElasticVarForm::space_, and polyfem::varform::VarForm::write_checkpoint_ordering().
|
private |
install a threshold (parts), rebuild the node weights, log
Definition at line 1408 of file GrowthElasticVarForm.cpp.
References assemble_growth_node_weights(), polyfem::logger(), median_of(), polyfem::varform::VarForm::mesh_, shear_supply_, threshold_clamped_, threshold_parallel_, and threshold_per_element_.
Referenced by solve_growth_increment().
|
inlineoverrideprivatevirtual |
Capture mutable timestep data for deferred field evaluation.
An empty callback requests immediate field preparation.
Reimplemented from polyfem::varform::VarForm.
Definition at line 87 of file GrowthElasticVarForm.hpp.
|
private |
One increment: primal-dual active-set loop on theta >= theta_n.
Returns the number of passes; throws if the set does not settle.
Definition at line 1578 of file GrowthElasticVarForm.cpp.
References polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::active_set_tol, displacement_ndof(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::feasibility_tol, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::final_tol_factor, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::from_state, growth_law_, growth_multiplier(), growth_ndof(), growth_node_volume_, growth_node_weights_, growth_pinned_mask_, polyfem::log_and_throw_error(), log_kkt_residual(), polyfem::logger(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::max_active_set_iterations, pinned_growth_nodes_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::relag_max_updates, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::relag_tol, set_threshold(), shear_supply_, solve_with_current_pins(), polyfem::io::OutStatsData::solver_info, polyfem::varform::VarForm::stats, theta_n_, threshold_parallel_, threshold_per_element_, and threshold_target().
Referenced by advance_increment().
|
private |
Definition at line 1717 of file GrowthElasticVarForm.cpp.
References advance_increment(), compute_growth_node_weights(), growth_activation_step_, growth_law_, growth_ndof(), growth_pinned_mask_, polyfem::log_and_throw_error(), polyfem::logger(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::n_steps, report_lag_residual(), save_growth_increment(), polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::save_increments, polyfem::io::OutStatsData::solver_info, polyfem::varform::VarForm::stats, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::t_end, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::theta_crit, and theta_n_.
Referenced by solve_problem().
|
private |
Definition at line 1067 of file GrowthElasticVarForm.cpp.
References polyfem::solver::SolveData::al_form, polyfem::varform::VarForm::args, polyfem::Units::characteristic_length(), displacement_ndof(), polyfem::solver::FullNLProblem::finish(), polyfem::solver::FullNLProblem::init(), polyfem::solver::NLProblem::init_lagging(), polyfem::solver::FullNLProblem::is_residual(), polyfem::logger(), polyfem::solver::SolveData::nl_problem, polyfem::solver::NLProblem::normalize_forms(), polyfem::solver::ALSolver::post_subsolve, polyfem::varform::VarForm::save_subsolve(), polyfem::solver::ALSolver::solve_al(), polyfem::varform::NonlinearElasticVarForm::solve_data_, polyfem::solver::ALSolver::solve_reduced(), polyfem::io::OutStatsData::solver_info, polyfem::varform::VarForm::stats, polyfem::varform::VarForm::units, polyfem::solver::SolveData::update_barrier_stiffness(), polyfem::solver::FullNLProblem::uses_lagging(), and x.
Referenced by solve_problem(), and solve_with_current_pins().
|
overrideprivatevirtual |
Implements polyfem::varform::VarForm.
Definition at line 1140 of file GrowthElasticVarForm.cpp.
References build_forms(), converged_solution_, polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::enabled, growth_law_, initial_growth_solution(), polyfem::varform::ElasticVarForm::initial_solution(), polyfem::logger(), make_nl_problem(), POLYFEM_SCOPED_TIMER, solve_growth_law(), solve_nonlinear_step(), polyfem::io::OutStatsData::solver_info, polyfem::io::OutRuntimeData::solving_time, polyfem::io::OutStatsData::spectrum, stacked_solution(), polyfem::varform::VarForm::stats, and polyfem::varform::VarForm::timings.
|
private |
Definition at line 1571 of file GrowthElasticVarForm.cpp.
References build_forms(), make_nl_problem(), and solve_nonlinear_step().
Referenced by solve_growth_increment().
|
private |
Definition at line 925 of file GrowthElasticVarForm.cpp.
References displacement_ndof(), growth_ndof(), and total_ndof().
Referenced by build_forms(), compute_errors(), export_data(), and output_fields().
|
private |
Definition at line 912 of file GrowthElasticVarForm.cpp.
References displacement_ndof(), and growth_ndof().
Referenced by solve_problem().
|
private |
the threshold the state implies (from_state): G(x) = (PHI_PAR, f_gamma) at C_check of the state; f_gamma = f_I(Ce) - f_I(Ce with the transverse shears removed and Ce_nn at the layer value), PHI_PAR = max(f_par, 0)
Definition at line 1398 of file GrowthElasticVarForm.cpp.
References displacement_ndof(), and evaluate_threshold_state().
Referenced by solve_growth_increment().
|
inlineprivate |
Definition at line 190 of file GrowthElasticVarForm.hpp.
References displacement_ndof(), and growth_ndof().
Referenced by build_forms(), deserialize_checkpoint(), make_nl_problem(), output_fields(), and split_solution().
|
overridevirtual |
Solved growth steps its own pseudo-time (growth_law.n_steps, t_end), so its displacement problem is time dependent (the Dirichlet data follow t) without a "time" block, which init refuses.
Reimplemented from polyfem::varform::VarForm.
Definition at line 310 of file GrowthElasticVarForm.cpp.
References polyfem::varform::GrowthElasticVarForm::GrowthLawSettings::enabled, growth_law_, and polyfem::varform::VarForm::validate_time_dependence().
|
private |
vartheta^e / theta_crit at the last converged increment
Definition at line 268 of file GrowthElasticVarForm.hpp.
Referenced by growth_attainment(), report_lag_residual(), and reset().
|
private |
Converged stacked (u, growth) solution cached at the end of solve_problem.
The output pipeline does not reliably hand output_fields the stacked vector (sizes/ordering differ per export path), so growth sampling and the reaction evaluation use this authoritative copy whenever the passed solution is not total_ndof-sized.
Definition at line 218 of file GrowthElasticVarForm.hpp.
Referenced by output_fields(), reset(), save_growth_increment(), and solve_problem().
|
private |
Definition at line 226 of file GrowthElasticVarForm.hpp.
Referenced by build_basis(), build_displacement_boundary(), build_rhs_assembler(), read_material_space_ids(), and reset().
|
private |
cumulative D = sum v_n max(f_par,0) dtheta per element [Pa]
Definition at line 269 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), growth_dissipation(), and reset().
|
private |
Definition at line 280 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), and reset().
|
private |
Definition at line 228 of file GrowthElasticVarForm.hpp.
Referenced by init(), read_material_space_ids(), and reset().
|
private |
reference element volumes (growth quadrature)
Definition at line 271 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), and reset().
|
private |
first increment in which a growth DOF grew (0 = never)
Definition at line 279 of file GrowthElasticVarForm.hpp.
Referenced by commit_increment(), growth_activation_step(), reset(), and solve_growth_law().
|
private |
Definition at line 196 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), assemble_growth_node_weights(), build_basis(), build_forms(), element_mean_growth(), and reset().
|
private |
Definition at line 199 of file GrowthElasticVarForm.hpp.
Referenced by build_basis(), build_growth_basis(), build_rhs_assembler(), init(), load_mesh(), and reset().
|
private |
Definition at line 193 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), build_growth_basis(), build_growth_boundary(), build_rhs_assembler(), and reset().
|
private |
Definition at line 209 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), and reset().
|
private |
Referenced by advance_increment(), assemble_growth_node_weights(), build_basis(), build_forms(), compute_growth_node_weights(), evaluate_threshold_state(), init(), read_growth_law(), report_lag_residual(), reset(), save_growth_increment(), solve_growth_increment(), solve_growth_law(), solve_problem(), and validate_time_dependence().
|
private |
Definition at line 205 of file GrowthElasticVarForm.hpp.
Referenced by assemble_mass_mat(), build_forms(), and reset().
|
private |
Definition at line 197 of file GrowthElasticVarForm.hpp.
Referenced by assemble_mass_mat(), build_basis(), build_rhs_assembler(), and reset().
|
private |
Definition at line 201 of file GrowthElasticVarForm.hpp.
Referenced by assemble_mass_mat(), init(), load_mesh(), and reset().
|
private |
int vn N_a dV (KKT residual in Pa)
Definition at line 274 of file GrowthElasticVarForm.hpp.
Referenced by assemble_growth_node_weights(), and log_kkt_residual().
|
private |
int N_a dV
Definition at line 273 of file GrowthElasticVarForm.hpp.
Referenced by assemble_growth_node_weights(), reset(), and solve_growth_increment().
|
private |
int vn phi N_a dV
Definition at line 275 of file GrowthElasticVarForm.hpp.
Referenced by advance_increment(), assemble_growth_node_weights(), build_forms(), reset(), and solve_growth_increment().
|
private |
last solved pass: 1 = pinned at theta_n
Definition at line 278 of file GrowthElasticVarForm.hpp.
Referenced by advance_increment(), commit_increment(), reset(), solve_growth_increment(), and solve_growth_law().
|
private |
Definition at line 194 of file GrowthElasticVarForm.hpp.
Referenced by assemble_rhs(), build_basis(), build_growth_boundary(), build_rhs_assembler(), init(), load_mesh(), and reset().
|
private |
Definition at line 207 of file GrowthElasticVarForm.hpp.
Referenced by assemble_rhs(), and reset().
|
private |
Definition at line 202 of file GrowthElasticVarForm.hpp.
Referenced by assemble_rhs(), build_forms(), build_rhs_assembler(), initial_growth_solution(), and reset().
|
private |
Definition at line 203 of file GrowthElasticVarForm.hpp.
Referenced by assemble_rhs(), and reset().
|
private |
Definition at line 192 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), assemble_growth_node_weights(), assemble_mass_mat(), build_basis(), build_forms(), build_growth_basis(), build_growth_boundary(), build_rhs_assembler(), deserialize_checkpoint(), element_mean_growth(), grown_stress_at(), growth_ndof(), prescribed_growth_field(), reset(), and serialize_checkpoint().
|
private |
Definition at line 227 of file GrowthElasticVarForm.hpp.
Referenced by build_growth_basis(), build_growth_boundary(), build_rhs_assembler(), read_material_space_ids(), and reset().
|
private |
Definition at line 200 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), evaluate_threshold_state(), grown_stress_at(), init(), load_mesh(), replace_stress_fields(), and reset().
|
private |
phi(converged state) - phi used, last increment [Pa]
Definition at line 267 of file GrowthElasticVarForm.hpp.
Referenced by growth_lag_residual(), report_lag_residual(), and reset().
|
private |
vn_e (1 when not given)
Definition at line 272 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), assemble_growth_node_weights(), compute_growth_node_weights(), evaluate_threshold_state(), and reset().
|
private |
member: BCLagrangianForm keeps a reference
Definition at line 277 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), reset(), and solve_growth_increment().
|
mutableprivate |
Whole-field growth prescription (boundary_conditions.growth_nodal_field): nodal theta values loaded lazily from file; when set, EVERY growth DOF is Dirichlet with these targets (via BCLagrangianForm's tabulated-target constructor) and the same field is the growth initial solution.
Definition at line 224 of file GrowthElasticVarForm.hpp.
Referenced by prescribed_growth_field(), and reset().
|
private |
the setup line is logged once, not per update
Definition at line 265 of file GrowthElasticVarForm.hpp.
Referenced by assemble_growth_node_weights(), and reset().
|
private |
from_state: f_gamma,e of the last update [Pa]
Definition at line 264 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), advance_increment(), compute_growth_node_weights(), growth_shear_supply(), reset(), set_threshold(), and solve_growth_increment().
|
private |
cumulative S = sum v_n f_gamma dtheta per element [Pa]
Definition at line 270 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), growth_shear_supply_work(), and reset().
|
private |
Definition at line 210 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), growth_multiplier(), and reset().
|
private |
Definition at line 206 of file GrowthElasticVarForm.hpp.
Referenced by assemble_mass_mat(), make_nl_problem(), and reset().
|
private |
converged growth of the previous increment
Definition at line 276 of file GrowthElasticVarForm.hpp.
Referenced by build_forms(), commit_increment(), reset(), solve_growth_increment(), and solve_growth_law().
|
private |
1 where f_par(C_check) < 0 (zero floor), when computed here
Definition at line 266 of file GrowthElasticVarForm.hpp.
Referenced by advance_increment(), compute_growth_node_weights(), reset(), and set_threshold().
|
private |
from_state: phi_par,e of the last update [Pa]
Definition at line 263 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), advance_increment(), compute_growth_node_weights(), growth_threshold_parallel(), reset(), set_threshold(), and solve_growth_increment().
|
private |
phi_e [Pa] in use (from_state: phi_par + f_gamma)
Definition at line 262 of file GrowthElasticVarForm.hpp.
Referenced by accumulate_dissipation(), advance_increment(), assemble_growth_node_weights(), compute_growth_node_weights(), growth_threshold(), report_lag_residual(), reset(), set_threshold(), and solve_growth_increment().