PolyFEM
Loading...
Searching...
No Matches
polyfem::varform::DifferentiableVarForm Class Referenceabstract

Optimization-facing interface implemented by differentiated VarForm adapters. More...

#include <DifferentiableVarForm.hpp>

Inheritance diagram for polyfem::varform::DifferentiableVarForm:
[legend]

Public Member Functions

virtual ~DifferentiableVarForm ()=default
 
virtual std::string name () const =0
 
virtual void solve (Eigen::MatrixXd &solution, const InitialConditionOverride *initial_condition_override, const ForwardStepCallback &post_step, bool differentiable)=0
 
virtual void prepare ()=0
 
virtual void save_vtu (const std::string &path, const Eigen::MatrixXd &solution, double time, double dt) const =0
 
virtual jsonget_args ()=0
 
virtual const jsonget_args () const =0
 
virtual const mesh::Meshget_mesh () const =0
 
virtual assembler::Problemget_problem ()=0
 
virtual const assembler::Problemget_problem () const =0
 
virtual const std::string & get_root_path () const =0
 
virtual std::string input_path (const std::string &path, bool only_if_exists=false) const =0
 
virtual std::string output_file_path (const std::string &path) const =0
 
virtual const Unitsget_units () const =0
 
virtual bool is_contact_enabled () const =0
 
virtual const FESpaceprimary_space () const =0
 
virtual const VarFormBoundaryStateboundary_state () const =0
 
virtual const assembler::Assemblerprimary_assembler () const =0
 
virtual const assembler::Massmass_assembler () const =0
 
virtual const assembler::AssemblyValsCacheassembly_cache () const =0
 
virtual const assembler::AssemblyValsCachemass_assembly_cache () const =0
 
virtual const StiffnessMatrixmass_matrix () const =0
 
virtual solver::SolveDatasolve_data ()=0
 
virtual const solver::SolveDatasolve_data () const =0
 
virtual const ipc::CollisionMesh & collision_mesh () const
 
virtual const mesh::Obstacleget_obstacle () const
 
virtual const assembler::ViscousDampingdamping_assembler () const
 
virtual const assembler::ViscousDampingPrevdamping_prev_assembler () const
 
virtual void initial_solution (Eigen::MatrixXd &solution, const InitialConditionOverride *override=nullptr) const
 
virtual void initial_velocity (Eigen::MatrixXd &velocity, const InitialConditionOverride *override=nullptr) const
 
virtual void initial_acceleration (Eigen::MatrixXd &acceleration, const InitialConditionOverride *override=nullptr) const
 
virtual Eigen::MatrixXd displacement_gradient () const
 
void get_vertices (Eigen::MatrixXd &vertices) const
 
std::unordered_map< int, std::array< bool, 3 > > boundary_conditions_ids (const std::string &bc_type) const
 
bool is_homogenization () const
 
bool has_periodic_boundary () const
 
Eigen::MatrixXd periodic_tile_offsets () const
 
bool is_adhesion_enabled () const
 
bool is_pressure_enabled () const
 
bool has_constraints () const
 
bool is_problem_linear () const
 
void build_stiffness_matrix (StiffnessMatrix &stiffness) const
 
std::vector< int > primitive_to_node () const
 
std::vector< int > node_to_primitive () const
 
void get_elements (Eigen::MatrixXi &elements) const
 
QuadratureOrders n_boundary_samples () const
 
void set_vertex_positions (const Eigen::MatrixXd &vertices)
 
virtual void set_lame_parameters (const Eigen::VectorXd &lambda, const Eigen::VectorXd &mu)
 
virtual void set_friction_coefficient (double coefficient)
 
virtual void set_damping_coefficients (double psi, double phi)
 
virtual void set_dirichlet_boundary (int boundary_id, int time_step, const Eigen::VectorXd &value)
 
virtual void set_dirichlet_nodes (const Eigen::VectorXi &input_nodes, const Eigen::MatrixXd &values)
 
virtual void set_pressure_boundary (int boundary_id, int time_step, double value)
 

Protected Member Functions

virtual mesh::Meshmutable_mesh ()=0
 
virtual void invalidate_after_geometry_update ()=0
 
virtual void invalidate_after_parameter_update ()=0
 
virtual QuadratureOrders boundary_samples (int discr_order, int discr_orderq, int geometry_discr_order) const =0
 

Detailed Description

Optimization-facing interface implemented by differentiated VarForm adapters.

Definition at line 22 of file DifferentiableVarForm.hpp.

Constructor & Destructor Documentation

◆ ~DifferentiableVarForm()

virtual polyfem::varform::DifferentiableVarForm::~DifferentiableVarForm ( )
virtualdefault

Member Function Documentation

◆ assembly_cache()

virtual const assembler::AssemblyValsCache & polyfem::varform::DifferentiableVarForm::assembly_cache ( ) const
pure virtual

◆ boundary_conditions_ids()

std::unordered_map< int, std::array< bool, 3 > > polyfem::varform::DifferentiableVarForm::boundary_conditions_ids ( const std::string &  bc_type) const

Definition at line 48 of file DifferentiableVarForm.cpp.

References get_args(), get_mesh(), and polyfem::utils::json_as_array().

Here is the call graph for this function:

◆ boundary_samples()

virtual QuadratureOrders polyfem::varform::DifferentiableVarForm::boundary_samples ( int  discr_order,
int  discr_orderq,
int  geometry_discr_order 
) const
protectedpure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by n_boundary_samples().

Here is the caller graph for this function:

◆ boundary_state()

virtual const VarFormBoundaryState & polyfem::varform::DifferentiableVarForm::boundary_state ( ) const
pure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by polyfem::solver::BoundedBiharmonicWeights2Dto3D::BoundedBiharmonicWeights2Dto3D(), polyfem::solver::DirichletBoundaryVariableToSimulation::build_boundary_node_maps(), polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::compute_surface_node_ids(), polyfem::compute_total_surface_node_ids(), polyfem::solver::AdjointTools::dJ_damping_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_dirichlet_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_dirichlet_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_du_step(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_initial_condition_adjoint_term(), polyfem::solver::AdjointTools::dJ_material_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_material_transient_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(), polyfem::solver::AdjointTools::integrate_objective(), periodic_tile_offsets(), polyfem::select_boundary_nodes(), and polyfem::select_boundary_nodes_excluding_surfaces().

Here is the caller graph for this function:

◆ build_stiffness_matrix()

void polyfem::varform::DifferentiableVarForm::build_stiffness_matrix ( StiffnessMatrix stiffness) const

Definition at line 124 of file DifferentiableVarForm.cpp.

References polyfem::assembler::Assembler::assemble(), assembly_cache(), polyfem::varform::FESpace::basis_list(), polyfem::varform::FESpace::geometry_basis_list(), get_mesh(), polyfem::varform::FESpace::n_bases, primary_assembler(), and primary_space().

Here is the call graph for this function:

◆ collision_mesh()

const ipc::CollisionMesh & polyfem::varform::DifferentiableVarForm::collision_mesh ( ) const
virtual

Reimplemented in polyfem::varform::DifferentiableNonlinearElasticVarForm.

Definition at line 11 of file DifferentiableVarForm.cpp.

References polyfem::log_and_throw_error(), and name().

Referenced by polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term().

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

◆ damping_assembler()

virtual const assembler::ViscousDamping * polyfem::varform::DifferentiableVarForm::damping_assembler ( ) const
inlinevirtual

◆ damping_prev_assembler()

virtual const assembler::ViscousDampingPrev * polyfem::varform::DifferentiableVarForm::damping_prev_assembler ( ) const
inlinevirtual

◆ displacement_gradient()

Eigen::MatrixXd polyfem::varform::DifferentiableVarForm::displacement_gradient ( ) const
virtual

Reimplemented in polyfem::varform::DifferentiableNonlinearElasticVarForm.

Definition at line 36 of file DifferentiableVarForm.cpp.

References get_mesh().

Referenced by polyfem::DiffCache::cache_transient(), and polyfem::varform::DifferentiableNonlinearElasticVarForm::displacement_gradient().

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

◆ get_args() [1/2]

virtual const json & polyfem::varform::DifferentiableVarForm::get_args ( ) const
pure virtual

◆ get_args() [2/2]

◆ get_elements()

void polyfem::varform::DifferentiableVarForm::get_elements ( Eigen::MatrixXi &  elements) const

Definition at line 159 of file DifferentiableVarForm.cpp.

References polyfem::varform::FESpace::geometry_basis_list(), get_mesh(), polyfem::log_and_throw_error(), node_to_primitive(), and primary_space().

Here is the call graph for this function:

◆ get_mesh()

virtual const mesh::Mesh & polyfem::varform::DifferentiableVarForm::get_mesh ( ) const
pure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by boundary_conditions_ids(), polyfem::solver::BoundedBiharmonicWeights2Dto3D::BoundedBiharmonicWeights2Dto3D(), polyfem::solver::DirichletBoundaryVariableToSimulation::build_boundary_node_maps(), build_stiffness_matrix(), polyfem::DiffCache::cache_transient(), polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::compute_surface_node_ids(), polyfem::compute_total_surface_node_ids(), polyfem::compute_volume_node_ids(), displacement_gradient(), polyfem::solver::AdjointTools::dJ_dirichlet_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_du_step(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_periodic_shape_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(), get_elements(), get_vertices(), polyfem::solver::AdjointTools::integrate_objective(), polyfem::solver::AdjointTools::map_node_to_primitive_order(), polyfem::solver::AdjointTools::map_primitive_to_node_order(), n_boundary_samples(), periodic_tile_offsets(), primitive_to_node(), polyfem::select_boundary_nodes(), polyfem::select_boundary_nodes_excluding_surfaces(), polyfem::select_interior_nodes(), and set_lame_parameters().

Here is the caller graph for this function:

◆ get_obstacle()

const mesh::Obstacle & polyfem::varform::DifferentiableVarForm::get_obstacle ( ) const
virtual

Reimplemented in polyfem::varform::DifferentiableNonlinearElasticVarForm.

Definition at line 16 of file DifferentiableVarForm.cpp.

References polyfem::log_and_throw_error(), and name().

Here is the call graph for this function:

◆ get_problem() [1/2]

virtual const assembler::Problem & polyfem::varform::DifferentiableVarForm::get_problem ( ) const
pure virtual

◆ get_problem() [2/2]

◆ get_root_path()

virtual const std::string & polyfem::varform::DifferentiableVarForm::get_root_path ( ) const
pure virtual

◆ get_units()

virtual const Units & polyfem::varform::DifferentiableVarForm::get_units ( ) const
pure virtual

◆ get_vertices()

void polyfem::varform::DifferentiableVarForm::get_vertices ( Eigen::MatrixXd &  vertices) const

Definition at line 41 of file DifferentiableVarForm.cpp.

References get_mesh(), polyfem::mesh::Mesh::n_vertices(), and polyfem::mesh::Mesh::point().

Referenced by polyfem::solver::BoundedBiharmonicWeights2Dto3D::BoundedBiharmonicWeights2Dto3D().

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

◆ has_constraints()

bool polyfem::varform::DifferentiableVarForm::has_constraints ( ) const

Definition at line 113 of file DifferentiableVarForm.cpp.

References get_args().

Referenced by is_problem_linear().

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

◆ has_periodic_boundary()

bool polyfem::varform::DifferentiableVarForm::has_periodic_boundary ( ) const

Definition at line 70 of file DifferentiableVarForm.cpp.

References get_args().

Here is the call graph for this function:

◆ initial_acceleration()

void polyfem::varform::DifferentiableVarForm::initial_acceleration ( Eigen::MatrixXd &  acceleration,
const InitialConditionOverride override = nullptr 
) const
virtual

Reimplemented in polyfem::varform::DifferentiableLinearElasticVarForm, and polyfem::varform::DifferentiableNonlinearElasticVarForm.

Definition at line 31 of file DifferentiableVarForm.cpp.

References polyfem::log_and_throw_error(), and name().

Referenced by polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term().

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

◆ initial_solution()

void polyfem::varform::DifferentiableVarForm::initial_solution ( Eigen::MatrixXd &  solution,
const InitialConditionOverride override = nullptr 
) const
virtual

Reimplemented in polyfem::varform::DifferentiableLinearElasticVarForm, and polyfem::varform::DifferentiableNonlinearElasticVarForm.

Definition at line 21 of file DifferentiableVarForm.cpp.

References polyfem::log_and_throw_error(), and name().

Here is the call graph for this function:

◆ initial_velocity()

void polyfem::varform::DifferentiableVarForm::initial_velocity ( Eigen::MatrixXd &  velocity,
const InitialConditionOverride override = nullptr 
) const
virtual

Reimplemented in polyfem::varform::DifferentiableLinearElasticVarForm, and polyfem::varform::DifferentiableNonlinearElasticVarForm.

Definition at line 26 of file DifferentiableVarForm.cpp.

References polyfem::log_and_throw_error(), and name().

Referenced by polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term().

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

◆ input_path()

virtual std::string polyfem::varform::DifferentiableVarForm::input_path ( const std::string &  path,
bool  only_if_exists = false 
) const
pure virtual

◆ invalidate_after_geometry_update()

virtual void polyfem::varform::DifferentiableVarForm::invalidate_after_geometry_update ( )
protectedpure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by set_vertex_positions().

Here is the caller graph for this function:

◆ invalidate_after_parameter_update()

virtual void polyfem::varform::DifferentiableVarForm::invalidate_after_parameter_update ( )
protectedpure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by set_damping_coefficients(), set_dirichlet_boundary(), set_dirichlet_nodes(), set_friction_coefficient(), set_lame_parameters(), and set_pressure_boundary().

Here is the caller graph for this function:

◆ is_adhesion_enabled()

bool polyfem::varform::DifferentiableVarForm::is_adhesion_enabled ( ) const

Definition at line 102 of file DifferentiableVarForm.cpp.

References get_args().

Referenced by polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), and polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

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

◆ is_contact_enabled()

virtual bool polyfem::varform::DifferentiableVarForm::is_contact_enabled ( ) const
pure virtual

◆ is_homogenization()

bool polyfem::varform::DifferentiableVarForm::is_homogenization ( ) const

Definition at line 65 of file DifferentiableVarForm.cpp.

References get_args().

Referenced by polyfem::solver::AdjointForm::compute_reduced_adjoint_rhs(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_homogenization_solve(), and polyfem::varform::DifferentiableNonlinearElasticStaticVarForm::solve_problem().

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

◆ is_pressure_enabled()

bool polyfem::varform::DifferentiableVarForm::is_pressure_enabled ( ) const

Definition at line 107 of file DifferentiableVarForm.cpp.

References get_args().

Referenced by is_problem_linear().

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

◆ is_problem_linear()

bool polyfem::varform::DifferentiableVarForm::is_problem_linear ( ) const

Definition at line 119 of file DifferentiableVarForm.cpp.

References has_constraints(), is_contact_enabled(), polyfem::assembler::Assembler::is_linear(), is_pressure_enabled(), and primary_assembler().

Referenced by polyfem::OptState::check_unsupported().

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

◆ mass_assembler()

virtual const assembler::Mass & polyfem::varform::DifferentiableVarForm::mass_assembler ( ) const
pure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

Here is the caller graph for this function:

◆ mass_assembly_cache()

virtual const assembler::AssemblyValsCache & polyfem::varform::DifferentiableVarForm::mass_assembly_cache ( ) const
pure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

Here is the caller graph for this function:

◆ mass_matrix()

virtual const StiffnessMatrix & polyfem::varform::DifferentiableVarForm::mass_matrix ( ) const
pure virtual

◆ mutable_mesh()

virtual mesh::Mesh & polyfem::varform::DifferentiableVarForm::mutable_mesh ( )
protectedpure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by set_vertex_positions().

Here is the caller graph for this function:

◆ n_boundary_samples()

QuadratureOrders polyfem::varform::DifferentiableVarForm::n_boundary_samples ( ) const

Definition at line 174 of file DifferentiableVarForm.cpp.

References boundary_samples(), polyfem::varform::FESpace::disc_orders, polyfem::varform::FESpace::disc_ordersq, polyfem::varform::FESpace::geometry, get_mesh(), polyfem::mesh::Mesh::orders(), and primary_space().

Here is the call graph for this function:

◆ name()

◆ node_to_primitive()

std::vector< int > polyfem::varform::DifferentiableVarForm::node_to_primitive ( ) const

Definition at line 145 of file DifferentiableVarForm.cpp.

References polyfem::varform::FESpace::n_bases, primary_space(), and primitive_to_node().

Referenced by polyfem::solver::BoundedBiharmonicWeights2Dto3D::BoundedBiharmonicWeights2Dto3D(), get_elements(), and polyfem::solver::AdjointTools::map_node_to_primitive_order().

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

◆ output_file_path()

virtual std::string polyfem::varform::DifferentiableVarForm::output_file_path ( const std::string &  path) const
pure virtual

◆ periodic_tile_offsets()

Eigen::MatrixXd polyfem::varform::DifferentiableVarForm::periodic_tile_offsets ( ) const

Definition at line 76 of file DifferentiableVarForm.cpp.

References boundary_state(), polyfem::solver::PeriodicBoundaryLagrangianForm::build_mapping(), polyfem::mesh::Mesh::dimension(), get_args(), get_mesh(), polyfem::log_and_throw_adjoint_error(), and primary_space().

Here is the call graph for this function:

◆ prepare()

virtual void polyfem::varform::DifferentiableVarForm::prepare ( )
pure virtual

◆ primary_assembler()

virtual const assembler::Assembler & polyfem::varform::DifferentiableVarForm::primary_assembler ( ) const
pure virtual

◆ primary_space()

virtual const FESpace & polyfem::varform::DifferentiableVarForm::primary_space ( ) const
pure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by polyfem::solver::BoundedBiharmonicWeights2Dto3D::BoundedBiharmonicWeights2Dto3D(), polyfem::solver::DirichletBoundaryVariableToSimulation::build_boundary_node_maps(), build_stiffness_matrix(), polyfem::DiffCache::cache_transient(), polyfem::OptState::check_unsupported(), polyfem::solver::AdjointForm::compute_adjoint_rhs(), polyfem::solver::StaticForm::compute_adjoint_rhs(), polyfem::solver::MinTargetDistForm::compute_adjoint_rhs(), polyfem::solver::TransientForm::compute_adjoint_rhs(), polyfem::solver::ProxyTransientForm::compute_adjoint_rhs(), polyfem::solver::SpatialIntegralForm::compute_adjoint_rhs_step(), polyfem::solver::BarycenterTargetForm::compute_adjoint_rhs_step(), polyfem::solver::StaticForm::compute_adjoint_rhs_step_prev(), polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::compute_surface_node_ids(), polyfem::compute_total_surface_node_ids(), polyfem::compute_volume_node_ids(), polyfem::solver::AdjointTools::dJ_dirichlet_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_du_step(), polyfem::solver::AdjointTools::dJ_initial_condition_adjoint_term(), polyfem::solver::AdjointTools::dJ_material_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_periodic_shape_adjoint_term(), polyfem::solver::AdjointTools::dJ_pressure_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_pressure_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(), polyfem::solver::PeriodicContactForceDerivative::force_shape_derivative(), get_elements(), polyfem::solver::AdjointTools::integrate_objective(), polyfem::solver::AdjointTools::map_node_to_primitive_order(), polyfem::solver::AdjointTools::map_primitive_to_node_order(), n_boundary_samples(), node_to_primitive(), periodic_tile_offsets(), primitive_to_node(), and set_dirichlet_nodes().

Here is the caller graph for this function:

◆ primitive_to_node()

std::vector< int > polyfem::varform::DifferentiableVarForm::primitive_to_node ( ) const

◆ save_vtu()

virtual void polyfem::varform::DifferentiableVarForm::save_vtu ( const std::string &  path,
const Eigen::MatrixXd &  solution,
double  time,
double  dt 
) const
pure virtual

◆ set_damping_coefficients()

void polyfem::varform::DifferentiableVarForm::set_damping_coefficients ( double  psi,
double  phi 
)
virtual

Definition at line 210 of file DifferentiableVarForm.cpp.

References get_args(), and invalidate_after_parameter_update().

Here is the call graph for this function:

◆ set_dirichlet_boundary()

void polyfem::varform::DifferentiableVarForm::set_dirichlet_boundary ( int  boundary_id,
int  time_step,
const Eigen::VectorXd &  value 
)
virtual

Definition at line 226 of file DifferentiableVarForm.cpp.

References get_problem(), invalidate_after_parameter_update(), and polyfem::log_and_throw_error().

Here is the call graph for this function:

◆ set_dirichlet_nodes()

void polyfem::varform::DifferentiableVarForm::set_dirichlet_nodes ( const Eigen::VectorXi &  input_nodes,
const Eigen::MatrixXd &  values 
)
virtual

Definition at line 235 of file DifferentiableVarForm.cpp.

References get_problem(), invalidate_after_parameter_update(), polyfem::log_and_throw_error(), and primary_space().

Here is the call graph for this function:

◆ set_friction_coefficient()

void polyfem::varform::DifferentiableVarForm::set_friction_coefficient ( double  coefficient)
virtual

Definition at line 204 of file DifferentiableVarForm.cpp.

References get_args(), and invalidate_after_parameter_update().

Here is the call graph for this function:

◆ set_lame_parameters()

void polyfem::varform::DifferentiableVarForm::set_lame_parameters ( const Eigen::VectorXd &  lambda,
const Eigen::VectorXd &  mu 
)
virtual

Definition at line 196 of file DifferentiableVarForm.cpp.

References get_mesh(), invalidate_after_parameter_update(), polyfem::log_and_throw_error(), and primary_assembler().

Here is the call graph for this function:

◆ set_pressure_boundary()

void polyfem::varform::DifferentiableVarForm::set_pressure_boundary ( int  boundary_id,
int  time_step,
double  value 
)
virtual

Definition at line 244 of file DifferentiableVarForm.cpp.

References get_problem(), invalidate_after_parameter_update(), and polyfem::log_and_throw_error().

Here is the call graph for this function:

◆ set_vertex_positions()

void polyfem::varform::DifferentiableVarForm::set_vertex_positions ( const Eigen::MatrixXd &  vertices)

Definition at line 184 of file DifferentiableVarForm.cpp.

References polyfem::mesh::Mesh::dimension(), invalidate_after_geometry_update(), polyfem::log_and_throw_error(), mutable_mesh(), polyfem::mesh::Mesh::n_vertices(), and polyfem::mesh::Mesh::set_point().

Here is the call graph for this function:

◆ solve()

virtual void polyfem::varform::DifferentiableVarForm::solve ( Eigen::MatrixXd &  solution,
const InitialConditionOverride initial_condition_override,
const ForwardStepCallback post_step,
bool  differentiable 
)
pure virtual

Implemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, and polyfem::varform::DifferentiableScalarVarForm.

Referenced by polyfem::solver::AdjointOptUtils::solve_pde().

Here is the caller graph for this function:

◆ solve_data() [1/2]

virtual const solver::SolveData * polyfem::varform::DifferentiableVarForm::solve_data ( ) const
pure virtual

◆ solve_data() [2/2]


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