PolyFEM
|
Utilies related to export of geometry. More...
#include <OutData.hpp>
Classes | |
struct | ExportOptions |
different export flags More... | |
Public Member Functions | |
void | init_sampler (const polyfem::mesh::Mesh &mesh, const double vismesh_rel_area) |
unitalize the ref element sampler | |
void | build_grid (const polyfem::mesh::Mesh &mesh, const double spacing) |
builds the grid to export the solution | |
void | export_data (const State &state, const Eigen::MatrixXd &sol, const Eigen::MatrixXd &pressure, const bool is_time_dependent, const double tend_in, const double dt, const ExportOptions &opts, const std::string &vis_mesh_path, const std::string &nodes_path, const std::string &solution_path, const std::string &stress_path, const std::string &mises_path, const bool is_contact_enabled, std::vector< SolutionFrame > &solution_frames) const |
exports everytihng, txt, vtu, etc | |
void | save_vtu (const std::string &path, const State &state, const Eigen::MatrixXd &sol, const Eigen::MatrixXd &pressure, const double t, const double dt, const ExportOptions &opts, const bool is_contact_enabled, std::vector< SolutionFrame > &solution_frames) const |
saves the vtu file for time t | |
void | save_volume (const std::string &path, const State &state, const Eigen::MatrixXd &sol, const Eigen::MatrixXd &pressure, const double t, const double dt, const ExportOptions &opts, std::vector< SolutionFrame > &solution_frames) const |
saves the volume vtu file | |
void | save_surface (const std::string &export_surface, const State &state, const Eigen::MatrixXd &sol, const Eigen::MatrixXd &pressure, const double t, const double dt_in, const ExportOptions &opts, const bool is_contact_enabled, std::vector< SolutionFrame > &solution_frames) const |
saves the surface vtu file for for surface quantites, eg traction forces | |
void | save_contact_surface (const std::string &export_surface, const State &state, const Eigen::MatrixXd &sol, const Eigen::MatrixXd &pressure, const double t, const double dt_in, const ExportOptions &opts, const bool is_contact_enabled, std::vector< SolutionFrame > &solution_frames) const |
saves the surface vtu file for for constact quantites, eg contact or friction forces | |
void | save_wire (const std::string &name, const State &state, const Eigen::MatrixXd &sol, const double t, const ExportOptions &opts, std::vector< SolutionFrame > &solution_frames) const |
saves the wireframe | |
void | save_points (const std::string &path, const State &state, const Eigen::MatrixXd &sol, const ExportOptions &opts, std::vector< SolutionFrame > &solution_frames) const |
saves the nodal values | |
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 | |
Static Public Member Functions | |
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 | |
Private Member Functions | |
void | build_vis_boundary_mesh (const mesh::Mesh &mesh, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const std::vector< mesh::LocalBoundary > &total_local_boundary, const Eigen::MatrixXd &solution, const int problem_dim, 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, Eigen::MatrixXd &displaced_boundary_vis_normals) const |
builds the boundary mesh for visualization | |
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) const |
builds visualzation mesh, upsampled mesh used for visualization the visualization mesh is a dense mesh per element all disconnected it also retuns the mapping to element id and discretization of every elment works in 2 and 3d. | |
void | build_high_order_vis_mesh (const mesh::Mesh &mesh, const Eigen::VectorXi &disc_orders, const std::vector< basis::ElementBases > &bases, Eigen::MatrixXd &points, std::vector< std::vector< int > > &elements, Eigen::MatrixXi &el_id, Eigen::MatrixXd &discr) const |
builds high-der visualzation mesh per element all disconnected it also retuns the mapping to element id and discretization of every elment works in 2 and 3d. | |
void | save_volume_vector_field (const State &state, const Eigen::MatrixXd &points, const ExportOptions &opts, const std::string &name, const Eigen::VectorXd &field, paraviewo::ParaviewWriter &writer) const |
Private Attributes | |
utils::RefElementSampler | ref_element_sampler |
used to sample the solution | |
Eigen::MatrixXd | grid_points |
grid mesh points to export solution sampled on a grid | |
Eigen::MatrixXi | grid_points_to_elements |
grid mesh mapping to fe elements | |
Eigen::MatrixXd | grid_points_bc |
grid mesh boundaries | |
Utilies related to export of geometry.
Definition at line 44 of file OutData.hpp.
void polyfem::io::OutGeometryData::build_grid | ( | const polyfem::mesh::Mesh & | mesh, |
const double | spacing | ||
) |
builds the grid to export the solution
[in] | mesh | mesh |
[in] | spacing | grid spacing, <=0 mean no grid |
Definition at line 2319 of file OutData.cpp.
References polyfem::mesh::Mesh::barycentric_coords(), polyfem::mesh::Mesh::bounding_box(), polyfem::mesh::Mesh::elements_boxes(), grid_points, grid_points_bc, grid_points_to_elements, polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh::is_volume(), polyfem::logger(), x, y, and z.
Referenced by polyfem::State::build_basis().
|
private |
builds high-der visualzation mesh per element all disconnected it also retuns the mapping to element id and discretization of every elment works in 2 and 3d.
if the mesh is not simplicial it gets tri/tet halized
[in] | mesh | mesh |
[in] | disc_orders | discretization orders |
[in] | bases | bases |
[out] | points | mesh points |
[out] | elements | mesh high-order cells |
[out] | el_id | mapping from points to elements id |
[out] | discr | mapping from points to discretization order |
Definition at line 788 of file OutData.cpp.
References polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::is_cube(), polyfem::mesh::Mesh::is_linear(), polyfem::mesh::Mesh::is_polytope(), polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh::is_volume(), polyfem::logger(), polyfem::mesh::Mesh::n_face_vertices(), polyfem::autogen::p_nodes_2d(), polyfem::autogen::p_nodes_3d(), polyfem::autogen::q_nodes_2d(), and polyfem::autogen::q_nodes_3d().
Referenced by save_volume().
|
private |
builds the boundary mesh for visualization
[in] | mesh | mesh |
[in] | bases | bases |
[in] | gbases | geometric bases |
[in] | total_local_boundary | boundaries |
[in] | solution | solution |
[in] | problem_dim | dimension of the problem |
[out] | boundary_vis_vertices | boundary visualization mesh vertices |
[out] | boundary_vis_local_vertices | boundary visualization mesh vertices pre image in ref element |
[out] | boundary_vis_elements | boundary visualization mesh connectivity |
[out] | boundary_vis_elements_ids | boundary visualization mesh elements ids |
[out] | boundary_vis_primitive_ids | boundary visualization mesh edge/face id |
[out] | boundary_vis_normals | boundary visualization mesh normals |
[out] | displaced_boundary_vis_normals | boundary visualization mesh normals after displacement is applied |
Definition at line 397 of file OutData.cpp.
References polyfem::mesh::Mesh::is_volume(), polyfem::utils::BoundarySampler::normal_for_polygon_edge(), polyfem::utils::BoundarySampler::normal_for_quad_edge(), polyfem::utils::BoundarySampler::normal_for_quad_face(), polyfem::utils::BoundarySampler::normal_for_tri_edge(), polyfem::utils::BoundarySampler::normal_for_tri_face(), polyfem::utils::RefElementSampler::num_samples(), ref_element_sampler, polyfem::utils::BoundarySampler::sample_parametric_quad_edge(), polyfem::utils::BoundarySampler::sample_parametric_quad_face(), polyfem::utils::BoundarySampler::sample_parametric_tri_edge(), polyfem::utils::BoundarySampler::sample_parametric_tri_face(), polyfem::utils::BoundarySampler::sample_polygon_edge(), and vals.
Referenced by save_surface().
|
private |
builds visualzation mesh, upsampled mesh used for visualization the visualization mesh is a dense mesh per element all disconnected it also retuns the mapping to element id and discretization of every elment works in 2 and 3d.
if the mesh is not simplicial it gets tri/tet halized
[in] | mesh | mesh |
[in] | disc_orders | discretization orders |
[in] | gbases | geometric bases |
[in] | polys | polygons |
[in] | polys_3d | polyhedra |
[in] | boundary_only | is build only elements touching the boundary |
[out] | points | mesh points |
[out] | tets | mesh cells |
[out] | el_id | mapping from points to elements id |
[out] | discr | mapping from points to discretization order |
Definition at line 645 of file OutData.cpp.
References polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::is_boundary_element(), polyfem::mesh::Mesh::is_cube(), polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh::is_volume(), ref_element_sampler, and polyfem::utils::RefElementSampler::simplex_volume().
Referenced by save_volume().
void polyfem::io::OutGeometryData::export_data | ( | const State & | state, |
const Eigen::MatrixXd & | sol, | ||
const Eigen::MatrixXd & | pressure, | ||
const bool | is_time_dependent, | ||
const double | tend_in, | ||
const double | dt, | ||
const ExportOptions & | opts, | ||
const std::string & | vis_mesh_path, | ||
const std::string & | nodes_path, | ||
const std::string & | solution_path, | ||
const std::string & | stress_path, | ||
const std::string & | mises_path, | ||
const bool | is_contact_enabled, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
exports everytihng, txt, vtu, etc
[in] | state | state to get the data |
[in] | sol | solution |
[in] | pressure | pressure |
[in] | is_time_dependent | if the sim is time dependent |
[in] | tend_in | end time |
[in] | dt | delta t |
[in] | opts | export options |
[in] | vis_mesh_path | vtu path |
[in] | nodes_path | path to save nodes |
[in] | solution_path | path to save solution |
[in] | stress_path | path to save stress tensor |
[in] | mises_path | path to save von mises stresses |
[in] | is_contact_enabled | if contact is enabled |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 940 of file OutData.cpp.
References polyfem::State::assembler, polyfem::State::bases, polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::mesh::Mesh::dimension(), polyfem::State::disc_orders, polyfem::State::geom_bases(), polyfem::State::in_node_to_node, polyfem::assembler::Problem::is_scalar(), polyfem::logger(), polyfem::State::mesh, polyfem::State::n_bases, polyfem::State::problem, polyfem::io::OutGeometryData::ExportOptions::reorder_output, polyfem::State::rhs, save_vtu(), and polyfem::utils::unflatten().
Referenced by polyfem::State::export_data().
|
static |
extracts the boundary mesh
[in] | mesh | mesh |
[in] | n_bases | number of bases |
[in] | bases | bases |
[in] | total_local_boundary | mesh boundaries |
[out] | node_positions | nodes positions |
[out] | boundary_edges | edges |
[out] | boundary_triangles | triangles |
[out] | displacement_map | map of collision mesh vertices to nodes, empty if identity |
Definition at line 145 of file OutData.cpp.
References polyfem::basis::ElementBases::bases, polyfem::basis::Basis::global(), polyfem::mesh::Mesh::has_poly(), polyfem::mesh::Mesh::is_conforming(), polyfem::mesh::Mesh::is_cube(), polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh::is_simplicial(), polyfem::mesh::Mesh::is_volume(), polyfem::basis::ElementBases::local_nodes_for_primitive(), polyfem::logger(), and polyfem::mesh::Mesh::n_faces().
Referenced by polyfem::solver::LayerThicknessForm::build_collision_mesh(), polyfem::solver::ProxyContactForceForm::build_collision_mesh(), and polyfem::State::build_collision_mesh().
void polyfem::io::OutGeometryData::init_sampler | ( | const polyfem::mesh::Mesh & | mesh, |
const double | vismesh_rel_area | ||
) |
unitalize the ref element sampler
[in] | mesh | mesh |
[in] | vismesh_rel_area | relative sampling size |
Definition at line 2314 of file OutData.cpp.
References polyfem::utils::RefElementSampler::init(), polyfem::mesh::Mesh::is_volume(), polyfem::mesh::Mesh::n_elements(), and ref_element_sampler.
Referenced by polyfem::State::load_mesh(), and polyfem::State::load_mesh().
void polyfem::io::OutGeometryData::save_contact_surface | ( | const std::string & | export_surface, |
const State & | state, | ||
const Eigen::MatrixXd & | sol, | ||
const Eigen::MatrixXd & | pressure, | ||
const double | t, | ||
const double | dt_in, | ||
const ExportOptions & | opts, | ||
const bool | is_contact_enabled, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
saves the surface vtu file for for constact quantites, eg contact or friction forces
[in] | export_surface | filename |
[in] | state | state to get the data |
[in] | sol | solution |
[in] | pressure | pressure |
[in] | t | time |
[in] | dt_in | delta_t |
[in] | opts | export options |
[in] | is_contact_enabled | if contact is enabled |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 1968 of file OutData.cpp.
References polyfem::State::args, polyfem::State::collision_mesh, polyfem::io::OutGeometryData::ExportOptions::contact_forces, polyfem::solver::SolveData::contact_form, polyfem::mesh::Mesh::dimension(), polyfem::io::OutGeometryData::ExportOptions::friction_forces, polyfem::solver::SolveData::friction_form, polyfem::State::mesh, polyfem::State::solve_data, polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, polyfem::solver::SolveData::time_integrator, polyfem::utils::unflatten(), and polyfem::io::OutGeometryData::ExportOptions::use_hdf5.
Referenced by save_vtu().
void polyfem::io::OutGeometryData::save_points | ( | const std::string & | path, |
const State & | state, | ||
const Eigen::MatrixXd & | sol, | ||
const ExportOptions & | opts, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
saves the nodal values
[in] | path | filename |
[in] | state | state to get the data |
[in] | sol | solution |
[in] | opts | export options |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 2250 of file OutData.cpp.
References polyfem::mesh::Mesh::dimension(), polyfem::State::dirichlet_nodes, polyfem::State::dirichlet_nodes_position, polyfem::mesh::Mesh::get_node_id(), polyfem::assembler::Problem::is_scalar(), polyfem::State::mesh, polyfem::State::problem, polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, and polyfem::io::OutGeometryData::ExportOptions::use_hdf5.
Referenced by save_vtu().
void polyfem::io::OutGeometryData::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
[in] | name | filename |
[in] | vtu_names | names of the vtu files |
[in] | time_steps | total time stesp |
[in] | t0 | initial time |
[in] | dt | delta t |
[in] | skip_frame | every which frame to skip |
Definition at line 2306 of file OutData.cpp.
Referenced by polyfem::State::save_timestep().
void polyfem::io::OutGeometryData::save_surface | ( | const std::string & | export_surface, |
const State & | state, | ||
const Eigen::MatrixXd & | sol, | ||
const Eigen::MatrixXd & | pressure, | ||
const double | t, | ||
const double | dt_in, | ||
const ExportOptions & | opts, | ||
const bool | is_contact_enabled, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
saves the surface vtu file for for surface quantites, eg traction forces
[in] | export_surface | filename |
[in] | state | state to get the data |
[in] | sol | solution |
[in] | pressure | pressure |
[in] | t | time |
[in] | dt_in | delta_t |
[in] | opts | export options |
[in] | is_contact_enabled | if contact is enabled |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 1769 of file OutData.cpp.
References polyfem::State::assembler, polyfem::State::bases, polyfem::io::OutGeometryData::ExportOptions::body_ids, build_vis_boundary_mesh(), polyfem::assembler::Assembler::compute_tensor_value(), polyfem::mesh::Mesh::dimension(), polyfem::State::disc_orders, polyfem::mesh::Mesh::edge_length(), polyfem::State::geom_bases(), polyfem::mesh::Mesh::get_body_id(), polyfem::mesh::Mesh::get_boundary_id(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::mesh::Mesh::is_cube(), polyfem::assembler::Problem::is_scalar(), polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh::is_volume(), polyfem::State::mass_matrix_assembler, polyfem::io::OutGeometryData::ExportOptions::material_params, polyfem::State::mesh, polyfem::State::mixed_assembler, polyfem::assembler::Assembler::parameters(), polyfem::State::pressure_bases, polyfem::State::problem, polyfem::mesh::Mesh::quad_area(), polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, polyfem::State::total_local_boundary, polyfem::mesh::Mesh::tri_area(), and polyfem::io::OutGeometryData::ExportOptions::use_hdf5.
Referenced by save_vtu().
void polyfem::io::OutGeometryData::save_volume | ( | const std::string & | path, |
const State & | state, | ||
const Eigen::MatrixXd & | sol, | ||
const Eigen::MatrixXd & | pressure, | ||
const double | t, | ||
const double | dt, | ||
const ExportOptions & | opts, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
saves the volume vtu file
[in] | path | filename |
[in] | state | state to get the data |
[in] | sol | solution |
[in] | pressure | pressure |
[in] | t | time |
[in] | dt | delta t |
[in] | opts | export options |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 1196 of file OutData.cpp.
References polyfem::io::OutGeometryData::ExportOptions::acceleration, polyfem::utils::append_rows_of_zeros(), polyfem::State::ass_vals_cache, polyfem::State::assembler, polyfem::io::Evaluator::average_grad_based_function(), polyfem::State::bases, polyfem::io::OutGeometryData::ExportOptions::body_ids, polyfem::io::OutGeometryData::ExportOptions::boundary_only, build_high_order_vis_mesh(), build_vis_mesh(), polyfem::assembler::ElementAssemblyValues::compute(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::mesh::Mesh::dimension(), polyfem::State::disc_orders, polyfem::io::OutGeometryData::ExportOptions::discretization_order, polyfem::assembler::Problem::exact(), polyfem::io::OutGeometryData::ExportOptions::forces, polyfem::State::geom_bases(), polyfem::mesh::Mesh::get_body_id(), polyfem::mesh::Obstacle::get_edge_connectivity(), polyfem::mesh::Obstacle::get_face_connectivity(), polyfem::mesh::Obstacle::get_vertex_connectivity(), grid_points, grid_points_bc, grid_points_to_elements, polyfem::assembler::Problem::has_exact_sol(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::Evaluator::interpolate_function(), polyfem::mesh::Mesh::is_cube(), polyfem::assembler::Problem::is_scalar(), polyfem::mesh::Mesh::is_simplex(), polyfem::assembler::Problem::is_time_dependent(), polyfem::mesh::Mesh::is_volume(), polyfem::State::mass_matrix_assembler, polyfem::io::OutGeometryData::ExportOptions::material_params, polyfem::State::mesh, polyfem::State::mixed_assembler, polyfem::State::n_bases, polyfem::mesh::Mesh::n_face_vertices(), polyfem::mesh::Obstacle::n_vertices(), polyfem::solver::SolveData::named_forms(), polyfem::mesh::Obstacle::ndof(), polyfem::io::OutGeometryData::ExportOptions::nodes, polyfem::State::obstacle, polyfem::autogen::p_nodes_2d(), polyfem::autogen::p_nodes_3d(), polyfem::assembler::Assembler::parameters(), polyfem::State::polys, polyfem::State::polys_3d, polyfem::State::pressure_bases, polyfem::State::problem, polyfem::autogen::q_nodes_2d(), polyfem::autogen::q_nodes_3d(), ref_element_sampler, save_volume_vector_field(), polyfem::io::OutGeometryData::ExportOptions::scalar_values, polyfem::io::OutGeometryData::ExportOptions::sol_on_grid, polyfem::State::solve_data, polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, polyfem::io::OutGeometryData::ExportOptions::tensor_values, polyfem::solver::SolveData::time_integrator, polyfem::utils::unflatten(), polyfem::io::OutGeometryData::ExportOptions::use_hdf5, polyfem::io::OutGeometryData::ExportOptions::use_sampler, polyfem::io::OutGeometryData::ExportOptions::use_spline, polyfem::mesh::Obstacle::v(), vals, and polyfem::io::OutGeometryData::ExportOptions::velocity.
Referenced by save_vtu().
|
private |
Definition at line 1740 of file OutData.cpp.
References polyfem::State::bases, polyfem::io::OutGeometryData::ExportOptions::boundary_only, polyfem::State::disc_orders, polyfem::io::Evaluator::interpolate_function(), polyfem::State::mesh, polyfem::mesh::Obstacle::n_vertices(), polyfem::mesh::Obstacle::ndof(), polyfem::State::obstacle, polyfem::State::polys, polyfem::State::polys_3d, polyfem::State::problem, ref_element_sampler, polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, polyfem::utils::unflatten(), and polyfem::io::OutGeometryData::ExportOptions::use_sampler.
Referenced by save_volume().
void polyfem::io::OutGeometryData::save_vtu | ( | const std::string & | path, |
const State & | state, | ||
const Eigen::MatrixXd & | sol, | ||
const Eigen::MatrixXd & | pressure, | ||
const double | t, | ||
const double | dt, | ||
const ExportOptions & | opts, | ||
const bool | is_contact_enabled, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
saves the vtu file for time t
[in] | path | filename |
[in] | state | state to get the data |
[in] | sol | solution |
[in] | pressure | pressure |
[in] | t | time |
[in] | dt | delta t |
[in] | opts | export options |
[in] | is_contact_enabled | if contact is enabled |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 1113 of file OutData.cpp.
References polyfem::io::OutGeometryData::ExportOptions::contact_forces, polyfem::io::OutGeometryData::ExportOptions::file_extension(), polyfem::io::OutGeometryData::ExportOptions::friction_forces, polyfem::logger(), polyfem::State::mesh, polyfem::State::n_bases, polyfem::io::OutGeometryData::ExportOptions::points, polyfem::State::rhs, save_contact_surface(), save_points(), save_surface(), save_volume(), save_wire(), polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, polyfem::io::OutGeometryData::ExportOptions::surface, polyfem::io::OutGeometryData::ExportOptions::volume, and polyfem::io::OutGeometryData::ExportOptions::wire.
Referenced by export_data(), polyfem::State::save_subsolve(), and polyfem::State::save_timestep().
void polyfem::io::OutGeometryData::save_wire | ( | const std::string & | name, |
const State & | state, | ||
const Eigen::MatrixXd & | sol, | ||
const double | t, | ||
const ExportOptions & | opts, | ||
std::vector< SolutionFrame > & | solution_frames | ||
) | const |
saves the wireframe
[in] | name | filename |
[in] | state | state to get the data |
[in] | sol | solution |
[in] | t | time |
[in] | opts | export options |
[out] | solution_frames | saves the output here instead of vtu |
Definition at line 2062 of file OutData.cpp.
References polyfem::State::assembler, polyfem::State::bases, polyfem::io::Evaluator::compute_scalar_value(), polyfem::mesh::Mesh::dimension(), polyfem::State::disc_orders, polyfem::assembler::Problem::exact(), faces, polyfem::State::geom_bases(), polyfem::assembler::Problem::has_exact_sol(), polyfem::io::Evaluator::interpolate_function(), polyfem::mesh::Mesh::is_cube(), polyfem::assembler::Problem::is_scalar(), polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh::is_volume(), polyfem::State::mesh, polyfem::State::polys, polyfem::State::polys_3d, polyfem::State::problem, ref_element_sampler, polyfem::utils::RefElementSampler::simplex_points(), polyfem::io::OutGeometryData::ExportOptions::solve_export_to_file, and polyfem::io::OutGeometryData::ExportOptions::use_hdf5.
Referenced by save_vtu().
|
private |
grid mesh points to export solution sampled on a grid
Definition at line 273 of file OutData.hpp.
Referenced by build_grid(), and save_volume().
|
private |
grid mesh boundaries
Definition at line 277 of file OutData.hpp.
Referenced by build_grid(), and save_volume().
|
private |
grid mesh mapping to fe elements
Definition at line 275 of file OutData.hpp.
Referenced by build_grid(), and save_volume().
|
private |
used to sample the solution
Definition at line 270 of file OutData.hpp.
Referenced by build_vis_boundary_mesh(), build_vis_mesh(), init_sampler(), save_volume(), save_volume_vector_field(), and save_wire().