38 Sim1D(std::vector<Domain1D*>& domains);
60 void setValue(
size_t dom,
size_t comp,
size_t localPoint, doublereal
value);
69 doublereal
value(
size_t dom,
size_t comp,
size_t localPoint)
const;
71 doublereal workValue(
size_t dom,
size_t comp,
size_t localPoint)
const;
95 void save(
const std::string& fname,
const std::string&
id,
96 const std::string& desc,
int loglevel=1);
98 void saveResidual(
const std::string& fname,
const std::string&
id,
99 const std::string& desc,
int loglevel=1);
105 const doublereal* solution() {
109 void setTimeStep(doublereal stepsize,
size_t n, integer* tsteps);
113 void solve(
int loglevel = 0,
bool refine_grid =
true);
115 void eval(doublereal
rdt=-1.0,
int count = 1) {
120 int refine(
int loglevel=0);
125 void setAdiabaticFlame(
void);
133 doublereal slope = 0.8, doublereal curve = 0.8, doublereal prune = -0.1);
134 void setMaxGridPoints(
int dom = -1,
int npoints = 300);
145 void restore(
const std::string& fname,
const std::string&
id,
int loglevel=2);
147 void getInitialSoln();
149 void setSolution(
const doublereal* soln) {
153 const doublereal* solution()
const {
159 void evalSSJacobian();
Container class for multiple-domain 1D problems.
void showSolution(std::ostream &s)
Print to stream s the current solution for all domains.
void restore(const std::string &fname, const std::string &id, int loglevel=2)
Initialize the solution with a previously-saved solution.
vector_fp m_x
the solution vector
doublereal value(size_t dom, size_t comp, size_t localPoint) const
Get one entry in the solution vector.
void eval(size_t j, double *x, double *r, doublereal rdt=-1.0, int count=1)
Evaluate the multi-domain residual function.
MultiJac & jacobian()
Return a reference to the Jacobian evaluator.
const size_t npos
index returned by functions to indicate "no position"
void setValue(size_t dom, size_t comp, size_t localPoint, doublereal value)
Set a single value in the solution vector.
void setRefineCriteria(int dom=-1, doublereal ratio=10.0, doublereal slope=0.8, doublereal curve=0.8, doublereal prune=-0.1)
Set grid refinement criteria.
void setInitialGuess(const std::string &component, vector_fp &locs, vector_fp &vals)
Set initial guess based on equilibrium.
vector_int m_steps
array of number of steps to take before re-attempting the steady-state solution
int newtonSolve(int loglevel)
doublereal rdt() const
Reciprocal of the time step.
std::vector< int > vector_int
Vector of ints.
int setFixedTemperature(doublereal t)
Add node for fixed temperature point of freely propagating flame.
One-dimensional simulations.
void finalize()
Calls method _finalize in each domain.
doublereal m_tstep
timestep
void setFlatProfile(size_t dom, size_t comp, doublereal v)
Set component 'comp' of domain 'dom' to value 'v' at all points.
Sim1D()
Default constructor.
vector_fp m_xnew
a work array used to hold the residual or the new solution
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
int refine(int loglevel=0)
Refine the grid in all domains.
void setProfile(size_t dom, size_t comp, const vector_fp &pos, const vector_fp &values)
Specify a profile for one component of one domain.
#define DATA_PTR(vec)
Creates a pointer to the start of the raw data for a vector.
Header for a file containing miscellaneous numerical functions.
void setGridMin(int dom, double gridmin)
Set the minimum grid spacing in the specified domain(s).