Skip to content

Commit

Permalink
[Samples] Remove unused methods of class BoundaryValueProblem
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Nov 12, 2018
1 parent b9a5913 commit c26db35
Showing 1 changed file with 0 additions and 84 deletions.
84 changes: 0 additions & 84 deletions samples/cxx/bvp/BoundaryValueProblem.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,11 @@ class BoundaryValueProblem : public Cantera::Domain1D
return 0.0;
}

/**
* Value of component \a m at point \a j. This method is used
* to access solution values once a converged solution has been
* attained.
*/
double v(int m, int j) const {
return m_sim->value(1,m,j);
}

protected:
Cantera::Domain1D* m_left; ///< dummy terminator
Cantera::Domain1D* m_right; ///< dummy terminator
Cantera::Sim1D* m_sim; ///< controller for solution

/**
* True if n is the index of the left-most grid point (zero),
* false otherwise.
*/
bool isLeft(size_t n) const {
return (n == 0);
}

/**
* True if \a n is the index of the right-most grid point, false
* otherwise.
*/
bool isRight(size_t n) const {
return (n == nPoints() - 1);
}

/**
* Set up the problem. Creates the solver instance, and sets
* default grid refinement parameters. This method is called
Expand Down Expand Up @@ -311,65 +286,6 @@ class BoundaryValueProblem : public Cantera::Domain1D
return c1/(z(j+1) - z(j-1));
}

/**
* This method is provided for use in method residual when
* central-differenced second derivatives are needed.
* @param x The current trial solution vector.
* @param n Component index.
* @param j Grid point number.
*/
doublereal central_secondDeriv(const doublereal* x,
int n, int j) const {
doublereal c1 = leftFirstDeriv(x, n, j);
doublereal c2 = rightFirstDeriv(x, n, j);
return 2.0*(c2 - c1)/(z(j+1) - z(j-1));
}

/**
* This method is provided for use in method residual when
* central-differenced evaluation of terms like
* \f[
* \frac{d}{dz}\left(g \frac{df}{dz}\right)
* \f]
* is required.
* @param x The current trial solution vector.
* @param g The array of g values at the grid points.
* @param n Component index.
* @param j Grid point number.
*/
doublereal central_Deriv_G_Deriv(const doublereal* x,
const doublereal* g, int n, int j) const {
doublereal c1 = 0.5*(g[j] + g[j-1])*leftFirstDeriv(x, n, j);
doublereal c2 = 0.5*(g[j+1] + g[j])*rightFirstDeriv(x, n, j);
return 2.0*(c2 - c1)/(z(j+1) - z(j-1));
}

/**
* Value of component m between points j and j + 1. This is
* computed as the mean of the values at j and j + 1.
*/
doublereal midpointSolution(const doublereal* x, int m, int j) const {
return 0.5*(value(x,m,j) + value(x,m,j+1));
}

/**
* This method is provided for use in method residual when
* central-differenced evaluation of terms like
* \f[
* \frac{d}{dz}\left(f_m \frac{df_n}{dz}\right)
* \f]
* is required.
* @param x The current trial solution vector.
* @param n Solution component for \f$ f_n \f$
* @param m Solution component for \f$ f_m \f$
* @param j Grid point number.
*/
doublereal central_Deriv_S_Deriv(const doublereal* x,
int n, int m, int j) const {
doublereal c1 = midpointSolution(x,m,j-1)*leftFirstDeriv(x, n, j);
doublereal c2 = midpointSolution(x,m,j)*rightFirstDeriv(x, n, j);
return 2.0*(c2 - c1)/(z(j+1) - z(j-1));
}
//@}
};
}
Expand Down

0 comments on commit c26db35

Please sign in to comment.