-
Notifications
You must be signed in to change notification settings - Fork 2
/
CirculationModel_aorta.h
197 lines (159 loc) · 5.6 KB
/
CirculationModel_aorta.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// Filename: CirculationModel_aorta.h
// Created on 04 May 2007 by Boyce Griffith
// Modified 2019, Alexander D. Kaiser
#ifndef included_CirculationModel_aorta
#define included_CirculationModel_aorta
/////////////////////////////// INCLUDES /////////////////////////////////////
// IBTK INCLUDES
#include <ibtk/ibtk_utilities.h>
// SAMRAI INCLUDES
#include <CellVariable.h>
#include <tbox/Database.h>
#include <tbox/Serializable.h>
// C++ STDLIB INCLUDES
#include <vector>
// NAMESPACE
#include <ibamr/app_namespaces.h>
#include <boundary_condition_util.h>
#include "pnpoly.h"
/////////////////////////////// CLASS DEFINITION /////////////////////////////
/*!
* \brief Class CirculationModel_aorta
*/
class CirculationModel_aorta : public Serializable
{
public:
/*!
* \brief The object name.
*/
string d_object_name;
/*!
* \brief Whether the object is registered with the restart manager.
*/
bool d_registered_for_restart;
/*!
* \brief model data.
*/
const fourier_series_data *d_fourier_ventricle;
int d_n_pts_ventricle;
double* d_ventricle_points_idx1;
double* d_ventricle_points_idx2;
int d_ventricle_axis;
int d_ventricle_side;
bool d_rcr_bcs_on;
// const fourier_series_data *d_fourier_aorta;
int d_n_pts_aorta;
double* d_aorta_points_idx1;
double* d_aorta_points_idx2;
int d_aorta_axis;
int d_aorta_side;
double d_aorta_P;
double d_aorta_P_Wk;
double d_aorta_R_proximal;
double d_aorta_R_distal;
double d_aorta_C;
double d_cycle_duration;
double d_t_offset_bcs_unscaled;
unsigned int d_current_idx_series;
double d_Q_ventricle;
double d_Q_aorta;
double d_Q_valve;
double d_time;
double d_area_ventricle;
double d_area_aorta;
double d_area_left_pa;
bool d_area_initialized;
double d_p_extender_mean;
double d_p_extender_point;
bool d_P_initial_aorta_equal_to_ventricle;
double d_rcr_on_time;
/*!
* \brief The level of the patch hierarchy on which the Lagrangian
* structures that interface the boundary are located.
*/
int d_bdry_interface_level_number;
/*!
* \brief Constructor
*/
CirculationModel_aorta(Pointer<Database> input_db,
const fourier_series_data *fourier_ventricle,
string ventricle_vertices_file_name,
string aorta_vertices_file_name,
const double cycle_duration,
const double t_offset_bcs_unscaled,
const double initial_time,
double P_initial_aorta,
bool rcr_bcs_on,
bool P_initial_aorta_equal_to_ventricle = false,
double rcr_on_time = 0.1);
/*!
* \brief Destructor.
*/
virtual ~CirculationModel_aorta();
/*!
* \brief Advance time-dependent data.
*/
void advanceTimeDependentData(const double dt,
const Pointer<PatchHierarchy<NDIM> > hierarchy,
const int U_idx,
const int P_idx,
const int wgt_cc_idx,
const int wgt_sc_idx);
void set_Q_valve(double Q_valve);
void set_extender_pressures(double p_extender_mean, double p_extender_point);
/*!
* \name Implementation of Serializable interface.
*/
/*!
* Write out object state to the given database.
*
* When assertion checking is active, database point must be non-null.
*/
void putToDatabase(Pointer<Database> db);
// basic data summary to stdout
void print_summary();
int point_in_ventricle(double testx, double testy, int axis, int side);
int point_in_aorta(double testx, double testy, int axis, int side);
void write_plot_code();
private:
/*!
* \brief Copy constructor.
*
* \note This constructor is not implemented and should not be used.
*
* \param from The value to copy to this object.
*/
CirculationModel_aorta(const CirculationModel_aorta& from);
/*!
* \brief Assignment operator.
*
* \note This operator is not implemented and should not be used.
*
* \param that The value to assign to this object.
*
* \return A reference to this object.
*/
CirculationModel_aorta& operator=(const CirculationModel_aorta& that);
/*!
* Write out source/sink state data to disk.
*/
void writeDataFile() const;
/*!
* Read object state from the restart file and initialize class data
* members. The database from which the restart data is read is determined
* by the object_name specified in the constructor.
*
* Unrecoverable Errors:
*
* - The database corresponding to object_name is not found in the
* restart file.
*
* - The class version number and restart version number do not match.
*
*/
void getFromRestart();
};
/////////////////////////////// INLINE ///////////////////////////////////////
//#include <CirculationModel.I>
//////////////////////////////////////////////////////////////////////////////
#endif //#ifndef included_CirculationModel_aorta