12#include <paraviewo/ParaviewWriter.hpp>
13#include <paraviewo/VTUWriter.hpp>
14#include <paraviewo/HDF5VTUWriter.hpp>
61 const bool is_mesh_linear,
62 const bool mesh_has_prisms,
63 const bool is_problem_scalar);
87 const std::vector<basis::ElementBases> &bases,
88 const std::vector<mesh::LocalBoundary> &total_local_boundary,
89 Eigen::MatrixXd &node_positions,
90 Eigen::MatrixXi &boundary_edges,
91 Eigen::MatrixXi &boundary_triangles,
92 std::vector<Eigen::Triplet<double>> &displacement_map_entries);
105 const std::vector<basis::ElementBases> &bases,
106 const std::vector<mesh::LocalBoundary> &total_local_boundary,
107 Eigen::MatrixXd &node_positions,
108 Eigen::MatrixXi &boundary_edges,
109 Eigen::MatrixXi &boundary_triangles,
110 std::vector<Eigen::Triplet<double>> &displacement_map_entries,
111 const int sampling_order = 0);
134 const bool is_time_dependent,
135 const double tend_in,
137 const ExportOptions &opts,
138 const std::string &vis_mesh_path)
const;
147 void save_vtu(
const std::string &path,
152 const ExportOptions &opts)
const;
157 void save_vtu(
const std::string &path,
162 const ExportOptions &opts,
163 paraviewo::VTMWriter &vtm,
164 const std::string &block_prefix)
const;
178 const ExportOptions &opts)
const;
192 const ExportOptions &opts)
const;
202 const std::string &export_surface,
207 const ExportOptions &opts)
const;
219 const ExportOptions &opts)
const;
227 const std::string &path,
230 const ExportOptions &opts)
const;
239 void save_pvd(
const std::string &name,
const std::function<std::string(
int)> &vtu_names,
240 int time_steps,
double t0,
double dt,
int skip_frame = 1)
const;
265 const std::vector<basis::ElementBases> &gbases,
266 const std::vector<mesh::LocalBoundary> &total_local_boundary,
267 Eigen::MatrixXd &boundary_vis_vertices,
268 Eigen::MatrixXd &boundary_vis_local_vertices,
269 Eigen::MatrixXi &boundary_vis_elements,
270 Eigen::MatrixXi &boundary_vis_elements_ids,
271 Eigen::MatrixXi &boundary_vis_primitive_ids,
272 Eigen::MatrixXd &boundary_vis_normals)
const;
290 const Eigen::VectorXi &disc_orders,
291 const std::vector<basis::ElementBases> &gbases,
292 const std::map<int, Eigen::MatrixXd> &polys,
293 const std::map<
int, std::pair<Eigen::MatrixXd, Eigen::MatrixXi>> &polys_3d,
294 const bool boundary_only,
295 Eigen::MatrixXd &points,
296 Eigen::MatrixXi &tets,
297 Eigen::MatrixXi &el_id,
298 Eigen::MatrixXd &discr,
299 Eigen::MatrixXd &local_points)
const;
313 const Eigen::VectorXi &output_orders,
314 const std::vector<basis::ElementBases> &bases,
315 Eigen::MatrixXd &points,
316 std::vector<paraviewo::CellElement> &elements,
317 Eigen::MatrixXi &el_id,
318 Eigen::MatrixXd &discr,
319 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