[1D] Exceeding the max number of grid points should be an error
This commit is contained in:
parent
a82dd5a483
commit
0a363a108d
2 changed files with 2 additions and 7 deletions
|
|
@ -331,10 +331,6 @@ void Sim1D::solve(int loglevel, bool refine_grid)
|
|||
saveResidual("debug_sim1d.xml", "residual",
|
||||
"After regridding");
|
||||
}
|
||||
if (new_points < 0) {
|
||||
writelog("Maximum number of grid points reached.");
|
||||
new_points = 0;
|
||||
}
|
||||
} else {
|
||||
debuglog("grid refinement disabled.\n", loglevel);
|
||||
new_points = 0;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ int Refiner::analyze(size_t n, const doublereal* z,
|
|||
const doublereal* x)
|
||||
{
|
||||
if (n >= m_npmax) {
|
||||
writelog("max number of grid points reached ({}).\n", m_npmax);
|
||||
return -2;
|
||||
throw CanteraError("Refiner::analyze", "max number of grid points reached ({}).", m_npmax);
|
||||
}
|
||||
|
||||
if (m_domain->nPoints() <= 1) {
|
||||
|
|
@ -66,7 +65,7 @@ int Refiner::analyze(size_t n, const doublereal* z,
|
|||
|
||||
// check consistency
|
||||
if (n != m_domain->nPoints()) {
|
||||
throw CanteraError("analyze","inconsistent");
|
||||
throw CanteraError("Refiner::analyze", "inconsistent");
|
||||
}
|
||||
|
||||
// find locations where cell size ratio is too large.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue