7 :
AdjointForm(variable_to_simulation), state_(state), dhat_(dhat), barrier_potential_(dhat)
12 [
this](
const std::string &p) { return this->state_.resolve_input_path(p); },
52 if ((
V1 -
V0).lpNorm<Eigen::Infinity>() == 0.0)
55 bool is_valid = ipc::is_step_collision_free(
70 double max_step = ipc::compute_collision_free_stepsize(
81 static Eigen::MatrixXd cached_displaced_surface;
82 if (cached_displaced_surface.size() == displaced_surface.size() && cached_displaced_surface == displaced_surface)
87 cached_displaced_surface = displaced_surface;
92 Eigen::VectorXd X =
X_init;
98 :
AdjointForm(variable_to_simulation), state_(state), dhat_(dhat), barrier_potential_(dhat)
106 [
this](
const std::string &p) { return this->state_.resolve_input_path(p); },
175 static Eigen::MatrixXd cached_displaced_surface;
176 if (cached_displaced_surface.size() == displaced_surface.size() && cached_displaced_surface == displaced_surface)
181 cached_displaced_surface = displaced_surface;
186 Eigen::VectorXd X =
X_init;
main class that contains the polyfem solver and all its state
void get_vertices(Eigen::MatrixXd &vertices) const
int n_bases
number of bases
const std::vector< basis::ElementBases > & geom_bases() const
Get a constant reference to the geometry mapping bases.
Eigen::VectorXi in_node_to_node
Inpute nodes (including high-order) to polyfem nodes, only for isoparametric.
mesh::Obstacle obstacle
Obstacles used in collisions.
std::unique_ptr< mesh::Mesh > mesh
current mesh, it can be a Mesh2D or Mesh3D
json args
main input arguments containing all defaults
solver::DiffCache diff_cached
int n_geom_bases
number of geometric bases
std::vector< mesh::LocalBoundary > total_local_boundary
mapping from elements to nodes for all mesh
void build_collision_mesh()
extracts the boundary mesh for collision, called in build_basis
Eigen::VectorXd u(int step) const
A collection of VariableToSimulation.
void compute_state_variable(const ParameterType type, const State *state_ptr, const Eigen::VectorXd &x, Eigen::VectorXd &state_variable) const
Evaluate the variable to simulations and overwrite the state_variable based on x.
Eigen::VectorXd apply_parametrization_jacobian(const ParameterType type, const State *state_ptr, const Eigen::VectorXd &x, const std::function< Eigen::VectorXd()> &grad) const
Maps the partial gradient wrt.
Eigen::MatrixXd unflatten(const Eigen::VectorXd &x, int dim)
Unflatten rowwises, so every dim elements in x become a row.
Eigen::VectorXd flatten(const Eigen::MatrixXd &X)
Flatten rowwises.
void log_and_throw_adjoint_error(const std::string &msg)