12#include <paraviewo/ParaviewWriter.hpp>
13#include <paraviewo/VTUWriter.hpp>
14#include <paraviewo/HDF5VTUWriter.hpp>
54 const bool is_mesh_linear,
55 const bool mesh_has_prisms,
56 const bool is_problem_scalar);
80 const std::vector<basis::ElementBases> &bases,
81 const std::vector<mesh::LocalBoundary> &total_local_boundary,
82 Eigen::MatrixXd &node_positions,
83 Eigen::MatrixXi &boundary_edges,
84 Eigen::MatrixXi &boundary_triangles,
85 std::vector<Eigen::Triplet<double>> &displacement_map_entries);
108 const bool is_time_dependent,
109 const double tend_in,
111 const ExportOptions &opts,
112 const std::string &vis_mesh_path)
const;
121 void save_vtu(
const std::string &path,
126 const ExportOptions &opts)
const;
140 const ExportOptions &opts)
const;
154 const ExportOptions &opts)
const;
164 const std::string &export_surface,
169 const ExportOptions &opts)
const;
181 const ExportOptions &opts)
const;
189 const std::string &path,
192 const ExportOptions &opts)
const;
201 void save_pvd(
const std::string &name,
const std::function<std::string(
int)> &vtu_names,
202 int time_steps,
double t0,
double dt,
int skip_frame = 1)
const;
227 const std::vector<basis::ElementBases> &gbases,
228 const std::vector<mesh::LocalBoundary> &total_local_boundary,
229 Eigen::MatrixXd &boundary_vis_vertices,
230 Eigen::MatrixXd &boundary_vis_local_vertices,
231 Eigen::MatrixXi &boundary_vis_elements,
232 Eigen::MatrixXi &boundary_vis_elements_ids,
233 Eigen::MatrixXi &boundary_vis_primitive_ids,
234 Eigen::MatrixXd &boundary_vis_normals)
const;
252 const Eigen::VectorXi &disc_orders,
253 const std::vector<basis::ElementBases> &gbases,
254 const std::map<int, Eigen::MatrixXd> &polys,
255 const std::map<
int, std::pair<Eigen::MatrixXd, Eigen::MatrixXi>> &polys_3d,
256 const bool boundary_only,
257 Eigen::MatrixXd &points,
258 Eigen::MatrixXi &tets,
259 Eigen::MatrixXi &el_id,
260 Eigen::MatrixXd &discr,
261 Eigen::MatrixXd &local_points)
const;
275 const Eigen::VectorXi &output_orders,
276 const std::vector<basis::ElementBases> &bases,
277 Eigen::MatrixXd &points,
278 std::vector<paraviewo::CellElement> &elements,
279 Eigen::MatrixXi &el_id,
280 Eigen::MatrixXd &discr,
281 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
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