Commit graph

47 commits

Author SHA1 Message Date
Ray Speth
059e657fe4 [1D/Examples] Use new default values for Jacobian and time stepping settings
These values were selected for optimal performance across a large set of flames
in each configuration and using mechanisms of various sizes to give good average
performance. It should not generally be necessary for users to change these
values.
2016-03-27 17:07:36 -04:00
Ray Speth
9353a79da2 [1D] Switch to "steady mode" before attempting steady-state solve
The solver could previously get left in transient mode if an exception occurred
during time stepping, making it impossible to make a new attempt at solving the
steady-state problem.
2016-03-27 17:07:36 -04:00
Ray Speth
7ba668109e [1D] Increase default value for maximum timestep
This accelerates convergence of the solver in some cases.
2016-03-27 17:07:36 -04:00
Ray Speth
29b704916c [1D] Set limit on number of timesteps without reaching steady state 2016-03-27 17:07:36 -04:00
Ray Speth
11b665b00a [1D] Keep track of number of time steps taken before each steady-state solve 2016-03-27 17:07:35 -04:00
Ray Speth
318fa04cf7 [1D] Reset negative species concentrations after a failed time step 2016-03-27 17:07:35 -04:00
Ray Speth
d76704912b [1D] Fix transient mask after Jacobian update
The transient mask should only be zeroed when doing a full evaluation of the
residual function, since the partial evaluations done while evaluating the
Jacobian will not fill in all elements of the mask. This error was causing
Jacobian update in MultiNewton::solve to always effectively generate the
steady-state Jacobian, even when in time-stepping mode.
2016-03-25 12:21:19 -04:00
Ray Speth
d20ab891e8 [1D] add function for getting info about a solution component 2016-03-25 12:21:19 -04:00
Ray Speth
4887775109 Eliminate unnecessary counter member variables 2015-12-01 15:54:55 -05:00
Ray Speth
34ff39e3df Clean up Doxygen docs and comments in OneD classes 2015-11-12 11:41:34 -05:00
Ray Speth
0647823ada Replace DATA_PTR macro with calls to data() 2015-10-17 18:58:50 -04:00
Ray Speth
fb4eece9f8 Use std::unique_ptr instead of raw pointers where appropriate 2015-10-14 18:45:23 -04:00
Ray Speth
2589a27b6c Use range-based for and auto to simplify some loops 2015-10-14 18:45:23 -04:00
Ray Speth
71bb73b728 Eliminate unnecessary calles to std::string.c_str() 2015-10-14 18:45:22 -04:00
Ray Speth
1411419b0f [1D] Eliminate sprintf-style string formatting 2015-10-14 18:45:22 -04:00
Ray Speth
41527b1ea7 Rename two-argument version of writelog 'debuglog'
This is a prerequisite to allowing writelog to take an arbitrary number
of arguments.
2015-10-14 18:45:22 -04:00
Ray Speth
6a04193646 Fix un-bracketed if, for, and else statements 2015-08-02 23:06:15 -04:00
Ray Speth
e4c45b6429 General whitespace cleanup
Remove unnecessary blank lines and trailing whitespace. Replace tabs with
spaces.
2015-08-02 23:06:15 -04:00
Ray Speth
619cd20f14 Fix badly-formatted else/else if/catch clauses 2015-08-02 23:06:15 -04:00
Ray Speth
217d780233 Fix calls to CanteraError with blank or incorrect first argument
The first argument should be the function name from which the exception was
thrown. Leaving this blank makes it difficult to track down the location of the
exception.
2015-06-09 12:03:57 -04:00
Ray Speth
5214672ab3 Merge namespace ctml with namespace Cantera 2015-05-27 18:09:07 -04:00
Ray Speth
fd659c09ea [1D] Fix saving multiple flame profiles to a single XML file
Broken by the change in b0e5b13913. Modify the save_restore test
to cover this case.
2015-05-02 21:24:51 -04:00
Ray Speth
4081d41841 [1D] Change 'save' behavior to avoid endlessly appending solutions
Instead of changing the solution 'id' provided by the user to avoid
duplicates, replace the solution with the same id.
2014-09-15 18:04:54 +00:00
Ray Speth
a837dfdc6d [1D] Add 'clearStats' function for clearing accumulated solver stats 2014-09-07 21:17:00 +00:00
Ray Speth
002c158761 Cleanup include statements
Move includes from header to implementation files where possible, and remove
unnecessary includes.
2014-08-28 16:54:13 +00:00
Ray Speth
56ccc667df Fix some uninitialized member variables 2014-07-30 16:59:39 +00:00
Ray Speth
b5396837b2 Make use of std::min, std::max, and clip 2014-06-03 16:52:43 +00:00
Ray Speth
789574ac80 Remove commented-out code 2014-05-27 02:52:21 +00:00
Ray Speth
1b20128ad5 [1D] Miscellanous cleanup of class OneDim 2014-01-06 18:46:14 +00:00
Ray Speth
dede8dcd42 [1D] Remove redundant Domain1D::setGrid function
This is a duplicate of Domain1D::setupGrid.
2014-01-06 18:46:09 +00:00
Ray Speth
2653c0a16b [1D] Move OneDim::needJacUpdate to the correct source file 2014-01-06 18:46:03 +00:00
Ray Speth
a6614b87bb [Doxygen] Fix some incorrect/missing "@file" commands 2013-06-06 15:32:30 +00:00
Ray Speth
f75ba112f9 Clean up Doxygen docs for 1D simulation classes 2013-06-05 03:09:03 +00:00
Ray Speth
53ea57f504 Fixed compiler warnings about initialization order 2013-04-18 22:09:16 +00:00
Ray Speth
b3a1e1e47c [Cython/1D] 1D solver can be interrupted by ctrl-c
By calling a pure Python function each time OneDim::eval is called, we can
catch KeyboardInterrupt exceptions and abort the 1D solver loop, returning
control to Python.

Partially addresses Issue 93.
2013-03-04 17:31:41 +00:00
Ray Speth
934010136d Removed unnecessary temporaries used for storing return values 2013-02-14 01:04:07 +00:00
Ray Speth
1e43e4f333 Added a version of writelog which takes the log level as an argument 2012-12-30 00:17:08 +00:00
Ray Speth
14426bfc86 [1D] Added loglevel argument to control output from save and restore
Passing loglevel=0 to Sim1D::save or Sim1D::restore will suppress all output
from these functions. The default loglevel maintains the normal level of output.
2012-12-18 00:09:29 +00:00
Ray Speth
1d19803885 Pass "const std::string&" instead of "std::string" when possible 2012-10-24 15:42:51 +00:00
Ray Speth
85d9d360c7 Fixed a bunch of spelling issues 2012-08-17 16:43:34 +00:00
Ray Speth
d8db89e708 Propagate setSteadyMode from OneDim to child Domain1D objects 2012-04-10 03:13:07 +00:00
Ray Speth
8ea4ae728a Moved a few standard library includes to more local scopes 2012-03-23 22:16:04 +00:00
Ray Speth
3bff32dd55 Fixed problems that generated warnings with the Intel compiler 2012-03-07 00:51:13 +00:00
Ray Speth
657ed19371 Fixed warnings related to printf/sprintf 2012-02-28 19:02:00 +00:00
Ray Speth
fe8a5d49a8 Use std::min and std::max instead of homegrown alternatives 2012-02-21 16:03:32 +00:00
Ray Speth
a310345b9e Updated #includes to reflect new header file locations 2012-02-12 02:44:14 +00:00
Ray Speth
2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00
Renamed from Cantera/src/oneD/OneDim.cpp (Browse further)