mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[clib] Remove obsolete functions
This commit is contained in:
parent
0ce3a7c3e1
commit
7809c7355a
@ -25,7 +25,6 @@ extern "C" {
|
||||
CANTERA_CAPI int reactor_setInitialVolume(int i, double v);
|
||||
CANTERA_CAPI int reactor_setChemistry(int i, int cflag);
|
||||
CANTERA_CAPI int reactor_setEnergy(int i, int eflag);
|
||||
CANTERA_CAPI int reactor_setSolution(int i, int n);
|
||||
CANTERA_CAPI double reactor_mass(int i);
|
||||
CANTERA_CAPI double reactor_volume(int i);
|
||||
CANTERA_CAPI double reactor_density(int i);
|
||||
@ -58,11 +57,6 @@ extern "C" {
|
||||
CANTERA_CAPI int connector_name(int i, int len, char* nbuf);
|
||||
CANTERA_CAPI int connector_setName(int i, const char* name);
|
||||
|
||||
CANTERA_CAPI int flowdev_new(const char* type, const char* name);
|
||||
CANTERA_CAPI int flowdev_del(int i);
|
||||
CANTERA_CAPI int flowdev_name(int i, int len, char* nbuf);
|
||||
CANTERA_CAPI int flowdev_setName(int i, const char* name);
|
||||
CANTERA_CAPI int flowdev_install(int i, int n, int m);
|
||||
CANTERA_CAPI int flowdev_setPrimary(int i, int n);
|
||||
CANTERA_CAPI double flowdev_massFlowRate(int i);
|
||||
CANTERA_CAPI int flowdev_setMassFlowCoeff(int i, double v);
|
||||
@ -71,11 +65,6 @@ extern "C" {
|
||||
CANTERA_CAPI int flowdev_setPressureFunction(int i, int n);
|
||||
CANTERA_CAPI int flowdev_setTimeFunction(int i, int n);
|
||||
|
||||
CANTERA_CAPI int wall_new(const char* type, const char* name);
|
||||
CANTERA_CAPI int wall_del(int i);
|
||||
CANTERA_CAPI int wall_name(int i, int len, char* nbuf);
|
||||
CANTERA_CAPI int wall_setName(int i, const char* name);
|
||||
CANTERA_CAPI int wall_install(int i, int n, int m);
|
||||
CANTERA_CAPI double wall_expansionRate(int i);
|
||||
CANTERA_CAPI double wall_heatRate(int i);
|
||||
CANTERA_CAPI double wall_area(int i);
|
||||
@ -86,7 +75,6 @@ extern "C" {
|
||||
CANTERA_CAPI int wall_setExpansionRateCoeff(int i, double k);
|
||||
CANTERA_CAPI int wall_setVelocity(int i, int n);
|
||||
CANTERA_CAPI int wall_setEmissivity(int i, double epsilon);
|
||||
CANTERA_CAPI int wall_ready(int i);
|
||||
|
||||
CANTERA_CAPI int reactorsurface_new(const char* name);
|
||||
CANTERA_CAPI int reactorsurface_del(int i);
|
||||
|
@ -42,7 +42,8 @@ extern "C" {
|
||||
int reactor_new(const char* type, int n, const char* name)
|
||||
{
|
||||
try {
|
||||
return ReactorCabinet::add(newReactor(type, SolutionCabinet::at(n), name));
|
||||
return ReactorCabinet::add(
|
||||
newReactor(type, SolutionCabinet::at(n), name));
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
@ -98,16 +99,6 @@ extern "C" {
|
||||
}
|
||||
}
|
||||
|
||||
int reactor_setSolution(int i, int n)
|
||||
{
|
||||
try {
|
||||
ReactorCabinet::as<Reactor>(i)->setSolution(SolutionCabinet::at(n));
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
double reactor_mass(int i)
|
||||
{
|
||||
try {
|
||||
@ -363,7 +354,8 @@ extern "C" {
|
||||
try {
|
||||
|
||||
return ConnectorCabinet::add(
|
||||
newConnector(type, ReactorCabinet::at(n), ReactorCabinet::at(m), name));
|
||||
newConnectorNode(type,
|
||||
ReactorCabinet::at(n), ReactorCabinet::at(m), name));
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
@ -411,60 +403,6 @@ extern "C" {
|
||||
|
||||
// flow devices
|
||||
|
||||
int flowdev_new(const char* type, const char* name)
|
||||
{
|
||||
try {
|
||||
return ConnectorCabinet::add(newFlowDevice(type, name));
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int flowdev_del(int i)
|
||||
{
|
||||
try {
|
||||
ConnectorCabinet::del(i);
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int flowdev_name(int i, int len, char* nbuf)
|
||||
{
|
||||
try {
|
||||
return static_cast<int>(
|
||||
copyString(ConnectorCabinet::at(i)->name(), nbuf, len));
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int flowdev_setName(int i, const char* name)
|
||||
{
|
||||
try {
|
||||
ConnectorCabinet::at(i)->setName(name);
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int flowdev_install(int i, int n, int m)
|
||||
{
|
||||
try {
|
||||
bool ok = ConnectorCabinet::as<FlowDevice>(i)->install(
|
||||
*ReactorCabinet::at(n), *ReactorCabinet::at(m));
|
||||
if (!ok) {
|
||||
throw CanteraError("flowdev_install",
|
||||
"Could not install flow device.");
|
||||
}
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int flowdev_setPrimary(int i, int n)
|
||||
{
|
||||
try {
|
||||
@ -539,56 +477,6 @@ extern "C" {
|
||||
|
||||
///////////// Walls ///////////////////////
|
||||
|
||||
int wall_new(const char* type, const char* name)
|
||||
{
|
||||
try {
|
||||
return ConnectorCabinet::add(newWall(type, name));
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int wall_del(int i)
|
||||
{
|
||||
try {
|
||||
ConnectorCabinet::del(i);
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int wall_name(int i, int len, char* nbuf)
|
||||
{
|
||||
try {
|
||||
return static_cast<int>(
|
||||
copyString(ConnectorCabinet::at(i)->name(), nbuf, len));
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int wall_setName(int i, const char* name)
|
||||
{
|
||||
try {
|
||||
ConnectorCabinet::at(i)->setName(name);
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int wall_install(int i, int n, int m)
|
||||
{
|
||||
try {
|
||||
ConnectorCabinet::as<Wall>(i)->install(
|
||||
*ReactorCabinet::at(n), *ReactorCabinet::at(m));
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
double wall_expansionRate(int i)
|
||||
{
|
||||
try {
|
||||
@ -686,15 +574,6 @@ extern "C" {
|
||||
}
|
||||
}
|
||||
|
||||
int wall_ready(int i)
|
||||
{
|
||||
try {
|
||||
return int(ConnectorCabinet::as<Wall>(i)->ready());
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
// ReactorSurface
|
||||
|
||||
int reactorsurface_new(const char* name)
|
||||
|
Loading…
Reference in New Issue
Block a user