Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove magic number support for Func1 in clib #1741

Merged
merged 14 commits into from
Jul 31, 2024
Merged
23 changes: 2 additions & 21 deletions include/cantera/clib/ctfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,7 @@
extern "C" {
#endif

const int FourierFuncType = 1;
const int PolyFuncType = 2;
const int ArrheniusFuncType = 3;
const int GaussianFuncType = 4;
const int SumFuncType = 20;
const int DiffFuncType = 25;
const int ProdFuncType = 30;
const int RatioFuncType = 40;
const int PeriodicFuncType = 50;
const int CompositeFuncType = 60;
const int TimesConstantFuncType = 70;
const int PlusConstantFuncType = 80;
const int SinFuncType = 100;
const int CosFuncType = 102;
const int ExpFuncType = 104;
const int PowFuncType = 106;
const int ConstFuncType = 110;
const int TabulatedFuncType = 120;

CANTERA_CAPI int func_new(int type, size_t n, size_t lenp, const double* p);
CANTERA_CAPI int func_check(const char* type, size_t len, char* buf); //!< @since New in %Cantera 3.1
CANTERA_CAPI int func_new_basic(const char* type, double c);
CANTERA_CAPI int func_new_advanced(const char* type, size_t lenp, const double* p);
CANTERA_CAPI int func_new_compound(const char* type, int a, int b);
Expand All @@ -43,7 +24,7 @@ extern "C" {
CANTERA_CAPI double func_value(int i, double t);
CANTERA_CAPI int func_derivative(int i);
CANTERA_CAPI int func_duplicate(int i);
CANTERA_CAPI int func_write(int i, size_t lennm, const char* arg, char* nm);
CANTERA_CAPI int func_write(int i, const char* arg, size_t lennm, char* nm); //!< @since Changed signature in %Cantera 3.1
CANTERA_CAPI int ct_clearFunc();

#ifdef __cplusplus
Expand Down
3 changes: 1 addition & 2 deletions include/cantera/clib/ctonedim.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ extern "C" {
CANTERA_CAPI int ct_clearOneDim();
CANTERA_CAPI int domain_new(const char* type, int i, const char* id);
CANTERA_CAPI int domain_del(int i);
// @todo: reintroduce domain_type as synonym for domain_type3
CANTERA_CAPI int domain_type3(int i, size_t lennm, char* nm);
CANTERA_CAPI int domain_type(int i, size_t lennm, char* nm);
CANTERA_CAPI size_t domain_index(int i);
CANTERA_CAPI size_t domain_nComponents(int i);
CANTERA_CAPI size_t domain_nPoints(int i);
Expand Down
Loading
Loading