16 double& aval,
const int a_type )
44 double& aval,
const int a_type )
66 double& aval,
const int a_type )
94 double& aval,
const int a_type )
119 int attr_x = ( s_type >> 6 ) & 7;
120 int attr_y = ( s_type >> 3 ) & 7;
121 int attr_z = s_type & 7;
144 int attr_x = ( s_type >> 6 ) & 7;
145 int attr_y = ( s_type >> 3 ) & 7;
146 int attr_z = s_type & 7;
164 double y_min,
double y_max,
int y_res,
165 int grid_reps,
double* z_coeffs,
166 QList< QVector< US_ZSolute > >& solutes )
168 if ( grid_reps < 1 ) grid_reps = 1;
170 int nprx = qMax( 1, ( ( x_res / grid_reps ) - 1 ) );
171 int npry = qMax( 1, ( ( y_res / grid_reps ) - 1 ) );
172 double x_step = qAbs( x_max - x_min ) / (double)nprx;
173 double y_step = qAbs( y_max - y_min ) / (double)npry;
174 x_step = ( x_step > 0.0 ) ? x_step : ( x_min * 1.001 );
175 y_step = ( y_step > 0.0 ) ? y_step : ( y_min * 1.001 );
176 double x_grid = x_step / grid_reps;
177 double y_grid = y_step / grid_reps;
180 x_max += 0.01 * x_step;
181 y_max += 0.01 * y_step;
183 solutes.reserve(
sq( grid_reps ) );
186 for (
int ii = 0; ii < grid_reps; ii++ )
188 for (
int jj = 0; jj < grid_reps; jj++ )
191 x_min + x_grid * ii, x_max, x_step,
192 y_min + y_grid * jj, y_max, y_step,
201 int zcflg = ( ( zcoeffs[ 1 ] == 0.0 ) ? 0 : 1 )
202 + ( ( zcoeffs[ 2 ] == 0.0 ) ? 0 : 2 )
203 + ( ( zcoeffs[ 3 ] == 0.0 ) ? 0 : 4 );
210 double x_min,
double x_max,
double x_step,
211 double y_min,
double y_max,
double y_step,
214 QVector< US_ZSolute > solute_vector;
215 double zz = z_coeffs[ 0 ];
216 bool x_is_s = ( x_max < 1.0e-10 );
217 bool y_is_s = ( y_max < 1.0e-10 );
223 for (
double xx = x_min; xx <= x_max; xx += x_step )
225 if ( x_is_s && xx >= -1.0e-14 && xx <= 1.0e-14 )
continue;
227 for (
double yy = y_min; yy <= y_max; yy += y_step )
229 if ( y_is_s && yy >= -1.0e-14 && yy <= 1.0e-14 )
continue;
231 solute_vector <<
US_ZSolute( xx, yy, zz, 0.0 );
236 else if ( zcflg == 1 )
238 for (
double xx = x_min; xx <= x_max; xx += x_step )
240 if ( x_is_s && xx >= -1.0e-14 && xx <= 1.0e-14 )
continue;
241 zz = z_coeffs[ 0 ] + z_coeffs[ 1 ] * xx;
243 for (
double yy = y_min; yy <= y_max; yy += y_step )
245 if ( y_is_s && yy >= -1.0e-14 && yy <= 1.0e-14 )
continue;
247 solute_vector <<
US_ZSolute( xx, yy, zz, 0.0 );
254 for (
double xx = x_min; xx <= x_max; xx += x_step )
256 if ( x_is_s && xx >= -1.0e-14 && xx <= 1.0e-14 )
continue;
257 zz = z_coeffs[ 0 ] + z_coeffs[ 1 ] * xx
258 + z_coeffs[ 2 ] * xx * xx
259 + z_coeffs[ 3 ] * xx * xx * xx;
261 for (
double yy = y_min; yy <= y_max; yy += y_step )
263 if ( y_is_s && yy >= -1.0e-14 && yy <= 1.0e-14 )
continue;
265 solute_vector <<
US_ZSolute( xx, yy, zz, 0.0 );
270 return solute_vector;