Prepare SPHLite 0.2.0 development baseline
This commit is contained in:
@@ -23,6 +23,30 @@ extern void SPHLITE_FC_sphft_get_current_time(
|
||||
double *time, int *step, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_get_particle_count(
|
||||
int *count, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_get_particle_state_capacity(
|
||||
int *count, int *ndim, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_get_particle_state(
|
||||
const int *max_particles,
|
||||
int *particle_id_ext,
|
||||
int *phase,
|
||||
int *status,
|
||||
int *material_id,
|
||||
int *section_id,
|
||||
double *x,
|
||||
double *v,
|
||||
double *a,
|
||||
double *rho,
|
||||
double *pressure,
|
||||
double *internal_energy,
|
||||
double *temperature,
|
||||
double *h,
|
||||
int *count,
|
||||
int *ierr);
|
||||
extern void SPHLITE_FC_sphft_set_output_directory_chars(
|
||||
const int *chars, const int *count, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_set_output_interval(const int *interval, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_write_output(const int *step, const double *time, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_get_input_warning_count(int *count, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_write_csv_chars(
|
||||
const int *chars, const int *count, int *ierr);
|
||||
extern void SPHLITE_FC_sphft_write_restart_chars(
|
||||
@@ -170,6 +194,68 @@ int sphlite_get_particle_count(int *count)
|
||||
return ierr;
|
||||
}
|
||||
|
||||
int sphlite_get_input_warning_count(int *count)
|
||||
{
|
||||
int ierr = 0;
|
||||
if (count == NULL) {
|
||||
return -1;
|
||||
}
|
||||
SPHLITE_FC_sphft_get_input_warning_count(count, &ierr);
|
||||
return ierr;
|
||||
}
|
||||
|
||||
int sphlite_set_output_directory(const char *path)
|
||||
{
|
||||
return sphlite_call_path(path, SPHLITE_FC_sphft_set_output_directory_chars);
|
||||
}
|
||||
|
||||
int sphlite_set_output_interval(int interval)
|
||||
{
|
||||
int ierr = 0;
|
||||
if (interval <= 0) {
|
||||
return -1;
|
||||
}
|
||||
SPHLITE_FC_sphft_set_output_interval(&interval, &ierr);
|
||||
return ierr;
|
||||
}
|
||||
|
||||
int sphlite_write_output(int step, double time)
|
||||
{
|
||||
int ierr = 0;
|
||||
SPHLITE_FC_sphft_write_output(&step, &time, &ierr);
|
||||
return ierr;
|
||||
}
|
||||
|
||||
int sphlite_get_particle_state(int max_particles,
|
||||
int *particle_id_ext,
|
||||
int *phase,
|
||||
int *status,
|
||||
int *material_id,
|
||||
int *section_id,
|
||||
double *x,
|
||||
double *v,
|
||||
double *a,
|
||||
double *rho,
|
||||
double *pressure,
|
||||
double *internal_energy,
|
||||
double *temperature,
|
||||
double *h,
|
||||
int *count)
|
||||
{
|
||||
int ierr = 0;
|
||||
if (max_particles <= 0 || particle_id_ext == NULL || phase == NULL ||
|
||||
status == NULL || material_id == NULL || section_id == NULL ||
|
||||
x == NULL || v == NULL || a == NULL || rho == NULL ||
|
||||
pressure == NULL || internal_energy == NULL || temperature == NULL ||
|
||||
h == NULL || count == NULL) {
|
||||
return -1;
|
||||
}
|
||||
SPHLITE_FC_sphft_get_particle_state(&max_particles, particle_id_ext, phase,
|
||||
status, material_id, section_id, x, v, a, rho, pressure,
|
||||
internal_energy, temperature, h, count, &ierr);
|
||||
return ierr;
|
||||
}
|
||||
|
||||
int sphlite_write_csv(const char *filename)
|
||||
{
|
||||
return sphlite_call_path(
|
||||
|
||||
Reference in New Issue
Block a user