diff options
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_direct2.h')
-rw-r--r-- | src/lib/netlist/solver/nld_ms_direct2.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/netlist/solver/nld_ms_direct2.h b/src/lib/netlist/solver/nld_ms_direct2.h index 20d3bb659e5..4479ce8003e 100644 --- a/src/lib/netlist/solver/nld_ms_direct2.h +++ b/src/lib/netlist/solver/nld_ms_direct2.h @@ -34,16 +34,16 @@ namespace solver {} unsigned vsolve_non_dynamic(const bool newton_raphson) override { - this->build_LE_A(*this); - this->build_LE_RHS(*this); + this->clear_square_mat(2, this->m_A); + this->fill_matrix(2, this->m_RHS); - const float_type a = this->A(0,0); - const float_type b = this->A(0,1); - const float_type c = this->A(1,0); - const float_type d = this->A(1,1); + const float_type a = this->m_A[0][0]; + const float_type b = this->m_A[0][1]; + const float_type c = this->m_A[1][0]; + const float_type d = this->m_A[1][1]; - const float_type v1 = (a * this->RHS(1) - c * this->RHS(0)) / (a * d - b * c); - const float_type v0 = (this->RHS(0) - b * v1) / a; + const float_type v1 = (a * this->m_RHS[1] - c * this->m_RHS[0]) / (a * d - b * c); + const float_type v0 = (this->m_RHS[0] - b * v1) / a; std::array<float_type, 2> new_V = {v0, v1}; this->m_stat_calculations++; |