-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tissue.h
76 lines (53 loc) · 2.82 KB
/
Tissue.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
#ifndef DIPOLECELL_TISSUE_H
#define DIPOLECELL_TISSUE_H
#include "CellBase.h"
#include "CommonTypes.h"
#include "ModelTissueParameter.h"
#include <Eigen/Core>
#include <memory>
#include <vector>
class Tissue {
friend struct TissueInitializer;
public:
Tissue();
static constexpr auto tissue_parameter = ModelParameter::tissue_parameter;
private:
std::vector<std::unique_ptr<CellBase>> states_of_cell_current;
CellColonyMatrix cols_of_cell_current;
Vector2F computeInterCellForceOn1(CellInd i_cell_1, SubCellEnum i_subcell_1, CellInd i_cell_2,
SubCellEnum i_subcell_2,
const CellColonyMatrix &cols_of_cell_current_in) const;
Vector2F computeInterCellForceOn1(const CellSubCellInd &i_cell_subcell_1,
const CellSubCellInd &i_cell_subcell_2,
const CellColonyMatrix &cols_of_cell_current_in) const;
Vector2F
computeInterCellForceOn1(const std::pair<CellSubCellInd, CellSubCellInd> &interacting_pair,
const CellColonyMatrix &cols_of_cell_current_in) const;
Matrix4XF computeInterCellForce_serial(const CellColonyMatrix &cols_of_cell_current_in) const;
Matrix4XF computeInterCellForce(const CellColonyMatrix &cols_of_cell_current_in) const;
Matrix4XF computeExternalForce(const CellColonyMatrix &cols_of_cell_current_in,
const FloatingType t) const;
// void computeODEdydt(const CellColonyMatrix &cols_of_cell_current_in,
// CellColonyMatrix &cols_of_cell_dydt, FloatingType /*t*/) const;
void computeODEdydt(const CellColonyMatrix &cols_of_cell_current_in,
CellColonyMatrix &cols_of_cell_dydt, FloatingType /*t*/) const;
void odeintAStep();
void checkACell(CellInd i_cell) const;
void updateACellState(CellInd i_cell,
std::vector<std::unique_ptr<CellBase>> &states_of_newborn_cell_current,
CellColonyMatrix &cols_of_newborn_cell_current);
void rewindWholeCellCoordinates();
void doAfterOdeint();
// rewinds according to boundary condition, checks each cell, updates cells' state, appends
// newborn cells.
void doAStep();
void preRelax(std::size_t tot_num_relax_steps, TissueTrajectory &relaxation_trajectory,
CellCycleStageHistory &cells_stage_history);
// begin with nonmotile state and relax, then set all to contracting state
std::string collectCellsCycleStageRepr() const;
public:
void doSimulation(std::size_t tot_num_simulation_steps,
TissueTrajectory &simulation_trajectory,
CellCycleStageHistory &cells_stage_history);
};
#endif // DIPOLECELL_TISSUE_H