Skip to content

Commit

Permalink
[clib] Add bdry_setSpreadRate/bdry_spreadRate
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Mar 18, 2023
1 parent a502f30 commit 1dacf88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/cantera/clib/ctonedim.h
Expand Up @@ -40,8 +40,10 @@ extern "C" {

CANTERA_CAPI int bdry_setMdot(int i, double mdot);
CANTERA_CAPI int bdry_setTemperature(int i, double t);
CANTERA_CAPI int bdry_setSpreadRate(int i, double v);
CANTERA_CAPI int bdry_setMoleFractions(int i, const char* x);
CANTERA_CAPI double bdry_temperature(int i);
CANTERA_CAPI double bdry_spreadRate(int i);
CANTERA_CAPI double bdry_massFraction(int i, int k);
CANTERA_CAPI double bdry_mdot(int i);

Expand Down
19 changes: 19 additions & 0 deletions src/clib/ctonedim.cpp
Expand Up @@ -320,6 +320,16 @@ extern "C" {
}
}

int bdry_setSpreadRate(int i, double v)
{
try {
DomainCabinet::as<Boundary1D>(i)->setSpreadRate(v);
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}

int bdry_setMoleFractions(int i, const char* x)
{
try {
Expand All @@ -339,6 +349,15 @@ extern "C" {
}
}

double bdry_spreadRate(int i)
{
try {
return DomainCabinet::as<Boundary1D>(i)->spreadRate();
} catch (...) {
return handleAllExceptions(DERR, DERR);
}
}

double bdry_massFraction(int i, int k)
{
try {
Expand Down

0 comments on commit 1dacf88

Please sign in to comment.