Extend Gas restart and interfaces
This commit is contained in:
@@ -48,6 +48,13 @@ int main(void)
|
||||
double gas_radius = 0.0;
|
||||
double gas_radius_rate = 0.0;
|
||||
double gas_dtcrit = 0.0;
|
||||
double gas_extended_mass = 0.0;
|
||||
double gas_momentum[3] = {0.0, 0.0, 0.0};
|
||||
double gas_density_range[2] = {0.0, 0.0};
|
||||
double gas_dt_limits[3] = {0.0, 0.0, 0.0};
|
||||
double gas_source_mass = 0.0;
|
||||
double gas_source_momentum[3] = {0.0, 0.0, 0.0};
|
||||
double gas_source_energy = 0.0;
|
||||
|
||||
if (SPHLITE_PHASE_SOLID != 4 || SPHLITE_PHASE_GAS != 2 ||
|
||||
SPHLITE_STATUS_ACTIVE != 0) {
|
||||
@@ -93,6 +100,14 @@ int main(void)
|
||||
if (sphlite_get_gas_dt_limits(NULL, &dt_accel, &gas_dtcrit) != -1) {
|
||||
return fail("null gas dt cfl pointer did not return -1");
|
||||
}
|
||||
if (sphlite_get_gas_extended_summary(NULL, gas_momentum,
|
||||
gas_density_range, gas_dt_limits) != -1) {
|
||||
return fail("null gas extended mass pointer did not return -1");
|
||||
}
|
||||
if (sphlite_get_gas_source_summary(&gas_source_mass, NULL,
|
||||
&gas_source_energy) != -1) {
|
||||
return fail("null gas source momentum pointer did not return -1");
|
||||
}
|
||||
if (sphlite_get_gas_summary(&gas_volume, gas_center, &gas_mean_pressure,
|
||||
&gas_max_pressure) != 2) {
|
||||
return fail("uninitialized gas summary did not return Fortran state error");
|
||||
@@ -213,6 +228,18 @@ int main(void)
|
||||
ierr = sphlite_get_gas_dt_limits(&dt_cfl, &dt_accel, &gas_dtcrit);
|
||||
if (ierr != 0) return fail("gas dt query failed");
|
||||
if (dt_cfl <= 0.0 || gas_dtcrit <= 0.0) return fail("gas dt content mismatch");
|
||||
ierr = sphlite_get_gas_extended_summary(&gas_extended_mass, gas_momentum,
|
||||
gas_density_range, gas_dt_limits);
|
||||
if (ierr != 0) return fail("gas extended summary query failed");
|
||||
if (gas_extended_mass <= 0.0 || gas_density_range[1] < gas_density_range[0]) {
|
||||
return fail("gas extended summary content mismatch");
|
||||
}
|
||||
ierr = sphlite_get_gas_source_summary(&gas_source_mass, gas_source_momentum,
|
||||
&gas_source_energy);
|
||||
if (ierr != 0) return fail("gas source summary query failed");
|
||||
if (gas_source_mass != 0.0 || gas_source_energy != 0.0) {
|
||||
return fail("gas source summary default mismatch");
|
||||
}
|
||||
ierr = sphlite_finalize();
|
||||
if (ierr != 0) return fail("finalize gas failed");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user