UltraScan III
Namespaces
Classes
Files
File List
File Members
programs
us_2dsa
us_2dsa_process.h
Go to the documentation of this file.
1
#ifndef US_2DSA_PROCESS_H
3
#define US_2DSA_PROCESS_H
4
5
#include <QtCore>
6
7
#include "
us_extern.h
"
8
#include "
us_widgets.h
"
9
#include "
us_dataIO.h
"
10
#include "
us_simparms.h
"
11
#include "
us_model.h
"
12
#include "
us_noise.h
"
13
#include "
us_db2.h
"
14
#include "
us_solute.h
"
15
#include "
us_worker_2d.h
"
16
17
#ifndef DbgLv
18
#define DbgLv(a) if(dbg_level>=a)qDebug()
19
#endif
20
21
#ifndef SS_DATASET
22
#define SS_DATASET US_SolveSim::DataSet
23
#endif
24
26
33
class
US_2dsaProcess
:
public
QObject
34
{
35
Q_OBJECT
36
37
public
:
38
40
enum
RefineType
{
UGRID
,
LUGRID
,
RLGRID
,
SOLCO
,
CLIPLO
};
41
43
enum
TaskState
{
READY
,
WORKING
,
ABORTED
};
44
48
US_2dsaProcess
( QList< SS_DATASET* >&, QObject* = 0 );
49
60
void
start_fit
(
double
,
double
,
int
,
double
,
double
,
int
,
61
int
,
int
,
int
);
62
71
void
set_iters
(
int
,
int
,
int
,
double
,
double
,
double
,
int
);
72
80
bool
get_results
(
US_DataIO::RawData
*,
US_DataIO::RawData
*,
81
US_Model
*,
US_Noise
*,
US_Noise
* );
82
84
void
stop_fit
(
void
);
85
87
void
clear_data
(
void
);
88
92
int
estimate_steps
(
int
);
93
96
QString
lastError
(
void
) {
return
errMsg
; }
97
98
// Number of doubles in a solute object
99
static
const
int
solute_doubles
=
sizeof
(
US_Solute
) /
sizeof
(
double
);
100
101
private
:
102
103
signals:
104
void
progress_update
(
int
);
105
void
process_complete
(
int
);
106
void
stage_complete
(
int
,
int
);
107
void
message_update
( QString,
bool
);
108
109
private
:
110
QList< SS_DATASET* >&
dsets
;
// List of dataset pointers
111
112
long
int
maxrss
;
113
114
long
int
max_rss
(
void
);
115
116
QList< WorkerThread2D* >
wthreads
;
// worker threads
117
QList< WorkPacket2D >
job_queue
;
// job queue
118
119
QVector< int >
wkstates
;
// worker thread states
120
QVector< int >
wkdepths
;
// worker thread depths
121
QVector< int >
tkdepths
;
// task packet depths
122
123
QVector< double >
sigmas
;
// monte carlo sigma variations
124
125
QList< double >
itvaris
;
// iteration variances
126
127
QList< QVector< US_Solute > >
c_solutes
;
// calculated solutes
128
QList< QVector< US_Solute > >
orig_sols
;
// original solutes
129
QList< QVector< US_Solute > >
ical_sols
;
// iteration calculated solutes
130
131
US_DataIO::EditedData
*
edata
;
// experimental data (mc_iter)
132
US_DataIO::EditedData
*
bdata
;
// base experimental data
133
US_DataIO::EditedData
wdata
;
// work experimental data
134
135
US_DataIO::RawData
sdata
;
// simulation data
136
US_DataIO::RawData
sdata1
;
// simulation data (mc iter 1)
137
138
US_DataIO::RawData
rdata
;
// residuals data
139
140
US_Model
model
;
// constructed model
141
142
US_Noise
ti_noise
;
// time-invariant noise
143
US_Noise
ri_noise
;
// radially-invariant noise
144
145
US_SimulationParameters
*
simparms
;
// simulation parameters
146
147
QObject*
parentw
;
// parent object
148
149
QString
errMsg
;
// message from last error
150
151
int
dbg_level
;
// debug level
152
int
nthreads
;
// number of worker threads
153
int
nssteps
;
// number of s steps
154
int
nksteps
;
// number of k steps
155
int
ngrefine
;
// number of grid refinements
156
int
jgrefine
;
// grid refinement type flag (+ve., -1, -2)
157
int
nctotal
;
// number of total compute-progress steps
158
int
kcsteps
;
// count of completed progress steps
159
int
noisflag
;
// noise out flag: 0(none), 1(ti), 2(ri), 3(both)
160
int
nscans
;
// number of experiment scans
161
int
npoints
;
// number of reading points per experiment scan
162
int
nsubgrid
;
// number of subgrids (tasks)
163
int
kctask
;
// count of completed subgrid tasks
164
int
kstask
;
// count of started subgrid tasks;
165
int
mmiters
;
// number of meniscus or monte carlo iterations
166
int
mmtype
;
// mm type: 0,1,2 for NONE|MENISCUS|MONTECARLO
167
int
maxtsols
;
// maximum number of task solutes
168
int
mintsols
;
// minimum number of depth 1ff task solutes
169
int
maxdepth
;
// maximum depth of iteration jobs
170
int
maxiters
;
// maximum number of refinement iterations
171
int
r_iter
;
// refinement iteration index
172
int
mm_iter
;
// meniscus/MC iteration index
173
int
ntisols
;
// number total task input solutes
174
int
ntcsols
;
// number total task computed solutes
175
176
bool
abort
;
// flag used with stop_fit clicked
177
bool
fnoionly
;
// flag to use noise flag on final call only
178
179
double
slolim
;
// s lower limit
180
double
suplim
;
// s upper limit
181
double
klolim
;
// k lower limit
182
double
kuplim
;
// k upper limit
183
double
gdelta_s
;
// grid delta in s
184
double
gdelta_k
;
// grid delta in k
185
double
sdelta_s
;
// subgrid delta in s
186
double
sdelta_k
;
// subgrid delta in k
187
double
varitol
;
// variance difference tolerance
188
double
menrange
;
// meniscus range
189
double
cnstff0
;
// constant f/f0 (or 0.0)
190
191
QTime
timer
;
// timer for elapsed time measure
192
193
private
slots:
194
void
queue_task
(
WorkPacket2D
&,
double
,
double
,
195
int
,
int
,
int
, QVector< US_Solute > );
196
void
process_job
(
WorkerThread2D
* );
197
void
process_final
(
WorkerThread2D
* );
198
void
step_progress
(
int
);
199
void
final_computes
(
void
);
200
void
iterate
(
void
);
201
void
set_meniscus
(
void
);
202
void
set_monteCarlo
(
void
);
203
void
set_gaussians
(
void
);
204
void
requeue_tasks
(
void
);
205
void
submit_job
(
WorkPacket2D
&,
int
);
206
void
free_worker
(
int
);
207
int
running_at_depth
(
int
);
208
int
queued_at_depth
(
int
);
209
int
jobs_at_depth
(
int
);
210
QString
pmessage_head
(
void
);
211
WorkPacket2D
next_job
(
void
);
212
bool
memory_check
(
void
);
213
};
214
#endif
215
Generated on Sun Jun 21 2015 11:40:41 for UltraScan III by
1.8.3.1-20130324