12#include <paraviewo/ParaviewWriter.hpp>
13#include <paraviewo/VTUWriter.hpp>
14#include <paraviewo/HDF5VTUWriter.hpp>
59 const bool is_mesh_linear,
60 const bool mesh_has_prisms,
61 const bool is_problem_scalar);
85 const std::vector<basis::ElementBases> &bases,
86 const std::vector<mesh::LocalBoundary> &total_local_boundary,
87 Eigen::MatrixXd &node_positions,
88 Eigen::MatrixXi &boundary_edges,
89 Eigen::MatrixXi &boundary_triangles,
90 std::vector<Eigen::Triplet<double>> &displacement_map_entries);
103 const std::vector<basis::ElementBases> &bases,
104 const std::vector<mesh::LocalBoundary> &total_local_boundary,
105 Eigen::MatrixXd &node_positions,
106 Eigen::MatrixXi &boundary_edges,
107 Eigen::MatrixXi &boundary_triangles,
108 std::vector<Eigen::Triplet<double>> &displacement_map_entries,
109 const int sampling_order = 0);
132 const bool is_time_dependent,
133 const double tend_in,
135 const ExportOptions &opts,
136 const std::string &vis_mesh_path)
const;
145 void save_vtu(
const std::string &path,
150 const ExportOptions &opts)
const;
155 void save_vtu(
const std::string &path,
160 const ExportOptions &opts,
161 paraviewo::VTMWriter &vtm,
162 const std::string &block_prefix)
const;
176 const ExportOptions &opts)
const;
190 const ExportOptions &opts)
const;
200 const std::string &export_surface,
205 const ExportOptions &opts)
const;
217 const ExportOptions &opts)
const;
225 const std::string &path,
228 const ExportOptions &opts)
const;
237 void save_pvd(
const std::string &name,
const std::function<std::string(
int)> &vtu_names,
238 int time_steps,
double t0,
double dt,
int skip_frame = 1)
const;
263 const std::vector<basis::ElementBases> &gbases,
264 const std::vector<mesh::LocalBoundary> &total_local_boundary,
265 Eigen::MatrixXd &boundary_vis_vertices,
266 Eigen::MatrixXd &boundary_vis_local_vertices,
267 Eigen::MatrixXi &boundary_vis_elements,
268 Eigen::MatrixXi &boundary_vis_elements_ids,
269 Eigen::MatrixXi &boundary_vis_primitive_ids,
270 Eigen::MatrixXd &boundary_vis_normals)
const;
288 const Eigen::VectorXi &disc_orders,
289 const std::vector<basis::ElementBases> &gbases,
290 const std::map<int, Eigen::MatrixXd> &polys,
291 const std::map<
int, std::pair<Eigen::MatrixXd, Eigen::MatrixXi>> &polys_3d,
292 const bool boundary_only,
293 Eigen::MatrixXd &points,
294 Eigen::MatrixXi &tets,
295 Eigen::MatrixXi &el_id,
296 Eigen::MatrixXd &discr,
297 Eigen::MatrixXd &local_points)
const;
311 const Eigen::VectorXi &output_orders,
312 const std::vector<basis::ElementBases> &bases,
313 Eigen::MatrixXd &points,
314 std::vector<paraviewo::CellElement> &elements,
315 Eigen::MatrixXi &el_id,
316 Eigen::MatrixXd &discr,
317 Eigen::MatrixXd &local_points)
const;
Utilies related to export of geometry.
void build_vis_boundary_mesh(const mesh::Mesh &mesh, const std::vector< basis::ElementBases > &gbases, const std::vector< mesh::LocalBoundary > &total_local_boundary, Eigen::MatrixXd &boundary_vis_vertices, Eigen::MatrixXd &boundary_vis_local_vertices, Eigen::MatrixXi &boundary_vis_elements, Eigen::MatrixXi &boundary_vis_elements_ids, Eigen::MatrixXi &boundary_vis_primitive_ids, Eigen::MatrixXd &boundary_vis_normals) const
builds the boundary mesh for visualization
Eigen::MatrixXd grid_points_bc
grid mesh boundaries
void build_high_order_vis_mesh(const mesh::Mesh &mesh, const Eigen::VectorXi &output_orders, const std::vector< basis::ElementBases > &bases, Eigen::MatrixXd &points, std::vector< paraviewo::CellElement > &elements, Eigen::MatrixXi &el_id, Eigen::MatrixXd &discr, Eigen::MatrixXd &local_points) const
builds high-der visualzation mesh per element all disconnected it also retuns the mapping to element ...
Eigen::MatrixXd grid_points
grid mesh points to export solution sampled on a grid
static void extract_boundary_mesh_sampled(const mesh::Mesh &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< mesh::LocalBoundary > &total_local_boundary, Eigen::MatrixXd &node_positions, Eigen::MatrixXi &boundary_edges, Eigen::MatrixXi &boundary_triangles, std::vector< Eigen::Triplet< double > > &displacement_map_entries, const int sampling_order=0)
extracts a collision proxy sampling every boundary face on a uniform lattice of the globally maximal ...
void save_volume(const std::string &path, const OutputSpace &space, const OutputFieldFunction &output_fields, const double t, const double dt, const ExportOptions &opts) const
saves the volume vtu file
void build_vis_mesh(const mesh::Mesh &mesh, const Eigen::VectorXi &disc_orders, const std::vector< basis::ElementBases > &gbases, const std::map< int, Eigen::MatrixXd > &polys, const std::map< int, std::pair< Eigen::MatrixXd, Eigen::MatrixXi > > &polys_3d, const bool boundary_only, Eigen::MatrixXd &points, Eigen::MatrixXi &tets, Eigen::MatrixXi &el_id, Eigen::MatrixXd &discr, Eigen::MatrixXd &local_points) const
builds visualzation mesh, upsampled mesh used for visualization the visualization mesh is a dense mes...
void build_grid(const polyfem::mesh::Mesh &mesh, const double spacing)
builds the grid to export the solution
void save_wire(const std::string &name, const OutputSpace &space, const OutputFieldFunction &output_fields, const double t, const ExportOptions &opts) const
saves the wireframe
static void extract_boundary_mesh(const mesh::Mesh &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< mesh::LocalBoundary > &total_local_boundary, Eigen::MatrixXd &node_positions, Eigen::MatrixXi &boundary_edges, Eigen::MatrixXi &boundary_triangles, std::vector< Eigen::Triplet< double > > &displacement_map_entries)
extracts the boundary mesh
void save_pvd(const std::string &name, const std::function< std::string(int)> &vtu_names, int time_steps, double t0, double dt, int skip_frame=1) const
save a PVD of a time dependent simulation
void save_contact_surface(const std::string &export_surface, const OutputSpace &space, const OutputFieldFunction &output_fields, const double t, const double dt_in, const ExportOptions &opts) const
saves the surface vtu file for for constact quantites, eg contact or friction forces
void export_data(const OutputSpace &space, const OutputFieldFunction &output_fields, const bool is_time_dependent, const double tend_in, const double dt, const ExportOptions &opts, const std::string &vis_mesh_path) const
exports everytihng, txt, vtu, etc
void save_points(const std::string &path, const OutputSpace &space, const OutputFieldFunction &output_fields, const ExportOptions &opts) const
saves the nodal values
void save_vtu(const std::string &path, const OutputSpace &space, const OutputFieldFunction &output_fields, const double t, const double dt, const ExportOptions &opts) const
saves the vtu file for time t
void init_sampler(const polyfem::mesh::Mesh &mesh, const double vismesh_rel_area)
unitalize the ref element sampler
void save_surface(const std::string &export_surface, const OutputSpace &space, const OutputFieldFunction &output_fields, const double t, const double dt_in, const ExportOptions &opts) const
saves the surface vtu file for for surface quantites, eg traction forces
Eigen::MatrixXi grid_points_to_elements
grid mesh mapping to fe elements
utils::RefElementSampler ref_element_sampler
used to sample the solution
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes.
std::function< std::vector< OutputField >(const OutputSample &)> OutputFieldFunction
bool tangential_adhesion_forces
std::string file_extension() const
return the extension of the output paraview files depending on use_hdf5
std::vector< std::string > fields
bool discretization_order
bool normal_adhesion_forces
bool export_field(const std::string &field) const