PolyFEM
Loading...
Searching...
No Matches
OutputData.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <polyfem/Common.hpp>
8
9#include <Eigen/Dense>
10
11#include <functional>
12#include <map>
13#include <string>
14#include <vector>
15
16namespace polyfem::mesh
17{
18 class Obstacle;
19} // namespace polyfem::mesh
20
21namespace ipc
22{
23 class CollisionMesh;
24} // namespace ipc
25
26namespace polyfem::io
27{
29 {
30 std::vector<std::string> fields;
31
32 bool export_field(const std::string &field) const;
33 };
34
36 {
37 enum class Domain
38 {
39 Unknown,
40 Volume,
41 Surface,
42 Contact,
43 Wire,
44 Points,
45 Grid
46 };
47
48 Eigen::MatrixXd points;
49 Eigen::MatrixXd local_points;
50 Eigen::VectorXi element_ids;
51 Eigen::VectorXi primitive_ids;
52 Eigen::VectorXi node_ids;
53 Eigen::MatrixXd normals;
54 std::vector<std::string> requested_fields;
56 int cell_count = 0;
57 double time = 0;
58 double dt = 0;
59 };
60
62 {
63 enum class Association
64 {
65 Point,
66 Cell
67 };
68
69 std::string name;
70 Eigen::MatrixXd values;
72 };
73
74 using OutputFieldFunction = std::function<std::vector<OutputField>(const OutputSample &)>;
75
77 {
78 const mesh::Mesh *mesh = nullptr;
79 const std::vector<basis::ElementBases> *geometry_bases = nullptr;
80 Eigen::VectorXi output_orders;
81 const std::map<int, Eigen::MatrixXd> *polys = nullptr;
82 const std::map<int, std::pair<Eigen::MatrixXd, Eigen::MatrixXi>> *polys_3d = nullptr;
83 const std::vector<mesh::LocalBoundary> *total_local_boundary = nullptr;
84 const mesh::Obstacle *obstacle = nullptr;
85 const ipc::CollisionMesh *collision_mesh = nullptr;
86 const std::vector<int> *dirichlet_nodes = nullptr;
87 const std::vector<RowVectorNd> *dirichlet_nodes_position = nullptr;
89 const mesh::MeshNodes *mesh_nodes = nullptr;
90 };
91} // namespace polyfem::io
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes.
Definition Mesh.hpp:77
std::function< std::vector< OutputField >(const OutputSample &)> OutputFieldFunction
Eigen::MatrixXd values
bool export_field(const std::string &field) const
Definition OutData.cpp:82
std::vector< std::string > fields
Eigen::VectorXi node_ids
Eigen::MatrixXd normals
Eigen::VectorXi primitive_ids
std::vector< std::string > requested_fields
Eigen::VectorXi element_ids
Eigen::MatrixXd local_points
const mesh::Mesh * mesh
Eigen::VectorXi output_orders
const std::vector< mesh::LocalBoundary > * total_local_boundary
const mesh::MeshNodes * mesh_nodes
nodes of the FE space of dirichlet_nodes, for their tags
const std::vector< basis::ElementBases > * geometry_bases
const std::vector< RowVectorNd > * dirichlet_nodes_position
const std::vector< int > * dirichlet_nodes
const std::map< int, Eigen::MatrixXd > * polys
const mesh::Obstacle * obstacle
const ipc::CollisionMesh * collision_mesh
const std::map< int, std::pair< Eigen::MatrixXd, Eigen::MatrixXi > > * polys_3d