PolyFEM
Loading...
Searching...
No Matches
polyfem::mesh::MeshLoader Class Reference

The only non-legacy decoder from a logical resource path to mesh data. More...

#include <MeshLoader.hpp>

Collaboration diagram for polyfem::mesh::MeshLoader:
[legend]

Public Member Functions

 MeshLoader (const io::ResourceIO &resources)
 
std::unique_ptr< Mesh > load_fem (const std::string &path, bool non_conforming=false) const
 
SurfaceMesh load_surface (const std::string &path) const
 

Private Member Functions

void validate_group (const std::string &group, const std::string &expected_type) const
 

Private Attributes

const io::ResourceIO & resources_
 

Detailed Description

The only non-legacy decoder from a logical resource path to mesh data.

Definition at line 15 of file MeshLoader.hpp.

Constructor & Destructor Documentation

◆ MeshLoader()

polyfem::mesh::MeshLoader::MeshLoader ( const io::ResourceIO &  resources)
inlineexplicit

Definition at line 18 of file MeshLoader.hpp.

Member Function Documentation

◆ load_fem()

◆ load_surface()

◆ validate_group()

void polyfem::mesh::MeshLoader::validate_group ( const std::string &  group,
const std::string &  expected_type 
) const
private

Definition at line 54 of file MeshLoader.cpp.

References polyfem::io::ResourceIO::describe(), polyfem::io::ResourceIO::exists(), polyfem::io::ResourceIO::has_attribute(), polyfem::log_and_throw_error(), polyfem::mesh::MESH_SCHEMA_VERSION, polyfem::io::ResourceIO::read_integer_attribute(), polyfem::io::ResourceIO::read_string_attribute(), and resources_.

Referenced by load_fem(), and load_surface().

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

Member Data Documentation

◆ resources_

const io::ResourceIO& polyfem::mesh::MeshLoader::resources_
private

Definition at line 26 of file MeshLoader.hpp.

Referenced by load_fem(), load_surface(), and validate_group().


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