forked from husseinaluie/FlowSieve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparticles.hpp
95 lines (86 loc) · 3.13 KB
/
particles.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
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
#ifndef PARTICLES_HPP
#define PARTICLES_HPP 1
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include <mpi.h>
#include "constants.hpp"
void particles_evolve_trajectories(
std::vector<double> & part_lon_hist,
std::vector<double> & part_lat_hist,
std::vector<double> & rev_part_lon_hist,
std::vector<double> & rev_part_lat_hist,
std::vector< std::vector<double> > & field_trajectories,
std::vector< std::vector<double> > & rev_field_trajectories,
const std::vector<double> & starting_lat,
const std::vector<double> & starting_lon,
const std::vector<double> & target_times,
const double particle_lifespan,
const std::vector<double> & vel_lon,
const std::vector<double> & vel_lat,
const std::vector<const std::vector<double>*> & fields_to_track,
const std::vector<std::string> & names_of_tracked_fields,
const std::vector<double> & time,
const std::vector<double> & lat,
const std::vector<double> & lon,
const std::vector<bool> & mask,
const MPI_Comm comm = MPI_COMM_WORLD
);
void particles_get_edges(
int & left,
int & right,
int & bottom,
int & top,
const double & ref_lat,
const double & ref_lon,
const std::vector<double> & lat,
const std::vector<double> & lon
);
double particles_interp_from_edges(
double ref_lat,
double ref_lon,
const std::vector<double> & lat,
const std::vector<double> & lon,
const std::vector<double> * field,
const std::vector<bool> & mask,
const int left,
const int right,
const int bottom,
const int top,
const double time_p,
const int Itime,
const int Ntime
);
void particles_initial_positions(
std::vector<double> & starting_lat,
std::vector<double> & starting_lon,
const int Npts,
const std::vector<double> & latitude,
const std::vector<double> & longitude,
const std::vector<bool> & mask,
const MPI_Comm comm = MPI_COMM_WORLD
);
void particles_fore_back_difference(
std::vector<double> & traj_dists,
const std::vector<double> & fore_lon_hist,
const std::vector<double> & fore_lat_hist,
const std::vector<double> & back_lon_hist,
const std::vector<double> & back_lat_hist,
const MPI_Comm comm = MPI_COMM_WORLD
);
void particles_project_onto_trajectory(
std::vector< std::vector<double> > & field_trajectories,
const std::vector<double> & trajectory_time,
const std::vector<double> & trajectory_lat,
const std::vector<double> & trajectory_lon,
const std::vector<const std::vector<double>*> & fields_to_track,
const std::vector<double> & time,
const std::vector<double> & lat,
const std::vector<double> & lon,
const std::vector<bool> & particle_mask,
const std::vector<bool> & field_mask,
const std::vector<int> & myCounts,
const MPI_Comm comm = MPI_COMM_WORLD
);
#endif