forked from mikahlbk/SpatialYeastModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mesh.h
46 lines (40 loc) · 1.24 KB
/
mesh.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
//mesh.h
//*************************************
//include guards
#ifndef _MESH_H_INCLUDED_
#define _MESH_H_INCLUDED_
//**************************************
//forward declarations
//**************************************
// include dependencies
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
#include <cstdio>
#include <memory>
#include "parameters.h"
#include "coord.h"
#include "mesh_pt.h"
//**************************************************
//mesh struct declaration
class Mesh: public enable_shared_from_this<Mesh>{
private:
vector<pair<shared_ptr<Mesh_Pt>,int>> mesh_pts;
public:
//constructor
Mesh();
void make_mesh_pts(double x_start, double y_start, int num_buckets, double increment);
void update_mesh_pts_vec(shared_ptr<Mesh_Pt>& new_mesh_pt, int index);
void get_mesh_pts_vec(vector<shared_ptr<Mesh_Pt>>& mesh_points);
void assign_neighbors();
void assign_cell_to_bin(int& index, shared_ptr<Cell>& new_cell);
void get_cells_from_bin(int& index, vector<shared_ptr<Cell>>& neighbors);
void calculate_nutrient_concentration();
double get_nutrient_conc(int bin_id);
};
//end mesh class
//*******************************
#endif