PolyFEM
Loading...
Searching...
No Matches
polyfem::io::CheckpointReader Class Reference

#include <Checkpoint.hpp>

Collaboration diagram for polyfem::io::CheckpointReader:
[legend]

Public Member Functions

 CheckpointReader (const std::filesystem::path &path)
 
const std::filesystem::path & path () const
 
const CheckpointMetadata & metadata () const
 
const json & config () const
 
const ResourceIO & resources () const
 
std::unique_ptr< mesh::Mesh > read_mesh (const std::string &path, bool non_conforming=false) const
 
Eigen::MatrixXd read_matrix (const std::string &path) const
 
Eigen::MatrixXi read_int_matrix (const std::string &path) const
 
std::vector< double > read_vector (const std::string &path) const
 
std::vector< int > read_int_vector (const std::string &path) const
 
std::vector< long > read_long_vector (const std::string &path) const
 
std::string read_string (const std::string &path) const
 
long read_long (const std::string &path) const
 
double read_double (const std::string &path) const
 
bool exists (const std::string &path) const
 

Private Attributes

std::filesystem::path path_
 
std::unique_ptr< const HDF5IO > io_
 
std::unique_ptr< const ResourceIO > resources_
 
json config_
 
CheckpointMetadata metadata_
 

Detailed Description

Definition at line 68 of file Checkpoint.hpp.

Constructor & Destructor Documentation

◆ CheckpointReader()

polyfem::io::CheckpointReader::CheckpointReader ( const std::filesystem::path &  path)
explicit

Member Function Documentation

◆ config()

const json & polyfem::io::CheckpointReader::config ( ) const
inline

Definition at line 75 of file Checkpoint.hpp.

References config_.

Referenced by forward_simulation(), polyfem::State::init(), and main().

Here is the caller graph for this function:

◆ exists()

bool polyfem::io::CheckpointReader::exists ( const std::string &  path) const
inline

Definition at line 87 of file Checkpoint.hpp.

References io_, and path().

Referenced by polyfem::time_integrator::ImplicitTimeIntegrator::deserialize_checkpoint(), polyfem::varform::VarForm::deserialize_checkpoint(), polyfem::varform::OperatorSplittingVarForm::deserialize_checkpoint(), and polyfem::varform::VarForm::reorder_checkpoint_block().

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

◆ metadata()

const CheckpointMetadata & polyfem::io::CheckpointReader::metadata ( ) const
inline

Definition at line 74 of file Checkpoint.hpp.

References metadata_.

Referenced by polyfem::varform::VarForm::deserialize_checkpoint().

Here is the caller graph for this function:

◆ path()

const std::filesystem::path & polyfem::io::CheckpointReader::path ( ) const
inline

Definition at line 73 of file Checkpoint.hpp.

References path_.

Referenced by exists(), read_double(), read_int_matrix(), read_int_vector(), read_long(), read_long_vector(), read_matrix(), read_mesh(), read_string(), and read_vector().

Here is the caller graph for this function:

◆ read_double()

double polyfem::io::CheckpointReader::read_double ( const std::string &  path) const

Definition at line 264 of file Checkpoint.cpp.

References io_, and path().

Referenced by CheckpointReader(), and polyfem::time_integrator::ImplicitTimeIntegrator::deserialize_checkpoint().

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

◆ read_int_matrix()

Eigen::MatrixXi polyfem::io::CheckpointReader::read_int_matrix ( const std::string &  path) const

Definition at line 258 of file Checkpoint.cpp.

References io_, and path().

Here is the call graph for this function:

◆ read_int_vector()

std::vector< int > polyfem::io::CheckpointReader::read_int_vector ( const std::string &  path) const

Definition at line 260 of file Checkpoint.cpp.

References io_, and path().

Referenced by polyfem::varform::VarForm::reorder_checkpoint_block().

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

◆ read_long()

long polyfem::io::CheckpointReader::read_long ( const std::string &  path) const

Definition at line 263 of file Checkpoint.cpp.

References io_, and path().

Referenced by CheckpointReader(), and polyfem::time_integrator::ImplicitTimeIntegrator::deserialize_checkpoint().

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

◆ read_long_vector()

std::vector< long > polyfem::io::CheckpointReader::read_long_vector ( const std::string &  path) const

Definition at line 261 of file Checkpoint.cpp.

References io_, and path().

Here is the call graph for this function:

◆ read_matrix()

Eigen::MatrixXd polyfem::io::CheckpointReader::read_matrix ( const std::string &  path) const

Definition at line 257 of file Checkpoint.cpp.

References io_, and path().

Referenced by polyfem::time_integrator::ImplicitTimeIntegrator::deserialize_checkpoint(), polyfem::varform::VarForm::deserialize_checkpoint(), and polyfem::varform::OperatorSplittingVarForm::deserialize_checkpoint().

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

◆ read_mesh()

std::unique_ptr< mesh::Mesh > polyfem::io::CheckpointReader::read_mesh ( const std::string &  path,
bool  non_conforming = false 
) const

Definition at line 266 of file Checkpoint.cpp.

References polyfem::mesh::MeshLoader::load_fem(), and path().

Here is the call graph for this function:

◆ read_string()

std::string polyfem::io::CheckpointReader::read_string ( const std::string &  path) const

Definition at line 262 of file Checkpoint.cpp.

References io_, and path().

Referenced by CheckpointReader().

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

◆ read_vector()

std::vector< double > polyfem::io::CheckpointReader::read_vector ( const std::string &  path) const

Definition at line 259 of file Checkpoint.cpp.

References io_, and path().

Here is the call graph for this function:

◆ resources()

const ResourceIO & polyfem::io::CheckpointReader::resources ( ) const
inline

Definition at line 76 of file Checkpoint.hpp.

References resources_.

Referenced by forward_simulation(), and polyfem::State::init().

Here is the caller graph for this function:

Member Data Documentation

◆ config_

json polyfem::io::CheckpointReader::config_
private

Definition at line 93 of file Checkpoint.hpp.

Referenced by CheckpointReader(), and config().

◆ io_

std::unique_ptr<const HDF5IO> polyfem::io::CheckpointReader::io_
private

◆ metadata_

CheckpointMetadata polyfem::io::CheckpointReader::metadata_
private

Definition at line 94 of file Checkpoint.hpp.

Referenced by CheckpointReader(), and metadata().

◆ path_

std::filesystem::path polyfem::io::CheckpointReader::path_
private

Definition at line 90 of file Checkpoint.hpp.

Referenced by CheckpointReader(), and path().

◆ resources_

std::unique_ptr<const ResourceIO> polyfem::io::CheckpointReader::resources_
private

Definition at line 92 of file Checkpoint.hpp.

Referenced by CheckpointReader(), and resources().


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