Kramer3d kramer; auto end = params.data->constEnd(); real_2d_array a; a.setlength(3, 3); real_1d_array b; b.setlength(3); kramer.a[0][0] = Size; a(0,0) = Size; for (auto it = params.data->constBegin(); it != end; ++it) { const double tdTau = it->t / params.tau; kramer.b[0] += it->NR[params.axe]; kramer.b[1] += it->t * it->NR[params.axe]; kramer.b[2] += qExp(-tdTau) * it->NR[params.axe]; kramer.a[0][1] += it->t; kramer.a[0][2] += qExp(-tdTau); kramer.a[1][1] += qPow(it->t, 2.0); kramer.a[1][2] += qExp(-tdTau) * it->t; kramer.a[2][2] += qExp(-2.0 * tdTau); b(0) += it->NR[params.axe]; b(1) += it->t * it->NR[params.axe]; b(2) += qExp(-tdTau) * it->NR[params.axe]; a(0, 1) += it->t; a(0, 2) += qExp(-tdTau); a(1, 1) += qPow(it->t, 2.0); a(1, 2) += qExp(-tdTau) * it->t; a(2, 2) += qExp(-2.0 * tdTau); } kramer.a[1][0] = kramer.a[0][1]; kramer.a[2][0] = kramer.a[0][2]; kramer.a[2][1] = kramer.a[1][2]; a(1, 0) = a(0, 1); a(2, 0) = a(0, 2); a(2, 1) = a(1, 2); const Array3D slu = kramer.calcSLU(); result.koefs = {slu[2], slu[1], slu[0], static_cast<double>(params.tau)}; real_1d_array root; ae_int_t info; densesolverreport rep; rmatrixsolve(a, 3, b, info, rep, root); if (params.axe == 0 && params.tau < 100) qDebug() << root(0) << root(1) << root(2) << "\t-\t" << slu[0] << slu[1] << slu[2];
Vector<OneAxeParams> paramsOneAxe; int tau = Devices.at(params.deviceTypeIndex).tauMin; while (tau <= Devices.at(params.deviceTypeIndex).tauMax) paramsOneAxe.append( {&internalData.calcedData, axe, tau++} );#pragma GCC diagnostic push#pragma GCC diagnostic ignored "-Wshadow" internalData.resultsForAllTau[axe] = QtConcurrent::blockingMapped(paramsOneAxe, &RealizInfo::calcOneAxe);#pragma GCC diagnostic pop