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

Stateless format decoders used exclusively by MeshLoader and in-memory adapters. More...

#include <MeshReader.hpp>

Static Public Member Functions

static MeshData read_msh (const std::filesystem::path &path)
 
static MeshData read_hybrid (std::istream &input, const std::string &description)
 
static MeshData read_geogram (const std::filesystem::path &path)
 
static MeshData from_geogram (GEO::Mesh &mesh)
 
static SurfaceMeshData read_msh_surface (const std::filesystem::path &path)
 
static SurfaceMeshData read_obj_surface (const std::filesystem::path &path)
 
static bool read_triangle_surface (const std::filesystem::path &path, SurfaceMeshData &result)
 
static SurfaceMeshData read_geogram_surface (const std::filesystem::path &path)
 

Detailed Description

Stateless format decoders used exclusively by MeshLoader and in-memory adapters.

Definition at line 25 of file MeshReader.hpp.

Member Function Documentation

◆ from_geogram()

MeshData polyfem::mesh::MeshReader::from_geogram ( GEO::Mesh &  mesh)
static

Definition at line 197 of file MeshReader.cpp.

References polyfem::mesh::MeshData::cell_face_orientations, polyfem::mesh::MeshData::cell_faces, polyfem::mesh::MeshData::cell_is_hex, polyfem::mesh::MeshData::cell_kernel_points, faces, polyfem::mesh::MeshData::faces, polyfem::mesh::is_planar(), polyfem::log_and_throw_error(), and polyfem::mesh::MeshData::vertices.

Referenced by polyfem::legacy::State::load_mesh(), read_geogram(), and polyfem::State::set_mesh().

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

◆ read_geogram()

MeshData polyfem::mesh::MeshReader::read_geogram ( const std::filesystem::path &  path)
static

Definition at line 189 of file MeshReader.cpp.

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

Referenced by polyfem::mesh::MeshLoader::load_fem().

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

◆ read_geogram_surface()

SurfaceMeshData polyfem::mesh::MeshReader::read_geogram_surface ( const std::filesystem::path &  path)
static

Definition at line 316 of file MeshReader.cpp.

References polyfem::mesh::SurfaceMeshData::faces, polyfem::mesh::is_planar(), polyfem::log_and_throw_error(), and polyfem::mesh::SurfaceMeshData::vertices.

Referenced by polyfem::mesh::MeshLoader::load_surface().

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

◆ read_hybrid()

MeshData polyfem::mesh::MeshReader::read_hybrid ( std::istream &  input,
const std::string &  description 
)
static

Definition at line 88 of file MeshReader.cpp.

References 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::elements_are_ordered, faces, polyfem::mesh::MeshData::faces, and polyfem::log_and_throw_error().

Referenced by polyfem::mesh::MeshLoader::load_fem().

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

◆ read_msh()

MeshData polyfem::mesh::MeshReader::read_msh ( const std::filesystem::path &  path)
static

Definition at line 60 of file MeshReader.cpp.

References polyfem::mesh::MeshData::body_ids, polyfem::mesh::MeshData::boundary_elements, polyfem::mesh::MeshData::boundary_ids, polyfem::mesh::MeshData::dimension(), polyfem::mesh::MeshData::elements, polyfem::mesh::MeshData::higher_order_connectivity, polyfem::mesh::MeshData::higher_order_nodes, polyfem::mesh::MeshData::higher_order_weights, polyfem::io::MshReader::load(), polyfem::log_and_throw_error(), polyfem::mesh::MeshData::vertices, and weights.

Referenced by polyfem::mesh::MeshLoader::load_fem().

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

◆ read_msh_surface()

SurfaceMeshData polyfem::mesh::MeshReader::read_msh_surface ( const std::filesystem::path &  path)
static

Definition at line 266 of file MeshReader.cpp.

References polyfem::mesh::SurfaceMeshData::edges, polyfem::mesh::extract_triangle_surface_from_tets(), polyfem::mesh::SurfaceMeshData::faces, polyfem::io::MshReader::load(), polyfem::log_and_throw_error(), polyfem::mesh::SurfaceMeshData::points, polyfem::mesh::SurfaceMeshData::vertices, and weights.

Referenced by polyfem::mesh::MeshLoader::load_surface().

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

◆ read_obj_surface()

SurfaceMeshData polyfem::mesh::MeshReader::read_obj_surface ( const std::filesystem::path &  path)
static

Definition at line 296 of file MeshReader.cpp.

References polyfem::mesh::SurfaceMeshData::edges, polyfem::mesh::SurfaceMeshData::faces, polyfem::log_and_throw_error(), polyfem::io::OBJReader::read(), and polyfem::mesh::SurfaceMeshData::vertices.

Referenced by polyfem::mesh::MeshLoader::load_surface().

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

◆ read_triangle_surface()

bool polyfem::mesh::MeshReader::read_triangle_surface ( const std::filesystem::path &  path,
SurfaceMeshData &  result 
)
static

Definition at line 305 of file MeshReader.cpp.

References polyfem::mesh::SurfaceMeshData::faces, and polyfem::mesh::SurfaceMeshData::vertices.

Referenced by polyfem::mesh::MeshLoader::load_surface().

Here is the caller graph for this function:

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