Took namespaces out of headers
This commit is contained in:
parent
566fcdea0c
commit
368cdc8167
12 changed files with 36 additions and 35 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "Func1.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
namespace CanteraZeroD {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
namespace Cantera {
|
||||
class Func1;
|
||||
}
|
||||
using namespace Cantera;
|
||||
|
||||
namespace CanteraZeroD {
|
||||
|
||||
|
|
@ -166,7 +165,7 @@ namespace CanteraZeroD {
|
|||
|
||||
doublereal m_mdot;
|
||||
Cantera::Func1* m_func;
|
||||
vector_fp m_coeffs;
|
||||
Cantera::vector_fp m_coeffs;
|
||||
int m_type;
|
||||
|
||||
private:
|
||||
|
|
@ -174,10 +173,10 @@ namespace CanteraZeroD {
|
|||
int m_nspin, m_nspout;
|
||||
ReactorBase* m_in;
|
||||
ReactorBase* m_out;
|
||||
vector_int m_in2out, m_out2in;
|
||||
Cantera::vector_int m_in2out, m_out2in;
|
||||
|
||||
void warn(std::string meth) {
|
||||
writelog(std::string("Warning: method ") + meth + " of base class "
|
||||
Cantera::writelog(std::string("Warning: method ") + meth + " of base class "
|
||||
+ " FlowDevice called. Nothing done.\n");
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ namespace CanteraZeroD {
|
|||
setKineticsMgr(contents);
|
||||
}
|
||||
|
||||
void setKineticsMgr(Kinetics& kin) {
|
||||
void setKineticsMgr(Cantera::Kinetics& kin) {
|
||||
m_kin = &kin;
|
||||
if (m_kin->nReactions() == 0) disableChemistry();
|
||||
}
|
||||
|
|
@ -122,24 +122,24 @@ namespace CanteraZeroD {
|
|||
|
||||
protected:
|
||||
|
||||
Kinetics* m_kin;
|
||||
Cantera::Kinetics* m_kin;
|
||||
|
||||
doublereal m_temp_atol; // tolerance on T
|
||||
doublereal m_maxstep; // max step size
|
||||
doublereal m_vdot, m_Q;
|
||||
vector_fp m_atol;
|
||||
Cantera::vector_fp m_atol;
|
||||
doublereal m_rtol;
|
||||
vector_fp m_work;
|
||||
vector_fp m_sdot; // surface production rates
|
||||
Cantera::vector_fp m_work;
|
||||
Cantera::vector_fp m_sdot; // surface production rates
|
||||
bool m_chem;
|
||||
bool m_energy;
|
||||
int m_nv;
|
||||
|
||||
int m_nsens;
|
||||
vector_int m_pnum;
|
||||
Cantera::vector_int m_pnum;
|
||||
std::vector<std::string> m_pname;
|
||||
vector_int m_nsens_wall;
|
||||
vector_fp m_mult_save;
|
||||
Cantera::vector_int m_nsens_wall;
|
||||
Cantera::vector_fp m_mult_save;
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
#include "Wall.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
namespace CanteraZeroD {
|
||||
|
||||
ReactorBase::ReactorBase(string name) : m_nsp(0),
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "ThermoPhase.h"
|
||||
|
||||
using namespace Cantera;
|
||||
|
||||
/// Namespace for classes implementing zero-dimensional reactor networks.
|
||||
namespace CanteraZeroD {
|
||||
|
||||
|
|
@ -82,7 +80,7 @@ namespace CanteraZeroD {
|
|||
* a pointer to this substance is stored, and as the integration
|
||||
* proceeds, the state of the substance is modified.
|
||||
*/
|
||||
void setThermoMgr(thermo_t& thermo);
|
||||
void setThermoMgr(Cantera::thermo_t& thermo);
|
||||
|
||||
void addInlet(FlowDevice& inlet);
|
||||
void addOutlet(FlowDevice& outlet);
|
||||
|
|
@ -118,9 +116,9 @@ namespace CanteraZeroD {
|
|||
void resetState();
|
||||
|
||||
/// return a reference to the contents.
|
||||
thermo_t& contents() { return *m_thermo; }
|
||||
Cantera::thermo_t& contents() { return *m_thermo; }
|
||||
|
||||
const thermo_t& contents() const { return *m_thermo; }
|
||||
const Cantera::thermo_t& contents() const { return *m_thermo; }
|
||||
|
||||
doublereal residenceTime();
|
||||
|
||||
|
|
@ -148,14 +146,14 @@ namespace CanteraZeroD {
|
|||
//@}
|
||||
|
||||
int error(std::string msg) const {
|
||||
writelog("Error: "+msg);
|
||||
Cantera::writelog("Error: "+msg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
int m_nsp;
|
||||
thermo_t* m_thermo;
|
||||
Cantera::thermo_t* m_thermo;
|
||||
doublereal m_time;
|
||||
doublereal m_vol, m_vol0;
|
||||
bool m_init;
|
||||
|
|
@ -164,10 +162,10 @@ namespace CanteraZeroD {
|
|||
doublereal m_enthalpy;
|
||||
doublereal m_intEnergy;
|
||||
doublereal m_pressure;
|
||||
vector_fp m_state;
|
||||
Cantera::vector_fp m_state;
|
||||
std::vector<FlowDevice*> m_inlet, m_outlet;
|
||||
std::vector<Wall*> m_wall;
|
||||
vector_int m_lr;
|
||||
Cantera::vector_int m_lr;
|
||||
int m_nwalls;
|
||||
std::string m_name;
|
||||
double m_rho0;
|
||||
|
|
@ -175,7 +173,7 @@ namespace CanteraZeroD {
|
|||
private:
|
||||
|
||||
void tilt(std::string method="") const {
|
||||
throw CanteraError("ReactorBase::"+method,
|
||||
throw Cantera::CanteraError("ReactorBase::"+method,
|
||||
"ReactorBase method called!"); }
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace CanteraZeroD {
|
|||
case ConstPressureReactorType:
|
||||
return new ConstPressureReactor();
|
||||
default:
|
||||
throw CanteraError("ReactorFactory::newReactor",
|
||||
throw Cantera::CanteraError("ReactorFactory::newReactor",
|
||||
"unknown reactor type!");
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
namespace CanteraZeroD {
|
||||
|
||||
|
||||
class ReactorFactory : FactoryBase {
|
||||
class ReactorFactory : Cantera::FactoryBase {
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "Wall.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
namespace CanteraZeroD {
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace CanteraZeroD {
|
|||
void setVerbose(bool v = true) { m_verbose = v; }
|
||||
|
||||
/// Return a reference to the integrator.
|
||||
Integrator& integrator() { return *m_integ; }
|
||||
Cantera::Integrator& integrator() { return *m_integ; }
|
||||
|
||||
void updateState(doublereal* y);
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ namespace CanteraZeroD {
|
|||
}
|
||||
|
||||
void evalJacobian(doublereal t, doublereal* y,
|
||||
doublereal* ydot, doublereal* p, Array2D* j);
|
||||
doublereal* ydot, doublereal* p, Cantera::Array2D* j);
|
||||
|
||||
//-----------------------------------------------------
|
||||
|
||||
|
|
@ -144,20 +144,20 @@ namespace CanteraZeroD {
|
|||
std::vector<Reactor*> m_reactors;
|
||||
int m_nr;
|
||||
int m_nreactors;
|
||||
Integrator* m_integ;
|
||||
Cantera::Integrator* m_integ;
|
||||
doublereal m_time;
|
||||
bool m_init;
|
||||
int m_nv;
|
||||
vector_int m_size;
|
||||
vector_fp m_atol;
|
||||
Cantera::vector_int m_size;
|
||||
Cantera::vector_fp m_atol;
|
||||
doublereal m_rtol, m_rtolsens;
|
||||
doublereal m_atols, m_atolsens;
|
||||
doublereal m_maxstep;
|
||||
bool m_verbose;
|
||||
int m_ntotpar;
|
||||
vector_int m_nparams;
|
||||
vector_int m_connect;
|
||||
vector_fp m_ydot;
|
||||
Cantera::vector_int m_nparams;
|
||||
Cantera::vector_int m_connect;
|
||||
Cantera::vector_fp m_ydot;
|
||||
|
||||
std::vector<bool> m_iown;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ namespace CanteraZeroD {
|
|||
virtual void initialize(doublereal t0 = 0.0) {}
|
||||
virtual void advance(doublereal time) {m_time = time;}
|
||||
|
||||
void insert(ThermoPhase& contents) {
|
||||
setThermoMgr(contents);
|
||||
void insert(Cantera::ThermoPhase& contents) {
|
||||
setThermoMgr(contents);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using Cantera::Func1;
|
|||
using Cantera::Kinetics;
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
namespace CanteraZeroD {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ namespace Cantera {
|
|||
class Func1;
|
||||
class SurfPhase;
|
||||
}
|
||||
//using namespace Cantera;
|
||||
|
||||
namespace CanteraZeroD {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue