-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
136 lines (92 loc) · 4.13 KB
/
main.h
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//#define DEBUG
#undef DEBUG
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_2.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/spatial_sort.h>
using std::vector;
using std::list;
using std::endl;
using std::cout;
using std::cin;
#include <fstream>
//using namespace CGAL;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
//typedef CGAL::Periodic_2_triangulation_filtered_traits_2<K> GT;
typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> GT;
typedef CGAL::Periodic_2_triangulation_vertex_base_2<GT> VbDS;
//typedef CGAL::Periodic_2_triangulation_vertex_base_2<GT> VbDS;
typedef CGAL::Periodic_2_triangulation_face_base_2<GT> FbDS;
typedef K::FT FT;
typedef CGAL::Vector_2<K> Vector_2;
typedef CGAL::Segment_2<K> Segment;
typedef CGAL::Triangle_2<K> Triangle;
typedef CGAL::Point_2<K> Point;
typedef CGAL::Creator_uniform_2<FT,Point> Creator;
#include"vrtx_info.h"
typedef My_vertex_base<GT, VbDS> Vb;
typedef My_face_base<GT, FbDS> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
//#include"my_Tr.h"
typedef CGAL::Periodic_2_Delaunay_triangulation_2<GT, Tds> Triangulation;
typedef Triangulation::Face_handle Face_handle;
typedef Triangulation::Face Face;
typedef Triangulation::Vertex_handle Vertex_handle;
typedef Triangulation::Vertex Vertex;
typedef Triangulation::Edge Edge;
//typedef Triangulation::Facet Facet;
typedef Triangulation::Locate_type Locate_type;
//typedef Triangulation::Point Point;
typedef Triangulation::Finite_vertices_iterator F_v_it;
typedef Triangulation::Finite_edges_iterator F_e_it;
typedef Triangulation::Finite_faces_iterator F_f_it;
typedef Triangulation::Edge_circulator Edge_circulator;
typedef Triangulation::Vertex_circulator Vertex_circulator;
typedef Triangulation::Face_circulator Face_circulator;
typedef Triangulation::Iso_rectangle Iso_rectangle;
typedef Triangulation::Periodic_point Periodic_point;
typedef Triangulation::Periodic_point_iterator Periodic_point_iterator;
typedef Triangulation::Periodic_segment Periodic_segment;
typedef Triangulation::Periodic_segment_iterator Periodic_segment_iterator;
typedef Triangulation::Periodic_triangle Periodic_triangle;
typedef Triangulation::Periodic_triangle_iterator Periodic_triangle_iterator;
typedef Triangulation::Iterator_type Iterator_type;
const Iterator_type stored=Triangulation::STORED;
const Iterator_type unique=Triangulation::UNIQUE;
const Iterator_type stored_cover=Triangulation::STORED_COVER_DOMAIN;
const Iterator_type unique_cover=Triangulation::UNIQUE_COVER_DOMAIN;
typedef CGAL::Periodic_2_offset_2 Offset;
void draw(Triangulation& T, const std::string file_name , const bool setup ) ;
void number(Triangulation& T);
void quad_coeffs( Triangulation& T , bool ) ;
void matrices(void);
FT solve_linear(std::vector<Periodic_point>& vP,
std::vector<FT>& AA );
void prune(std::vector<Vertex_handle>& v);
void set_fields_Zalesak(void);
void set_vels(void);
void curvature(void) ;
FT move(Triangulation& T, FT, FT& ) ;
void move_info(Triangulation& T) ;
void u_star(Triangulation& T, FT, bool) ;
void u_star_inviscid(Triangulation& T ) ;
void u_new(Triangulation& T, const FT) ;
//void u_star_new(Triangulation& T, FT) ;
void update_half_velocity( Triangulation& T , const bool );
void update_half_alpha( Triangulation& T );
void nabla(Triangulation& T) ;
void Delta(Triangulation& T);
void setup_v(void);
void areas(Triangulation& T);
void volumes(Triangulation& T, bool);
void integrals(Triangulation& T, std::ofstream& log_file);
void fidelity(Triangulation& T, std::ofstream& log_file );
FT L2_vel_Gresho( Triangulation& T) ;
FT kinetic_E( Triangulation& T);
// TODO: don't have these around as global vars
//extern Triangulation Tm;
//extern Triangulation Tp;
//#include <Eigen/Dense>
// #include"linear.h"