summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/solver/nld_ms_gmres.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_gmres.h')
-rw-r--r--src/lib/netlist/solver/nld_ms_gmres.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/netlist/solver/nld_ms_gmres.h b/src/lib/netlist/solver/nld_ms_gmres.h
index f3d894881e2..2ff515ebda7 100644
--- a/src/lib/netlist/solver/nld_ms_gmres.h
+++ b/src/lib/netlist/solver/nld_ms_gmres.h
@@ -37,7 +37,6 @@ namespace devices
*/
matrix_solver_GMRES_t(netlist_state_t &anetlist, const pstring &name, const solver_parameters_t *params, const std::size_t size)
: matrix_solver_direct_t<FT, SIZE>(anetlist, name, matrix_solver_t::PREFER_BAND_MATRIX, params, size)
- , m_term_cr(size)
//, m_ops(size, 2)
, m_ops(size, 4)
, m_gmres(size)
@@ -51,9 +50,7 @@ namespace devices
using mattype = typename plib::matrix_compressed_rows_t<FT, SIZE>::index_type;
- plib::parray<plib::aligned_vector<FT *, PALIGN_VECTOROPT>, SIZE> m_term_cr;
plib::mat_precondition_ILU<FT, SIZE> m_ops;
- //plib::mat_precondition_diag<FT, SIZE> m_ops;
plib::gmres_t<FT, SIZE> m_gmres;
};
@@ -86,17 +83,19 @@ namespace devices
for (std::size_t k=0; k<iN; k++)
{
+ std::size_t cnt = 0;
for (std::size_t j=0; j< this->m_terms[k]->m_railstart;j++)
{
for (std::size_t i = m_ops.m_mat.row_idx[k]; i<m_ops.m_mat.row_idx[k+1]; i++)
if (this->m_terms[k]->m_connected_net_idx[j] == static_cast<int>(m_ops.m_mat.col_idx[i]))
{
- m_term_cr[k].push_back(&m_ops.m_mat.A[i]);
+ this->m_mat_ptr[k][j] = &m_ops.m_mat.A[i];
+ cnt++;
break;
}
}
- nl_assert(m_term_cr[k].size() == this->m_terms[k]->m_railstart);
- m_term_cr[k].push_back(&m_ops.m_mat.A[m_ops.m_mat.diag[k]]);
+ nl_assert(cnt == this->m_terms[k]->m_railstart);
+ this->m_mat_ptr[k][this->m_terms[k]->m_railstart] = &m_ops.m_mat.A[m_ops.m_mat.diag[k]];
}
}
@@ -111,7 +110,7 @@ namespace devices
m_ops.m_mat.set_scalar(0.0);
/* populate matrix and V for first estimate */
- this->fill_matrix(iN, m_term_cr, RHS);
+ this->fill_matrix(iN, this->m_mat_ptr, RHS);
for (std::size_t k = 0; k < iN; k++)
{