PolyFEM
Loading...
Searching...
No Matches
GeometryReader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <polyfem/Common.hpp>
8
9namespace polyfem::mesh
10{
20 std::unique_ptr<Mesh> read_fem_mesh(
21 const Units &units,
22 const json &j_mesh,
23 const std::string &root_path,
24 const bool non_conforming = false);
25
34 std::unique_ptr<Mesh> read_fem_geometry(
35 const Units &units,
36 const json &geometry,
37 const std::string &root_path,
38 const std::vector<std::string> &names = std::vector<std::string>(),
39 const std::vector<Eigen::MatrixXd> &vertices = std::vector<Eigen::MatrixXd>(),
40 const std::vector<Eigen::MatrixXi> &cells = std::vector<Eigen::MatrixXi>(),
41 const bool non_conforming = false);
42
54 const Units &units,
55 const json &j_mesh,
56 const std::string &root_path,
57 const int dim,
58 Eigen::MatrixXd &vertices,
59 Eigen::VectorXi &codim_vertices,
60 Eigen::MatrixXi &codim_edges,
61 Eigen::MatrixXi &faces);
62
74 const Units &units,
75 const json &geometry,
76 const std::vector<json> &displacements,
77 const std::vector<json> &dirichlets,
78 const std::string &root_path,
79 const int dim,
80 const std::vector<std::string> &names = std::vector<std::string>(),
81 const std::vector<Eigen::MatrixXd> &vertices = std::vector<Eigen::MatrixXd>(),
82 const std::vector<Eigen::MatrixXi> &cells = std::vector<Eigen::MatrixXi>(),
83 const bool non_conforming = false);
84
94 const double unit_scale,
95 const json &transform,
96 const VectorNd &mesh_dimensions,
97 MatrixNd &A,
98 VectorNd &b);
99
100} // namespace polyfem::mesh
std::vector< Eigen::VectorXi > faces
void read_obstacle_mesh(const Units &units, const json &j_mesh, const std::string &root_path, const int dim, Eigen::MatrixXd &vertices, Eigen::VectorXi &codim_vertices, Eigen::MatrixXi &codim_edges, Eigen::MatrixXi &faces)
read a obstacle mesh from a geometry JSON
void construct_affine_transformation(const double unit_scale, const json &transform, const VectorNd &mesh_dimensions, MatrixNd &A, VectorNd &b)
Construct an affine transformation .
Obstacle read_obstacle_geometry(const Units &units, const json &geometry, const std::vector< json > &displacements, const std::vector< json > &dirichlets, const std::string &root_path, const int dim, const std::vector< std::string > &_names, const std::vector< Eigen::MatrixXd > &_vertices, const std::vector< Eigen::MatrixXi > &_cells, const bool non_conforming)
read a FEM mesh from a geometry JSON
std::unique_ptr< Mesh > read_fem_geometry(const Units &units, const json &geometry, const std::string &root_path, const std::vector< std::string > &_names, const std::vector< Eigen::MatrixXd > &_vertices, const std::vector< Eigen::MatrixXi > &_cells, const bool non_conforming)
read FEM meshes from a geometry JSON array (or single)
std::unique_ptr< Mesh > read_fem_mesh(const Units &units, const json &j_mesh, const std::string &root_path, const bool non_conforming)
read a FEM mesh from a geometry JSON
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > VectorNd
Definition Types.hpp:11
nlohmann::json json
Definition Common.hpp:9
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 3, 3 > MatrixNd
Definition Types.hpp:14