37 Sim1D(std::vector<Domain1D*>& domains);
59 void setValue(
size_t dom,
size_t comp,
size_t localPoint, doublereal
value);
68 doublereal
value(
size_t dom,
size_t comp,
size_t localPoint)
const;
70 doublereal workValue(
size_t dom,
size_t comp,
size_t localPoint)
const;
94 void save(
const std::string& fname,
const std::string&
id,
95 const std::string& desc,
int loglevel=1);
97 void saveResidual(
const std::string& fname,
const std::string&
id,
98 const std::string& desc,
int loglevel=1);
101 void showSolution(std::ostream& s);
104 const doublereal* solution() {
108 void setTimeStep(doublereal stepsize,
size_t n, integer* tsteps);
112 void solve(
int loglevel = 0,
bool refine_grid =
true);
114 void eval(doublereal
rdt=-1.0,
int count = 1) {
119 int refine(
int loglevel=0);
130 doublereal slope = 0.8, doublereal curve = 0.8, doublereal prune = -0.1);
131 void setMaxGridPoints(
int dom = -1,
int npoints = 300);
142 void restore(
const std::string& fname,
const std::string&
id,
int loglevel=2);
144 void getInitialSoln();
146 void setSolution(
const doublereal* soln) {
150 const doublereal* solution()
const {
156 void evalSSJacobian();
Container class for multiple-domain 1D problems.
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.
void setGridMin(int dom, double gridmin)
Set the minimum grid spacing in the specified domain(s).