From af54f50a254b58a71703fdda32315bed55bd1510 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Mon, 7 Jul 2003 16:45:46 +0000 Subject: [PATCH] Added more functions to the virtual base class. This will mean that all classes that inherit from this class will be broken until they too add definitions for these functions. --- Cantera/src/ResidEval.h | 66 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/Cantera/src/ResidEval.h b/Cantera/src/ResidEval.h index 1cc04af15..5ca3726b6 100755 --- a/Cantera/src/ResidEval.h +++ b/Cantera/src/ResidEval.h @@ -35,8 +35,10 @@ namespace Cantera { * @param ydot rate of change of solution vector. (input, do * not modify) */ - virtual void evalResid(double t, const double* y, - const double* ydot, double* resid)=0; + virtual void evalResid(double t, const double deltaT, + const double* y, + const double* ydot, + double* resid)=0; /** Number of equations. */ virtual int neq()=0; @@ -45,12 +47,68 @@ namespace Cantera { virtual double* solution()=0; virtual double* solution_dot()=0; + /** + * Fill the solution vector with the initial conditions + * at initial time t0. + */ + virtual void getInitialConditions(double t0, size_t leny, double* y)=0; + + /** + * Report the analytical result if available and describe + * how close the numerical solution is to the analytical + * solution + */ + virtual void analytical_solution(double, double *)=0; + virtual void analytical_solution_dot(double, double *)=0; + + /** + * Write out to a file or to standard output the current solution + * ievent is a description of the event that caused this + * function to be called. + */ + virtual void writeSolution(int ievent, double t, + const double *y, const double *ydot) = 0; + + /** + * Apply a filter + */ + virtual void applyFilter(const double time, const double deltaT, + const double *ydot, const double *y, + double *ydot) = 0; + + /** + * Write out to a file or to standard output the current solution + * ievent is a description of the event that caused this + * function to be called. + */ + virtual void writeSolutionFilter(int ievent, double t, + const double * const y, + const double * const ydot, + const double * const delta_y, + const char * const fname) = 0; + + /** + * This function returns a value of the delta t constraint + * that may exist in the problem. + * + */ + virtual double delta_t_constraint(const double t, const double *y, + const double *ydot) = 0; + + virtual void adjustAtol(double *) = 0; + + /** + * This function may be used to create output at various points in the + * execution of an application. + * + */ + virtual void user_out(const int ifunc, const double t, const double *y, + const double *ydot) = 0; + protected: private: }; - } - #endif