-
Notifications
You must be signed in to change notification settings - Fork 13
/
lgr_vtk.hpp
59 lines (52 loc) · 3.18 KB
/
lgr_vtk.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include <hpc_array_vector.hpp>
#include <hpc_dimensional.hpp>
#include <lgr_mesh_indices.hpp>
#include <string>
namespace lgr {
class input;
class state;
class captured_state
{
public:
hpc::counting_range<element_index> elements{0};
hpc::counting_range<node_index> nodes{0};
hpc::counting_range<node_in_element_index> nodes_in_element{0};
hpc::counting_range<point_in_element_index> points_in_element{0};
hpc::pinned_vector<node_index, element_node_index> element_nodes_to_nodes;
hpc::pinned_array_vector<hpc::position<double>, node_index> x;
hpc::pinned_array_vector<hpc::velocity<double>, node_index> v;
hpc::pinned_array_vector<hpc::symmetric_stress<double>, node_index> sigma;
hpc::pinned_array_vector<hpc::stress<double>, node_index> sigma_full;
hpc::pinned_array_vector<hpc::deformation_gradient<double>, node_index> F_total;
hpc::pinned_array_vector<hpc::deformation_gradient<double>, node_index> Fp_total;
hpc::host_vector<hpc::pinned_vector<hpc::pressure<double>, node_index>, material_index> p_h;
hpc::host_vector<hpc::pinned_vector<hpc::specific_energy<double>, node_index>, material_index> e_h;
hpc::host_vector<hpc::pinned_vector<hpc::density<double>, node_index>, material_index> rho_h;
hpc::pinned_vector<hpc::length<double>, node_index> h_adapt;
hpc::pinned_vector<hpc::pressure<double>, point_index> p;
hpc::pinned_vector<hpc::pressure<double>, point_index> K;
hpc::pinned_vector<hpc::speed<double>, point_index> c;
hpc::pinned_vector<hpc::specific_energy<double>, point_index> e;
hpc::pinned_vector<hpc::density<double>, point_index> rho;
hpc::pinned_vector<hpc::density<double>, point_index> ep;
hpc::pinned_array_vector<hpc::heat_flux<double>, point_index> q;
hpc::pinned_vector<hpc::pressure<double>, point_index> p_prime;
hpc::pinned_vector<hpc::time<double>, point_index> element_dt;
hpc::pinned_vector<hpc::adimensional<double>, element_index> quality;
hpc::pinned_vector<material_index, element_index> material;
};
class file_writer
{
std::string prefix;
public:
file_writer(std::string const& prefix_in) : prefix(prefix_in)
{
}
void
capture(input const& in, state const& s);
void
write(input const& in, int const file_output_index);
captured_state captured;
};
} // namespace lgr