Skip to content

Commit

Permalink
Add missing docstrings for SystemJacobian methods
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Feb 1, 2025
1 parent e383e7b commit fdca602
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/cantera/numerics/EigenSparseJacobian.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class EigenSparseJacobian : public SystemJacobian
return m_matrix;
}

//! Print preconditioner contents
void printPreconditioner() override;

//! Print jacobian contents
Expand Down
9 changes: 9 additions & 0 deletions include/cantera/numerics/SystemJacobian.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SystemJacobian

virtual ~SystemJacobian() {}

//! Derived type, corresponding to names registered with SystemJacobianFactory
virtual const string type() const = 0;

//! Set a value at the specified row and column of the jacobian triplet vector
Expand All @@ -70,6 +71,7 @@ class SystemJacobian
return m_precon_side;
}

//! For iterative solvers, set the side where the preconditioner is applied
virtual void setPreconditionerSide(const string& preconSide) {
m_precon_side = preconSide;
}
Expand Down Expand Up @@ -156,6 +158,8 @@ class SystemJacobian
double elapsedTime() const {
return m_elapsed;
}

//! Increase the elapsed time by the specified time.
void updateElapsed(double evalTime) {
m_elapsed += evalTime;
}
Expand All @@ -164,6 +168,7 @@ class SystemJacobian
int nEvals() const {
return m_nevals;
}
//! Increment the number of times the Jacobian has been evaluated
void incrementEvals() {
m_nevals++;
}
Expand All @@ -183,6 +188,9 @@ class SystemJacobian
m_age = age;
}

//! Clear collected stats about number of Jacobian evaluations, CPU time spent on
//! Jacobian updates, and the number of Newton steps that have been taken since
//! updating the Jacobian.
void clearStats() {
m_elapsed = 0.0;
m_nevals = 0;
Expand Down Expand Up @@ -213,6 +221,7 @@ class SystemJacobian

int m_age = 100000; //!< Age of the Jacobian (times incrementAge() has been called)

//! For iterative solvers, side of the system to apply the preconditioner on
string m_precon_side = "none";
};

Expand Down

0 comments on commit fdca602

Please sign in to comment.