-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdataio.h
More file actions
44 lines (28 loc) · 815 Bytes
/
dataio.h
File metadata and controls
44 lines (28 loc) · 815 Bytes
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
#ifndef DATAIO_H_
#define DATAIO_H_
#include "eigen.h"
#include <vector>
struct scalar_field {
Vector3d posi;
double value;
};
struct vector_field {
Vector3d posi;
Vector3d value;
};
void pos_scalar_field(std::string filename, const std::vector<scalar_field> &dist);
void pos_vector_field(std::string filename, const std::vector<vector_field> &dist);
void export_scalar_field(std::string filename = "scalar_field.pos");
void export_vector_field(std::string filename = "vector_field.pos");
void export_M_matrix();
void export_K_matrix();
std::string integer_to_string(int n);
struct signal {
std::vector<double> ampl;
double dt;
void push_back(double value) {
ampl.push_back(value);
}
void save(std::string filename);
};
#endif /* DATAIO_H_ */