| 240 | } |
| 241 | |
| 242 | fields_chunk::fields_chunk(structure_chunk *the_s, const char *od, double m, double beta, |
| 243 | bool zero_fields_near_cylorigin, int chunkidx, int loop_tile_base_db, |
| 244 | std::vector<double> bfast_scaled_k) |
| 245 | : gv(the_s->gv), v(the_s->v), m(m), zero_fields_near_cylorigin(zero_fields_near_cylorigin), |
| 246 | beta(beta), bfast_scaled_k(bfast_scaled_k) { |
| 247 | s = the_s; |
| 248 | chunk_idx = chunkidx; |
| 249 | s->refcount++; |
| 250 | outdir = od; |
| 251 | new_s = NULL; |
| 252 | is_real = 0; |
| 253 | a = s->a; |
| 254 | Courant = s->Courant; |
| 255 | dt = s->dt; |
| 256 | dft_chunks = NULL; |
| 257 | if (loop_tile_base_db > 0) { |
| 258 | split_into_tiles(gv, &gvs_tiled, loop_tile_base_db); |
| 259 | check_tiles(gv, gvs_tiled); |
| 260 | } |
| 261 | else { gvs_tiled.push_back(gv); } |
| 262 | FOR_FIELD_TYPES(ft) { |
| 263 | polarization_state *cur = NULL; |
| 264 | pol[ft] = NULL; |
| 265 | for (susceptibility *chiP = the_s->chiP[ft]; chiP; chiP = chiP->next) { |
| 266 | polarization_state *p = new polarization_state; |
| 267 | // P and data lazily allocated in update_pols |
| 268 | p->data = NULL; |
| 269 | p->s = chiP; |
| 270 | p->next = NULL; |
| 271 | if (cur) { |
| 272 | cur->next = p; |
| 273 | cur = p; |
| 274 | } |
| 275 | else { pol[ft] = cur = p; } |
| 276 | } |
| 277 | } |
| 278 | doing_solve_cw = false; |
| 279 | solve_cw_omega = 0.0; |
| 280 | FOR_COMPONENTS(c) DOCMP2 { |
| 281 | f[c][cmp] = NULL; |
| 282 | f_u[c][cmp] = NULL; |
| 283 | f_w[c][cmp] = NULL; |
| 284 | f_cond[c][cmp] = NULL; |
| 285 | f_bfast[c][cmp] = NULL; |
| 286 | f_minus_p[c][cmp] = NULL; |
| 287 | f_w_prev[c][cmp] = NULL; |
| 288 | f_backup[c][cmp] = NULL; |
| 289 | f_u_backup[c][cmp] = NULL; |
| 290 | f_w_backup[c][cmp] = NULL; |
| 291 | f_cond_backup[c][cmp] = NULL; |
| 292 | f_bfast_backup[c][cmp] = NULL; |
| 293 | } |
| 294 | f_rderiv_int = NULL; |
| 295 | FOR_FIELD_TYPES(ft) { |
| 296 | zeroes[ft] = NULL; |
nothing calls this directly
no test coverage detected