48 lines
1.4 KiB
C
48 lines
1.4 KiB
C
#ifndef SPHLITE_C_API_H
|
|
#define SPHLITE_C_API_H
|
|
|
|
#ifdef _WIN32
|
|
# ifdef SPHLITE_BUILD_SHARED
|
|
# define SPHLITE_API __declspec(dllexport)
|
|
# else
|
|
# define SPHLITE_API
|
|
# endif
|
|
#else
|
|
# define SPHLITE_API
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define SPHLITE_PHASE_WATER 1
|
|
#define SPHLITE_PHASE_GAS 2
|
|
#define SPHLITE_PHASE_EXPLOSIVE 3
|
|
#define SPHLITE_PHASE_SOLID 4
|
|
#define SPHLITE_PHASE_SHELL 5
|
|
#define SPHLITE_PHASE_BOUNDARY 6
|
|
#define SPHLITE_PHASE_COUPLING 7
|
|
#define SPHLITE_PHASE_SOLID_FAILED 8
|
|
#define SPHLITE_PHASE_SHELL_FAILED 9
|
|
|
|
SPHLITE_API int sphlite_initialize(void);
|
|
SPHLITE_API int sphlite_finalize(void);
|
|
SPHLITE_API int sphlite_get_version(int *major, int *minor, int *patch);
|
|
SPHLITE_API int sphlite_get_last_error(int *code, char *message, int message_capacity);
|
|
SPHLITE_API int sphlite_read_inp(const char *filename);
|
|
SPHLITE_API int sphlite_build_model(void);
|
|
SPHLITE_API int sphlite_estimate_stable_dt(double *dtcrit);
|
|
SPHLITE_API int sphlite_advance_explicit(double dt);
|
|
SPHLITE_API int sphlite_run_explicit(void);
|
|
SPHLITE_API int sphlite_get_current_time(double *time, int *step);
|
|
SPHLITE_API int sphlite_get_particle_count(int *count);
|
|
SPHLITE_API int sphlite_write_csv(const char *filename);
|
|
SPHLITE_API int sphlite_write_restart(const char *filename);
|
|
SPHLITE_API int sphlite_read_restart(const char *filename);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|