|
PolyFEM
|
#include <Checkpoint.hpp>
Classes | |
| class | Impl |
Public Member Functions | |
| CheckpointWriter (const std::filesystem::path &path, const json &config, const CheckpointMetadata &metadata) | |
| ~CheckpointWriter () | |
| CheckpointWriter (const CheckpointWriter &)=delete | |
| CheckpointWriter & | operator= (const CheckpointWriter &)=delete |
| void | write_matrix (const std::string &path, const Eigen::MatrixXd &value) |
| void | write_int_matrix (const std::string &path, const Eigen::MatrixXi &value) |
| void | write_bytes (const std::string &path, const std::vector< unsigned char > &value) |
| void | write_vector (const std::string &path, const std::vector< double > &value) |
| void | write_int_vector (const std::string &path, const std::vector< int > &value) |
| void | write_long_vector (const std::string &path, const std::vector< long > &value) |
| void | write_string (const std::string &path, const std::string &value) |
| void | write_long (const std::string &path, long value) |
| void | write_double (const std::string &path, double value) |
| void | write_attribute (const std::string &path, const std::string &name, long value) |
| void | write_attribute (const std::string &path, const std::string &name, const std::string &value) |
| void | write_mesh (const std::string &group, const mesh::Mesh &mesh) |
| void | write_mesh (const std::string &group, const mesh::MeshData &mesh) |
| void | embed_resources (const ResourceIO &resources) |
| void | finalize () |
Private Attributes | |
| std::unique_ptr< Impl > | impl_ |
| std::filesystem::path | path_ |
| std::filesystem::path | temporary_path_ |
| bool | finalized_ = false |
Definition at line 34 of file Checkpoint.hpp.
| polyfem::io::CheckpointWriter::CheckpointWriter | ( | const std::filesystem::path & | path, |
| const json & | config, | ||
| const CheckpointMetadata & | metadata | ||
| ) |
| polyfem::io::CheckpointWriter::~CheckpointWriter | ( | ) |
Definition at line 92 of file Checkpoint.cpp.
References finalized_, impl_, and temporary_path_.
|
delete |
| void polyfem::io::CheckpointWriter::embed_resources | ( | const ResourceIO & | resources | ) |
Definition at line 169 of file Checkpoint.cpp.
References polyfem::io::ResourceIO::accessed_resources(), polyfem::io::ResourceIO::canonical_path(), polyfem::io::ResourceIO::describe(), polyfem::io::ResourceIO::exists(), impl_, polyfem::io::ResourceIO::is_group(), polyfem::log_and_throw_error(), polyfem::io::ResourceIO::open(), write_bytes(), and write_string().
Referenced by polyfem::varform::VarForm::save_step_state().
| void polyfem::io::CheckpointWriter::finalize | ( | ) |
Definition at line 207 of file Checkpoint.cpp.
References finalized_, impl_, polyfem::log_and_throw_error(), path_, and temporary_path_.
Referenced by polyfem::varform::VarForm::save_step_state().
|
delete |
| void polyfem::io::CheckpointWriter::write_attribute | ( | const std::string & | path, |
| const std::string & | name, | ||
| const std::string & | value | ||
| ) |
Definition at line 112 of file Checkpoint.cpp.
References impl_.
| void polyfem::io::CheckpointWriter::write_attribute | ( | const std::string & | path, |
| const std::string & | name, | ||
| long | value | ||
| ) |
Definition at line 111 of file Checkpoint.cpp.
References impl_.
Referenced by write_mesh().
| void polyfem::io::CheckpointWriter::write_bytes | ( | const std::string & | path, |
| const std::vector< unsigned char > & | value | ||
| ) |
Definition at line 104 of file Checkpoint.cpp.
References impl_.
Referenced by embed_resources().
| void polyfem::io::CheckpointWriter::write_double | ( | const std::string & | path, |
| double | value | ||
| ) |
Definition at line 110 of file Checkpoint.cpp.
References impl_.
Referenced by polyfem::time_integrator::ImplicitTimeIntegrator::serialize_checkpoint().
| void polyfem::io::CheckpointWriter::write_int_matrix | ( | const std::string & | path, |
| const Eigen::MatrixXi & | value | ||
| ) |
Definition at line 103 of file Checkpoint.cpp.
References impl_.
Referenced by write_mesh().
| void polyfem::io::CheckpointWriter::write_int_vector | ( | const std::string & | path, |
| const std::vector< int > & | value | ||
| ) |
Definition at line 106 of file Checkpoint.cpp.
References impl_.
Referenced by polyfem::varform::VarForm::write_checkpoint_ordering(), and write_mesh().
| void polyfem::io::CheckpointWriter::write_long | ( | const std::string & | path, |
| long | value | ||
| ) |
Definition at line 109 of file Checkpoint.cpp.
References impl_.
Referenced by polyfem::time_integrator::ImplicitTimeIntegrator::serialize_checkpoint().
| void polyfem::io::CheckpointWriter::write_long_vector | ( | const std::string & | path, |
| const std::vector< long > & | value | ||
| ) |
Definition at line 107 of file Checkpoint.cpp.
References impl_.
Referenced by write_mesh().
| void polyfem::io::CheckpointWriter::write_matrix | ( | const std::string & | path, |
| const Eigen::MatrixXd & | value | ||
| ) |
Definition at line 102 of file Checkpoint.cpp.
References impl_.
Referenced by polyfem::varform::VarForm::serialize_checkpoint(), polyfem::varform::OperatorSplittingVarForm::serialize_checkpoint(), polyfem::time_integrator::ImplicitTimeIntegrator::serialize_checkpoint(), and write_mesh().
| void polyfem::io::CheckpointWriter::write_mesh | ( | const std::string & | group, |
| const mesh::Mesh & | mesh | ||
| ) |
Definition at line 114 of file Checkpoint.cpp.
References polyfem::mesh::Mesh::to_mesh_data(), and write_mesh().
Referenced by polyfem::varform::VarForm::save_step_state(), polyfem::varform::NavierStokesFSIVarForm::serialize_checkpoint(), and write_mesh().
| void polyfem::io::CheckpointWriter::write_mesh | ( | const std::string & | group, |
| const mesh::MeshData & | mesh | ||
| ) |
Definition at line 119 of file Checkpoint.cpp.
References polyfem::mesh::MeshData::body_ids, polyfem::mesh::MeshData::boundary_elements, polyfem::mesh::MeshData::boundary_ids, polyfem::mesh::MeshData::cell_face_orientations, polyfem::mesh::MeshData::cell_faces, polyfem::mesh::MeshData::cell_is_hex, polyfem::mesh::MeshData::cell_kernel_points, polyfem::mesh::MeshData::dimension(), polyfem::mesh::MeshData::elements, polyfem::mesh::MeshData::elements_are_ordered, faces, polyfem::mesh::MeshData::faces, polyfem::mesh::MeshData::geometry_ids, polyfem::mesh::MeshData::has_polyhedral_topology(), polyfem::mesh::MeshData::higher_order_connectivity, polyfem::mesh::MeshData::higher_order_nodes, polyfem::mesh::MeshData::higher_order_weights, polyfem::mesh::MESH_SCHEMA_VERSION, polyfem::mesh::MeshData::node_ids, polyfem::mesh::MeshData::validate(), polyfem::mesh::MeshData::vertices, write_attribute(), write_int_matrix(), write_int_vector(), write_long_vector(), write_matrix(), and write_vector().
| void polyfem::io::CheckpointWriter::write_string | ( | const std::string & | path, |
| const std::string & | value | ||
| ) |
Definition at line 108 of file Checkpoint.cpp.
References impl_.
Referenced by embed_resources().
| void polyfem::io::CheckpointWriter::write_vector | ( | const std::string & | path, |
| const std::vector< double > & | value | ||
| ) |
Definition at line 105 of file Checkpoint.cpp.
References impl_.
Referenced by write_mesh().
|
private |
Definition at line 65 of file Checkpoint.hpp.
Referenced by finalize(), and ~CheckpointWriter().
|
private |
Definition at line 62 of file Checkpoint.hpp.
Referenced by embed_resources(), finalize(), write_attribute(), write_attribute(), write_bytes(), write_double(), write_int_matrix(), write_int_vector(), write_long(), write_long_vector(), write_matrix(), write_string(), write_vector(), and ~CheckpointWriter().
|
private |
Definition at line 63 of file Checkpoint.hpp.
Referenced by finalize().
|
private |
Definition at line 64 of file Checkpoint.hpp.
Referenced by finalize(), and ~CheckpointWriter().