summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/solver/nld_ms_sor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_sor.h')
-rw-r--r--src/lib/netlist/solver/nld_ms_sor.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/netlist/solver/nld_ms_sor.h b/src/lib/netlist/solver/nld_ms_sor.h
index a253f160c4a..6b1a21afd39 100644
--- a/src/lib/netlist/solver/nld_ms_sor.h
+++ b/src/lib/netlist/solver/nld_ms_sor.h
@@ -12,8 +12,8 @@
/// Fow w==1 we will do the classic Gauss-Seidel approach.
///
+#include "nld_matrix_solver_ext.h"
#include "nld_ms_direct.h"
-#include "nld_solver.h"
#include <algorithm>
@@ -70,16 +70,19 @@ namespace solver
for (std::size_t k = 0; k < iN; k++)
{
- nl_fptype gtot_t = nlconst::zero();
- nl_fptype gabs_t = nlconst::zero();
- nl_fptype RHS_t = nlconst::zero();
const std::size_t term_count = this->m_terms[k].count();
- const nl_fptype * const gt = this->m_gtn[k];
- const nl_fptype * const go = this->m_gonn[k];
- const nl_fptype * const Idr = this->m_Idrn[k];
+ const auto * const gt = this->m_gtn[k];
+ const auto * const go = this->m_gonn[k];
+ const auto * const Idr = this->m_Idrn[k];
auto other_cur_analog = this->m_connected_net_Vn[k];
+ using fpaggtype = std::remove_reference_t<std::remove_cv_t<decltype(this->m_gtn[0][0])>>;
+
+ fpaggtype gtot_t = nlconst_base<fpaggtype>::zero();
+ fpaggtype gabs_t = nlconst_base<fpaggtype>::zero();
+ fpaggtype RHS_t = nlconst_base<fpaggtype>::zero();
+
this->m_new_V[k] = static_cast<float_type>(this->m_terms[k].getV());
for (std::size_t i = 0; i < term_count; i++)
@@ -126,7 +129,7 @@ namespace solver
{
const int * net_other = this->m_terms[k].m_connected_net_idx.data();
const std::size_t railstart = this->m_terms[k].railstart();
- const nl_fptype * go = this->m_gonn[k];
+ const auto * go = this->m_gonn[k];
float_type Idrive = plib::constants<float_type>::zero();
for (std::size_t i = 0; i < railstart; i++)