DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
diffusion.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
3 // AND EFFORT DISPLACEMENT
4 // Copyright (c) 2012-2019 Francois Bastardie <fba@aqua.dtu.dk>
5 
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // --------------------------------------------------------------------------
20 
21 #include <commons_global.h>
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <helpers.h>
26 
27 #include <string>
28 #include <vector>
29 
30 #include <Node.h>
31 
32 #include <boost/make_shared.hpp>
33 
34 #include <boost/geometry.hpp>
35 #include <boost/geometry/geometries/point.hpp>
36 #include <boost/geometry/geometries/box.hpp>
37 #include <boost/geometry/index/rtree.hpp>
38 
39 #include <boost/foreach.hpp>
40 
41 namespace bg = boost::geometry;
42 namespace bgi = boost::geometry::index;
43 
44 typedef bg::model::point<double, 2, bg::cs::cartesian> point;
45 typedef bg::model::box<point> box;
46 typedef std::pair<box, unsigned> value;
47 
48 
49 
50 bool COMMONSSHARED_EXPORT diffuse_Nitrogen_in_every_directions(vector<Node*>&list_of_nodes,
51  adjacency_map_t& adjacency_map, double coeff);
52 bool COMMONSSHARED_EXPORT diffuse_Benthos_in_every_directions(vector<Node*>&list_of_nodes,
53  adjacency_map_t& adjacency_map, double coeff);
54 bool COMMONSSHARED_EXPORT diffuse_Nitrogen_with_gradients(vector<Node*>&list_of_nodes,
56  bgi::rtree< std::pair<point, int>, bgi::quadratic<16> >& rtree,
57  double coeff);
58 
60  bgi::rtree< std::pair<point, int>, bgi::quadratic<16> >& rtree);
61 
bg::model::point< double, 2, bg::cs::cartesian > point
Definition: diffusion.h:44
vector< Node * > nodes
Definition: main.cpp:270
void COMMONSSHARED_EXPORT createRTreeFromNodes(vector< Node * > &nodes, bgi::rtree< std::pair< point, int >, bgi::quadratic< 16 > > &rtree)
Definition: diffusion.cpp:33
adjacency_map_t adjacency_map
Definition: main.cpp:253
bg::model::box< point > box
Definition: diffusion.h:45
std::map< vertex_t, std::list< edge > > adjacency_map_t
Definition: myutils.h:214
std::pair< box, unsigned > value
Definition: diffusion.h:46
bool COMMONSSHARED_EXPORT diffuse_Benthos_in_every_directions(vector< Node * > &list_of_nodes, adjacency_map_t &adjacency_map, double coeff)
Definition: diffusion.cpp:225
bool COMMONSSHARED_EXPORT diffuse_Nitrogen_in_every_directions(vector< Node * > &list_of_nodes, adjacency_map_t &adjacency_map, double coeff)
Definition: diffusion.cpp:147
bool COMMONSSHARED_EXPORT diffuse_Nitrogen_with_gradients(vector< Node * > &list_of_nodes, adjacency_map_t &adjacency_map, bgi::rtree< std::pair< point, int >, bgi::quadratic< 16 > > &rtree, double coeff)
Definition: diffusion.cpp:71
#define COMMONSSHARED_EXPORT
Definition: commons_global.h:23