diff options
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_direct2.h')
-rw-r--r-- | src/lib/netlist/solver/nld_ms_direct2.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lib/netlist/solver/nld_ms_direct2.h b/src/lib/netlist/solver/nld_ms_direct2.h index 06f00302d3c..2488e573bf2 100644 --- a/src/lib/netlist/solver/nld_ms_direct2.h +++ b/src/lib/netlist/solver/nld_ms_direct2.h @@ -20,26 +20,18 @@ public: matrix_solver_direct2_t(const solver_parameters_t *params) : matrix_solver_direct_t<2, 2>(params, 2) {} - ATTR_HOT inline int vsolve_non_dynamic(const bool newton_raphson); -protected: - ATTR_HOT virtual nl_double vsolve() override; -private: + virtual int vsolve_non_dynamic(const bool newton_raphson) override; + }; // ---------------------------------------------------------------------------------------- // matrix_solver - Direct2 // ---------------------------------------------------------------------------------------- -ATTR_HOT nl_double matrix_solver_direct2_t::vsolve() -{ - solve_base<matrix_solver_direct2_t>(this); - return this->compute_next_timestep(); -} - -ATTR_HOT inline int matrix_solver_direct2_t::vsolve_non_dynamic(ATTR_UNUSED const bool newton_raphson) +inline int matrix_solver_direct2_t::vsolve_non_dynamic(ATTR_UNUSED const bool newton_raphson) { build_LE_A(); - build_LE_RHS(m_RHS); + build_LE_RHS(); const nl_double a = A(0,0); const nl_double b = A(0,1); @@ -47,8 +39,8 @@ ATTR_HOT inline int matrix_solver_direct2_t::vsolve_non_dynamic(ATTR_UNUSED cons const nl_double d = A(1,1); nl_double new_val[2]; - new_val[1] = (a * m_RHS[1] - c * m_RHS[0]) / (a * d - b * c); - new_val[0] = (m_RHS[0] - b * new_val[1]) / a; + new_val[1] = (a * RHS(1) - c * RHS(0)) / (a * d - b * c); + new_val[0] = (RHS(0) - b * new_val[1]) / a; if (is_dynamic()) { |