Commit graph

59 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
0c8bf1fd08 Clean up Doxygen docs and comments for Transport classes 2015-11-12 11:41:34 -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
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
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
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
546289f737 Remove deprecated code with functional alternatives 2015-07-13 18:59:09 -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
25953f94d4 [Transport] Make transport XML node optional
The default is equivalent to specifying <transport model="None">
2015-04-22 14:08:24 -04:00
Ray Speth
7cdeedb91b [Transport] Provide transitional 'TransportFactory::initTransport'
There are user-provided classes derived from GasTransport which still call this
method, so a version of it that calls the new method for initializing
GasTransport objects needs to be provided until after Cantera 2.2.
2015-02-26 21:59:37 +00:00
Ray Speth
cc17716182 Cleanup trailing whitespace 2015-02-26 21:52:52 +00:00
Ray Speth
fdf7db716e [Transport] Construct gas phase Transport without GasTransportParams
Since most of the members of class GasTransportParams were copied to
MixTransport or MultiTransport, they have instead been made members of
GasTransport and populated directly, making class GasTransportParams
unnecessary.
2015-01-13 23:07:00 +00:00
Ray Speth
07fd8e26c0 [Transport] Move gas transport initialization to class GasTransport
Model-specific initialization code belongs in the classes implementing
the corresponding model, not in TransportFactory.
2015-01-07 23:30:57 +00:00
Ray Speth
e05da2a6a5 [Transport] Fix conversion of dipole moments from Debye to SI units
The existing formulas for converting Debye to SI units did not maintain the
correct dimensionality for the dipole moment. The updated formulas do not change
the results of any calculations, but the dipole moment is now correctly
expressed in Coulomb-meters.
2015-01-06 23:37:28 +00:00
Ray Speth
ced2d20dd8 Use XML_Node::attrib when it is more clear than using operator[] 2014-11-15 00:47:31 +00:00
Ray Speth
5b1b08849c Additional uses for getValue with default value 2014-10-03 01:45:54 +00:00
Ray Speth
1ea0122c15 [Transport] Check for invalid 'geometry' flags
For those cases where the number of atoms in a molecule precludes certain
geometries, check to make sure that that the geometry flag is set
appropriately.
2014-09-15 18:05: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
Steven DeCaluwe
14019cfd2e Adding HighPressureGas transport module. 2014-07-28 21:02:18 +00:00
Steven DeCaluwe
8954090881 Modifying TransportFactory::fitProperties to eliminate an assumption
that the phase of interest is an ideal gas.
2014-07-28 18:18:41 +00:00
Ray Speth
41a6e78ff1 Remove incorrect comments from 'newTransportMgr' functions 2014-07-25 18:32:24 +00:00
Ray Speth
a470502932 [Transport] Replace transport_log.xml with regular text logging
Write plain text to the common Cantera logger to be more consistent with the
verbose/debug logging from other parts of Cantera. This simplifies several of
the transport initialization functions, and eliminates the need for class
XML_Writer.
2014-06-20 18:44:59 +00:00
Ray Speth
b5396837b2 Make use of std::min, std::max, and clip 2014-06-03 16:52:43 +00:00
Ray Speth
712293e415 Change debug code to avoid ifdefs where possible
Use "if (DEBUG_MODE_ENABLED)" instead of "#ifdef DEBUG_MODE". This makes
it easier to see the flow control logic, and the compiler will optimize
out the always-false conditionals when DEBUG_MODE_ENABLED is 0, so there
isn't any speed penalty.
2014-05-27 02:53:22 +00:00
Ray Speth
789574ac80 Remove commented-out code 2014-05-27 02:52:21 +00:00
Harry Moffat
f1863b103a Some changes to make XML sections of liquid transport more orderly, uniform, and processed in
only one place.
2014-04-20 02:12:35 +00:00
Harry Moffat
39651964a7 Added back Statmech and PecosTransport.
Rarefied gas dynamics is an import application area for Sandia, and
    it represents a potentially important development direction for Cantera.
    These classes provide inroads into that area.
2014-03-15 02:57:00 +00:00
Ray Speth
2fb9ff630d Remove abandoned StatMech and PecosTransport classes 2014-03-13 21:35:11 +00:00
Ray Speth
dba9ddd858 Fix miscellaneous integer sign/size warnings 2014-02-21 19:08:47 +00:00
Ray Speth
607955b9f2 Remove unnecessary conditional surrounding 'delete' statements 2014-01-06 18:45:19 +00:00
Ray Speth
d253fc0d63 Eliminate redundant standard library includes 2013-06-05 17:08:13 +00:00
Ray Speth
a8fea51046 Clean up Doxygen docs for TransportFactory 2013-06-03 22:16:41 +00:00
Ray Speth
7da738d238 Re-applied consistent formatting to trunk
Applied using: astyle -n --style=kr --add-brackets --indent=spaces=4
--indent-col1-comments --unpad-paren --pad-header --align-pointer=type
--lineend=linux
2013-02-07 23:40:59 +00:00
Harry Moffat
ea25de7fe7 Continuing transfering LiquidTransport changes, doing bugfixes, and
qualifying against our testsuite.
2012-12-15 00:49:14 +00:00
Victor Brunini
c3233c1355 Update TransportFactory to allow the specification of the number of
dimensions in the problem and default it to 1. At present this is
only passed through to the LiquidTransport constructor.

Remove LiquidTransport member m_nDim since the base Transport class
already stores m_nDim.

Don't set m_nDim to 1 in LiquidTransport constructor, it is set by
the Transport constructor.
2012-11-26 20:19:57 +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
5f2ec1f11d Added ability to switch between transport models in the Cython module 2012-09-06 19:59:45 +00:00
Ray Speth
346605abc4 Removed some unused CTML functions 2012-08-08 22:17:05 +00:00
Ray Speth
3ce3da1fa2 Fixed code formatting 2012-07-18 18:32:29 +00:00
Nicholas Malaya
d9381b55da merging into cantera 2.0 the pecos autotools trunk 2012-07-17 21:12:16 +00:00
Ray Speth
8611f43eb0 Removed deprecated 'GasTransportData' struct
Simplified implementation of TransportFactory::getTransportData,
and removed data members of MixTransport and MultiTransport that
were only used to fill in the GasTransportData structure.
2012-07-16 22:18:58 +00:00
Ray Speth
9f6c79eaf8 Fixed thread safety of TransportFactory 2012-05-31 14:58:03 +00:00
Ray Speth
2970e0c693 Added a ScopedLock typedef that can be used without requiring extra any #ifdefs 2012-05-31 14:57:54 +00:00
Ray Speth
6011f24b38 Removed unnecessary WITH_FEATURE configuration options 2012-05-31 14:57:32 +00:00
Ray Speth
d3e98fe5a8 Corrected a bunch of spelling errors 2012-05-29 21:21:47 +00:00
Harry Moffat
25ba149aab Sorry for monolithic commit. Will break it up in the future.
Moved the external libraries to separate library files so that libcantera.a just contains its own namespace externals.

Fixed several errors in the equilibrium program that occurred during the port. (int to size_t issues).

Moved some equilibrium program headers to the include file system, so that it can link with equilibrium program.

Worked on Cantera.mak. Needs more work.

Fixed an issue with the Residual virtual base classes within numerics. They didn't inherit due to int to size_t migration. This caused numerous test problems to fail (issue with backwards compatibility - do we want it and how much do we want?).

Added csvdiff back so that it's available for shell environment runtests.
2012-04-05 00:24:31 +00:00