Commit graph

64 commits

Author SHA1 Message Date
Ray Speth
ee95c60813 Simplify error handling to eliminate need for global error stack
All of the functions for manipulating the global error stack
(CanteraError::save, setError, showErrors, etc.) are deprecated. The ability to
store an error is retained only for use in the C and Fortran interfaces so that
the last error message can be retrieved after a function returns an error code.
2015-11-16 19:50:55 -05:00
Ray Speth
f8b12adef4 Clean up comments in 'base' source and header files 2015-11-09 19:35:52 -05:00
Ray Speth
90b0ee152b Fix compilation with GCC 4.6 and 4.7
The standard libraries for these versions of GCC do not have 'emplace'
methods for associative containers.
2015-10-17 18:58:50 -04:00
Ray Speth
a945ef2c23 Make use of initializer lists where appropriate 2015-10-17 18:58:50 -04:00
Ray Speth
f9375e1a09 Use locks/mutexes from the standard library instead of Boost.Thread
This eliminates the need to link against any of the compiled Boost libraries,
and means that we can always build in thread-safe mode
2015-10-17 18:58:50 -04:00
Ray Speth
a03f370cfd Make use of emplace and emplace_back methods 2015-10-14 18:45:23 -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
e131766b71 Replace auto_ptr with unique_ptr
auto_ptr is deprecated in c++11
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
acdf9cf0ed Clean up interstitial whitespace
Remove extra space around operators, between words, etc.
2015-08-02 23:06:16 -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
f1f10b6526 Remove unused, deprecated code marked for removal after Cantera 2.2 2015-07-15 12:08:50 -04:00
Ray Speth
6f7241b08b Remove dead code from class Application 2015-06-21 19:01:15 -04:00
Ray Speth
484eff996b Use short form of cantera_version when looking for data directory 2015-06-14 19:51:00 -04:00
Ray Speth
8dcde36d20 Fix invalid iterator usage in Application::close_XML_File
The iterator 'b' is invalidated by calling erase(b), which means that the
subsequent call to ++b results in undefined behavior. This was identified by
segfaults in the Matlab unit test on OS X.
2015-06-08 17:20:54 -04:00
Ray Speth
5214672ab3 Merge namespace ctml with namespace Cantera 2015-05-27 18:09:07 -04:00
Ray Speth
aa2b732954 Fix directories searched for input files on Windows
Update to use the registry key for Cantera 2.2. The 'templates'
subdirectory no longer exists.

Fix documentation to not incorrectly claim that COMMONPROGRAMFILES
will be searched for input files.
2015-05-24 18:23:24 -04:00
Ray Speth
f3eaef1675 [CTI] Strip leading whitespace when converting CTI strings
Leading whitespace would normally result in a Python IndentationError.
2015-04-20 18:34:39 -04:00
Ray Speth
39b93d3690 Allow XML documents without an XML declaration node 2015-04-20 18:34:38 -04:00
Ray Speth
2e53890adf Minor cleanup of constructors and destructors 2015-02-26 21:58:42 +00:00
Ray Speth
ddfc15bb77 Allow CANTERA_DATA to include multiple directories 2014-12-12 01:36:56 +00:00
Ray Speth
8bb65e4cee Add user-specified directories to the beginning of the search path
This way, users are able to override the defaults.
2014-09-23 02:20:45 +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
907bbd8b79 Allow importing phases from XML or CTI strings 2014-07-30 16:59:51 +00:00
Ray Speth
232e28d2c8 Check file modification time before reusing cached XML 2014-07-30 16:59:04 +00:00
Ray Speth
6866725b57 Simplify implementation of get_XML_File
This is easier now that we don't have to write the XML file to disk
when importing from a CTI file.
2014-07-30 16:58:52 +00:00
Ray Speth
19e3a09980 Allow '~/' as alias for user's home directory when importing cti/xml 2014-07-10 22:33:20 +00:00
Ray Speth
789574ac80 Remove commented-out code 2014-05-27 02:52:21 +00:00
Ray Speth
54ded64e4b Miscellaneous whitespace cleanup 2014-05-08 23:01:12 +00:00
Ray Speth
9e4ae0d050 Deprecate unused global 'error' function 2014-03-28 23:12:36 +00:00
Ray Speth
d516d46f33 Remove unnecessary use of static_cast<int> 2014-01-31 23:15:09 +00:00
Ray Speth
3dc335565c Fix missing include in application.cpp
Causes compilation errors on OS X 10.8.
2014-01-31 03:44:27 +00:00
Ray Speth
ff9584105b Do implicit CTI to XML conversions without generating .xml files
When instantiating a phase from a .cti file, do the conversion in memory,
without writing the XML representation to disk. This eliminates the unrequrested
XML files that Cantera normally generates, and also avoids errors when running
Cantera from a directory where the user does not have write permissons.
2014-01-30 00:47:37 +00:00
Ray Speth
f63f8ae57e Remove deprecated HTML logging functionality 2013-12-09 01:36:11 +00:00
Ray Speth
a6614b87bb [Doxygen] Fix some incorrect/missing "@file" commands 2013-06-06 15:32:30 +00:00
Ray Speth
2483e39ae5 Allow tests to suppress deprecation warnings
This prevents certain tests from failing comparisons with blessed output files.
2013-06-05 17:09:46 +00:00
Ray Speth
56d481785c Deprecate HTML log files 2013-06-05 17:09:39 +00:00
Ray Speth
d253fc0d63 Eliminate redundant standard library includes 2013-06-05 17:08:13 +00:00
Ray Speth
3305698b6a Add support for Visual Studio 2012 2013-06-03 22:17:23 +00:00
Ray Speth
c1cfdffccc Add "warn_deprecated" function
This function can be used for issuing runtime deprecation warnings
2013-05-31 15:56:06 +00:00
Ray Speth
65d7cab42e Cleaned up Doxygen documentation for Application and global functions 2013-04-12 23:07:38 +00:00
Ray Speth
07fcf5aab2 Removed unnecessary overloads of writelog for char* 2013-04-12 23:07:30 +00:00
Harry Moffat
94cb8cbb65 Fixed printout issues for interfacial voltage variables in equilibrium solver.
Added a global variable to indicate debug mode.
2013-03-26 02:26:35 +00:00
Ray Speth
e04e59cdd3 Removed extraneous parentheses around arguments to 'return'
'return' is a keyword, not a function, so these parens are unnecessary.
2013-02-14 01:03:48 +00:00
Ray Speth
1a0b59efd4 Eliminated unnecessary variable shadowing in write_logfile 2013-02-14 01:03:05 +00:00
Ray Speth
990a0b5491 Fixed an error that prevented HTML log files from being written 2013-01-07 18:08:17 +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
a1b2f54ffb Fixed segfault in HTML logging at intermediate log levels 2012-10-24 15:42:20 +00:00
Ray Speth
3ce3da1fa2 Fixed code formatting 2012-07-18 18:32:29 +00:00