Skip to content

Commit

Permalink
Remove final
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu committed Dec 19, 2023
1 parent 27af30a commit 532b8c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/nrniv/nonlinz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ extern void pargap_jacobi_rhs(std::vector<std::complex<double>>&,
const std::vector<std::complex<double>>&);
extern void pargap_jacobi_setup(int mode);

class NonLinImpRep final {
class NonLinImpRep {
public:
NonLinImpRep();
void delta(double);

// Functions to fill the matrix
void didv();
void dids();
void dsdv();
void dsds();

int gapsolve();

// Matrix containing the non linear system to solve.
Expand Down Expand Up @@ -148,6 +151,7 @@ void NonLinImp::compute(double omega, double deltafac, int maxiter) {
// Now that the matrix is filled we can compress it (mandatory for SparseLU)
rep_->m_.makeCompressed();

// Factorize the matrix so this is ready to solve
rep_->lu_.compute(rep_->m_);
switch (rep_->lu_.info()) {
case Eigen::Success:
Expand Down
8 changes: 5 additions & 3 deletions src/nrniv/nonlinz.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@

class NonLinImpRep;

// A solve for non linear equation of complex numbers.
// A solver for non linear equation of complex numbers.
// Matrix should be squared.
class NonLinImp final {
class NonLinImp {
public:
~NonLinImp();
// Prepare the matrix before solving it.
void compute(double omega, double deltafac, int maxiter);
double transfer_amp(int curloc, int vloc); // v_node[arg] is the node

double transfer_amp(int curloc, int vloc);
double transfer_phase(int curloc, int vloc);
double input_amp(int curloc);
double input_phase(int curloc);
double ratio_amp(int clmploc, int vloc);

int solve(int curloc);

private:
Expand Down

0 comments on commit 532b8c6

Please sign in to comment.