33 lines
750 B
C++
33 lines
750 B
C++
|
|
#include "sphlite.hpp"
|
||
|
|
|
||
|
|
#include <cstdlib>
|
||
|
|
|
||
|
|
int main()
|
||
|
|
{
|
||
|
|
if (sphlite::PhaseSolid != SPHLITE_PHASE_SOLID ||
|
||
|
|
sphlite::StatusActive != SPHLITE_STATUS_ACTIVE) {
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
sphlite::Session session;
|
||
|
|
sphlite::Version version = sphlite::version();
|
||
|
|
if (version.major != 0 || version.minor != 1 || version.patch != 1) {
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
std::string input = std::string(SPHLITE_TEST_DATA_DIR) + "/minimal_particles_011.inp";
|
||
|
|
sphlite::read_inp(input);
|
||
|
|
sphlite::build_model();
|
||
|
|
if (sphlite::particle_count() != 4) {
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
sphlite::ParticleState state = sphlite::particle_state();
|
||
|
|
if (state.particle_id_ext.size() != 4 || state.phase[0] != sphlite::PhaseSolid) {
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
session.close();
|
||
|
|
return 0;
|
||
|
|
}
|