Eliminated the unnecessary Cantera.h header from sample code

This commit is contained in:
Ray Speth 2012-02-15 01:01:15 +00:00
parent 0b8d2ec223
commit 855f2ec77b
21 changed files with 13 additions and 83 deletions

View file

@ -60,8 +60,6 @@ To see how this works, consider the class Droplet, shown below, that models a si
// parameters taken from Example 3.2, p. 103, in "An Introduction to
// Combustion" by S.R. Turns
#include <cantera/Cantera.h>
namespace DropletNamespace {
const double Dab_0 = 8.1e-6; // m2/s

View file

@ -35,10 +35,4 @@ These are:
- zerodim.h
- Zero-dimensional reactor networks.
These must be included \e after Cantera.h, for example:
\code
#include <cantera/Cantera.h>
#include <cantera/equilibrium.h>
\endcode
*/

View file

@ -1,5 +1,3 @@
#include <cantera/Cantera.h>
#include <cantera/IdealGasMix.h> // defines class IdealGasMix
#include <cantera/equilibrium.h> // chemical equilibrium
#include <cantera/transport.h> // transport properties

View file

@ -1,6 +1,4 @@
// This header must alway be included.
#include <cantera/Cantera.h>
#include <cantera/thermo.h>
// The actual code is put into a function that

View file

@ -1,6 +1,5 @@
#include <cantera/Cantera.h>
#include <cantera/equilibrium.h>
#include <cantera/thermo.h>
void equil_demo()
{

View file

@ -1,4 +1,4 @@
#include <cantera/Cantera.h>
#include <cantera/base/ctexceptions.h>
void demoprog()
{

View file

@ -1,4 +1,6 @@
#include <cantera/Cantera.h>
#include "cantera/thermo.h"
#include <iostream>
int main()
{
ThermoPhase* gas = newPhase("h2o2.cti","ohmech");

View file

@ -1,4 +1,4 @@
#include <cantera/Cantera.h>
#include "cantera/thermo.h"
//
// artifical example of throwing and catching a CanteraError exception.
//

View file

@ -46,19 +46,6 @@ equivalent of the "Hello, World" program most programming textbooks
begin with. But it illustrates some important points in writing
%Cantera C++ programs.
- <b>The Cantera.h header</b>\n
Note that the program begins with
\code
#include <cantera/Cantera.h>
\endcode
All %Cantera application programs must begin by including this header
file. The syntax of the include statement shown here is recommended,
since usually the %Cantera header files are installed within a
subdirectory named "cantera" in a directory on the search path
used by the compiler. If you need to include additional %Cantera headers,
always include Cantera.h first.
\see \ref cxx-headers
- <b>Catching CanteraError exceptions</b>\n
The entire body of the program is put inside a function that is invoked
within a \c try block in the main program. In this way, exceptions

View file

@ -1,5 +1,5 @@
#include "cantera/thermo.h"
#include <cantera/Cantera.h>
void thermo_demo(string file, string phase)
{

View file

@ -1,32 +0,0 @@
/**
* @file Cantera.h
* Basic include file to be used in all Cantera application environments.
*/
// Copyright 2001 California Institute of Technology
#ifndef CANTERA_H_INCL
#define CANTERA_H_INCL
#include "base/ct_defs.h"
// some useful functions
#include "base/global.h"
// the CanteraError exception class
#include "base/ctexceptions.h"
// The Cantera logger class
#include "base/logger.h"
// Include the timer
#include "base/clockWC.h"
// Include routines for reading and writing XML files
#include "base/xml.h"
// Include string utility routines
#include "base/stringUtils.h"
#endif

View file

@ -6,7 +6,6 @@
#define CXX_INTERFACE
#include <string>
#include "Cantera.h"
#include "thermo.h"
#include "kinetics.h"

View file

@ -1,5 +1,3 @@
#include <cantera/Cantera.h>
#include <cantera/IdealGasMix.h> // defines class IdealGasMix
#include <iostream>

View file

@ -7,7 +7,6 @@
// igniter is a pulsed flow of atomic hydrogen. After the igniter is
// turned off, the system approaches the steady burning solution."""
#include <cantera/Cantera.h>
#include <cantera/zerodim.h>
#include <cantera/IdealGasMix.h>

View file

@ -6,15 +6,11 @@
//
///////////////////////////////////////////////////////////////////////
// Include cantera header files. They should be included in the form
// <cantera/*.h>, and Cantera.h should always be included first.
// These headers are designed for use in C++ programs and provide a
// simplified interface to the Cantera kernel header files. If you
// need to include kernel headers directly, use the format
// <cantera/kernel/*.h>.
// "cantera/*.h". These headers are designed for use in C++ programs and
// provide a simplified interface to the Cantera header files. If you need
// to include core headers directly, use the format "cantera/module/*.h".
#include <cantera/Cantera.h>
#include <cantera/IdealGasMix.h> // defines class IdealGasMix
#include <cantera/equilibrium.h> // chemical equilibrium
#include <cantera/transport.h> // transport properties

View file

@ -1,4 +1,3 @@
#include <cantera/Cantera.h>
#include <cantera/onedim.h>
#include <cantera/IdealGasMix.h>
#include <cantera/equilibrium.h>

View file

@ -6,7 +6,6 @@
//
/////////////////////////////////////////////////////////////
#include <cantera/Cantera.h>
#include <cantera/zerodim.h>
#include <cantera/IdealGasMix.h>
#include <cantera/numerics.h>

View file

@ -3,7 +3,6 @@
#include <string>
#include <map>
#include <cantera/Cantera.h>
#include <cantera/PureFluid.h> // defines class Water
using namespace Cantera;

View file

@ -26,7 +26,6 @@
*/
// add any other Cantera header files you need here
#include <cantera/Cantera.h>
#include <cantera/IdealGasMix.h>
using namespace Cantera;

View file

@ -283,8 +283,7 @@ typedef double(*VCS_FUNC_PTR)(double xval, double Vtarget,
#include <cmath>
#include <cstdlib>
#include "cantera/Cantera.h"
#include "kernel/vcs_internal.h"
#include "equil/vcs_internal.h"
const double g_cgs = 980.;
const double mass_cyl = 0.066;

View file

@ -53,8 +53,7 @@ static void print_funcEval(FILE* fp, double xval, double fval, int its)
* #include <cmath>
* #include <cstdlib>
*
* #include "cantera/Cantera.h"
* #include "kernel/vcs_internal.h"
* #include "equil/vcs_internal.h"
*
* const double g_cgs = 980.;
* const double mass_cyl = 0.066;